pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Remove remaining compat code for old pkg_install ve...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c97d1c766294
branches:  trunk
changeset: 539878:c97d1c766294
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Mar 15 16:27:42 2008 +0000

description:
Remove remaining compat code for old pkg_install versions.

diffstat:

 mk/bsd.pkg.readme.mk     |   8 ++------
 mk/bulk/pre-build        |  20 +++++++-------------
 mk/bulk/sort-packages    |  13 ++-----------
 mk/bulk/upload           |  21 ++++++---------------
 mk/defaults/mk.conf      |  15 +--------------
 mk/scripts/genreadme.awk |  37 ++-----------------------------------
 mk/scripts/mkreadme      |  10 +++-------
 7 files changed, 23 insertions(+), 101 deletions(-)

diffs (249 lines):

diff -r fe3f9eb724dd -r c97d1c766294 mk/bsd.pkg.readme.mk
--- a/mk/bsd.pkg.readme.mk      Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/bsd.pkg.readme.mk      Sat Mar 15 16:27:42 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.readme.mk,v 1.18 2008/03/15 16:17:43 joerg Exp $
+# $NetBSD: bsd.pkg.readme.mk,v 1.19 2008/03/15 16:27:42 joerg Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and encapsulates the
 # code to produce README.html files in each package directory.
@@ -265,11 +265,7 @@
                esac;                                                   \
                cd ${.CURDIR} ;                                         \
        fi;                                                             \
-       if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${PKGTOOLS_VERSION}; then \
-               _PVDIR=${PKGVULNDIR};                                   \
-       else                                                            \
-               _PVDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`; \
-       fi; \
+       _PVDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`; \
        ${AWK} -f ../../mk/scripts/genreadme.awk \
                builddependsfile=/dev/null \
                dependsfile=/dev/null \
diff -r fe3f9eb724dd -r c97d1c766294 mk/bulk/pre-build
--- a/mk/bulk/pre-build Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/bulk/pre-build Sat Mar 15 16:27:42 2008 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: pre-build,v 1.71 2008/01/04 15:49:08 rillig Exp $
+# $NetBSD: pre-build,v 1.72 2008/03/15 16:27:43 joerg Exp $
 #
 # Clean up system to be ready for bulk pkg build
 #
@@ -74,20 +74,14 @@
 _INFO_VER=`${PKG_INFO} -V`;
 echo "pre-build> Making sure vulnerability-list is upto date:"
 if [ -z "$UPDATE_VULNERABILITY_LIST" -o "$UPDATE_VULNERABILITY_LIST" = yes ]; then
-       if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER}; then
-       ( cd "${USR_PKGSRC}/security/audit-packages" \
-         && ${BMAKE} bulk-install \
-         && env PKGVULNDIR="${DISTDIR}" download-vulnerability-list )
-       else
-               _PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
-               download-vulnerability-list ${DOWNLOAD_VULNERABILITY_LIST_FLAGS}
-               if [ "x${_PKGVULNDIR}" != "x${DISTDIR}" ]; then
-                       cp ${_PKGVULNDIR}/pkg-vulnerabilities ${DISTDIR}
-               fi
+       _PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
+       download-vulnerability-list ${DOWNLOAD_VULNERABILITY_LIST_FLAGS}
+       if [ "x${_PKGVULNDIR}" != "x${DISTDIR}" ]; then
+               cp ${_PKGVULNDIR}/pkg-vulnerabilities ${DISTDIR}
        fi
-       echo 'pre-build> done.'
+       echo 'pre-build> done.'
 else
-       echo 'pre-build> (skipped)'
+       echo 'pre-build> (skipped)'
 fi
 
 # On non-NetBSD platforms we need to keep the bootstrap-files!
diff -r fe3f9eb724dd -r c97d1c766294 mk/bulk/sort-packages
--- a/mk/bulk/sort-packages     Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/bulk/sort-packages     Sat Mar 15 16:27:42 2008 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: sort-packages,v 1.11 2007/10/09 19:19:13 martti Exp $
+# $NetBSD: sort-packages,v 1.12 2008/03/15 16:27:43 joerg Exp $
 
 # This program scans all binary packages in the current directory and
 # creates three lists of files in OUTDIR:
