diff options
author | sketch <sketch> | 2008-11-19 16:27:14 +0000 |
---|---|---|
committer | sketch <sketch> | 2008-11-19 16:27:14 +0000 |
commit | a771f0b1fc8a8b24ac7c3eb05ebe9b0c826e853b (patch) | |
tree | acac1868af3b264510b8d5a514e23bd6586bc7dd /mk/bulk | |
parent | f8ba61732ae019276851d183b96faf9fa52830f8 (diff) | |
download | pkgsrc-a771f0b1fc8a8b24ac7c3eb05ebe9b0c826e853b.tar.gz |
Make the bulk scripts which use 'set -eu' actually work.
Diffstat (limited to 'mk/bulk')
-rw-r--r-- | mk/bulk/build.conf-example | 7 | ||||
-rw-r--r-- | mk/bulk/upload | 18 |
2 files changed, 19 insertions, 6 deletions
diff --git a/mk/bulk/build.conf-example b/mk/bulk/build.conf-example index 42c777bea5c..fb0be9ca478 100644 --- a/mk/bulk/build.conf-example +++ b/mk/bulk/build.conf-example @@ -1,4 +1,4 @@ -# $NetBSD: build.conf-example,v 1.37 2007/03/06 10:57:11 rillig Exp $ +# $NetBSD: build.conf-example,v 1.38 2008/11/19 16:27:14 sketch Exp $ # # This is an example configuration file for pkgsrc bulk builds. # Actually it's a shell script that is sourced in by the pre-build, @@ -79,6 +79,11 @@ REPORT_TXT_FILE="report.txt" # Uploading binary packages # +# Optional flags, however these variables must be left defined (even if empty) to +# satisfy 'set -eu' in bulk scripts. +AUDIT_PACKAGES_FLAGS= +DOWNLOAD_VULNERABILITY_LIST_FLAGS= + # Update vulnerability database before uploading. # Can be set to 'yes' or 'no'. UPDATE_VULNERABILITY_LIST=yes diff --git a/mk/bulk/upload b/mk/bulk/upload index 476794f0c98..f71d774ccb3 100644 --- a/mk/bulk/upload +++ b/mk/bulk/upload @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: upload,v 1.43 2008/03/15 16:27:43 joerg Exp $ +# $NetBSD: upload,v 1.44 2008/11/19 16:27:14 sketch Exp $ # # Upload non-restricted binary pkgs to ftp server @@ -164,7 +164,11 @@ IRIX*) BMAKE=bmake; CKSUM="cksum"; SYSVSUM="sum"; ;; -*) BMAKE=bmake ;; +*) BMAKE=bmake; + BSDSUM=""; + CKSUM=""; + SYSVSUM=""; + ;; esac export BMAKE @@ -230,6 +234,7 @@ packages=`cd pkgtools/lintpkgsrc ; ${BMAKE} show-var VARNAME=PACKAGES` distdir=`cd pkgtools/lintpkgsrc ; ${BMAKE} show-var VARNAME=DISTDIR` gzip_cmd=`cd pkgtools/lintpkgsrc; ${BMAKE} show-var VARNAME=GZIP_CMD USE_TOOLS=gzip` pkg_info=`cd pkgtools/lintpkgsrc && ${BMAKE} show-var VARNAME=PKG_INFO` +shell=`cd pkgtools/lintpkgsrc && ${BMAKE} show-var VARNAME=TOOLS_PLATFORM.sh` # Pull in some pkgs needed for pkg in ${REQUIRED_PACKAGES}; do @@ -269,7 +274,10 @@ failed=no cd $packages echo "upload> Checking for restricted and vulnerable packages" -(cd All && env PKG_INFO="${pkg_info}" OUTDIR="${TMP}" PKGVULNDIR="${distdir}" sh "${pkgsrcdir}/mk/bulk/sort-packages") +(cd All && env PKG_INFO="${pkg_info}" OUTDIR="${TMP}" PKGVULNDIR="${distdir}" \ + AUDIT_PACKAGES_FLAGS="${AUDIT_PACKAGES_FLAGS}" \ + DOWNLOAD_VULNERABILITY_LIST_FLAGS="${DOWNLOAD_VULNERABILITY_LIST_FLAGS}" \ + ${shell} "${pkgsrcdir}/mk/bulk/sort-packages") # Add the name of the package file, including all its symlinks to the # list of files to be uploaded. @@ -343,7 +351,7 @@ chmod +x "$upload_general" if [ "$do_upload" = "yes" ]; then echo "upload> Uploading non-vulnerable packages" - sh "$upload_general" \ + ${shell} "$upload_general" \ || { echo "upload> ERROR: rsync failed. To retry later, you can run $upload_general" 1>&2 failed=yes @@ -363,7 +371,7 @@ chmod +x "$upload_vulnerable" if [ "$do_upload" = "yes" ]; then echo "upload> Uploading vulnerable packages" - sh "$upload_vulnerable" \ + ${shell} "$upload_vulnerable" \ || { echo "upload> ERROR: rsync failed. To retry later, you can run $upload_vulnerable" 1>&2 failed=yes |