Subject: Re: bit of help here?
To: Alfred Perlstein <bright@hotjobs.com>
From: Todd Whitesel <toddpw@best.com>
List: netbsd-help
Date: 11/17/1998 08:06:59
> I was hoping to be able to track netbsd-current can anyone give me a few
> pointers?
I have a directory called /usr/netbsd-current, which has all
my supfiles and logfiles and stuff. /usr/netbsd-current/supfile
looks like this:
# /usr/netbsd-current/supfile, originally cloned from:
# $NetBSD: sup.netbsd.org,v 1.1 1997/11/13 02:31:38 thorpej Exp $
#
# Example supfile for sup.netbsd.org.
#
current release=allsrc host=sup.netbsd.org hostbase=/ftp/pub \
base=/usr/netbsd-current prefix=/usr backup use-rel-suffix compress
current release=doc host=sup.netbsd.org hostbase=/ftp/pub \
base=/usr/netbsd-current prefix=/usr backup use-rel-suffix compress
current release=security host=sup.netbsd.org hostbase=/ftp/pub \
base=/usr/netbsd-current prefix=/usr backup use-rel-suffix compress
When I want to start a new 'cycle', I cd to /usr/netbsd-current
and source (w/ tcsh) the following script (/usr/netbsd-current/SUPME):
sup -v supfile |& tee suplogs/`date +%Y%m%d-%H:%M:%S`
This requires a directory /usr/netbsd-current/suplogs, of
course. To help myself remember all the usual steps of building
things, I also have an "uber Makefile" which is a great example
of Makefile abuse. Here's the top portion of my i386 version:
SHELL=/bin/sh
S=/usr/src
D=/usr/curroot
R=/usr/curdist
default:
@echo Please read the Makefile and choose an explicit target.
install-includes: sup/current/when.allsrc
(cd $S/sys && make includes)
touch $@
build-config: install-includes
(cd $S/usr.sbin/config && make)
touch $@
install-config: build-config
(cd $S/usr.sbin/config && make install)
touch $@
config-generic: install-config
(cd $S/sys/arch/i386/conf && config GENERIC)
touch $@
depend-generic: config-generic
(cd $S/sys/arch/i386/compile/GENERIC && make depend)
touch $@
build-generic: depend-generic
(cd $S/sys/arch/i386/compile/GENERIC && make)
touch $@
install-generic: build-generic
mv $S/sys/arch/i386/compile/GENERIC/netbsd /netbsd.new
mv /netbsd /netbsd.old
mv /netbsd.new /netbsd
@echo You should reboot now. '(/netbsd has been replaced.)'
@echo DO NOT RUN MAKE AGAIN HERE UNTIL YOU HAVE BOOTED THE NEW KERNEL.
touch $@
false
make-cleandir: install-generic
(cd $S && make cleandir)
make-build: make-cleandir
(cd $S && make UPDATE=1 build) > buildlogs/`date +%Y%m%d-%H:%M:%S` 2>&1
touch $@
...
The rest of the targets go on to build a set of distribution tarballs and
boot floppy images, and drop them in $R (/usr/curdist). Every few times I
get a complete cycle, I write out a 3.5 boot floppy and put everything on
a ZIP100, and then use those to install a scratch hard drive on the same
machine as a smoke test. It's also a good way to have a recent snapshot
that you can restore the system from, in case of emergency...
> I already downloaded the whole tree at work sunday and was hoping not to
> have to do it again, but the web page explains that i have to "sup" first
> which is going ok, but i fear that i won't know how to update after the
> sup redownloads the whole tree)
Don't worry about that. The next time you use sup, it will only download
the files that actually changed.
Todd Whitesel
toddpw @ best.com