summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjmmv <jmmv>2003-01-08 17:45:09 +0000
committerjmmv <jmmv>2003-01-08 17:45:09 +0000
commit7276961be51274df2e9b96d8fc0d9a24ca450c58 (patch)
tree95e79459c1c809b7ea3d9eb06e55d98f25f2416d /sysutils
parentabc0cb2c974b75d0401d09c4da6604a289d530a0 (diff)
downloadpkgsrc-7276961be51274df2e9b96d8fc0d9a24ca450c58.tar.gz
Update sysbuild to 1.9. Changes include:
- Addition of a new variable, MACHINE, which is used to tell the program the machine name. This is needed since NetBSD-current now automatically adds this value to RELEASEDIR. - Properly pass RELEASEDIR's value to make when building an X release (pointed out by Douglas Brebner in private mail). - Update the TODO list in the manpage: remove the X11R6 item and add a new one about using build.sh to create and use a nbmake wrapper.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/sysbuild/Makefile4
-rw-r--r--sysutils/sysbuild/files/default.conf8
-rw-r--r--sysutils/sysbuild/files/sysbuild.821
-rw-r--r--sysutils/sysbuild/files/sysbuild.sh24
4 files changed, 35 insertions, 22 deletions
diff --git a/sysutils/sysbuild/Makefile b/sysutils/sysbuild/Makefile
index e3fcd070078..231924508ce 100644
--- a/sysutils/sysbuild/Makefile
+++ b/sysutils/sysbuild/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2003/01/01 21:16:52 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2003/01/08 17:45:09 jmmv Exp $
#
-DISTNAME= sysbuild-1.8
+DISTNAME= sysbuild-1.9
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/sysutils/sysbuild/files/default.conf b/sysutils/sysbuild/files/default.conf
index 7a54c1e8110..2e1207c962c 100644
--- a/sysutils/sysbuild/files/default.conf
+++ b/sysutils/sysbuild/files/default.conf
@@ -1,4 +1,4 @@
-# $NetBSD: default.conf,v 1.3 2002/12/18 11:28:09 jmmv Exp $
+# $NetBSD: default.conf,v 1.4 2003/01/08 17:45:09 jmmv Exp $
#
# sysbuild - System wide configuration file
#
@@ -15,7 +15,11 @@ SRCGROUP=@SYSBUILD_SRCGROUP@
BUILDDIR=/var/sysbuild
# Release directory (it will require around 100-200 Mb).
-RELEASEDIR=/var/sysbuild/NetBSD-1.6/i386
+RELEASEDIR=/var/sysbuild/NetBSD-1.6
+
+# Machine name. It is appended to RELEASEDIR. It currently has no other
+# effect. Set only if you are building NetBSD-current!
+MACHINE=
# Source directory.
SRCDIR=/usr/src
diff --git a/sysutils/sysbuild/files/sysbuild.8 b/sysutils/sysbuild/files/sysbuild.8
index b008f2e8147..3afffd0fdd6 100644
--- a/sysutils/sysbuild/files/sysbuild.8
+++ b/sysutils/sysbuild/files/sysbuild.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: sysbuild.8,v 1.5 2002/12/18 11:28:09 jmmv Exp $
+.\" $NetBSD: sysbuild.8,v 1.6 2003/01/08 17:45:09 jmmv Exp $
.\"
.\" sysbuild - Automatic NetBSD system builds
.\" Copyright (c) 2002, Julio Merino <jmmv@netbsd.org>
@@ -367,6 +367,13 @@ The first one is the kernel that will be installed when running
Directory which holds kernel configuration files.
Defaults to
.Pa @SYSBUILD_HOMEDIR@ .
+.It MACHINE
+Machine name.
+It is appended to
+.Va RELEASEDIR .
+Do not set if you are not building
+.Nx Ns -current .
+This variable may be used for cross-building in a future.
.It MOUNT_PRECMD
Specifies a command to be called to gain privileges when running
.Xr mount_union 8
@@ -520,10 +527,12 @@ There are many other things to do, but are left for future releases.
Here is a small list with some ideas:
.Bl -bullet -width indent
.It
-Add support for X11R6 unprivileged builds.
-This will require the use of
-.Xr mount_union 8
-because X11R6 build system creates object files together with sources.
-.It
Support building for multiple architectures.
+.It
+Create our own
+.Nm nbmake
+wrapper (using
+.Nm build.sh Ns )
+at the beginning of each build, instead of passing all the
+variables when calling the program itself.
.El
diff --git a/sysutils/sysbuild/files/sysbuild.sh b/sysutils/sysbuild/files/sysbuild.sh
index 342b086da0f..3dec0882658 100644
--- a/sysutils/sysbuild/files/sysbuild.sh
+++ b/sysutils/sysbuild/files/sysbuild.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: sysbuild.sh,v 1.9 2003/01/01 21:16:52 jmmv Exp $
+# $NetBSD: sysbuild.sh,v 1.10 2003/01/08 17:45:09 jmmv Exp $
#
# sysbuild - Automatic NetBSD system builds
# Copyright (c) 2002, Julio Merino <jmmv@netbsd.org>
@@ -284,7 +284,7 @@ sysbuild_build_sets() {
echo " done."
printf "Making sets:"
- mkdir -p $RELEASEDIR/binary/sets
+ mkdir -p $RELEASEDIR/$MACHINE/binary/sets
cd $SRCDIR/distrib/sets
$BUILDDIR/tools/bin/nbmake-`uname -m` sets BSDSRCDIR=$SRCDIR OBJMACHINE=yes MKOBJDIRS=yes TOOLDIR=$BUILDDIR/tools DESTDIR=$BUILDDIR/root RELEASEDIR=$RELEASEDIR UNPRIVED=yes >> $_log 2>&1
if [ $? -ne 0 ]; then
@@ -307,10 +307,10 @@ sysbuild_install_sets() {
for _s in $SETS; do
printf "Installing $_s:"
- if [ ! -f $RELEASEDIR/binary/sets/$_s ]; then
+ if [ ! -f $RELEASEDIR/$MACHINE/binary/sets/$_s ]; then
echo " not built yet"
else
- cd / && tar xzpf $RELEASEDIR/binary/sets/$_s > /dev/null 2>&1
+ cd / && tar xzpf $RELEASEDIR/$MACHINE/binary/sets/$_s > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " failed."
else
@@ -328,10 +328,10 @@ sysbuild_install_x_sets() {
for _s in $XSETS; do
printf "Installing $_s:"
- if [ ! -f $RELEASEDIR/binary/sets/$_s ]; then
+ if [ ! -f $RELEASEDIR/$MACHINE/binary/sets/$_s ]; then
echo " not built yet"
else
- cd / && tar xzpf $RELEASEDIR/binary/sets/$_s > /dev/null 2>&1
+ cd / && tar xzpf $RELEASEDIR/$MACHINE/binary/sets/$_s > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " failed."
else
@@ -409,17 +409,17 @@ sysbuild_build_x_release() {
if [ "$_mnt" = "ok" ]; then
printf "Building full X11R6 release:"
- mkdir -p $RELEASEDIR
+ mkdir -p $RELEASEDIR/$MACHINE
( cd $BUILDDIR/obj && \
- BSDSRCDIR=$SRCDIR NETBSDSRCDIR=$SRCDIR $BUILDDIR/tools/bin/nbmake-`uname -m` DESTDIR=$BUILDDIR/root release >> $_log 2>&1 )
+ BSDSRCDIR=$SRCDIR NETBSDSRCDIR=$SRCDIR RELEASEDIR=$RELEASEDIR/$MACHINE $BUILDDIR/tools/bin/nbmake-`uname -m` DESTDIR=$BUILDDIR/root release >> $_log 2>&1 )
if [ $? -ne 0 ]; then
echo " failed."
else
echo " done."
fi
- chmod 644 $RELEASEDIR/binary/sets/x*.tgz
- chown $USER:$OBJGROUP $RELEASEDIR/binary/sets/*
+ chmod 644 $RELEASEDIR/$MACHINE/binary/sets/x*.tgz
+ chown $USER:$OBJGROUP $RELEASEDIR/$MACHINE/binary/sets/*
fi
printf "Unmounting $BUILDDIR/obj:"
@@ -483,7 +483,7 @@ sysbuild_etcupdate() {
check_root
tmp=`mktemp -d /tmp/sysbuild.XXXX`
- if [ ! -f $RELEASEDIR/binary/sets/etc.tgz ]; then
+ if [ ! -f $RELEASEDIR/$MACHINE/binary/sets/etc.tgz ]; then
err "etc.tgz is not yet built."
fi
printf "Backing up /etc to /etc.old:"
@@ -491,7 +491,7 @@ sysbuild_etcupdate() {
cp -rf /etc /etc.old > /dev/null 2>&1
echo " done."
printf "Unpacking etc.tgz:"
- cd $tmp && tar xzpf $RELEASEDIR/binary/sets/etc.tgz > /dev/null 2>&1
+ cd $tmp && tar xzpf $RELEASEDIR/$MACHINE/binary/sets/etc.tgz > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " failed."
else