On Thu, 24 Apr 2025 05:35:41 +0100 Lexi Winter <i...@freebsd.org> wrote:
> Gordon Tetlow: > > A while ago, I was playing around with building stripped down jails > > based on pkgbase and noticed that /bin/sh and a whole host of > > interactive commands is in the FreeBSD-runtime package. > > [...] > > So, my proposal/question is, can we split out the critical libraries > > from the shell and supporting commands in the runtime package so a > > minimal jail could be properly built via pkgbase? > > i see no reason not to do this. FreeBSD-runtime is the default package > that everything else gets lumped into if it hasn't been moved elsewhere, > so there are definitely things in there that shouldn't be. Not anymore, FreeBSD-utilities is the default package for a long time now. > however... i believe there is a general desire to not have a separate > package for every single command, so you may need to put some thought > into the most useful way to organise this. for example, perhaps it > makes sense for FreeBSD-runtime to be a metapackage which depends on > other required packages for a functional basic interactive system. The rational for FreeBSD-runtime is that if you have it (and -clibs since it's a dep) you can boot to single user and have (almost ?) every tools needed to repair your system. > you'd also need to make sure you don't break everyone's system when they > upgrade and don't realise /bin/sh is in a different package that they > neglected to install. Yup, that's the main problem without pkg groups right now. > > What needs to happen to make that work? > > the short version is you need to add PACKAGE=xxx to the Makefiles for > the things you want to move, and then add dependencies in > release/packages/ for other packages which require /bin/sh, e.g. > FreeBSD-rc. > > > Digging around, I found dfr@ asking about this in > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273783. There seemed > > to be agreement from manu@ that making a shell-free environment is a > > good goal we can support. > > as i write this, Bugzilla seems to be offline, buf if there's an > existing PR i trust that some people have already brought up some of the > obvious issues that come to mind. -- Emmanuel Vadot <m...@bidouilliste.com> <m...@freebsd.org>