[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I just installed openbsd 3.4 and I think I bit off more than I can chew



> I installed openbsd 3.4 via network install. I did not install X sets.
> This is to become a server- web, mail, smtp, pop & webmail for maybe 20
> users.
> First issue is I need to apply patches. To be be blunt I dont have a
> clue how to patch. I am looking at this url
> http://openbsd.org/faq/faq10.html#Patches
> I have installed wget on the server but used lynx to download 3.4.tar.gz
> (all patches for system to date, I think)
>
> The matter of retrieving source code before patching has me quite
> confused. /usr/src/ is empty. What exact source code do I need to
> install to apply all patches?

If you want to have it real simple. You can use this script

First time, then after that change the:

#cd /usr/src
#cvs -q up -rOPENBSD_3_4 -Pd
cd /usr
cvs -q get -rOPENBSD_3_4 -P src

to this:

cd /usr/src
cvs -q up -rOPENBSD_3_4 -Pd
#cd /usr
#cvs -q get -rOPENBSD_3_4 -P src

=================================
Script start here.

#!/bin/sh -
#
#       Kernel Update
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
export CVSROOT=anoncvs@anoncvs.ca.openbsd.org:/cvs
cd /usr/src
cvs -q up -rOPENBSD_3_4 -Pd
#cd /usr
#cvs -q get -rOPENBSD_3_4 -P src
cd /usr/src/sys/arch/i386/conf
/usr/sbin/config GENERIC
cd /usr/src/sys/arch/i386/compile/GENERIC
make clean && make depend && make
cd /usr/src/sys/arch/i386/compile/GENERIC
cp /bsd /bsd.old
cp bsd /bsd
echo Kernel updated | mail yourname@yourdomain.tld
reboot

======================================

The do the userland with this:

#!/bin/sh -
#
#       Binaries Update
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
cd /usr/src
rm -r /usr/obj/* >/dev/null 2>&1;
make obj >/dev/null 2>&1;
make build >/dev/null 2>&1;
echo Binaries updated | mail yourname@yourdomain.tld

=======================================


All explain here anyway:

http://www.openbsd.org/anoncvs.html

Change to fit what you like and where you are if you want to use a different
source site. Works for me so well that for my home server, I put it into a
cronjob every two weeks. So, even if I forget, the box stay patch! (:>

Daniel