From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 20 19:40:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8080106567C for ; Fri, 20 Jan 2012 19:40:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BCF9D8FC1F for ; Fri, 20 Jan 2012 19:40:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0KJeDCR030019 for ; Fri, 20 Jan 2012 19:40:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0KJeDTo030018; Fri, 20 Jan 2012 19:40:13 GMT (envelope-from gnats) Resent-Date: Fri, 20 Jan 2012 19:40:13 GMT Resent-Message-Id: <201201201940.q0KJeDTo030018@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Scheidell Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47989106564A for ; Fri, 20 Jan 2012 19:31:17 +0000 (UTC) (envelope-from scheidell@secnap.net) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [204.89.241.253]) by mx1.freebsd.org (Postfix) with ESMTP id F3E328FC0C for ; Fri, 20 Jan 2012 19:31:16 +0000 (UTC) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [10.70.1.253]) by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id 73A6A621C3B for ; Fri, 20 Jan 2012 14:31:16 -0500 (EST) Received: from scanner.secnap.net (unknown [10.70.1.4]) by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id D5BF5621C3A for ; Fri, 20 Jan 2012 14:31:14 -0500 (EST) Received: by scanner.secnap.net (Postfix, from userid 1001) id D071B1D3E3; Fri, 20 Jan 2012 14:31:14 -0500 (EST) Message-Id: <20120120193114.D071B1D3E3@scanner.secnap.net> Date: Fri, 20 Jan 2012 14:31:14 -0500 (EST) From: Michael Scheidell To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/164343: [PATCH] security/snort add SNORT_OPTIONS make.conf options. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 19:40:14 -0000 >Number: 164343 >Category: ports >Synopsis: [PATCH] security/snort add SNORT_OPTIONS make.conf options. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 20 19:40:13 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Michael Scheidell >Release: FreeBSD 7.4-RELEASE-p3 i386 >Organization: SECNAP Network Security Corp >Environment: 8.x amd64, 7.4 amd64 >Description: 1) Sometimes, you need to put conflicting options in make.conf, WITH_MYSQL for one port, WITHOUT_MYSQL for another. This takes code from mail/postfix, which had the same problem. It sets up the ability to automagically turn knobs via make.conf. This will work with make install/package (which pkgtools.conf doesn't), as well as package tools To make this work in make.conf, add a list of the conflicting knobs to make.conf: example SNORT_OPTIONS=MYSQL ZLIB PERFPROFILE This also works in tb/scripts/etc/env, but as: export SNORT_OPTIONS=MYSQL\ ZLIB\ PERFPROFILE 2) if you define NOPORTSDOCS=yes in env, or make.conf, install still installs: == Checking filesystem state after all packages deleted ================================================================ list of extra files and directories in / (not present on clean system but present after everything was deinstalled) 5555747 8 drwxr-xr-x 2 root wheel 512 Jan 20 15:42 usr/local/share/doc/snort 5555765 8 -r--r--r-- 1 root wheel 562 Jan 20 15:42 usr/local/share/doc/snort/README.u2boat I added a @${RM} in port Makefile, after spending an hour looking to try to patch ${WRKSRC}/tools/u2boat/Makefile* 3) RUN_DEPENDS should be RUN_DEPENDS:={$BUILD_DEPENDS}, makes portlint happy(er) >How-To-Repeat: 1) add WITH_MYSQL=yes to make.conf. build snort. pulls in mysql support, even if you really don't want it. 2) define NOPORTSDOCS=yes in make.conf, or env. install snort. see /usr/local/share/doc/snort/README.u2boat 3) portlint will complain if RUN_DEPENDS=${BUILD_DEPENDS}, so we (I think I did it), made duplicate entries. >Fix: - Adds ability to support conflicting options to make.conf. Common kernel options like WITH(OUT)_IP=V6 not touched. - These knobs .for o in MPLS GRE TARGETBASED DECODERPRE ZLIB PERFPROFILE MYSQL ODBC POSTGRESQL LRGPCAP - Bump PORTREVISION because of NOPORTSDOCS change - portlint, best practices for RUN_DEPENDS:= ${BUILD_DEPENDS} --- snort.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/snort/Makefile,v retrieving revision 1.144 diff -u -r1.144 Makefile --- Makefile 16 Dec 2011 14:45:39 -0000 1.144 +++ Makefile 20 Jan 2012 19:14:52 -0000 @@ -7,6 +7,7 @@ PORTNAME= snort PORTVERSION= 2.9.2 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF/snort/snort \ http://people.rit.edu/rpsfa/distfiles/ @@ -22,24 +23,35 @@ LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre BUILD_DEPENDS= daq>=0.6.2:${PORTSDIR}/net/daq \ ${LOCALBASE}/lib/libnet11/libnet.a:${PORTSDIR}/net/libnet -RUN_DEPENDS= daq>=0.6.2:${PORTSDIR}/net/daq \ - ${LOCALBASE}/lib/libnet11/libnet.a:${PORTSDIR}/net/libnet +RUN_DEPENDS:= ${BUILD_DEPENDS} + +# ported from postfix/Makefile, thanks +# back compat pull in settings from SNORT_OPTIONS for convenience when +# make config is run (happens first time port is built, too) +.for o in MPLS GRE TARGETBASED DECODERPRE ZLIB PERFPROFILE MYSQL ODBC POSTGRESQL LRGPCAP +STATUS_${o}=off +.endfor +.if defined(SNORT_OPTIONS) +. for o in ${SNORT_OPTIONS} +STATUS_${o}=on +. endfor +.endif OPTIONS= IPV6 "Enable IPv6 support" on \ - MPLS "Enable MPLS support" on \ - GRE "Enable GRE support" on \ + MPLS "Enable MPLS support" ${STATUS_MPLS} \ + GRE "Enable GRE support" ${STATUS_GRE} \ TARGETBASED "Enable Targetbased support" off \ DECODERPRE "Enable Decoded-Preprocessor-Rules" on \ - ZLIB "Enable GZIP support" on \ + ZLIB "Enable GZIP support" ${STATUS_ZLIB} \ NORMALIZER "Enable Normalizer" on \ REACT "Enable React" on \ - PERFPROFILE "Enable Performance Profiling" on \ + PERFPROFILE "Enable Performance Profiling" ${STATUS_PERFPROFILE} \ FLEXRESP3 "Flexible response to events (version 3)" on \ - MYSQL "Enable MySQL support" off \ - ODBC "Enable ODBC support" off \ - POSTGRESQL "Enable PostgreSQL support" off \ + MYSQL "Enable MySQL support" ${STATUS_MYSQL} \ + ODBC "Enable ODBC support" ${STATUS_ODBC} \ + POSTGRESQL "Enable PostgreSQL support" ${STATUS_POSTGRESQL} \ PRELUDE "Enable Prelude NIDS integration" off \ - LRGPCAP "Enable pcaps larger than 2GB" off \ + LRGPCAP "Enable pcaps larger than 2GB" ${STATUS_LRGPCAP} \ SNORTSAM "Unofficial Snortsam Patch" off \ SOURCEFIRE "Enable Sourcefire specific build options" on \ DBGSNORT "Enable debugging symbols+core dumps" off @@ -200,6 +212,7 @@ .endif .if defined(NOPORTDOCS) @${REINPLACE_CMD} '/SUBDIRS = /s/doc//' ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.am + @${REINPLACE_CMD} '/^dist_doc_DATA/s/=.*/=/' ${WRKSRC}/tools/u2boat/Makefile.am .endif pre-configure: @@ -236,6 +249,8 @@ .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} +.else + @${RM} -rf ${DOCSDIR} .endif .if defined(WITH_DECODERPRE) @${MKDIR} ${PREPROC_RULE_DIR} --- snort.patch ends here --- ______________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.spammertrap.com/ ______________________________________________________________________ >Release-Note: >Audit-Trail: >Unformatted: