Linked by Thom Holwerda on Mon 26th Mar 2007 17:24 UTC, submitted by lteo_calyptix
OpenBSD "Unlike other operating systems, patches for the OpenBSD base system are distributed as source code patches. These patches are usually applied by compiling and installing them onto the target system. While that upgrade procedure is well-documented, it is not always suitable for certain systems that do not have the OpenBSD compiler set installed for various reasons such as disk space constraints. To fill this gap, open source projects like binpatch were started to allow administrators to create binary patches using the BSD make system. This article proposes an alternative method to build binary patches using a chroot environment in an attempt to more closely mirror the instructions given in the OpenBSD patch files."
Order by: Score:
Hmmm
by Archite on Mon 26th Mar 2007 18:05 UTC
Archite
Member since:
2006-01-14

Of course, you could just do this:

1)Create a patch dir (say /usr/patches)
2) patch src and build for each affected system
3) env DESTDIR=/usr/patches make install
4) tar up the files and apply to other system

much easier, IMHO.

Reply Score: 3

RE: Hmmm
by lteo_calyptix on Mon 26th Mar 2007 18:33 UTC in reply to "Hmmm"
lteo_calyptix Member since:
2007-03-25

Thanks for your feedback. I thought about that as well, but the OpenBSD Makefile system may not always obey the DESTDIR approach, especially for those programs using the Makefile.bsd-wrapper file, like Apache.

Reply Score: 1

RE[2]: Hmmm
by Archite on Mon 26th Mar 2007 18:41 UTC in reply to "RE: Hmmm"
Archite Member since:
2006-01-14

Yes, I have experienced that as well. In order to get around that you must play with other env variables. It's only a few and you can do it on a case by case basis. Some of them also panic if the file system is not laid out properly so I usually use mtree to rebuild the structure and then after installing patches remove empty directories.

Reply Score: 3

RE[3]: Hmmm
by lteo_calyptix on Mon 26th Mar 2007 20:42 UTC in reply to "RE[2]: Hmmm"
lteo_calyptix Member since:
2007-03-25

My intent was to avoid Makefile environment variables and be as clean and consistent as possible with each patch -- hence, chroot. ;) Thanks again for your insight.

Reply Score: 2