From owner-svn-ports-head@FreeBSD.ORG Wed May 14 01:36:47 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A45A1D73; Wed, 14 May 2014 01:36:47 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22B552643; Wed, 14 May 2014 01:36:47 +0000 (UTC) Received: from [192.168.2.1] (dhcp-108-170-169-12.cable.user.start.ca [108.170.169.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by apnoea.adamw.org (Postfix) with ESMTPSA id 61AFC11F812; Tue, 13 May 2014 21:36:40 -0400 (EDT) From: "Adam Weinberger" To: "Mark Felder" Subject: Re: svn commit: r353977 - head/security/py-fail2ban Date: Tue, 13 May 2014 21:36:38 -0400 Message-ID: <805981A4-2E52-4C2A-B2B8-B751D484279A@adamw.org> In-Reply-To: <5CC317FA-F4BD-40C4-ACD8-04AB16902C4A@FreeBSD.org> References: <201405131830.s4DIUNGm023128@svn.freebsd.org> <5CC317FA-F4BD-40C4-ACD8-04AB16902C4A@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.8r4214) Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, Adam Weinberger , ports-committers@FreeBSD.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 01:36:47 -0000 On 13 May 2014, at 17:12, Mark Felder wrote: > On May 13, 2014, at 13:30, Adam Weinberger wrote: > >> >> post-install: >> - @${MKDIR} ${STAGEDIR}${FAIL2BAN_DBDIR} >> + @${MKDIR} ${STAGEDIR}${FAIL2BAN_DBDIR} ${STAGEDIR}/var/run/fail2ban >> @${MKDIR} ${STAGEDIR}${DOCSDIR} >> (cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) >> .for file in fail2ban-client fail2ban-regex fail2ban-server fail2ban >> > > > Pkg ignores items in ${STAGEDIR}/var (and probably all of base), so > this won't actually make it into a package. In fact, since the > creation of the stage dir it won't even make it if installed from a > port (as a package is created before being installed). Anything you > need created for the port to run that must exist in base such as > /var/run/, /var/db/, /var/log/, etc should be handled in the rc script > start_precmd so it gets created if necessary just before the daemon is > launched. > > Just drop something in like > > start_precmd=fail2ban_prestart > > fail2ban_prestart() > { > for i in run db; do > if [ ! -d /var/${i}/fail2ban ]; then > install -d -o fail2ban /dev/null /var/${i}/fail2ban > fi > done > } > > (or more verbose, but two actions -- mkdir and then chown) > > and then you can remove those MKDIRs in post-install That part about pkg ignoring /var doesn't seem right... The .keep_me files in /var/run/fail2ban and /var/db/fail2ban are installed by pkg, as expected. Putting the stuff into the rc script seems like a good idea, but I'm missing where the current version isn't working. # Adam -- Adam Weinberger adamw@adamw.org http://www.adamw.org