Page MenuHomeFreeBSD

freebsd-update: improve BE creation feature
ClosedPublic

Authored by kevans on Feb 12 2022, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 12, 5:40 PM
Unknown Object (File)
Sun, Mar 10, 7:59 PM
Unknown Object (File)
Wed, Mar 6, 3:11 AM
Unknown Object (File)
Feb 8 2024, 9:53 PM
Unknown Object (File)
Jan 26 2024, 1:57 PM
Unknown Object (File)
Dec 23 2023, 12:52 AM
Unknown Object (File)
Dec 12 2023, 12:17 AM
Unknown Object (File)
Dec 2 2023, 8:13 PM
Subscribers

Details

Summary

This addresses one nit and one bug in the BE creation feature of
freebsd-update:

The nit addressed is that it currently only names the BEs after the
userland version, but the kernel version may be higher. After this
change, we request both and pass them through sort(1) to choose the
highest. This is especially helpful if a freebsd-update patch touched
one but not the other.

The bug fixed is that roots updated that are not located at '/', e.g.,
by using -b or -j, will no longer create boot environments
automatically. There's a very low chance these will actually change the
BE in any meaningful way, anyways. It could make sense in the future
to allow an argument-override to create the BE anyways if someone comes
up with a non-standard setup, e.g., where a jail is an important part of
their boot environment on an appliance or some such setup.

Half of this patch is submitted by delphij@, the other half kevans@.

PR: 261446

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I had already intended to EN the basedir check, but I don't think there's any reason the VERSION construction shouldn't go with it.

Better than how I was going to do it. I was setting a flag if -b or -j was being used, this is WAY simpler.

This revision is now accepted and ready to land.Feb 12 2022, 6:59 PM
This revision was automatically updated to reflect the committed changes.