Page MenuHomeFreeBSD

bsdinstall: Improve pkgbase handling for jails
ClosedPublic

Authored by ivy on Wed, Oct 1, 1:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 8:04 PM
Unknown Object (File)
Thu, Oct 9, 8:04 PM
Unknown Object (File)
Thu, Oct 9, 8:04 PM
Unknown Object (File)
Thu, Oct 9, 8:04 PM
Unknown Object (File)
Thu, Oct 9, 5:20 PM
Unknown Object (File)
Sun, Oct 5, 6:56 PM
Unknown Object (File)
Sun, Oct 5, 1:39 PM
Unknown Object (File)
Sun, Oct 5, 11:59 AM

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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Wed, Oct 1, 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.Fri, Oct 3, 9:53 AM
This revision was automatically updated to reflect the committed changes.