Page MenuHomeFreeBSD

bsdinstall: Improve pkgbase handling for jails
ClosedPublic

Authored by ivy on Oct 1 2025, 1:27 PM.
Tags
None
Referenced Files
F137882182: D52829.diff
Wed, Nov 26, 8:21 PM
Unknown Object (File)
Tue, Nov 25, 3:16 PM
Unknown Object (File)
Sun, Nov 23, 3:26 AM
Unknown Object (File)
Sat, Nov 15, 6:32 PM
Unknown Object (File)
Fri, Nov 14, 8:49 AM
Unknown Object (File)
Thu, Nov 13, 3:17 AM
Unknown Object (File)
Wed, Nov 12, 6:22 PM
Unknown Object (File)
Tue, Nov 11, 6:21 PM

Details

Summary

Add a new --jail option to the pkgbase script which installs
jail-specific set variants if they exist:

  • "minimal" is replaced with "minimal-jail"
  • For sets shown in the component selection dialogue, only show the appropriate variant (jail or non-jail) for the target.
  • --jail implies --no-kernel, so the kernel also won't be installed in a jail.

Modify the jail script to pass --jail to the pkgbase script.

MFC after: 3 seconds

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67505
Build 64388: arc lint + arc unit

Event Timeline

ivy requested review of this revision.Oct 1 2025, 1:27 PM

Should we remove the --no-kernel option along with this change? I added it specifically for installing jails originally and don't see a use case for using --no-kernel but not --jail.

usr.sbin/bsdinstall/scripts/pkgbase.in
109

I like the decision to describe this logic using a function, the early returns make it much more readable than the equivalent boolean expression.

Should we remove the --no-kernel option along with this change? I added it specifically for installing jails originally and don't see a use case for using --no-kernel but not --jail.

i didn't remove it because i wasn't sure if people might be using it already. but if it was only added in 15.0 then there's probably no reason to keep it.

In D52829#1207617, @ivy wrote:

Should we remove the --no-kernel option along with this change? I added it specifically for installing jails originally and don't see a use case for using --no-kernel but not --jail.

i didn't remove it because i wasn't sure if people might be using it already. but if it was only added in 15.0 then there's probably no reason to keep it.

If you don't see any use-case either I think we should remove it.

Note that --no-kernel is mentioned in the bsdinstall man page currently while --jail is not, it would be good to fix that as well.

Other than that, this patch LGTM!

remove --no-kernel and update the manpage

also remove some additional filtering for sorted_components which is now redundant.

ziaee added a reviewer: manpages.
This revision is now accepted and ready to land.Oct 3 2025, 9:53 AM
This revision was automatically updated to reflect the committed changes.