From owner-freebsd-ports@FreeBSD.ORG Sat Dec 19 08:13:19 2009 Return-Path: Delivered-To: FreeBSD-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97005106566B for ; Sat, 19 Dec 2009 08:13:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4B08FC0C for ; Sat, 19 Dec 2009 08:13:18 +0000 (UTC) Received: (qmail 25573 invoked by uid 399); 19 Dec 2009 08:13:18 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 19 Dec 2009 08:13:18 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B2C8B22.5040206@FreeBSD.org> Date: Sat, 19 Dec 2009 00:13:22 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Paul Schmehl References: <200912180551.nBI5pHS9070032@anthesphoria.net> <89630D83B6FFCFDE388CABE9@utd65257.utdallas.edu> <4B2C0BEF.1000507@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------000802090608010508040207" Cc: pauls@utdallas.edu, Freebsd Ports , portmgr@freebsd.org Subject: Re: Need help with a port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2009 08:13:19 -0000 This is a multi-part message in MIME format. --------------000802090608010508040207 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've looked at your port, and FWIW I don't see anything wrong with your suggested fix. I have attached a patch with some small tweaks to what you proposed, as well as some changes to the rc.d script. Regarding the latter: 1. A $FreeBSD$ cvs id is effectively mandatory 2. We prefer that local scripts REQUIRE: LOGIN unless there is a good reason to run before it 3. Duplicating the documentation in the rc.d script is not desirable. 4. The s#%%RC_SUBR%%#/etc/rc.subr# change will happen soon to all ports anyway 5. load_rc_config is supposed to come AFTER rcvar 6. I added a required_files for the conf file, since it is included in command_args 7. It is not necessary or desirable to include $name_flags in command_args. Please test this version of the port. If you're satisfied with the changes I will commit it for you. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ --------------000802090608010508040207 Content-Type: text/plain; name="barnyard2-diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="barnyard2-diff" Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/barnyard2/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 9 Sep 2009 01:42:43 -0000 1.1 +++ Makefile 19 Dec 2009 08:07:18 -0000 @@ -6,7 +6,7 @@ # PORTNAME= barnyard2 -PORTVERSION= 1.6 +PORTVERSION= 1.7 CATEGORIES= security MASTER_SITES= http://www.securixlive.com/download/barnyard2/ @@ -39,8 +39,10 @@ CONFIGURE_ARGS+= --with-postgresql .endif -post-install: +post-patch: + ${CHMOD} 755 ${WRKSRC}/install-sh +post-install: .for f in barnyard2.conf ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample [ -f ${PREFIX}/etc/${f} ] || \ @@ -48,7 +50,6 @@ .endfor .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} -# cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif Index: distinfo =================================================================== RCS file: /home/pcvs/ports/security/barnyard2/distinfo,v retrieving revision 1.1 diff -u -r1.1 distinfo --- distinfo 9 Sep 2009 01:42:43 -0000 1.1 +++ distinfo 19 Dec 2009 08:07:18 -0000 @@ -1,3 +1,3 @@ -MD5 (barnyard2-1.6.tar.gz) = fe49fae09f585677af7dda53f3f4bedf -SHA256 (barnyard2-1.6.tar.gz) = c8b9b58d48b420634c502d27f21cbdaf42df0205abeb2970f9ee7e114744433b -SIZE (barnyard2-1.6.tar.gz) = 631471 +MD5 (barnyard2-1.7.tar.gz) = 6801649c45287799354e0a458af737ef +SHA256 (barnyard2-1.7.tar.gz) = a9bd56c2887111f3c114e82fc9277ee759a5005374081136e76d950ff390fd1b +SIZE (barnyard2-1.7.tar.gz) = 652605 Index: files/barnyard2.sh.in =================================================================== RCS file: /home/pcvs/ports/security/barnyard2/files/barnyard2.sh.in,v retrieving revision 1.1 diff -u -r1.1 barnyard2.sh.in --- files/barnyard2.sh.in 9 Sep 2009 01:42:44 -0000 1.1 +++ files/barnyard2.sh.in 19 Dec 2009 08:07:18 -0000 @@ -1,9 +1,9 @@ #!/bin/sh # +# $FreeBSD$ # PROVIDE: barnyard2 -# REQUIRE: DAEMON -# BEFORE: LOGIN +# REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable barnyard2: @@ -13,59 +13,20 @@ # Default: -D # barnyard2_conf (str): Barnyard configuration file # Default: %%PREFIX%%/etc/barnyard2.conf -# -# USAGE: barnyard2 [-options] -# -# General Options: -# -? Show this information -# -c Use configuration file -# -g Run barnyard gid as group (or gid) after initialization -# -m Set umask = -# -q Quiet. Don't show banner and status report -# -u Run barnyard uid as user (or uid) after initialization -# -v Be verbose -# -C Read the classification map from -# -D Run barnyard in background (daemon) mode -# -G Read the gen-msg map from -# -L Write output files in -# -R Read the reference map from -# -S Read the sid-msg map from -# -T Test and report on the current configuration -# -U Use UTC for timestamps -# -V Show version and exit -# -# Continual Processing Options: -# -a Archive processed files to -# -f Use as the base filename pattern -# -d Spool files from -# -n Only process new events -# -w Enable bookmarking using -# -# Batch Processing Mode Options: -# -o Enable batch processing mode -# -# Longname options and their corresponding single char version -# --reference Same as -R -# --classification Same as -C -# --gen-msg Same as -G -# --sid-msg Same as -S -# --pid-path Specify the path for the barnyard PID file -# --create-pidfile Create PID file, even when not in Daemon mode -# --nolock-pidfile Do not try to lock barnyard PID file -# --help Same as -? -# --version Same as -V -. %%RC_SUBR%% +. /etc/rc.subr -name="barnyard2" -load_rc_config $name +name=barnyard2 rcvar=`set_rcvar` -# set some defaults + +load_rc_config $name : ${barnyard2_enable="NO"} : ${barnyard2_conf="%%PREFIX%%/etc/barnyard2.conf"} : ${barnyard2_flags="-D"} +required_files="${barnyard2_conf}" + command="%%PREFIX%%/bin/barnyard2" -command_args="-c ${barnyard2_conf} ${barnyard2_flags}" +command_args="-c ${barnyard2_conf}" run_rc_command "$1" Index: files/pkg-message.in =================================================================== RCS file: /home/pcvs/ports/security/barnyard2/files/pkg-message.in,v retrieving revision 1.2 diff -u -r1.2 pkg-message.in --- files/pkg-message.in 4 Nov 2009 07:42:59 -0000 1.2 +++ files/pkg-message.in 19 Dec 2009 08:07:18 -0000 @@ -1,16 +1,3 @@ -************************************************************************ -**************************WARNING****WARNING**************************** -**************************WARNING****WARNING**************************** - -This version of barnyard2 does not correctly parse the waldo file. As a -result, each time barnyard2 is restarted, all alerts remaining in the -snort log directory will be reinserted into the database. If this is a -a problem for you, consider using security/barnyard2-devel, which has -resolved this problem. - -**************************WARNING****WARNING**************************** -**************************WARNING****WARNING**************************** - Read the notes in the barnyard2.conf file for how to configure %%PREFIX%%/etc/barnyard2.conf after installation. For addtional information see the Securixlive FAQ at http://www.securixlive.com/barnyard2/faq.php. --------------000802090608010508040207--