@@ -69,16 +69,7 @@
                pkg_prefix="${pkg%%-*}"
                category="regular"
                _INFO_VER=`${PKG_INFO} -V`;
-               if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER}; then
-                       # XXX: The egrep command is only needed here because
-                       # audit-packages before pkg_install-20070714 is so
-                       # awfully slow.
-                       if egrep "^({.*${pkg_prefix}.*}|${pkg_prefix}|{.*}${pkg_prefix})" ${PKGVULNDIR}/pkg-vulnerabilities >/dev/null 4>&1; then
-                               vuln=`${AUDIT_PACKAGES} -p "${pkg}"`
-                       fi
-               else
-                       vuln=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -p "${pkg}"`
-               fi
+               vuln=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -p "${pkg}"`
                if [ -n "${vuln}" ]; then
                        category="vulnerable"
                fi
diff -r fe3f9eb724dd -r c97d1c766294 mk/bulk/upload
--- a/mk/bulk/upload    Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/bulk/upload    Sat Mar 15 16:27:42 2008 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: upload,v 1.42 2008/01/04 15:49:08 rillig Exp $
+# $NetBSD: upload,v 1.43 2008/03/15 16:27:43 joerg Exp $
 
 #
 # Upload non-restricted binary pkgs to ftp server
@@ -150,11 +150,7 @@
 SHA1="digest sha1";
 
 _INFO_VER=`${PKG_INFO} -V`;
-if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER}; then
-       REQUIRED_PACKAGES="pkgtools/lintpkgsrc net/rsync security/audit-packages"
-else
-       REQUIRED_PACKAGES="pkgtools/lintpkgsrc net/rsync"
-fi
+REQUIRED_PACKAGES="pkgtools/lintpkgsrc net/rsync"
 
 opsys=`uname -s`
 case "$opsys" in
@@ -243,15 +239,10 @@
 echo "upload> Making sure vulnerability-list is up-to-date:"
 if [ -z "$UPDATE_VULNERABILITY_LIST" -o "$UPDATE_VULNERABILITY_LIST" = "yes" ]
 then
-       if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER}
-       then
-               env PKGVULNDIR=${distdir} download-vulnerability-list
-       else
-               _PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
-               download-vulnerability-list ${DOWNLOAD_VULNERABILITY_LIST_FLAGS}
-               if [ "x${_PKGVULNDIR}" != "x${distdir}" ]; then
-                       cp ${_PKGVULNDIR}/pkg-vulnerabilities ${distdir}
-               fi
+       _PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
+       download-vulnerability-list ${DOWNLOAD_VULNERABILITY_LIST_FLAGS}
+       if [ "x${_PKGVULNDIR}" != "x${distdir}" ]; then
+               cp ${_PKGVULNDIR}/pkg-vulnerabilities ${distdir}
        fi
        echo "        done."
 else
diff -r fe3f9eb724dd -r c97d1c766294 mk/defaults/mk.conf
--- a/mk/defaults/mk.conf       Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/defaults/mk.conf       Sat Mar 15 16:27:42 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.171 2008/01/16 03:16:40 tnn Exp $
+# $NetBSD: mk.conf,v 1.172 2008/03/15 16:27:43 joerg Exp $
 #
 
 # This file provides default values for variables that may be overridden
@@ -21,8 +21,6 @@
 #AUDIT_PACKAGES_FLAGS=
 # List of flags passed to audit-packages(1).
 #
-# NOTE: If you have pkg_install<20070714 then this variable is not referenced.
-#
 # Possible: -e, -s, etc. See audit-packages(1)
 # Default: (no option)
 
@@ -397,17 +395,6 @@
 # Possible: any path you like
 # Default: /usr/pkgsrc/packages
 
-PKGVULNDIR?=   ${DISTDIR}
-# Specifies where the `vulnerabilities' file is located.  This variable
-# is used by the audit-packages program and by pkgsrc itself to do security
-# checks before building/installing programs.
-#
-# NOTE: If you have pkg_install>=20070714 then this variable is not referenced.
-# See audit-packages.conf(5)
-#
-# Possible: any path you like
-# Default: /usr/pkgsrc/distfiles
-
 #PASSIVE_FETCH=
 # Use ftp(1) in passive mode, for use behind filtering firewalls.
 # (Set by default in ftp(1) in NetBSD-current)
