diff options
author | joerg <joerg@pkgsrc.org> | 2015-09-08 17:35:06 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-09-08 17:35:06 +0000 |
commit | e07cd46c383dfb75eaca3ec5640398031108af74 (patch) | |
tree | 790b69c0ed6ed1c4b028801569bc67a70112477e /pkgtools/pbulk | |
parent | d289a0ec34442c42806cbef53645c6535928dfef (diff) | |
download | pkgsrc-e07cd46c383dfb75eaca3ec5640398031108af74.tar.gz |
pbulk-0.55: Add option for running the checksum phase unprivileged. This
makes it easy to use DISTDIR=${WRKDIR}/.distfiles or so. Not the default
as it changes the required permissions on ${DISTDIR}.
Diffstat (limited to 'pkgtools/pbulk')
-rw-r--r-- | pkgtools/pbulk/Makefile | 6 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/pbulk.conf | 6 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pkg-build | 10 |
3 files changed, 16 insertions, 6 deletions
diff --git a/pkgtools/pbulk/Makefile b/pkgtools/pbulk/Makefile index 081cc29e6f3..aa3f5946752 100644 --- a/pkgtools/pbulk/Makefile +++ b/pkgtools/pbulk/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.70 2015/06/07 22:49:04 joerg Exp $ +# $NetBSD: Makefile,v 1.71 2015/09/08 17:35:06 joerg Exp $ -PKGNAME= pbulk-0.54 +PKGNAME= pbulk-0.55 COMMENT= Modular bulk build framework .include "../../pkgtools/pbulk/Makefile.common" @@ -39,7 +39,7 @@ SUBST_VARS.tools= AWK BZIP2 CHOWN DIGEST GZIP_CMD ID MAIL_CMD NEATO \ CONF_FILES+= share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf PBULK_CONFIG= ${PKG_SYSCONFDIR}/pbulk.conf -PBULK_CONFIG_VERSION= 0.51 +PBULK_CONFIG_VERSION= 0.52 INSTALLATION_DIRS= bin libexec/pbulk share/examples/pbulk USE_BSD_MAKEFILE= yes diff --git a/pkgtools/pbulk/files/pbulk/pbulk.conf b/pkgtools/pbulk/files/pbulk/pbulk.conf index 59e300cb7e9..8a5371c096f 100644 --- a/pkgtools/pbulk/files/pbulk/pbulk.conf +++ b/pkgtools/pbulk/files/pbulk/pbulk.conf @@ -1,4 +1,4 @@ -# $NetBSD: pbulk.conf,v 1.19 2013/01/07 14:15:35 jperkin Exp $ +# $NetBSD: pbulk.conf,v 1.20 2015/09/08 17:35:07 joerg Exp $ # Version of the configuration file. This is bumped whenever the default # config changes to notify the administrator about updates. @@ -63,6 +63,10 @@ report_graph_script_limit=512 # unprivileged_user=pbulk +# If yes, run the checksum phase as unprivileged user. +# Note: requires DISTDIR to be writeable for the unprivileged user. +use_unprivileged_checksum=no + # Variables used for the optional cross-compiling of packages. # cross_compile=no diff --git a/pkgtools/pbulk/files/pbulk/scripts/pkg-build b/pkgtools/pbulk/files/pbulk/scripts/pkg-build index 7bc2acd3ad0..4ea344eae1b 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.25 2012/11/23 12:13:35 joerg Exp $ +# $NetBSD: pkg-build,v 1.26 2015/09/08 17:35:07 joerg Exp $ # # Copyright (c) 2007, 2008 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -109,6 +109,11 @@ while read build_info_line; do esac done +if [ "$use_unprivileged_checksum" != "no" ]; then + run_checksum=run_su +else + run_checksum=run_direct +fi case "$use_destdir" in user-destdir) run_build=run_su @@ -125,6 +130,7 @@ destdir) esac if [ `@ID@ -u` -ne 0 ]; then + run_checksum=run_direct run_build=run_direct run_install=run_direct fi @@ -178,7 +184,7 @@ if [ ! -z "$dependencies" ]; then ${pkg_add_cmd} $dependencies > ${bulklog}/${pkgname}/depends.log 2>&1 fi # Build package, create a separate log file for each major phase -run_make run_direct checksum > ${bulklog}/${pkgname}/checksum.log 2>&1 || cleanup +run_make ${run_checksum} checksum > ${bulklog}/${pkgname}/checksum.log 2>&1 || cleanup run_usergroup configure > ${bulklog}/${pkgname}/configure.log 2>&1 || cleanup run_make ${run_build} configure >> ${bulklog}/${pkgname}/configure.log 2>&1 || cleanup run_usergroup build> ${bulklog}/${pkgname}/build.log 2>&1 || cleanup |