Bug 290988 - sysutils/firstboot-freebsd-update: does not work on pkgbase images
Summary: sysutils/firstboot-freebsd-update: does not work on pkgbase images
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Colin Percival
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-12 23:37 UTC by Alan Somers
Modified: 2025-11-12 23:40 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cperciva)


Attachments
Detect pkgbase systems, and upgrade with pkg instead of with freebsd-update (2.66 KB, patch)
2025-11-12 23:40 UTC, Alan Somers
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2025-11-12 23:37:56 UTC
sysutils/firstboot-freebsd-update unconditionally tries to execute freebsd-update.  On a pkgbase image, that doesn't work.  Instead, it should try to update the image using pkg.  If this script had been working, then a freebsd-15-0-BETA5 image would be working, despite bug #290982 .
Comment 1 Alan Somers freebsd_committer freebsd_triage 2025-11-12 23:40:41 UTC
Created attachment 265385 [details]
Detect pkgbase systems, and upgrade with pkg instead of with freebsd-update

Here's a WIP patch.  But there are two open questions:

Under what conditions should the script request a reboot?

Might a "pkg upgrade -y" be too aggressive?  Such a command would upgrade potentially many more packages than "freebsd-update install".  Would it be a bad thing if we automatically upgrade all packages on firstboot?  If so, we'll have to narrow down the command somehow.