diff -r fe3f9eb724dd -r c97d1c766294 mk/scripts/genreadme.awk
--- a/mk/scripts/genreadme.awk  Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/scripts/genreadme.awk  Sat Mar 15 16:27:42 2008 +0000
@@ -1,5 +1,5 @@
 #!/usr/bin/awk -f
-# $NetBSD: genreadme.awk,v 1.30 2008/01/03 20:51:22 adrianp Exp $
+# $NetBSD: genreadme.awk,v 1.31 2008/03/15 16:27:43 joerg Exp $
 #
 # Copyright (c) 2002, 2003, 2005, 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -372,45 +372,12 @@
                        if (debug) printf("wrote = %d entries to \"%s\"\n",
                                          i-1, htmldeps_file);
 
-# XXX: The code for the pkg_install<20070714 vulnerability checks are
-# XXX: broken.  It will not find vulnerabilities in any packages that
-# XXX: have complex names in the pkg-vulnerabilties file.
-# XXX: e.g. php{4,5}-perl and sun-{jdk,jre}15
 # XXX: Post pkg_install-20070714 only currently known vulnerabilities are
 # XXX: shown in the generated README.html files for packages.
 
                        vul = "";
-                       if (have_vfile && PKGTOOLS_VERSION < 20070714) {
-                               i = 1;
-                               pkgbase = pkgdir2name[toppkg];
-                               gsub(/-[^-]*$/, "", pkgbase);
-                               if (debug) {
-                                 printf("Checking for %s (%s) vulnerabilities\n",
-                                        toppkg, pkgbase);
-                               }
-                               while(i in vulpkg) {
-                                       if (vulpkg[i] ~ "^" pkgbase"[-<>=]+[0-9]") {
-                                               nm = vulpkg[i];
-                                               gsub(/&/, "\\\\\\&amp;", nm);
-                                               gsub(/</, "\\\\\\&lt;", nm);
-                                               gsub(/>/, "\\\\\\&gt;", nm);
-                                               url = vulref[i];
-                                               gsub(/&/, "\\\\\\&", url);
-                                               printurl = vulref[i];
-                                               gsub(/&/, "\\\\\\&amp;", printurl);
-                                               gsub(/</, "\\\\\\&lt;", printurl);
-                                               gsub(/>/, "\\\\\\&gt;", printurl);
-                                               vul =  sprintf("%s<LI><STRONG>%s has a <a href=\"%s\">%s</a> vulnerability</STRONG></LI>\n",
-                                                         vul, nm, url, vultype[i]);
-                                       }
-                                       i = i + 1;
-                               }
-                               if ( vul == "" ){
-                                       vul="<I>(no vulnerabilities known)</I>";
-                               }
-                       }
 
-                       if (have_vfile && PKGTOOLS_VERSION >= 20070714) {
+                       if (have_vfile) {
                                pkg = pkgdir2name[toppkg];
 
                                if (debug) {
diff -r fe3f9eb724dd -r c97d1c766294 mk/scripts/mkreadme
--- a/mk/scripts/mkreadme       Sat Mar 15 16:17:43 2008 +0000
+++ b/mk/scripts/mkreadme       Sat Mar 15 16:27:42 2008 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkreadme,v 1.21 2008/01/03 20:51:22 adrianp Exp $
+# $NetBSD: mkreadme,v 1.22 2008/03/15 16:27:43 joerg Exp $
 #
 # Script for README.html generation
 #
@@ -307,13 +307,9 @@
 # populated until this stage (see above)
 #
 if [ "$pv" = "default" ]; then
-    if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${PKGTOOLS_VERSION}; then
-       PVDIR=`${BMAKE} show-var VARNAME=PKGVULNDIR`
-    else
-       PVDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
-    fi
+    PVDIR=`${AUDIT_PACKAGES} ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR`
 fi
-       echo "---->  PVDIR=\"${PVDIR}\""
+echo "---->  PVDIR=\"${PVDIR}\""
 
 
 ######################################################################



Home | Main Index | Thread Index | Old Index