? security/snort/options ? security/snort/rep ? security/snort/work Index: Mk/bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.426 diff -u -r1.426 bsd.port.mk --- Mk/bsd.port.mk 2 Oct 2002 07:18:17 -0000 1.426 +++ Mk/bsd.port.mk 6 Oct 2002 20:16:59 -0000 @@ -519,6 +519,8 @@ # PATCH_DEBUG - If set, print out more information about the patches as # it attempts to apply them. # PKG_DBDIR - Where package installation is recorded (default: /var/db/pkg) +# PORT_DBDIR - Where port configuration options are recorded +# (default: /var/db/port) # NO_PKG_REGISTER - Don't register a port installation as a package. # FORCE_PKG_REGISTER - If set, it will overwrite any existing package # registration information in ${PKG_DBDIR}/${PKGNAME}. @@ -555,6 +557,7 @@ CP?= /bin/cp CUT?= /usr/bin/cut DC?= /usr/bin/dc +DIALOG?= /usr/bin/dialog EGREP?= /usr/bin/egrep EXPR?= /bin/expr FALSE?= false # Shell builtin @@ -653,6 +656,17 @@ .include "${MASTERDIR}/Makefile.local" .endif +# where 'make config' records user configuration options +PORT_DBDIR?= /var/db/port + +OPTIONSFILE?=${PORT_DBDIR}/${PORTNAME}/options +.if exists(${OPTIONSFILE}) +.include "${OPTIONSFILE}" +.endif +.if exists(${OPTIONSFILE}.local) +.include "${OPTIONSFILE}.local" +.endif + .if !defined(PORTNAME) || !defined(PORTVERSION) || defined(PKGNAME) .BEGIN: @${ECHO_CMD} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME." @@ -2520,7 +2534,11 @@ # Please note that the order of the following targets is important, and # should not be modified. -_FETCH_SEQ= pre-everything fetch-depends pre-fetch pre-fetch-script \ +_FETCH_SEQ= pre-everything +.if defined(OPTIONS) && !exists(${OPTIONSFILE}) +_FETCH_SEQ+= config +.endif +_FETCH_SEQ+= fetch-depends pre-fetch pre-fetch-script \ do-fetch post-fetch post-fetch-script _EXTRACT_DEP= fetch _EXTRACT_SEQ= extract-message checksum build-depends lib-depends \ @@ -3501,6 +3519,84 @@ OSVERSION="${OSVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ PORTOBJFORMAT="${PORTOBJFORMAT:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ SYSTEMVERSION="${SYSTEMVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" +.endif + +.if !target(config) +config: +.if !defined(OPTIONS) + @${ECHO_MSG} "==> No options to configure" +.else + @(${MKDIR} ${PORT_DBDIR}/${PORTNAME} 2> /dev/null) || \ + (${ECHO_MSG} "==> Cannot create ${PORT_DBDIR}/${PORTNAME}, check permissions"; exit 1) + -@if [ -e ${OPTIONSFILE} ]; then \ + . ${OPTIONSFILE}; \ + fi; \ + set ${OPTIONS} XXX; \ + while [ $$# -gt 3 ]; do \ + OPTIONSLIST="$${OPTIONSLIST} $$1"; \ + defaultval=$$3; \ + withvar=WITH_$$1; \ + withoutvar=WITHOUT_$$1; \ + withval=$$(eval echo $$\{$${withvar}\}); \ + withoutval=$$(eval echo $$\{$${withoutvar}\}); \ + echo $${withval}; \ + if [ ! -z "$${withval}" ]; then \ + val=on; \ + elif [ ! -z "$${withoutval}" ]; then \ + val=off; \ + else \ + val=$$3; \ + fi; \ + DEFOPTIONS="$${DEFOPTIONS} $$1 \"$$2\" $${val}"; \ + shift 3; \ + done; \ + TMPOPTIONSFILE=$$(mktemp -t portoptions); \ + trap "rm -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ + ${SH} -c "${DIALOG} --checklist \"Options for ${PORTNAME} ${PORTVERSION}\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \ + status=$$?; \ + if [ $${status} -ne 0 ] ; then \ + ${RM} -f $${TMPOPTIONSFILE}; \ + ${ECHO_MSG} "==> Options unchanged"; \ + exit 0; \ + fi; \ + SELOPTIONS=$$(cat $${TMPOPTIONSFILE}); \ + ${RM} -f $${TMPOPTIONSFILE}; \ + ${ECHO_CMD} "# This file is auto-generated by 'make config'. No user-servicable parts" > ${OPTIONSFILE}; \ + ${ECHO_CMD} "# inside!" >> ${OPTIONSFILE}; \ + for i in $${OPTIONSLIST}; do \ + ${ECHO_CMD} $${SELOPTIONS} | grep -qw $${i}; \ + if [ $$? -eq 0 ]; then \ + ${ECHO_CMD} WITH_$${i}=true >> ${OPTIONSFILE}; \ + else \ + ${ECHO_CMD} WITHOUT_$${i}=true >> ${OPTIONSFILE}; \ + fi; \ + done +.elif defined(PACKAGE_BUILDING) || defined(BATCH) +.endif +.endif + +.if !target(showconfig) +showconfig: +.if exists(${OPTIONSFILE}) + @${ECHO_MSG} "==> The following configuration options are set for ${PORTNAME}"; \ + ${GREP} -v ^# ${OPTIONSFILE} +.else + @${ECHO_MSG} "==> No configuration options are set for this port" +.if defined(OPTIONS) + @${ECHO_MSG} " Use 'make config' to set default values" +.endif +.endif +.endif + +.if !target(rmconfig) +rmconfig: +.if exists(${OPTIONSFILE}) + -@${ECHO_MSG} "==> Removing user-configured options for ${PORTNAME}"; \ + ${RM} -f ${OPTIONSFILE}; \ + ${RMDIR} ${PORT_DBDIR}/${PORTNAME} +.else + @${ECHO_MSG} "==> No user-specified options configured for ${PORTNAME}" +.endif .endif .endif Index: security/gnupg/Makefile =================================================================== RCS file: /home/ncvs/ports/security/gnupg/Makefile,v retrieving revision 1.46 diff -u -r1.46 Makefile --- security/gnupg/Makefile 1 Aug 2002 16:22:34 -0000 1.46 +++ security/gnupg/Makefile 6 Oct 2002 20:16:59 -0000 @@ -29,6 +29,15 @@ .include .if defined(WITH_LIBICONV) || exists(${PREFIX}/lib/libiconv.so) +HAS_ICONV= on +.else +HAS_ICONV= off +.endif + +OPTIONS= LIBICONV "Support for libiconv" ${HAS_ICONV} \ + SUID_GPG "Make gpg binary setuid root" off + +.if defined(WITH_LIBICONV) && !defined(WITHOUT_LIBICONV) LIB_DEPENDS+= iconv.3:${PORTSDIR}/converters/libiconv .endif Index: security/snort/Makefile =================================================================== RCS file: /home/ncvs/ports/security/snort/Makefile,v retrieving revision 1.30 diff -u -r1.30 Makefile --- security/snort/Makefile 6 Oct 2002 09:48:09 -0000 1.30 +++ security/snort/Makefile 6 Oct 2002 20:16:59 -0000 @@ -16,6 +16,13 @@ CONFIGURE_ARGS= --with-mysql=no --with-odbc=no --with-postgresql=no MAN8= snort.8 +OPTIONS= FLEXRESP "Flexible response to events" off\ + MYSQL "Mysql logging" off \ + ODBC "ODBC logging" off \ + POSTGRES "Postgresql logging" off + +.include + .if defined(WITH_FLEXRESP) BUILD_DEPENDS+= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet CONFIGURE_ARGS+=--enable-flexresp @@ -85,4 +92,4 @@ ${PREFIX}/etc/snort.conf; \ fi -.include +.include