Bugzilla – Bug 1207056
systemd missing conf.d directories
Last modified: 2023-11-24 16:41:23 UTC
/etc/systemd/system.conf is recommending, rather than modifying it, to create a droplet in /etc/systemd/system.conf.d/ and /etc/system/user.conf.d (for /etc/systemd/user.conf). can we please ship those directories as part of the systemd package?
(In reply to Dirk Mueller from comment #0) > /etc/systemd/system.conf is recommending, rather than modifying it, to > create a droplet in /etc/systemd/system.conf.d/ and /etc/system/user.conf.d > (for /etc/systemd/user.conf). > > can we please ship those directories as part of the systemd package? Of course you can do that, but I'd prefer to create these directories only if I need them. Reason: I don't want to look into additional empty directories in case of a problem.
If we do that we have create empty /etc/systemd/*.conf.d/ directories for all main config files that systemd or any of its sub-package ship. And most of them will likely remain empty. So I'm not sure it's a good idea. What's wrong with letting the user creates them when needed ?
Ludwig, can you please give your opinion here ? The situation is pretty messy currently since systemd ships *some* empty drop-in directories in /etc already. For consistency sake I assume that we should either ship all of them or none. Given the fact that packages should avoid shipping stuff in /etc these days, if we decide to ship the directories then we should create them via tmpfiles, right ?
Directories are not a problem. They can be created based on information in the rpm database, like microos does today already for /srv and /var: https://confluence.suse.com/pages/viewpage.action?pageId=1157103705 So no extra tmpfiles etc needed. Whether or not we should ship those directories I have no opinion. No harm done by doing so. What seems to be missing is a systemd-analyze edit-config tool though. There's only cat-config, while systemctl has both edit and cat.
This is the correct link: https://github.com/openSUSE/transactional-update/blob/master/sbin/create_dirs_from_rpmdb.c
(In reply to Dirk Mueller from comment #0) > /etc/systemd/system.conf is recommending, rather than modifying it, to > create a droplet in /etc/systemd/system.conf.d/ and /etc/system/user.conf.d > (for /etc/systemd/user.conf). That's actually true and beside the fact that packages should stop shipping files in /etc the reason is that any drop-ins shipped by downstream in /usr override the customisations made by users in the main config files in /etc. We had a discussion on the Factory mailing-list about this issue: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/KWRBTAVQ6MGHVAHKDZZ6GIRX4RMHKHQ6/ and it's been decided to install the main configuration files in /usr/lib instead rather than dropping them completely because they can still be used as templates and `systemd-analyze cat-config` will continue to show the defaults (as commented entries). > can we please ship those directories as part of the systemd package? Yes. This will hopefully encourage users to create drop-ins, which is even more likely when the main config files are missing.
This is an autogenerated message for OBS integration: This bug (1207056) was mentioned in https://build.opensuse.org/request/show/1119192 Factory / systemd
Fix submitted: https://build.opensuse.org/request/show/1119192
This is an autogenerated message for OBS integration: This bug (1207056) was mentioned in https://build.opensuse.org/request/show/1120043 Factory / systemd