diff options
author | jmmv <jmmv> | 2003-07-20 15:54:46 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2003-07-20 15:54:46 +0000 |
commit | e96ec22e5bd8a86e93abd90999b6075665314d14 (patch) | |
tree | 5024bc84ab88706d2b0ae24a6126ece409894173 /pkgtools/pkg_comp | |
parent | f2f2f62143e779c0cb9e65a1c0664e928ab33324 (diff) | |
download | pkgsrc-e96ec22e5bd8a86e93abd90999b6075665314d14.tar.gz |
Update to 1.8:
- Add the NETBSD_RELEASE variable. This is used to automatically configure
pkgtools/libkver inside the chroot so that packages see the right kernel
version when issuing calls to sysctl(8). Suggested by seb@.
- Turn on emacs editing mode by default in sh/ksh.
Diffstat (limited to 'pkgtools/pkg_comp')
-rw-r--r-- | pkgtools/pkg_comp/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkg_comp/files/pkg_comp.8 | 28 | ||||
-rw-r--r-- | pkgtools/pkg_comp/files/pkg_comp.sh | 14 |
3 files changed, 39 insertions, 7 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile index 748dbe9b150..d0fd1f88cd4 100644 --- a/pkgtools/pkg_comp/Makefile +++ b/pkgtools/pkg_comp/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.11 2003/07/18 12:21:38 jmmv Exp $ +# $NetBSD: Makefile,v 1.12 2003/07/20 15:54:46 jmmv Exp $ -DISTNAME= pkg_comp-1.7 +DISTNAME= pkg_comp-1.8 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools MASTER_SITES= # empty diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8 index 5cddb04d53d..79554f0db62 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.8 2003/07/18 12:21:39 jmmv Exp $ +.\" $NetBSD: pkg_comp.8,v 1.9 2003/07/20 15:54:47 jmmv Exp $ .\" .\" pkg_comp - Build packages inside a clean chroot environment .\" Copyright (c) 2002, 2003, Julio Merino <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 July 18, 2003 +.Dd July 20, 2003 .Dt PKG_COMP 8 .Os .Sh NAME @@ -163,6 +163,27 @@ A list of variable names that will be appended to the generated .Pa /etc/mk.conf file, together with their values set in the configuration file. Its default value contains all variables listed here. +.It NETBSD_RELEASE +Specifies which version number of +.Nx +is installed inside the chroot. +If set to +.Ql no , +no special action is taken (this is useful if the system version inside +the chroot matches the outside one). +Otherwise, the +.Pa pkgtools/libkver +package is installed, configuring it with the version set in the variable. +This package fakes calls to the +.Xr sysctl 8 +utility so that programs get the right kernel version with respect to the +installed userland (inside the chroot). +Note that +.Va REAL_SRC +has to point to a directory holding system sources +matching the selected version. +Defaults to +.Ql no . .It PKG_SYSCONFBASE Base directory of configuration files. Defaults to @@ -359,6 +380,7 @@ chroot environment. .Sh SEE ALSO .Xr pkg_delete 1 , .Xr packages 7 , -.Xr mount_null 8 +.Xr mount_null 8 , +.Xr sysctl 8 .Sh AUTHORS .An Julio Merino Aq jmmv@netbsd.org diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh index b96250bd9ca..1b90920a463 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.7 2003/07/18 12:21:39 jmmv Exp $ +# $NetBSD: pkg_comp.sh,v 1.8 2003/07/20 15:54:47 jmmv Exp $ # # pkg_comp - Build packages inside a clean chroot environment # Copyright (c) 2002, 2003, Julio Merino <jmmv@netbsd.org> @@ -46,7 +46,8 @@ _MKCONF_VARS="OBJMACHINE MKOBJDIRS BSDSRCDIR WRKOBJDIR DISTDIR PACKAGES \ _TEMPLATE_VARS="DESTDIR ROOTSHELL COPYROOTCFG BUILD_TARGET DISTRIBDIR SETS \ SETS_X11 USE_XPKGWEDGE REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \ REAL_PKGSRC_OPTS REAL_DISTFILES REAL_DISTFILES_OPTS \ - REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR" + REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \ + NETBSD_RELEASE" env_clean() { @@ -356,6 +357,7 @@ pkg_makeroot() echo "umask 022" >> $DESTDIR/etc/profile echo "ENV=/etc/shrc" >> $DESTDIR/etc/profile echo "export PS1=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/shrc + echo "set -o emacs" >> $DESTDIR/etc/shrc # Set csh configuration echo "umask 022" >> $DESTDIR/etc/csh.login @@ -376,6 +378,10 @@ pkg_makeroot() pkg_build security/audit-packages fi + if [ "$NETBSD_RELEASE" != "no" ]; then + BUILD_TARGET=install pkg_build pkgtools/libkver + fi + if [ "$USE_GCC3" = "yes" ]; then if [ -z "`echo $MAKE_PACKAGES $INSTALL_PACKAGES | grep gcc3`" ]; then AVOID_GCC3=yes pkg_build lang/gcc3 @@ -423,6 +429,10 @@ EOF fi fi + if [ "$NETBSD_RELEASE" != "no" ]; then + echo "KVER_OSRELEASE = $NETBSD_RELEASE" >> $file + fi + if [ "$USE_AUDIT_PACKAGES" != "yes" ]; then echo "ALLOW_VULNERABLE_PACKAGES ?= YES" >> $file fi |