Closed nudgegoonies closed 3 years ago
Thanks @nudgegoonies. I agree that the place where the sysbox installer places the "shiftfs.conf" file is not the correct one (i.e., "/etc/modules-load.d/shiftfs.conf").
Reading the man page you referenced, I see:
"Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs)."
Thus, I am thinking the right directory is "/usr/local/lib/modules-load.d", rather than "/usr/lib/modules-load.d". Do you agree?
Thanks again!
Agree with you @nudgegoonies. The file in question is "sysbox-configfs.conf".
Now, concerning the ideal location, i find linux FHS a bit ambiguous on this matter:
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
Locally compiled/installed software would fully fit the above description. Now, we are distributing Sysbox in a distro-package, so we don't need to worry about "being overwritten when the system software is updated", coz the package subsystem (either deb or rpm) prevent that from happening. This seems to be the stance taken by Redhat folks:
In Red Hat Enterprise Linux, the intended use for the /usr/local/ directory is slightly different from that specified by the FHS. The FHS says that /usr/local/ should be where software that is to remain safe from system software upgrades is stored. Since software upgrades can be performed safely with RPM Package Manager (RPM), it is not necessary to protect files by putting them in /usr/local/. Instead, the /usr/local/ directory is used for software that is local to the machine.
On the other hand, Sysbox is not yet part of an official distro-package repository, so you could argue that Sysbox is what FHS refers to as a "local install" ...
As we need to be consistent with the location of our binaries and config-files, and we were already considering to move Sysbox binaries to /usr/bin
(issue #221), i think it makes sense to stick to /usr/lib/modules-load.d
as the proper location to install Sysbox's *.conf files.
In my view the correct location is /usr/local/*
for these, as Sysbox is not a distribution package (yet).
Let's talk.
In my view the correct location is
/usr/local/*
for these, as Sysbox is not a distribution package (yet).
I think not there is no difference between official distribution packages and "other" packages. When using /usr as the base even for "other" packages the workflow that a local administrator can install a higher version manually with "make install" into /usr/local/ still works. And even "other" packages should not overwrite anything in /usr/local i think.
Yep, agree @nudgegoonies.
I think not there is no difference between official distribution packages and "other" packages.
I see; let's stick with /usr/lib
then.
Using /usr/lib/modules-load.d directory the file sysbox-configfs.conf can be removed from the conffiles list in the package. Regarding the prefix i am unsure. Maybe 50-?
Yep, 50-? sounds good. But why are you saying that sysbox-configfs.conf
file can be removed from the package? That file would still be needed to enforce the configfs
module dependency that Sysbox has.
No, not the "sysbox-configfs.conf" file. That file and its content must stay. I mean the "entry" for this file in the "conffiles" debian package configuration file can be removed. The "sysbox-configfs.conf" file does not need to be "marked" as a configuration file.
Oh yes, "conffiles" is gone now as there's no need for it anymore.
These changes will be present in our next release -- just a very few weeks from now. Please let me know if we can close this issue now.
Btw, thanks for all your suggestions + PRs @nudgegoonies, we really appreciate that!
Thank you very much. Yes, can be closed!
Fixed as part of various enhancements made in the Sysbox installer. Closing issue now.
For packages /usr/lib/modules-load.d/*.conf is the correct location. The file should also be prefixed with a priority. Please see here: https://www.freedesktop.org/software/systemd/man/modules-load.d.html