Subject: Re: pkg/28230: bsd.pkg.mk ignores /etc/audit-packages.conf
To: None <agc@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: pkgsrc-bugs
Date: 03/23/2005 21:16:01
The following reply was made to PR pkg/28230; it has been noted by GNATS.

From: Alistair Crooks <agc@pkgsrc.org>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: "Julio M. Merino Vidal" <jmmv@menta.net>, gnats-bugs@netbsd.org
Subject: Re: pkg/28230: bsd.pkg.mk ignores /etc/audit-packages.conf
Date: Wed, 23 Mar 2005 21:14:29 +0000

 --envbJBWh7q8WU6mo
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Wed, Nov 17, 2004 at 08:15:40PM +0100, Hauke Fath wrote:
 > Julio M. Merino Vidal wrote
 > 
 > [Note that I saw this only by chance / because of the duplicate of this
 > bug; you left me off the Cc: list.]
 > 
 > > How does the patch below look?  (I've put the chunk of code just before the
 > > check-vulnerable target, but I'm not sure that's the best place...)
 > [...]
 > 
 > Works for me (although I must admit it looks a bit clumsy to me).
 
 Thanks to Julio - I wonder if the attached patch is any more
 aesthetically pleasing?
 
 Works for me, although my setup is depressingly standard.
 
 Thanks,
 Alistair
 
 --envbJBWh7q8WU6mo
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="check-vul.diff"
 
 Index: bsd.pkg.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
 retrieving revision 1.1603
 diff -u -r1.1603 bsd.pkg.mk
 --- bsd.pkg.mk	22 Mar 2005 22:49:15 -0000	1.1603
 +++ bsd.pkg.mk	23 Mar 2005 21:06:24 -0000
 @@ -1417,7 +1417,12 @@
  # Please do not modify the leading "@" here
  .PHONY: check-vulnerable
  check-vulnerable:
 -	@if [ -f ${PKGVULNDIR}/pkg-vulnerabilities ]; then		\
 +	@if [ "X${PKG_SYSCONFDIR.audit-packages}" != "X" -a -f ${PKG_SYSCONFDIR.audit-packages}/audit-packages.conf ]; then \
 +		. ${PKG_SYSCONFDIR.audit-packages}/audit-packages.conf; \
 +	elif [ "X${PKG_SYSCONFDIR}" != "X" -a -f ${PKG_SYSCONFDIR}/audit-packages.conf ]; then \
 +		. ${PKG_SYSCONFDIR}/audit-packages.conf;		\
 +	fi;								\
 +	if [ -f $${PKGVULNDIR}/pkg-vulnerabilities ]; then		\
  		${SETENV} PKGNAME="${PKGNAME}"				\
  			  PKGBASE="${PKGBASE}"				\
  			${AWK} '/^$$/ { next }				\
 
 --envbJBWh7q8WU6mo--