Applying security patches without reinstalling the whole system

So FreeBSD used to provide what to update specific parts of the system from source in their security advisories/erratas.

Then quite a while ago (it's been several years) stopped doing that.

I'm wondering:
  • what was the reason? Was it because people used freebsd-upgrade
  • is there a way for me to figure that out?
For example: https://www.freebsd.org/security/advisories/FreeBSD-EN-26:18.tzdata.asc
Is it enough to just run:

cd /usr/src/share/zoneinfo
make install

?

Is there some simple way to figure that out?
 
I have no idea about your system because of lack of detail.
This still works for me.
freebsd-update fetch install
Depending on patches maybe reboot then check.
freebsd-version -kru
 
The OP wants to apply patches and build from source, but is saying the simple instructions on how to do so no longer seem to be provided.

Like you, I use freebsd-update and I do not know the answers to the patching-when-building-from-source questions.
 
The instructions are still there, but are rather "broad" - build everything in this case (from the tzdata.asc patch above):
Code:
3) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-26:18/tzdata-2026c.patch
# fetch https://security.FreeBSD.org/patches/EN-26:18/tzdata-2026c.patch.asc
# gpg --verify tzdata-2026c.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch -E -p0 < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

Restart all the affected applications and daemons, or reboot the system.
So you are hoping for narrower instructions in subsection (c), rather than build & install the world?
 
From the advisory:

IV. Workaround

The system administrator can install an updated version of the IANA Time Zone
Database from the misc/zoneinfo port and run tzsetup(8).
 
Yes that's true, but to do it properly I should reboot to single user, then run etcupdate. On top of that the inodes of files that not supposed to change change so it also impacts backup.
 
The main reason is: don't compile if you can update on an other way.

There is freebsd-update, but it's not working for STABLE or CURRENT versions.
If you are on RELEASE versions, it's just a waste of time, unless you have a personal patch somewhere in the system.

And now, even if you are on STABLE or CURRENT versions, pkgbase does updates without compiling.

So, are you sure you're still needing compiling or is it just a habit?
 
I never run etcupdate. Every now and then I add missing UIDs and GIDs.
But the /usr/src/UPDATING says:
[4] Note: This step is non-optional. Failure to do this step
can result in a significant reduction in the functionality of the
system. Attempting to do it by hand is not recommended and those
that pursue this avenue should read this file carefully, as well
as the archives of freebsd-current and freebsd-hackers mailing lists
for potential gotchas. See etcupdate(8) for more information.
Yeah, I know with security patches it's unlikely to change, but there is a chance and the footnote must have been added because people weren't running it.
In any case this is just one step, the others still apply.

So, are you sure you're still needing compiling or is it just a habit?
I do have some minor changes, but main reason is that I enable optimizations for my CPU.

Anyway I know I could use freebsd-upgrade and that's why I mentioned it in the initial post, I'm just wondering if there's an easy way to just run subset installation, but I'm guessing it's not unless you intimately know how how the Makefiles are designed.
 
Back
Top