Bug 1207056 - systemd missing conf.d directories
Summary: systemd missing conf.d directories
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: systemd maintainers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-11 14:12 UTC by Dirk Mueller
Modified: 2023-11-24 16:41 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Mueller 2023-01-11 14:12:41 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?
Comment 1 Michael Hirmke 2023-01-11 16:33:20 UTC
(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.
Comment 2 Franck Bui 2023-01-24 13:54:38 UTC
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 ?
Comment 3 Franck Bui 2023-03-03 08:51:33 UTC
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 ?
Comment 4 Ludwig Nussel 2023-03-06 12:18:48 UTC
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.
Comment 5 Ludwig Nussel 2023-03-06 17:17:29 UTC
This is the correct link:
https://github.com/openSUSE/transactional-update/blob/master/sbin/create_dirs_from_rpmdb.c
Comment 6 Franck Bui 2023-10-18 09:29:48 UTC
(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.
Comment 7 OBSbugzilla Bot 2023-10-20 10:25:13 UTC
This is an autogenerated message for OBS integration:
This bug (1207056) was mentioned in
https://build.opensuse.org/request/show/1119192 Factory / systemd
Comment 8 Franck Bui 2023-10-20 12:49:46 UTC
Fix submitted: https://build.opensuse.org/request/show/1119192
Comment 9 OBSbugzilla Bot 2023-10-24 16:15:02 UTC
This is an autogenerated message for OBS integration:
This bug (1207056) was mentioned in
https://build.opensuse.org/request/show/1120043 Factory / systemd