Bug 253989 - freebsd-update: workdir should default to ${basedir}/var/db/freebsd-update
Summary: freebsd-update: workdir should default to ${basedir}/var/db/freebsd-update
Status: Closed DUPLICATE of bug 235318
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-03 16:48 UTC by Alan Somers
Modified: 2024-01-04 03:40 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2021-03-03 16:48:05 UTC
freebsd-update works quite well in tandem with boot environments.  When doing minor upgrades (e.g. 12.0 -> 12.1), I can complete the entire upgrade in the BE and then boot into an upgraded system.  But it's a little less convenient when doing major upgrades, because one must do "freebsd-update install" a final time after reinstalling ports, which must happen after the reboot.  The sequence looks like this:

# bectl create 13.0-BETA3
# bectl mount 13.0-BETA3
# freebsd-update -b /tmp/whatever -d /tmp/whatever/var/db/freebsd-update upgrade -r 13.0-RELEASE
# freebsd-update -b /tmp/whatever -d /tmp/whatever/var/db/freebsd-update install
# freebsd-update -b /tmp/whatever -d /tmp/whatever/var/db/freebsd-update install
# reboot
# pkg update
# pkg upgrade
# freebsd-update install

It's easy to accidentally forget the "-d" argument.  If you do that, then the final "freebsd-update install" won't work, and the only remedy is to revert to the old boot environment and try again.

I propose that freebsd-update's workdir should default to
${BASEDIR}/var/db/freebsd-update .  That would eliminate the need to specify "-d" in most cases, and it would be backwards compatible with the common use case where "-b" is not specified.
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2024-01-03 11:16:56 UTC
Can we close this as dup of Bug 235318? The report is identical.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2024-01-04 03:40:01 UTC

*** This bug has been marked as a duplicate of bug 235318 ***