On Mon, 12 Dec 2022 at 20:21, Lee Duncan
On 12/12/22 08:34, Callum Farmer wrote:
Hi all,
As many of you will have seen there is an ongoing effort to move config files which currently sit in /etc to /usr (where possible). I just wanted to provide a quick overview of the wider changes and how this affects new packages.
DBUS-1 conf files: - Currently in /etc/dbus-1/system.d - Moving to /usr/share/dbus-1/system.d - If this is a change to an existing package, please file a SUSE security bug before sending it to Factory (example: https://bugzilla.suse.com/show_bug.cgi?id=1204055) - If this is a new package, please try to move the file to the /usr location and then you'll have to create a security bug anyway for Factory inclusion.
pam.d files: - Currently in /etc/pam.d - Moving to /usr/lib/pam.d - Please use the %_pam_vendordir macro - These were previously moving to /usr/etc/pam.d (SUSE location) but then upstream created a vendor location so we follow that, files located in /usr/etc will still be read.
XDG autostart files: - Currently in /etc/xdg/autostart - Moving to /usr/etc/xdg/autostart - There previously was an issue where files located in /usr/etc weren't being detected by the systemd generator, this was fixed (ref: https://github.com/openSUSE/aaa_base/pull/118) (bug: https://bugzilla.suse.com/show_bug.cgi?id=1201802)
System user accounts and groups: - Currently created by useradd in %pre - Moving to creation based on /usr/lib/sysusers.d conf file (systemd / sysuser-shadow) - Information on how to create a sysusers.d file can be found at: https://en.opensuse.org/openSUSE:Packaging_guidelines#Users_and_Groups
Notes: - When moving existing packages config files to /usr, you will require a section in the %pre and %posttrans sections to restore the admin's copy of the conf file (ref: https://en.opensuse.org/openSUSE:Packaging_UsrEtc#Moving_of_configuration_fi...). Although this doesn't really apply to the dbus-1 changes since admins typically would have no reason to overwrite them. - Don't use %config or %config(noreplace) on the /usr version of the file
More information on other smaller changes and packaging information can be found here: https://en.opensuse.org/openSUSE:Packaging_UsrEtc
P.S. This was a quick general guide, so some information may be slightly wrong.
So you expect upstream packages we use in openSUSE to create a layered configuration file system, since systemd does it that way?
Why is my small guide to an active SUSE driven change suddenly controversial? No, only if they already support it or when SUSE can easily patch the program
The way I see it, I'd have to submit changes upstream to do this (ignoring the hours of work it would take), then hope they accept them, and if they do then other distributions using the code would have to change as well. And all to support some transactional model layered on top of Linux?
If the program doesn't support this at the moment, that's still fine, no need to do anything. This is mostly only in the documented cases on the wiki. If the program has one of the documented cases but the build system doesn't have an option to move the file, you can move it in packaging.
I guess at some point you're just going to have to quit supporting many packages then.
Exactly why this isn't for everything and why I didn't say that.
-- Lee Duncan Owner of half a dozen packages that use /etc for config files.
Was this necessary? -- Callum Farmer gmbr3@opensuse.org openSUSE - gmbr3