summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_comp
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-06-06 18:50:07 +0000
committerjmmv <jmmv@pkgsrc.org>2005-06-06 18:50:07 +0000
commitc0fc7c293deb5822f584c64a692e903e21f4892d (patch)
tree1e5cc41bcb39a10ea837e7b6b46a54fb7651294c /pkgtools/pkg_comp
parent17c89c7bf7c18306da7c52927c395e977c111aae (diff)
downloadpkgsrc-c0fc7c293deb5822f584c64a692e903e21f4892d.tar.gz
Update to 1.21:
- Make the EXTRA_MK variable be a list of files rather a single one. From brook at biology.nmsu.edu in PR pkg/30099. - Directly recognize pkg_* commands to be executed within the sandbox (i.e., no need to use the chroot keyword). From Robert Elz in PR pkg/29749. - Fix a typo in the manual page.
Diffstat (limited to 'pkgtools/pkg_comp')
-rw-r--r--pkgtools/pkg_comp/Makefile4
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.813
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh25
3 files changed, 28 insertions, 14 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index ebc4ee2c553..c97abca70c3 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.28 2005/04/11 21:47:05 tv Exp $
+# $NetBSD: Makefile,v 1.29 2005/06/06 18:50:07 jmmv Exp $
-DISTNAME= pkg_comp-1.20
+DISTNAME= pkg_comp-1.21
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 0e8988f5cdb..2fb4780cfef 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.24 2005/03/20 21:29:05 jmmv Exp $
+.\" $NetBSD: pkg_comp.8,v 1.25 2005/06/06 18:50:07 jmmv Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
.\" Copyright (c) 2002, 2003, 2004 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 April 2, 2004
+.Dd June 6, 2005
.Dt PKG_COMP 8
.Os
.Sh NAME
@@ -198,7 +198,7 @@ distributions, that is, tgz files must reside inside
Defaults to
.Pa /var/pub/NetBSD .
.It EXTRAMK
-Specifies a file that must be appended to
+Specifies a whitespace-separated list of files that must be appended to
.Pa $DESTDIR/etc/mk.conf .
This is useful to add special items to this configuration file.
Defaults to nothing.
@@ -445,6 +445,11 @@ Enters the chroot environment.
If no arguments are given,
.Va ROOTSHELL
is executed, otherwise whatever you typed.
+If the first argument begins with a word prefixed by
+.Li pkg_ ,
+then the
+.Ql chroot
+argument can be omitted (it is implied).
.It removeroot
Remove the entire chroot tree.
You should do it with this target because it
@@ -464,7 +469,7 @@ and use
.Sy AUTO_PACKAGES
or pass package names through the command line.
.Pp
-If the magic work
+If the magic word
.Ql resume
is passed as the unique argument to this target,
.Nm
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
index 998f80b1216..e7ca5e372a6 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.22 2004/12/12 01:04:27 grant Exp $
+# $NetBSD: pkg_comp.sh,v 1.23 2005/06/06 18:50:07 jmmv Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, 2003, 2004 Julio M. Merino Vidal <jmmv@NetBSD.org>
@@ -555,11 +555,13 @@ EOF
done
if [ -n "$EXTRAMK" ]; then
- if [ ! -f "$EXTRAMK" ]; then
- err "Cannot find $EXTRAMK"
- else
- cat $EXTRAMK >> $file
- fi
+ for mkfile in $EXTRAMK; do
+ if [ ! -f "$mkfile" ]; then
+ err "Cannot find $mkfile"
+ else
+ cat $mkfile >> $file
+ fi
+ done
fi
if [ "$USE_AUDIT_PACKAGES" != "yes" ]; then
@@ -886,8 +888,15 @@ if [ -z "$conffile" ]; then
conffile="$confdir/default.conf"
fi
-target="$1"
-shift
+case "$1" in
+ pkg_*)
+ target=chroot
+ ;;
+ *)
+ target="$1"
+ shift
+ ;;
+esac
args="$*"
# readconf