September 4th, 2002, 12:05
If you've got a fully patched and up to date build of OpenBSD and you tend to do a lot of installs or you have a number of boxes which need patched or upgraded you'll want to look at make release.

What does make release do you ask? It allows you to fully build a release of OpenBSD from the src on the box you are running it. So, for example, if you're running i386 and you use make release it will essentially build the equivalent to the i386 folder on ftp sites or the cdrom!!!! But what's best is that if your src is up to date with patches, then the build you create will be too!!! This means that you can use the files to do new installations or upgrades and these installations will be fully patched... obviously only to the date you ran the make release. The man pages for release are quite good and also go over how you can update your src via CVS, for which I've also written a How-To.

So here's a quick rundown on what do to:

1) Update your src

See my other how-to for this!

2) Build crunch

This is right from the man page:

cd /usr/src/distrib/crunch && make clean && make && make install
create the special tools needed to build the release

3) make release

Ok, next we just need to start the make. In my usual lazy approach, I wrote a script to do the task:


export DESTDIR=/home/release/WIP
export RELEASEDIR=/home/release/FG

test -d ${DESTDIR} && mv ${DESTDIR} ${DESTDIR}- && rm -rf ${DESTDIR}- &
cd /usr/src/etc && nice make release
cd /usr/src/distrib/sets && sh checkflist

Obviously you can choose the location of the DESTDIR and RELEASEDIR to suit your needs. The make takes a while but when it done you'll have all the .tgz files and everything you need to to installs, including the floppy images!

So what do you do with all this? Well, I set up an ftp server on the box containing the new, fully patched release so I can install new boxes. And again, in typical fashion, I wrote a script to run so that I just put a floppy in the drive of the release box, run the script and it makes the bootable floppy for me:


fdformat -q /dev/fd0a

dd if=/path/to/floppy31.fs of=/dev/rfd0c bs=126b

Boot a new box off that and enter it as the ftp server for the install and you're golden ;-) You can also use the box for upgrades in the same manner. Or, if you've got a firewall that has no compiler and no src you can move over say, base31.tgz maybe misc31.tgz or whatever. Be carefull with etc though! If you untar it, it ***will*** overwrite your existing files.

March 8th, 2003, 21:24
I'm just setting up my own make release boc now, Awesome. This has been on my todo list for a while, I now have lots of liberties to do this kind of stuff. ;)