I always find myself having to dig out the following commands after I've upgraded my systems. Here's my contribution to working smarter, not harder.
Ports
- Unpack
ports.tgzin the/usrdirectory. The following command will update the ports tree using anonymous cvs:
# cvs -q -d anoncvs@anoncvs3.usa.openbsd.org:/cvs up -r \ OPENBSD_4_4 -Pd
For a list of anoncvs servers look here.
To find where a package lives in the ports tree, use the following command:
# make search key=programName
Beats visual grepping all the port directories.
To show available package flavors:
# make show=FLAVORS
To build a flavor:
# env FLAVOR="flavorName" make install
Base System Source Code
- Unpack
src.tgzandsys.tgzin the/usr/src. Do NOT unpack these archives in the/usrdirectory unless you want trouble. Apply patches from the top of the source tree -
/usr/srcusing the following command:# patch -p0 < pathToPatch/001_patchname
The instructions are fairly clear with regards what needs to happen after application of the patch. Don't skip any steps or bad shit will happen.
Rebuild the kernel using the following commands:
# cd /usr/src/sys/arch/i386/conf && config GENERIC && \ cd ../compile/GENERIC && make depend bsd && mv /bsd /bsd.old && \ cp bsd /
I usually put this into an executable script in the
/usr/srcdirectory so that I can easily rebuild the kernel. You might want to installscreenfrom ports before attempting to run this command on a Soekris 4801 or have the patience of a saint. If you've applied of patches in succession, you can issue a single rebuild instead of rebuilding per patch. That's just masochistic.



