summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukem <lukem@pkgsrc.org>2002-04-26 12:45:23 +0000
committerlukem <lukem@pkgsrc.org>2002-04-26 12:45:23 +0000
commit7780aa8486523ef16339a1af15d4aa102932420a (patch)
tree5b22cc6424c3c26c2379dad47600624ab12c778c
parentaa3515d6140dfd4352bafecfb6dddd5b33ba8400 (diff)
downloadpkgsrc-7780aa8486523ef16339a1af15d4aa102932420a.tar.gz
Store vulnerabilities file in ${PKGVULNDIR} instead of ${DISTDIR}, in case
the latter is not appropriate. The former defaults to the latter. Bump version to 1.12. Per discussion with Alistair Crooks.
-rw-r--r--security/audit-packages/Makefile8
-rwxr-xr-xsecurity/audit-packages/files/audit-packages12
-rw-r--r--security/audit-packages/files/download-vulnerability-list12
3 files changed, 17 insertions, 15 deletions
diff --git a/security/audit-packages/Makefile b/security/audit-packages/Makefile
index 38b0e6b5dad..c2da56e3b0e 100644
--- a/security/audit-packages/Makefile
+++ b/security/audit-packages/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.14 2002/02/06 13:05:48 agc Exp $
+# $NetBSD: Makefile,v 1.15 2002/04/26 12:45:23 lukem Exp $
-DISTNAME= audit-packages-1.11
+DISTNAME= audit-packages-1.12
CATEGORIES= security pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -13,9 +13,11 @@ NO_CHECKSUM= yes
NO_BUILD= yes
NO_MTREE= yes
+PKGVULNDIR?= ${DISTDIR}
+
do-configure:
@for f in audit-packages download-vulnerability-list; do \
- ${SED} -e 's|\$${DISTDIR}|${DISTDIR}|g' \
+ ${SED} -e 's|\$${PKGVULNDIR}|${PKGVULNDIR}|g' \
-e 's|\$${AWK}|${AWK}|g' \
-e 's|\$${FETCH_CMD}|${FETCH_CMD}|g' \
-e 's|\$${PKG_TOOLS_BIN}|${PKG_TOOLS_BIN}|g' \
diff --git a/security/audit-packages/files/audit-packages b/security/audit-packages/files/audit-packages
index 6d8794e4018..7a536914505 100755
--- a/security/audit-packages/files/audit-packages
+++ b/security/audit-packages/files/audit-packages
@@ -1,15 +1,15 @@
#! ${SH}
-# $NetBSD: audit-packages,v 1.7 2001/12/29 10:07:31 agc Exp $
+# $NetBSD: audit-packages,v 1.8 2002/04/26 12:45:24 lukem Exp $
-if [ ! -f ${DISTDIR}/vulnerabilities ] ;then
- echo "** Missing ${DISTDIR}/vulnerabilities" 1>&2
+if [ ! -f ${PKGVULNDIR}/vulnerabilities ] ;then
+ echo "** Missing ${PKGVULNDIR}/vulnerabilities" 1>&2
echo "** run download-vulnerability-list" 1>&2
exit 1
fi
-if [ -n "$(find ${DISTDIR}/vulnerabilities -ctime +7)" ]
+if [ -n "$(find ${PKGVULNDIR}/vulnerabilities -ctime +7)" ]
then
- echo "** ${DISTDIR}/vulnerabilities more than a week old" 1>&2
+ echo "** ${PKGVULNDIR}/vulnerabilities more than a week old" 1>&2
echo "** run download-vulnerability-list" 1>&2
exit 1
fi
@@ -19,6 +19,6 @@ ${AWK} '
NF == 0 { next }
{ cmd = sprintf("${PKG_TOOLS_BIN}/pkg_info -qe \"%s\" && echo Package \"`${PKG_TOOLS_BIN}/pkg_info -e '\''%s\'\''`\" has a %s vulnerability, see %s", $1, $1, $2, $3);
system(cmd); }
-' ${DISTDIR}/vulnerabilities
+' ${PKGVULNDIR}/vulnerabilities
exit 0
diff --git a/security/audit-packages/files/download-vulnerability-list b/security/audit-packages/files/download-vulnerability-list
index 78b64df8a1d..88daea584cf 100644
--- a/security/audit-packages/files/download-vulnerability-list
+++ b/security/audit-packages/files/download-vulnerability-list
@@ -1,14 +1,14 @@
#! ${SH}
-# $NetBSD: download-vulnerability-list,v 1.10 2001/12/17 18:08:21 wiz Exp $
+# $NetBSD: download-vulnerability-list,v 1.11 2002/04/26 12:45:24 lukem Exp $
-if [ ! -e ${DISTDIR} ]; then
- echo "Creating ${DISTDIR}"
- /bin/mkdir -p ${DISTDIR} || (echo "Can't create ${DISTDIR}" 1>&2; exit 1)
+if [ ! -e ${PKGVULNDIR} ]; then
+ echo "Creating ${PKGVULNDIR}"
+ /bin/mkdir -p ${PKGVULNDIR} || (echo "Can't create ${PKGVULNDIR}" 1>&2; exit 1)
fi
VUL_SOURCE="ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/vulnerabilities"
-NEW_VUL_LIST=${DISTDIR}/vulnerabilities.$$
-EXIST_VUL_LIST=${DISTDIR}/vulnerabilities
+NEW_VUL_LIST=${PKGVULNDIR}/vulnerabilities.$$
+EXIST_VUL_LIST=${PKGVULNDIR}/vulnerabilities
${FETCH_CMD} -o ${NEW_VUL_LIST} ${VUL_SOURCE}
existsize=0