summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-01-24 09:41:27 +0000
committerjmmv <jmmv@pkgsrc.org>2003-01-24 09:41:27 +0000
commit947d414a1069049ba273710b5149a5c30100a680 (patch)
treeab364a952490b880f52fdd0f7945402642ec99cc /pkgtools
parent1d82f99581b2258962b4ce6c7de79c12ec9c781f (diff)
downloadpkgsrc-947d414a1069049ba273710b5149a5c30100a680.tar.gz
Update pkg_comp to 1.6:
- Allow the user to issue any command inside the chroot environment using the "chroot" target, instead of only running ROOTSHELL. Patch provided by seb.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_comp/Makefile4
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.87
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh22
3 files changed, 20 insertions, 13 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index 1ccac992205..88e1d461af0 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2003/01/08 17:57:42 jmmv Exp $
+# $NetBSD: Makefile,v 1.7 2003/01/24 09:41:27 jmmv Exp $
-DISTNAME= pkg_comp-1.5
+DISTNAME= pkg_comp-1.6
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 58fc5c84d7e..f7ac5f350cf 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.5 2002/12/24 16:28:34 jmmv Exp $
+.\" $NetBSD: pkg_comp.8,v 1.6 2003/01/24 09:41:28 jmmv Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
.\" Copyright (c) 2002, Julio Merino <jmmv@netbsd.org>
@@ -228,7 +228,7 @@ which controls the number of
processes using the chroot environment.
If some of them crashes unexpectedly and you notice it does not try
to unmount the file systems, this status file may get out of sync.
-Be sure to check if NO file systems are mounted when issuing a
+Be sure to check that NO file systems are mounted when issuing a
.Sy removeroot .
.Bl -tag -width indent
.It REAL_DISTFILES
@@ -292,6 +292,9 @@ You must specify the full name of the package and they must be reside inside
.Sy REAL_PACKAGES .
.It chroot
Enters the chroot environment.
+If no arguments are given,
+.Va ROOTSHELL
+is executed, otherwise whatever you typed.
.It removepkgs
Remove all the packages in the chroot environment.
It starts deleting packages with
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
index d8215e3d621..4a426742ab5 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.5 2003/01/08 17:57:42 jmmv Exp $
+# $NetBSD: pkg_comp.sh,v 1.6 2003/01/24 09:41:28 jmmv Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, Julio Merino <jmmv@netbsd.org>
@@ -456,7 +456,11 @@ pkg_chroot()
fsmount
echo "PKG_COMP ==> Entering chroot: $DESTDIR"
- chroot $DESTDIR $ROOTSHELL
+ if [ $# -eq 0 ]; then
+ chroot $DESTDIR $ROOTSHELL
+ else
+ chroot $DESTDIR $*
+ fi
echo
fsumount
}
@@ -551,7 +555,7 @@ fi
target="$1"
shift
-pkgnames="$*"
+args="$*"
readconf()
{
@@ -607,19 +611,19 @@ case "$target" in
build)
readconf
checkroot
- pkg_build $pkgnames
+ pkg_build $args
exit 0
;;
install)
readconf
checkroot
- pkg_install $pkgnames
+ pkg_install $args
exit 0
;;
chroot)
readconf
checkroot
- pkg_chroot
+ pkg_chroot $args
exit 0
;;
removepkgs)
@@ -638,13 +642,13 @@ case "$target" in
if [ -z "$REAL_PACKAGES" ]; then
err "this is useless without REAL_PACKAGES"
fi
- if [ -z "$MAKE_PACKAGES" -a -z "$pkgnames" ]; then
+ if [ -z "$MAKE_PACKAGES" -a -z "$args" ]; then
err "this is useless without MAKE_PACKAGES nor package names"
fi
pkg_makeroot
checkroot
- if [ -n "$pkgnames" ]; then
- pkg_build $pkgnames
+ if [ -n "$args" ]; then
+ pkg_build $args
fi
pkg_removeroot
;;