pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_comp Welcome to 1.26:
details: https://anonhg.NetBSD.org/pkgsrc/rev/081620031a93
branches: trunk
changeset: 507891:081620031a93
user: salo <salo%pkgsrc.org@localhost>
date: Fri Feb 10 23:41:20 2006 +0000
description:
Welcome to 1.26:
- add MAKEROOT_HOOKS, a whitespace separated list of functions
or external scripts to be executed after the sandbox is created,
- be more verbose about hooks execution,
- run hooks only when they are defined.
ok <jmmv>
diffstat:
pkgtools/pkg_comp/Makefile | 4 ++--
pkgtools/pkg_comp/files/pkg_comp.8 | 12 ++++++++++--
pkgtools/pkg_comp/files/pkg_comp.sh | 34 ++++++++++++++++++++++++----------
3 files changed, 36 insertions(+), 14 deletions(-)
diffs (123 lines):
diff -r 1e624d7a38ee -r 081620031a93 pkgtools/pkg_comp/Makefile
--- a/pkgtools/pkg_comp/Makefile Fri Feb 10 23:36:12 2006 +0000
+++ b/pkgtools/pkg_comp/Makefile Fri Feb 10 23:41:20 2006 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.33 2006/01/06 23:08:51 seb Exp $
+# $NetBSD: Makefile,v 1.34 2006/02/10 23:41:20 salo Exp $
-DISTNAME= pkg_comp-1.25
+DISTNAME= pkg_comp-1.26
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 1e624d7a38ee -r 081620031a93 pkgtools/pkg_comp/files/pkg_comp.8
--- a/pkgtools/pkg_comp/files/pkg_comp.8 Fri Feb 10 23:36:12 2006 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.8 Fri Feb 10 23:41:20 2006 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_comp.8,v 1.29 2006/01/06 23:08:51 seb Exp $
+.\" $NetBSD: pkg_comp.8,v 1.30 2006/02/10 23:41:20 salo Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
.\" Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 6, 2006
+.Dd February 10, 2006
.Dt PKG_COMP 8
.Os
.Sh NAME
@@ -416,6 +416,14 @@
Mount options.
Defaults to
.Sy -t null -o ro .
+.It MAKEROOT_HOOKS
+A whitespace separated list of functions or external scripts to be executed
+after the sandbox is created.
+Two arguments are given to each of them:
+.Ar $DESTDIR ,
+and the word
+.Ar makeroot .
+Defaults to nothing.
.It MOUNT_HOOKS
A whitespace separated list of functions or external scripts to be executed
after file systems are mounted.
diff -r 1e624d7a38ee -r 081620031a93 pkgtools/pkg_comp/files/pkg_comp.sh
--- a/pkgtools/pkg_comp/files/pkg_comp.sh Fri Feb 10 23:36:12 2006 +0000
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh Fri Feb 10 23:41:20 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkg_comp.sh,v 1.28 2006/02/10 23:36:12 salo Exp $
+# $NetBSD: pkg_comp.sh,v 1.29 2006/02/10 23:41:20 salo Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
@@ -49,9 +49,9 @@
SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
REAL_PKGSRC_OPTS REAL_DISTFILES REAL_DISTFILES_OPTS \
REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \
- NETBSD_RELEASE MOUNT_HOOKS UMOUNT_HOOKS SYNC_UMOUNT \
- AUTO_TARGET AUTO_PACKAGES BUILD_PACKAGES REAL_CCACHE \
- LIBKVER_STANDALONE_PREFIX"
+ NETBSD_RELEASE MAKEROOT_HOOKS MOUNT_HOOKS UMOUNT_HOOKS \
+ SYNC_UMOUNT AUTO_TARGET AUTO_PACKAGES BUILD_PACKAGES \
+ REAL_CCACHE LIBKVER_STANDALONE_PREFIX"
_BUILD_RESUME=
@@ -120,6 +120,7 @@
: ${REAL_PKGVULNDIR:=/usr/pkgsrc/distfiles}
: ${NETBSD_RELEASE:=no}
: ${LIBKVER_STANDALONE_PREFIX:=/libkver}
+ : ${MAKEROOT_HOOKS:=}
: ${MOUNT_HOOKS:=}
: ${UMOUNT_HOOKS:=}
: ${SYNC_UMOUNT:=no}
@@ -280,9 +281,12 @@
touch $fsstate
- for h in ${MOUNT_HOOKS}; do
- ${h} ${DESTDIR} mount
- done
+ if [ -n "${MOUNT_HOOKS}" ]; then
+ echo "Executing mount hooks."
+ for h in ${MOUNT_HOOKS}; do
+ ${h} ${DESTDIR} mount
+ done
+ fi
}
# fsumount
@@ -306,9 +310,12 @@
return
fi
- for h in ${UMOUNT_HOOKS}; do
- ${h} ${DESTDIR} umount
- done
+ if [ -n "${UMOUNT_HOOKS}" ]; then
+ echo "Executing umount hooks."
+ for h in ${UMOUNT_HOOKS}; do
+ ${h} ${DESTDIR} umount
+ done
+ fi
fsfailed=no
@@ -530,6 +537,13 @@
fi
makeroot_x11
+
+ if [ -n "${MAKEROOT_HOOKS}" ]; then
+ echo "Executing makeroot hooks."
+ for h in ${MAKEROOT_HOOKS}; do
+ ${h} ${DESTDIR} makeroot
+ done
+ fi
}
# makeroot_mkconf
Home |
Main Index |
Thread Index |
Old Index