diff options
-rw-r--r-- | pkgtools/pkg_comp/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkg_comp/files/pkg_comp.8 | 14 | ||||
-rw-r--r-- | pkgtools/pkg_comp/files/pkg_comp.sh | 30 |
3 files changed, 15 insertions, 33 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile index 7d7f63186b7..38e78daba5f 100644 --- a/pkgtools/pkg_comp/Makefile +++ b/pkgtools/pkg_comp/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.32 2005/11/16 01:31:35 seb Exp $ +# $NetBSD: Makefile,v 1.33 2006/01/06 23:08:51 seb Exp $ -DISTNAME= pkg_comp-1.24 +DISTNAME= pkg_comp-1.25 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8 index 386822802d3..8ad7afc7617 100644 --- a/pkgtools/pkg_comp/files/pkg_comp.8 +++ b/pkgtools/pkg_comp/files/pkg_comp.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_comp.8,v 1.28 2005/11/16 01:31:35 seb Exp $ +.\" $NetBSD: pkg_comp.8,v 1.29 2006/01/06 23:08:51 seb Exp $ .\" .\" pkg_comp - Build packages inside a clean chroot environment .\" Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org> @@ -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 October 2, 2005 +.Dd January 6, 2006 .Dt PKG_COMP 8 .Os .Sh NAME @@ -234,10 +234,12 @@ the chroot matches the outside one). Otherwise, the package .Pa pkgtools/libkver will be installed inside the chroot, in a special purpose -prefix which value can be set in -.Pa $DESTDIR/etc/mk.conf -with -.Va LIBKVER_STANDALONE_PREFIX . +prefix whose value can be set in +.Pa $DESTDIR/etc/mk.conf +via the configuration file +with the +.Va LIBKVER_STANDALONE_PREFIX +variable. The libkver library will be configured inside the chroot, with the symbolic link .Pa $DESTDIR/libkver_osrelease and diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh index 62de22839bb..ae4427e664a 100644 --- a/pkgtools/pkg_comp/files/pkg_comp.sh +++ b/pkgtools/pkg_comp/files/pkg_comp.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pkg_comp.sh,v 1.26 2005/11/16 01:31:35 seb Exp $ +# $NetBSD: pkg_comp.sh,v 1.27 2006/01/06 23:08:51 seb Exp $ # # pkg_comp - Build packages inside a clean chroot environment # Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org> @@ -42,7 +42,8 @@ ProgName="`basename $0`" _MKCONF_VARS="WRKDIR_BASENAME MKOBJDIRS BSDSRCDIR WRKOBJDIR DISTDIR PACKAGES \ PKG_DEVELOPER CLEANDEPENDS LOCALBASE PKG_SYSCONFBASE \ CFLAGS CPPFLAGS CXXFLAGS USE_AUDIT_PACKAGES PKGVULNDIR \ - USE_XPKGWEDGE PKGSRC_COMPILER" + USE_XPKGWEDGE PKGSRC_COMPILER \ + LIBKVER_STANDALONE_PREFIX" _TEMPLATE_VARS="DESTDIR ROOTSHELL COPYROOTCFG BUILD_TARGET DISTRIBDIR SETS \ SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \ @@ -117,6 +118,7 @@ env_setdefaults() : ${REAL_PACKAGES_OPTS:=-t null -o rw} : ${REAL_PKGVULNDIR:=/usr/pkgsrc/distfiles} : ${NETBSD_RELEASE:=no} + : ${LIBKVER_STANDALONE_PREFIX:=/libkver} : ${MOUNT_HOOKS:=} : ${UMOUNT_HOOKS:=} : ${SYNC_UMOUNT:=no} @@ -517,8 +519,8 @@ makeroot() # signals to umount them. trap "echo \"*** Process aborted ***\" ; fsumount ; exit 1" INT QUIT - makeroot_digest makeroot_libkver + makeroot_digest if [ "$USE_GCC3" = "yes" ]; then if [ -z "`echo $BUILD_PACKAGES $INSTALL_PACKAGES | grep gcc3`" ]; then @@ -613,28 +615,6 @@ makeroot_libkver() BUILD_TARGET="standalone-install" pkg_build pkgtools/libkver BUILD_TARGET="$_BUILD_TARGET" - prefix=`mktemp $DESTDIR/pkg_comp/tmp/pkg_comp-XXXX` - rm $prefix - script="$prefix.sh" - statfile="$prefix.stat" - init_script $script - cat >> $script <<EOF -cd /usr/pkgsrc/pkgtools/libkver -make show-var VARNAME=LIBKVER_STANDALONE_PREFIX -if [ \$? != 0 ]; then - touch /pkg_comp/tmp/`basename $statfile` -fi -EOF - chmod +x $script - fsmount - LIBKVER_STANDALONE_PREFIX=$(chroot $DESTDIR /pkg_comp/tmp/`basename $script`) - fsumount - rm $script - if [ -f $statfile ]; then - rm $statfile - err "Failed to get libkver standalone prefix" - fi - rm $script echo "LD_PRELOAD=${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so; export LD_PRELOAD" >> $DESTDIR/etc/shrc echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.login echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.cshrc |