Making OpenBSD Binary Patches With Chroot 66
Posted
by
kdawson
from the sometimes-a-cigar-is-just-a-stogie dept.
from the sometimes-a-cigar-is-just-a-stogie dept.
Lawrence Teo writes "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 suitable for systems that don't have the OpenBSD compiler set installed for whatever reason, 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."
Similar to existing techniques? (Score:3, Informative)
Furthermore, the FreeBSD manual recommends a similar procedure for automated building of package lists (lists of files installed by a package): create a regular port, install it into a temporary copy of a base filesystem, and use mtree to figure out what files were modified during the installation process. In this case no chroot environment is used, since ports are expected to honour the installation prefix (given in PREFIX).
So it's a pretty well-established technique; I'm not even sure using it to upgrade the base system is novel: as of late, FreeBSD provides binary updates to its operating system in addition to the traditional source upgrades (and binary releases), although I'm not sure how these packages are created.
Re:disk constraints? (Score:3, Informative)
Re:disk constraints? (Score:4, Informative)
We use flash memory, and the space and rewrite cycle requirements for compiling on this are prohibitive.
Just like Gerardo Santana's work (Score:3, Informative)
Re:Packages? (Score:3, Informative)
Maintenance actually gets easier, the more machines you have. If you need to build from ports for some reason, you only have to do it once, and can distribute the generated packages across as many systems as you want. Ditto for updating the base system, you just have to build it, then you can make dist sets to distribute.
You're not even a good troll.