Open bluca opened 1 year ago
A first bunch, starting with a minimal OS running containers.
APT and dpkg both don't support it. I haven't figured out the behavior for APT yet, tbh, it's weird because essentially everything is drop-ins for apt.conf these days.
glibc for /etc/services (used by getservbyname/getservbyport, which make little sense and are not widely used, but there still are some applications which do). It should be moved under /usr.
getservbyname/getservbyport
are using NSS as backend. There are NSS modules for nearly every location, not only /etc/services
, NIS or LDAP, but also for /usr
. There is e.g. https://github.com/openSUSE/libnss_usrfiles, which, with the /etc/nsswitch.conf
option services: files usrfiles
looks at first for entries in /etc/services
and afterwards in /usr/etc/services
. More such modules exists, so in my opinion, this task is solved, it's just in the responsibility of the Linux distributior to package the best fitting variant and configure it. openSUSE Tumbleweed/MicroOS are doing this since many years.
So this is solved for aliases, ethers, protocols, rpc and services.
/etc/shells
is not handled by NSS, so solving that will be more complicated.
I dare to add to the list :
There's currently https://github.com/systemd/systemd/pull/28919 to address this issue by giving the possibility to downstream to ship the config files in /usr/lib but for some reasons the idea has not been well received.
@fbuihuu systemd's config files in /etc/ are just decoration. Entirely redundant, they are pretty much just helpful hints to people who want to sue traditional populated /etc/. If you delete them for modern systems that come up without /etc/ then behaviour is not changed whatsoever.
All options listed in them just give users hints on the available settings and their defaults, and those options are fully commented, hence these files are NOPs.
Next package list:
For glibc I missed yesterday:
This are now all packages from our minimal installation of MicroOS as ContainerHost beside openssh.
I spoke already with the openssh developers about this some time ago, they rejected all ideas to modify configuration file handling. So we (openSUSE) reconfigured the configuration file setup to mimic hermetic-usr as far as possible, open issue is AcceptEnv
, which you cannot overwrite.
Question is how far do we want to go with that list? I could go as next through a typical server installation and desktop system, but I don't know if this would be really helpful, as the list is already long and it would mix up packages with different priority.
This are now all packages from our minimal installation of MicroOS as ContainerHost beside openssh. I spoke already with the openssh developers about this some time ago, they rejected all ideas to modify configuration file handling. So we (openSUSE) reconfigured the configuration file setup to mimic hermetic-usr as far as possible, open issue is
AcceptEnv
, which you cannot overwrite.
Yeah I had the same experience some years past, openssh as a project is just not interested in anything that doesn't directly benefit BSD. Should we set up a Linux-focused fork, where we can co-maintain patches?
Question is how far do we want to go with that list? I could go as next through a typical server installation and desktop system, but I don't know if this would be really helpful, as the list is already long and it would mix up packages with different priority.
I think this is a good starting point, being core packages they are the highest value to fix. Once we have made a dent in the current list, then we could start looking at a server installation.
nscd (/etc/nscd.conf)
nscd is on its way out: https://fedoraproject.org/wiki/Changes/RemoveNSCD. IIRC, the intent was to also propose the same from glibc upstream if the experiment in Fedora is successful.
Apparmor is another one that doesn't support any kind of vendordir at the moment.
/etc/rsyncd.conf should be solved with: https://github.com/WayneD/rsync/pull/551
util-linux (/etc/blkid.conf): https://github.com/util-linux/util-linux/pull/2616
I have fixed mailx (/etc/mail.rc) in SUSE OBS: https://build.opensuse.org/request/show/1131341 I would like to do it upstream too, but I do not find the code stream to which I can make a PR. Does anyone know where mailx is hosted upstream ? I know, it is really old code :-)
In Debian we ship bsd-mailx: https://tracker.debian.org/pkg/bsd-mailx which according to package metadata comes from https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mail/
In Debian we ship bsd-mailx: https://tracker.debian.org/pkg/bsd-mailx which according to package metadata comes from https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mail/
Thanks for hint ! I have sent a patch to tech@openbsd.org .
I filed this bug against Fedora's authselect now:
I have made a PR for fcoe-utils: https://github.com/openSUSE/fcoe-utils/pull/24
I have submitted a patch for selinux: https://github.com/SELinuxProject/selinux/pull/415
DNF 5 supports hermetic configuration since 5.1.4.
https://github.com/rpm-software-management/dnf5/pull/813 https://github.com/rpm-software-management/dnf5/pull/820 https://github.com/rpm-software-management/dnf5/pull/882
What about ca-certificates? That one seems to be prominently missing from the list? Debian already seems to put certificates in /usr/share/ca-certificates, whereas Fedora uses /etc/pki and OpenSUSE /var/lib/ca-certificates? It'd be great if we could standardize on /usr/share/ca-certificates in some form (not familiar with the details)
I have submitted a patch for open-iscsi: https://github.com/open-iscsi/open-iscsi/pull/437
What about ca-certificates? That one seems to be prominently missing from the list? Debian already seems to put certificates in /usr/share/ca-certificates, whereas Fedora uses /etc/pki and OpenSUSE /var/lib/ca-certificates? It'd be great if we could standardize on /usr/share/ca-certificates in some form (not familiar with the details)
A /usr/share/pki
hierarchy as an equivalent to the one in /etc/pki
would allow moving most of this stuff.
Another one that seems to be missing is openssl
This issue will be used to track Linux projects that do not currently support hermetic-usr configuration style (ie: /usr/lib/foo as default, /run/foo as ephemeral local override, /etc/foo as persistent local override). The purpose is to have a cross-distribution list of items to slowly work through, to be able to have a bootable and working minimal Linux image-based system with only /usr.
This list is not definitive and will get updated as we go.
/etc/shells
(ref: https://github.com/linux-pam/linux-pam/issues/498#issuecomment-1288457808)/etc/services
(used bygetservbyname
/getservbyport
, which make little sense and are not widely used, but there still are some applications which do). It should be moved under/usr
./etc/dnf/dnf.conf
/etc/systemd
/etc/udev
/etc/X11/xinit/xinitrc.d/50-systemd-user.sh