diff options
author | joerg <joerg> | 2010-06-15 21:11:43 +0000 |
---|---|---|
committer | joerg <joerg> | 2010-06-15 21:11:43 +0000 |
commit | 3d2186bb8cbb5beb9ee6969bd1bfe56dd742b277 (patch) | |
tree | ff108fe7d055db9225a3d4f9fba8325ebc1067be /pkgtools | |
parent | 0d0cf11045ec1be338e8d02413c2e55b9de5a2c6 (diff) | |
download | pkgsrc-3d2186bb8cbb5beb9ee6969bd1bfe56dd742b277.tar.gz |
pbulk-0.47:
- Explicitly call make create-usergroup if USERGROUP_PHASE is specified
and DESTDIR is active
- If the current user is not root, don't use su.
- Skip lines starting with # in the limited bulk build list.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pbulk/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pkg-build | 33 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/scan | 4 |
3 files changed, 33 insertions, 8 deletions
diff --git a/pkgtools/pbulk/Makefile b/pkgtools/pbulk/Makefile index 0bdda75290d..0aa86f37438 100644 --- a/pkgtools/pbulk/Makefile +++ b/pkgtools/pbulk/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.60 2010/02/24 22:54:54 joerg Exp $ +# $NetBSD: Makefile,v 1.61 2010/06/15 21:11:43 joerg Exp $ -DISTNAME= pbulk-0.46 +DISTNAME= pbulk-0.47 COMMENT= Modular bulk build framework PKG_DESTDIR_SUPPORT= user-destdir diff --git a/pkgtools/pbulk/files/pbulk/scripts/pkg-build b/pkgtools/pbulk/files/pbulk/scripts/pkg-build index f0eb90c1928..5058a7219ea 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.20 2010/02/24 22:51:37 joerg Exp $ +# $NetBSD: pkg-build,v 1.21 2010/06/15 21:11:43 joerg Exp $ # # Copyright (c) 2007, 2008 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -69,6 +69,21 @@ run_make() { } +run_usergroup() { + [ "${use_destdir}" != no ] || return 0 + case "${usergroup_phase}" in + *configure) + [ "$1" != "configure" ] || ${make} create-usergroup + ;; + *build) + [ "$1" != "build" ] || ${make} create-usergroup + ;; + pre-install) + [ "$1" != "install" ] || ${make} create-usergroup + ;; + esac +} + while read build_info_line; do case "${build_info_line}" in PKGNAME=*) @@ -89,6 +104,8 @@ while read build_info_line; do BOOTSTRAP_PKG=*) is_bootstrap=${build_info_line#BOOTSTRAP_PKG=} ;; + USERGROUP_PHASE=*) + usergroup_phase=${build_info_line#USERGROUP_PHASE=} esac done @@ -107,6 +124,11 @@ destdir) ;; esac +if [ `whoami` != "root" ]; then + run_build=run_direct + run_install=run_direct +fi + ${pkg_up_to_date_script} ${pkgname} ${dependencies} && exit 0 set -e @@ -157,9 +179,12 @@ if [ ! -z "$dependencies" ]; then 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_build} configure > ${bulklog}/${pkgname}/configure.log 2>&1 || cleanup -run_make ${run_build} all > ${bulklog}/${pkgname}/build.log 2>&1 || cleanup -run_make ${run_install} stage-install > ${bulklog}/${pkgname}/install.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 +run_make ${run_build} all >> ${bulklog}/${pkgname}/build.log 2>&1 || cleanup +run_usergroup install > ${bulklog}/${pkgname}/install.log 2>&1 || cleanup +run_make ${run_install} stage-install >> ${bulklog}/${pkgname}/install.log 2>&1 || cleanup run_make run_direct package > ${bulklog}/${pkgname}/package.log 2>&1 || cleanup # When using DESTDIR build, add the package once to test install rules. diff --git a/pkgtools/pbulk/files/pbulk/scripts/scan b/pkgtools/pbulk/files/pbulk/scripts/scan index e5e9ec48fe5..09b0ae65879 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/scan +++ b/pkgtools/pbulk/files/pbulk/scripts/scan @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: scan,v 1.6 2009/12/30 21:14:43 joerg Exp $ +# $NetBSD: scan,v 1.7 2010/06/15 21:11:43 joerg Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -72,7 +72,7 @@ if [ -z "${limited_list}" ]; then else initial=1 mkdir -p ${loc} - cp "${limited_list}" ${loc}/missing + grep -v '^#' "${limited_list}" > ${loc}/missing while [ -s ${loc}/missing ]; do sort -u ${loc}/missing > ${loc}/missing.s |