summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.readme.mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2008-04-18 14:26:36 +0000
committerjoerg <joerg@pkgsrc.org>2008-04-18 14:26:36 +0000
commit45efa7e875b1e32049c383cb822238d9eb308926 (patch)
tree45173f7247afdbad40928c6389756c3703e7ca05 /mk/bsd.pkg.readme.mk
parentcc29e3896e0da93fee1abf55a2d6079f8c1f535f (diff)
downloadpkgsrc-45efa7e875b1e32049c383cb822238d9eb308926.tar.gz
Change the code generation README.html to use the new
"pkg_admin audit-history" command to print the full list of vulnerabilities and use further pkg_admin pmatch logic to mark them as fixed or still open. For pkg_install versions before 20080415, skip the vulnerability processing. Discussed with: dmcmahill
Diffstat (limited to 'mk/bsd.pkg.readme.mk')
-rw-r--r--mk/bsd.pkg.readme.mk32
1 files changed, 13 insertions, 19 deletions
diff --git a/mk/bsd.pkg.readme.mk b/mk/bsd.pkg.readme.mk
index 1a56ccfddc1..25b0e038473 100644
--- a/mk/bsd.pkg.readme.mk
+++ b/mk/bsd.pkg.readme.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.readme.mk,v 1.19 2008/03/15 16:27:42 joerg Exp $
+# $NetBSD: bsd.pkg.readme.mk,v 1.20 2008/04/18 14:26:36 joerg Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and encapsulates the
# code to produce README.html files in each package directory.
@@ -230,21 +230,6 @@ SED_HOMEPAGE_EXPR= -e 's|%%HOMEPAGE%%|<p>This package has a home page at <a HREF
SED_HOMEPAGE_EXPR= -e 's|%%HOMEPAGE%%||'
.endif
-.PHONY: show-vulnerabilities-html
-show-vulnerabilities-html:
- ${RUN} \
- _PKGVULNDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`; \
- if [ -f $$_PKGVULNDIR/pkg-vulnerabilities ]; then \
- ${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -n ${PKGNAME} 2>&1| ${AWK} \
- '{ printurl = $$8; \
- gsub("\<", "\\&lt;", $$2); \
- gsub("\>", "\\&gt;", $$2); \
- gsub("\<", "\\&lt;", printurl); \
- gsub("\>", "\\&gt;", printurl); \
- gsub("\&", "\\&amp;", printurl); \
- printf("<LI><STRONG>%s has a %s exploit (see <a href=\"%s\">%s</a> for more details)</STRONG></LI>\n", $$2, $$5, $$8, printurl) }'; \
- fi
-
# If PACKAGES is set to the default (../../packages), the current
# ${MACHINE_ARCH} and "release" (uname -r) will be used. Otherwise a directory
# structure of ...pkgsrc/packages/`uname -r`/${MACHINE_ARCH} is assumed.
@@ -265,22 +250,31 @@ README.html: .PRECIOUS
esac; \
cd ${.CURDIR} ; \
fi; \
- _PVDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`; \
+ if [ `${PKG_ADMIN} -V` -lt 20080415 ]; then \
+ SCAN_VULNERABILITIES=0; \
+ else \
+ _PVDIR=`${PKG_ADMIN} config-var PKGVULNDIR`; \
+ if [ -e "$${_PVDIR}"/pkg-vulnerabilities ]; then \
+ SCAN_VULNERABILITIES=2; \
+ else \
+ SCAN_VULNERABILITIES=1; \
+ fi; \
+ fi; \
${AWK} -f ../../mk/scripts/genreadme.awk \
builddependsfile=/dev/null \
dependsfile=/dev/null \
- AUDIT_PACKAGES=${AUDIT_PACKAGES:Q} \
AWK=${AWK:Q} \
CMP=${CMP:Q} \
DISTDIR=${DISTDIR:Q} \
GREP=${GREP:Q} \
PACKAGES=${PACKAGES:Q} \
+ PKG_ADMIN=${PKG_ADMIN:Q} \
PKG_INFO=${PKG_INFO:Q} \
PKG_SUFX=${PKG_SUFX:Q} \
PKG_URL=${PKG_URL:Q} \
PKGSRCDIR=${.CURDIR:C|/[^/]*/[^/]*$||:Q} \
- PVDIR=$$_PVDIR \
PKGTOOLS_VERSION=${PKGTOOLS_VERSION} \
+ SCAN_VULNERABILITIES=$${SCAN_VULNERABILITIES} \
SED=${SED:Q} \
SETENV=${SETENV:Q} \
SORT=${SORT:Q} \