Subject: Re: Review wanted: bulk builds & vulnerabilities list [patch]
To: Dieter Baron <dillo@danbala.ifoer.tuwien.ac.at>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 03/20/2005 23:43:31
On Sun, 20 Mar 2005, Dieter Baron wrote:
>  I think it should use build-install, so it uses a binary package if
> available and up to date.  Also, maybe it should be moved to pre-build
> so it is skipped when restarting a bulk build.

Right... here's an update that has a good chance to work (after the 
previous patch's formatting was messed up).

Any other comments? I'd like to commit this before 2005Q1 gets cut.


  - Hubert

Index: mk/bulk/pre-build
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/pre-build,v
retrieving revision 1.44
diff -u -r1.44 pre-build
--- mk/bulk/pre-build	19 Jan 2005 20:58:01 -0000	1.44
+++ mk/bulk/pre-build	20 Mar 2005 22:41:54 -0000
@@ -53,6 +53,18 @@

  LOCALBASE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=LOCALBASE )`;
  X11BASE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=X11BASE )`;
+DISTDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=DISTDIR )`;
+
+# Make sure the pkg-vulnerabilities file is up to date
+echo "Making sure vulnerability-list is upto date:"
+if [ -z "$UPDATE_VULNERABILITY_LIST" -o "$UPDATE_VULNERABILITY_LIST" = yes ]; then
+       ( cd ${USR_PKGSRC}/security/audit-packages                       \
+         && ${BMAKE} bulk-install                                       \
+         && env PKGVULNDIR=${DISTDIR} download-vulnerability-list )
+       echo 'done.'
+else
+       echo '(skipped)'
+fi

  # On non-NetBSD platforms we need to keep the bootstrap-files!
  if [ x"$BMAKE" = x"bmake" ]; then
@@ -173,7 +185,6 @@
  #
  # Remove old/broken distfiles and binary packages
  #
-DISTDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=DISTDIR )`;
  PACKAGES=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=PACKAGES )`;

  case "$LINTPKGSRC_CACHE$PRUNEDISTFILES$PRUNEPACKAGES" in

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)