diff options
Diffstat (limited to 'pkgtools/pbulk')
-rw-r--r-- | pkgtools/pbulk/Makefile | 10 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/pbulk.conf | 12 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/presolve/presolve.c | 17 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/build | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/build-client-start | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/client-clean | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pkg-build | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pre-build | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/report | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/scan | 23 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/scan-client-start | 8 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/upload | 8 |
15 files changed, 127 insertions, 23 deletions
diff --git a/pkgtools/pbulk/Makefile b/pkgtools/pbulk/Makefile index 3fe901d9e8e..68d68904f36 100644 --- a/pkgtools/pbulk/Makefile +++ b/pkgtools/pbulk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.45 2008/09/14 18:59:02 joerg Exp $ +# $NetBSD: Makefile,v 1.46 2008/09/16 18:21:30 joerg Exp $ DISTNAME= pbulk-0.34 CATEGORIES= pkgtools @@ -44,12 +44,14 @@ SUBST_FILES.tools= pbulk.conf scripts/build scripts/build-client-start \ scripts/create-report-html.awk scripts/create-report-txt.awk \ scripts/create-report.awk SUBST_VARS.tools= AWK BZIP2 CHOWN DIGEST GZIP_CMD IDENT MAIL_CMD NEATO \ - PBULK_CONFIG PKG_ADD_CMD PKG_DELETE_CMD \ - PKG_INFO_CMD PREFIX SED SH TAR TARGET_MAKE + PBULK_CONFIG PBULK_CONFIG_VERSION PKG_ADD_CMD \ + PKG_DELETE_CMD PKG_INFO_CMD PREFIX SED SH TAR \ + TARGET_MAKE CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf -PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf +PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf +PBULK_CONFIG_VERSION= 0.34 INSTALLATION_DIRS= bin libexec/pbulk \ ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 \ diff --git a/pkgtools/pbulk/files/pbulk/pbulk.conf b/pkgtools/pbulk/files/pbulk/pbulk.conf index cbb50c84a34..1c065357c99 100644 --- a/pkgtools/pbulk/files/pbulk/pbulk.conf +++ b/pkgtools/pbulk/files/pbulk/pbulk.conf @@ -1,4 +1,9 @@ -# $NetBSD: pbulk.conf,v 1.14 2008/02/03 21:20:46 tnn Exp $ +# $NetBSD: pbulk.conf,v 1.15 2008/09/16 18:21:30 joerg Exp $ + +# Version of the configuration file. This is bumped whenver the default +# config changes to notify the administrator about updates. +# +config_version=@PBULK_CONFIG_VERSION@ # The URL where the build report will be made available. This is only # used in the .txt version of the report. @@ -36,6 +41,11 @@ bootstrapkit=/usr/pkgsrc/bootstrap/bootstrap.tar.gz # The file is a newline separated list of package locations (e.g. lang/perl5). #limited_list=/limited_list +# Optionally ignore unresolvable dependencies for a full build (e.g. +# a build without limited_list set). Default behavior is to bail out. +# +ignore_missing_dependencies=no + report_graph_script_limit=512 # Account used for user-destdir builds. This account should have diff --git a/pkgtools/pbulk/files/pbulk/presolve/presolve.c b/pkgtools/pbulk/files/pbulk/presolve/presolve.c index 2cdb9daf4f2..aff23a39b17 100644 --- a/pkgtools/pbulk/files/pbulk/presolve/presolve.c +++ b/pkgtools/pbulk/files/pbulk/presolve/presolve.c @@ -1,4 +1,4 @@ -/* $NetBSD: presolve.c,v 1.3 2007/07/20 19:39:34 joerg Exp $ */ +/* $NetBSD: presolve.c,v 1.4 2008/09/16 18:21:30 joerg Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -46,13 +46,13 @@ #include "pbulk.h" -static int verbosity; +static int partial, verbosity; static FILE *incremental = NULL; static void usage(void) { - (void)fprintf(stderr, "usage: pbulk-resolve [ -i <missing> ] [ -v ] <pscan output> [ ... ]\n"); + (void)fprintf(stderr, "usage: pbulk-resolve [ -pv ] [ -i <missing> ] <pscan output> [ ... ]\n"); exit(1); } @@ -63,6 +63,7 @@ struct pkg_entry { char *depends; char *pkglocation; int active; + int broken; /* Entry has missing dependencies */ const char *begin; const char *end; SLIST_ENTRY(pkg_entry) hash_link; @@ -86,7 +87,7 @@ main(int argc, char **argv) setprogname("pbulk-resolve"); - while ((ch = getopt(argc, argv, "i:v")) != -1) { + while ((ch = getopt(argc, argv, "i:pv")) != -1) { switch (ch) { case 'i': if (incremental != NULL) @@ -94,6 +95,9 @@ main(int argc, char **argv) if ((incremental = fopen(optarg, "w")) == NULL) err(1, "Cannot open output file"); break; + case 'p': + ++partial; + break; case 'v': ++verbosity; break; @@ -108,6 +112,9 @@ main(int argc, char **argv) if (argc == 0 || (incremental == NULL && argc > 1)) usage(); + if (partial && incremental != NULL) + usage(); + read_entries(argv[0], 1); while (--argc > 0) read_entries(*++argv, 0); @@ -301,7 +308,7 @@ resolve_entry(struct pkg_entry *pkg) if (ret == 1) { free(pkg->depends); pkg->depends = NULL; - if (incremental != NULL) + if (incremental != NULL || partial) return 0; else return 1; diff --git a/pkgtools/pbulk/files/pbulk/scripts/build b/pkgtools/pbulk/files/pbulk/scripts/build index afc094caa8e..1ed9a70cb72 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/build +++ b/pkgtools/pbulk/files/pbulk/scripts/build @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: build,v 1.4 2008/01/26 23:44:08 joerg Exp $ +# $NetBSD: build,v 1.5 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + echo "Building..." case "${master_mode}" in [nN][oO]) diff --git a/pkgtools/pbulk/files/pbulk/scripts/build-client-start b/pkgtools/pbulk/files/pbulk/scripts/build-client-start index 3cb3fe62c4e..1e916b7e83b 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/build-client-start +++ b/pkgtools/pbulk/files/pbulk/scripts/build-client-start @@ -1,10 +1,16 @@ #!@SH@ -# $NetBSD: build-client-start,v 1.1.1.1 2007/06/19 19:49:59 joerg Exp $ +# $NetBSD: build-client-start,v 1.2 2008/09/16 18:21:30 joerg Exp $ . @PBULK_CONFIG@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + for client in ${build_clients}; do ssh $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" & done diff --git a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild index 27f6e71a106..33ac0f39eb1 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild +++ b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild @@ -1,10 +1,16 @@ #!@SH@ -# $NetBSD: bulkbuild-rebuild,v 1.2 2008/06/20 11:51:50 joerg Exp $ +# $NetBSD: bulkbuild-rebuild,v 1.3 2008/09/16 18:21:30 joerg Exp $ . @PBULK_CONFIG@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + check_pkg() { if @AWK@ '{ if ($0 == "PKGNAME='$1'") exit 1 }' < ${loc}/presolve; then echo "Package $1 not found, aborting." diff --git a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart index 3b114d03d54..b5d09c29eb6 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart +++ b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart @@ -1,10 +1,16 @@ #!@SH@ -# $NetBSD: bulkbuild-restart,v 1.1 2008/04/04 17:58:59 joerg Exp $ +# $NetBSD: bulkbuild-restart,v 1.2 2008/09/16 18:21:30 joerg Exp $ . @PBULK_CONFIG@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + check_list() { while read pkg do diff --git a/pkgtools/pbulk/files/pbulk/scripts/client-clean b/pkgtools/pbulk/files/pbulk/scripts/client-clean index f1c85a15d87..e94312dc3be 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/client-clean +++ b/pkgtools/pbulk/files/pbulk/scripts/client-clean @@ -1,10 +1,16 @@ #!@SH@ -# $NetBSD: client-clean,v 1.8 2008/01/26 23:44:08 joerg Exp $ +# $NetBSD: client-clean,v 1.9 2008/09/16 18:21:30 joerg Exp $ . @PBULK_CONFIG@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + if [ "$cross_compile" != "no" ]; then cur_destdir=${target_destdir} else diff --git a/pkgtools/pbulk/files/pbulk/scripts/pkg-build b/pkgtools/pbulk/files/pbulk/scripts/pkg-build index 2350def97e9..5489e215d3a 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pkg-build +++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-build @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: pkg-build,v 1.16 2008/07/14 13:02:00 joerg Exp $ +# $NetBSD: pkg-build,v 1.17 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007, 2008 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -32,6 +32,12 @@ . @PBULK_CONFIG@ +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + cleanup() { if [ "$keep_wrkdir" = yes ]; then ${make} pbulk-save-wrkdir INTO=${bulklog}/${pkgname}/wrkdir.tar.gz diff --git a/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date b/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date index 372227b9011..31c90c8906f 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date +++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: pkg-up-to-date,v 1.2 2008/01/26 23:44:09 joerg Exp $ +# $NetBSD: pkg-up-to-date,v 1.3 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + pkg="${packages}/All/$1.tgz" [ -f ${pkg} ] diff --git a/pkgtools/pbulk/files/pbulk/scripts/pre-build b/pkgtools/pbulk/files/pbulk/scripts/pre-build index ce605efd5c9..9c9b1370345 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pre-build +++ b/pkgtools/pbulk/files/pbulk/scripts/pre-build @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: pre-build,v 1.8 2008/01/30 15:01:04 joerg Exp $ +# $NetBSD: pre-build,v 1.9 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + if [ "$cross_compile" != "no" ]; then if [ -z "${target_destdir}" ]; then echo "target_destdir must be set for cross-compiling." diff --git a/pkgtools/pbulk/files/pbulk/scripts/report b/pkgtools/pbulk/files/pbulk/scripts/report index 0247551ae43..e207018ae89 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/report +++ b/pkgtools/pbulk/files/pbulk/scripts/report @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: report,v 1.7 2008/01/15 21:43:32 joerg Exp $ +# $NetBSD: report,v 1.8 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + echo "Build reports..." ${report_script} ${loc} ${bzip2} -zc ${loc}/report > ${loc}/report.bz2 diff --git a/pkgtools/pbulk/files/pbulk/scripts/scan b/pkgtools/pbulk/files/pbulk/scripts/scan index 589750d1df5..3707314bb98 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/scan +++ b/pkgtools/pbulk/files/pbulk/scripts/scan @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: scan,v 1.3 2008/06/20 11:51:50 joerg Exp $ +# $NetBSD: scan,v 1.4 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + if [ -z "${limited_list}" ]; then echo "Scanning..." case "${master_mode}" in @@ -49,7 +55,20 @@ if [ -z "${limited_list}" ]; then ;; esac echo "Resolving..." - ${presolve} -v ${loc}/pscan > ${loc}/presolve 2> ${loc}/presolve.log + if ! ${presolve} -v ${loc}/pscan > ${loc}/presolve 2> ${loc}/presolve-err.log; then + echo "Global dependency resolution failed, check ${loc}/presolve-err.log for details" >&2 + case "${ignore_missing_dependencies}" in + [nN][oO]) + exit 1 + ;; + [yY][eE][sS]) + ${presolve} -p -v ${loc}/pscan > ${loc}/presolve 2> /dev/null + ;; + *) + echo "Unsupported value for ignore_missing_dependencies." + ;; + esac + fi else initial=1 mkdir -p ${loc} diff --git a/pkgtools/pbulk/files/pbulk/scripts/scan-client-start b/pkgtools/pbulk/files/pbulk/scripts/scan-client-start index d9057f14882..2db99d6517b 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/scan-client-start +++ b/pkgtools/pbulk/files/pbulk/scripts/scan-client-start @@ -1,10 +1,16 @@ #!@SH@ -# $NetBSD: scan-client-start,v 1.1.1.1 2007/06/19 19:49:59 joerg Exp $ +# $NetBSD: scan-client-start,v 1.2 2008/09/16 18:21:30 joerg Exp $ . @PBULK_CONFIG@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + for client in ${scan_clients}; do ssh $client "${pscan_prepare} && ${pscan} -c ${master_port_scan} -M ${make} ${pkgsrc}" & done diff --git a/pkgtools/pbulk/files/pbulk/scripts/upload b/pkgtools/pbulk/files/pbulk/scripts/upload index 8e76e5e74aa..6b212d6ad8a 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/upload +++ b/pkgtools/pbulk/files/pbulk/scripts/upload @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: upload,v 1.2 2008/01/15 21:43:32 joerg Exp $ +# $NetBSD: upload,v 1.3 2008/09/16 18:21:30 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -34,6 +34,12 @@ set -e +if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then + echo "Your configuration has version ${config_version}." + echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@." + exit 1 +fi + echo "Uploading packages..." cd ${packages} { |