pantz.org banner
Updating OpenBSD to stable
Posted on 05-24-2007 03:34:00 UTC | Updated on 05-24-2007 03:34:00 UTC
Section: /software/openbsd/ | Permanent Link

I had a friend update his machine to -stable for OpenBSD here are the scripts he came up with. The one note he had is the cvs checkouts are a hit or miss event and you have to check to see if they completed or not. This example is for building -current on OpenBSD 4.1.

First part. If empty, you must populate /usr/src/ with src before trying a cvs update. Get the OpenBSD src.

cd /usr/src
wget ftp://ftp.openbsd.org/pub/OpenBSD/4.1/src.tar.gz

untar it in /usr/src/

tar xvzf src.tar.gz

Make sure the cvs value below matches your distribution. For OpenBSD 4.1 it is OPENBSD_4_.

#!/bin/csh

cd /usr/src/
setenv CVS_CLIENT_PORT -1
setenv CVSROOT anoncvs@anoncvs3.usa.openbsd.org:/cvs
cvs -d $CVSROOT up -rOPENBSD_4_1 -Pd
logger "patch_1_sync_cvs_source `date`"

You need to make sure the CVS download completes. CVS lacks any logic to restart or resume a failed download, so you need to verify before building the kernel (patch_2) or any binaries (patch_3). Cvs needs some type of rsync.

Second part. These lines will build the new kernel, then put it in place while backing up the old kernel.

#!/bin/csh

cd /usr/src/sys/arch/i386/conf
/usr/sbin/config GENERIC
cd /usr/src/sys/arch/i386/compile/GENERIC
make clean && make depend && make
cp /bsd /bsd.old
cp bsd /bsd
logger "patch_2_build_kernel `date`"

Make sure everything went ok and reboot!

Third part. This script will build all new binaries. After this step is done you may want to check if any new packages are available for your install. (pkg_add -un)

#!/bin/csh

cd /usr/src
rm -r /usr/obj/*
make obj && make build
logger "patch_3_build_binaries `date`"

Make sure everything went ok and reboot!

For more detailed info about cvs updates for OpenBSD check here.

Del.icio.us! | Digg Me! | Reddit!

Related stories


RSS Feed RSS feed logo
About


3com
3ware
alsa
alsactl
alsamixer
amd
android
apache
areca
arm
ati
auditd
awk
badblocks
bash
bind
bios
bonnie
cable
carp
cat5
cdrom
cellphone
centos
chart
chrome
cifs
cisco
cloudera
comcast
commands
comodo
compiz-fusion
corsair
cpufreq
cpufrequtils
cpuspeed
cron
crontab
crossover
cu
cups
cvs
database
dbus
dd
dd_rescue
ddclient
debian
decimal
dhclient
dhcp
diagnostic
diskexplorer
disks
dkim
dns
dos
dovecot
drac
dsniff
dvdauthor
e-mail
echo
editor
emerald
ethernet
expect
ext3
ext4
fat32
fedora
fetchmail
fiber
filesystems
firefox
firewall
flac
flexlm
floppy
flowtools
fonts
format
freebsd
ftp
gdm
gmail
gnome
greasemonkey
greylisting
growisofs
grub
hacking
hadoop
harddrive
hba
hex
hfsc
html
html5
http
https
idl
ie
ilo
intel
ios
iperf
ipmi
iptables
ipv6
irix
javascript
kde
kernel
kickstart
kmail
kprinter
krecord
kubuntu
kvm
lame
ldap
linux
logfile
lp
lpq
lpr
maradns
matlab
memory
mencoder
mhdd
mkinitrd
mkisofs
moinmoin
motherboard
mouse
movemail
mplayer
multitail
mutt
myodbc
mysql
mythtv
nagios
nameserver
netflix
netflow
nginx
nic
ntfs
ntp
nvidia
odbc
openbsd
openntpd
openoffice
openssh
openssl
openvpn
opteron
parted
partimage
patch
perl
pf
pfflowd
pfsync
photorec
php
pop3
pop3s
ports
postfix
power
procmail
proftpd
proxy
pulseaudio
putty
pxe
python
qemu
r-studio
raid
recovery
redhat
router
rpc
rsync
ruby
saltstack
samba
schedule
screen
scsi
seagate
seatools
sed
sendmail
sgi
shell
siw
smtp
snort
solaris
soundcard
sox
spam
spamd
spf
sql
sqlite
squid
srs
ssh
ssh.com
ssl
su
subnet
subversion
sudo
sun
supermicro
switches
symbols
syslinux
syslog
systemrescuecd
t1
tcpip
tcpwrappers
telnet
terminal
testdisk
tftp
thttpd
thunderbird
timezone
ting
tls
tools
tr
trac
tuning
tunnel
ubuntu
unbound
vi
vpn
wget
wiki
windows
windowsxp
wireless
wpa_supplicant
x
xauth
xfree86
xfs
xinearama
xmms
youtube
zdump
zeromq
zic
zlib