summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2010-04-15 09:42:45 +0000
committerjmmv <jmmv@pkgsrc.org>2010-04-15 09:42:45 +0000
commit5878552ce4cefef3476346599b2b26e548caca84 (patch)
treeab68122da65836b4463f2f3649bd3389f7368b04 /pkgtools
parentf95d99f9467f7dcb3541919bb4cca9ac1b5a4c81 (diff)
downloadpkgsrc-5878552ce4cefef3476346599b2b26e548caca84.tar.gz
Update to 1.33:
* Make PKG_DBDIR customizable. This sets the variable in mk.conf, in pkg_install.conf and in the environment.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_comp/Makefile4
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.88
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh9
3 files changed, 15 insertions, 6 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index a58f3944956..6f0ffe04890 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.44 2010/04/13 16:46:01 jmmv Exp $
+# $NetBSD: Makefile,v 1.45 2010/04/15 09:42:45 jmmv Exp $
-DISTNAME= pkg_comp-1.32
+DISTNAME= pkg_comp-1.33
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 41ab9fa70e7..2dff943b1d8 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.34 2010/04/13 20:59:19 wiz Exp $
+.\" $NetBSD: pkg_comp.8,v 1.35 2010/04/15 09:42:45 jmmv 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 April 13, 2010
+.Dd April 15, 2010
.Dt PKG_COMP 8
.Os
.Sh NAME
@@ -265,6 +265,10 @@ See
for more information.
Defaults to
.Ql no .
+.It PKG_DBDIR
+Location of the packages database.
+Defaults to
+.Pa /var/db/pkg .
.It PKG_SYSCONFBASE
Base directory of configuration files.
Defaults to
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
index 3c7e0684c36..70d9c573e97 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.36 2010/04/13 16:46:01 jmmv Exp $
+# $NetBSD: pkg_comp.sh,v 1.37 2010/04/15 09:42:45 jmmv Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
@@ -43,7 +43,7 @@ _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 \
- LIBKVER_STANDALONE_PREFIX"
+ LIBKVER_STANDALONE_PREFIX PKG_DBDIR"
_TEMPLATE_VARS="DESTDIR ROOTSHELL COPYROOTCFG BUILD_TARGET DISTRIBDIR SETS \
SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
@@ -99,6 +99,7 @@ env_setdefaults()
: ${PKGVULNDIR:=/usr/pkg/share}
: ${USE_XPKGWEDGE:=yes}
: ${PKGSRC_COMPILER:=gcc}
+ : ${PKG_DBDIR:=/var/db/pkg}
# Default values for global variables used in the script.
: ${DESTDIR:=/var/chroot/pkg_comp/default}
@@ -513,16 +514,20 @@ makeroot()
echo "ENV=/etc/shrc" >> $DESTDIR/etc/profile
echo "export PS1=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/shrc
echo "set -o emacs" >> $DESTDIR/etc/shrc
+ echo "export PKG_DBDIR=\"${PKG_DBDIR}\"" >> ${DESTDIR}/etc/shrc
# Set csh configuration
echo "umask 022" >> $DESTDIR/etc/csh.login
echo "set prompt=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/csh.login
echo "set prompt=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/csh.cshrc
+ echo "setenv PKG_DBDIR \"${PKG_DBDIR}\"" >> ${DESTDIR}/etc/csh.cshrc
cp /etc/resolv.conf $DESTDIR/etc/resolv.conf
makeroot_mkconf
+ echo "PKG_DBDIR=${PKG_DBDIR}" >> ${DESTDIR}/etc/pkg_install.conf
+
# From now on, filesystems may be mounted, so we need to trap
# signals to umount them.
trap "echo \"*** Process aborted ***\" ; fsumount ; exit 1" INT QUIT