summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc>2003-12-30 15:45:01 +0000
committeragc <agc>2003-12-30 15:45:01 +0000
commitdab00d6a4650112b02404d9d6c49d8e3df45ca9e (patch)
treeaffd45ce7b6b395c3d6caee58160dfd44ee70fd3
parentde2757b9ec98bbd741fd37c5fa4a493fdab10d1e (diff)
downloadpkgsrc-dab00d6a4650112b02404d9d6c49d8e3df45ca9e.tar.gz
Pullup more forgiving functionality to the pkgsrc-2003Q4 branch, and also
incorporate the patches for an audit-packages.conf file. Requested by Jeremy Reed. PatchSet 46 Date: 2003/12/03 04:58:01 Author: martti Log: Updated audit-packages to 1.26 Added support for audit-packages.conf. This file can be used to define environment variables (e.g. FETCH_ARGS). Members: Makefile:1.34->1.35 files/audit-packages.8:1.3->1.4 files/download-vulnerability-list:1.21->1.22 --------------------- PatchSet 47 Date: 2003/12/03 09:31:01 Author: wiz Log: Bump date for previous. Fix typo. Members: files/audit-packages.8:1.4->1.5 --------------------- PatchSet 48 Date: 2003/12/11 17:10:21 Author: agc Log: Update audit-packages to version 1.27. Difference from previous version (1.26): + if the vulnerability list is older than a week, just display a warning message - don't consider this a fatal error. Members: Makefile:1.35->1.36 files/audit-packages:1.14->1.15
-rw-r--r--security/audit-packages/Makefile5
-rwxr-xr-xsecurity/audit-packages/files/audit-packages4
-rw-r--r--security/audit-packages/files/audit-packages.819
-rw-r--r--security/audit-packages/files/download-vulnerability-list13
4 files changed, 31 insertions, 10 deletions
diff --git a/security/audit-packages/Makefile b/security/audit-packages/Makefile
index 554e7a289c8..d4f18f286cd 100644
--- a/security/audit-packages/Makefile
+++ b/security/audit-packages/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.34 2003/10/18 10:16:57 agc Exp $
+# $NetBSD: Makefile,v 1.34.2.1 2003/12/30 15:45:01 agc Exp $
-DISTNAME= audit-packages-1.25
+DISTNAME= audit-packages-1.27
WRKSRC= ${WRKDIR}
CATEGORIES= security pkgtools
MASTER_SITES= # empty
@@ -38,6 +38,7 @@ do-build:
-e 's|@MV@|${MV}|g' \
-e 's|@RM@|${RM}|g' \
-e 's|@MKDIR@|${MKDIR}|g' \
+ -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \
${FILESDIR}/$$f > ${WRKSRC}/$$f; \
done
${NROFF} ${WRKSRC}/audit-packages.8 >${WRKSRC}/audit-packages.0
diff --git a/security/audit-packages/files/audit-packages b/security/audit-packages/files/audit-packages
index 2709baff137..d6e2dfc0b42 100755
--- a/security/audit-packages/files/audit-packages
+++ b/security/audit-packages/files/audit-packages
@@ -1,6 +1,6 @@
#! @SH@
#
-# $NetBSD: audit-packages,v 1.14 2003/10/18 10:16:57 agc Exp $
+# $NetBSD: audit-packages,v 1.14.2.1 2003/12/30 15:45:01 agc Exp $
#
# Copyright (c) 2000-2003 Alistair Crooks. All rights reserved.
#
@@ -44,7 +44,7 @@ errmsg=""
case "$errmsg" in
"") # check for old vulnerabilities file
- [ -n "$(find $vuls -ctime +7)" ] && errmsg="** $vuls more than a week old"
+ [ -n "$(find $vuls -ctime +7)" ] && echo "*** WARNING - $vuls more than a week old, continuing..."
;;
esac
diff --git a/security/audit-packages/files/audit-packages.8 b/security/audit-packages/files/audit-packages.8
index dac6c8c4555..56c1b4e851f 100644
--- a/security/audit-packages/files/audit-packages.8
+++ b/security/audit-packages/files/audit-packages.8
@@ -1,5 +1,5 @@
-.\" $NetBSD: audit-packages.8,v 1.3 2003/09/16 14:50:47 grant Exp $
-.Dd September 16, 2003
+.\" $NetBSD: audit-packages.8,v 1.3.2.1 2003/12/30 15:45:01 agc Exp $
+.Dd December 3, 2003
.Os
.Dt AUDIT-PACKAGES 8
.Sh NAME
@@ -111,14 +111,22 @@ This can be changed by defining the environment variable
.Ev PKGVULNDIR
to the directory containing the vulnerabilities file.
.Sh ENVIRONMENT
+These variables can also be defined in the
+.Pa @PKG_SYSCONFDIR@/audit-packages.conf
+file.
+.Pp
.Bl -tag -width PKGVULNDIR
.It Ev PKGVULNDIR
Specifies the directory containing the
.Pa pkg-vulnerabilities
file.
+.It Ev FETCH_ARGS
+Specifies optional arguments for the ftp client.
.El
.Sh FILES
.Pa @PKGVULNDIR@/pkg-vulnerabilities
+.Pp
+.Pa @PKG_SYSCONFDIR@/audit-packages.conf
.\" .Sh EXAMPLES
.Sh EXAMPLES
The
@@ -136,6 +144,13 @@ can be run via
.Nx Ns 's
.Pa /etc/security.local
daily security script).
+.Pp
+The
+.Nm download-vulnerability-list
+command can be forced to use IPv4 with the following setting in
+.Pa @PKG_SYSCONFDIR@/audit-packages.conf :
+.Pp
+export FETCH_ARGS="-4"
.Sh SEE ALSO
.Xr pkg_info 1 ,
.Xr mk.conf 5 ,
diff --git a/security/audit-packages/files/download-vulnerability-list b/security/audit-packages/files/download-vulnerability-list
index aa1b0e752f5..1e8e1bc09e5 100644
--- a/security/audit-packages/files/download-vulnerability-list
+++ b/security/audit-packages/files/download-vulnerability-list
@@ -1,6 +1,6 @@
#! @SH@
-# $NetBSD: download-vulnerability-list,v 1.21 2003/10/18 10:16:57 agc Exp $
+# $NetBSD: download-vulnerability-list,v 1.21.2.1 2003/12/30 15:45:01 agc Exp $
#
# Copyright (c) 2000-2003 Alistair Crooks. All rights reserved.
#
@@ -44,12 +44,17 @@ VUL_SOURCE="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabiliti
NEW_VUL_LIST=pkg-vulnerabilities.$$
EXIST_VUL_LIST=pkg-vulnerabilities
+if [ -r @PKG_SYSCONFDIR@/audit-packages.conf ]; then
+ echo "Reading settings from @PKG_SYSCONFDIR@/audit-packages.conf"
+ . @PKG_SYSCONFDIR@/audit-packages.conf
+fi
+
cd ${PKGVULNDIR}
utility=`echo "@FETCH_CMD@" | @AWK@ '{ print $1 }'`
case "$utility" in
-*curl) @FETCH_CMD@ -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
-*ftp) @FETCH_CMD@ -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
-*wget) @FETCH_CMD@ -O ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
+*curl) @FETCH_CMD@ ${FETCH_ARGS} -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
+*ftp) @FETCH_CMD@ ${FETCH_ARGS} -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
+*wget) @FETCH_CMD@ ${FETCH_ARGS} -O ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
*) echo "Unknown fetch command - please use send-pr to send in support for your fetch command" 1>&2
exit 1
;;