pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Fix for PR 28230 (bsd.pkg.mk ignores /etc/audit-pac...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2d05b39d71ee
branches:  trunk
changeset: 491897:2d05b39d71ee
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Mar 31 21:02:28 2005 +0000

description:
Fix for PR 28230 (bsd.pkg.mk ignores /etc/audit-packages.conf) by
sourcing any config file, if it's defined.  With thanks to Julio M.
Merino Vidal for the first pass at a fix, and for keeping me honest
and up-to-date with variable checks in portable shell constructs.

diffstat:

 mk/bsd.pkg.mk |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r d20e7e8d6f83 -r 2d05b39d71ee mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Thu Mar 31 20:59:47 2005 +0000
+++ b/mk/bsd.pkg.mk     Thu Mar 31 21:02:28 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1605 2005/03/29 08:17:42 garbled Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1606 2005/03/31 21:02:28 agc Exp $
 #
 # This file is in the public domain.
 #
@@ -1405,7 +1405,12 @@
 # Please do not modify the leading "@" here
 .PHONY: check-vulnerable
 check-vulnerable:
-       @if [ -f ${PKGVULNDIR}/pkg-vulnerabilities ]; then              \
+       @if [ ! -z "${PKG_SYSCONFDIR.audit-packages}" -a -f ${PKG_SYSCONFDIR.audit-packages}/audit-packages.conf ]; then \
+               . ${PKG_SYSCONFDIR.audit-packages}/audit-packages.conf; \
+       elif [ ! -z "${PKG_SYSCONFDIR}" -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 }                          \



Home | Main Index | Thread Index | Old Index