Hello, as per subject, what is the stance on dropping anything there from a rpm ? Either marked as %{config} or not ?
My naive reading of the Packaging guidelines is that nothing should be dropped in there by a package, but the guidelines only explicitly talk about not putting "service" files in there.
There is now a debate with a package maintainer that is putting in the etc/systemd/system/<..> directory what he calls a "configuration file, not a unit file".
I seek clarification about this so that we can settle this matter.
Regards, Simo.
On Tue, Mar 14, 2017 at 06:31:46AM -0400, Simo Sorce wrote:
Hello, as per subject, what is the stance on dropping anything there from a rpm ? Either marked as %{config} or not ?
My naive reading of the Packaging guidelines is that nothing should be dropped in there by a package, but the guidelines only explicitly talk about not putting "service" files in there.
The packaging guidelines actually use 'unit file' as the term
https://fedoraproject.org/wiki/Packaging:Systemd#Filesystem_locations
"Packages with systemd unit files *must* put them into %{_unitdir}. %{_unitdir} evaluates to /lib/systemd/system"
From that I'd say any RPM putting unit files into /etc/systemd/system is not compliant, regardless of whether its a full unit file, or a override unit file in a '.d' directory.
There is now a debate with a package maintainer that is putting in the etc/systemd/system/<..> directory what he calls a "configuration file, not a unit file".
A unit file provides configuration for a service (or other type of systemd resource). So saying 'configuration file, not a unit file' doesn't make conceptual sense - they're one & the same thing.
Regards, Daniel
On Tue, Mar 14, 2017 at 10:50:57AM +0000, Daniel P. Berrange wrote:
On Tue, Mar 14, 2017 at 06:31:46AM -0400, Simo Sorce wrote:
Hello, as per subject, what is the stance on dropping anything there from a rpm ? Either marked as %{config} or not ?
My naive reading of the Packaging guidelines is that nothing should be dropped in there by a package, but the guidelines only explicitly talk about not putting "service" files in there.
The packaging guidelines actually use 'unit file' as the term
https://fedoraproject.org/wiki/Packaging:Systemd#Filesystem_locations
"Packages with systemd unit files *must* put them into %{_unitdir}. %{_unitdir} evaluates to /lib/systemd/system"
From that I'd say any RPM putting unit files into /etc/systemd/system is not compliant, regardless of whether its a full unit file, or a override unit file in a '.d' directory.
Exactly. Distro packages putting files in /etc/systemd is also contrary to systemd logic (/usr/lib is for packaging, /etc is for the admin). Everything which can be put underneath /etc/systemd/system can be put under /usr/lib/systemd/system also.
This nicely avoids any questions about %config vs %config(noreplace) vs. anything else.
Zbyszek
On Tue, Mar 14, 2017 at 06:31:46AM -0400, Simo Sorce wrote:
Hello, as per subject, what is the stance on dropping anything there from a rpm ? Either marked as %{config} or not ?
My naive reading of the Packaging guidelines is that nothing should be dropped in there by a package, but the guidelines only explicitly talk about not putting "service" files in there.
There is now a debate with a package maintainer that is putting in the etc/systemd/system/<..> directory what he calls a "configuration file, not a unit file".
I seek clarification about this so that we can settle this matter.
Regards, Simo. _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-leave@lists.fedoraproject.org
Given that the packaging guidelines are vague, I'd say theres nothing that explicitly prevents him from adding configuration there. That said, it seems to make very little sense to do so, given that there is no precident, and there is lots of precident for alternate locations (environment settings should go in /etc/sysconfig, i.e. %sysconfdir, application specific settings in private /etc/<app> subdirectory, and so on). At the very least I would argue that configuration in /etc/systemd should be configuration specific to the systemd daemon (see the various *.conf files there), and stuff under .../system is clearly for the placement of unit files. Adding non-unit files to that location just makes systemd have to iterate longer when reloading units as it scans the directory there.
Neil
Le 14/03/2017 à 11:31, Simo Sorce a écrit :
Hello, as per subject, what is the stance on dropping anything there from a rpm ? Either marked as %{config} or not ?
s/anything/any file/
Some packages own directories there as it is the right place to drop additional configuration options.
e.g. rpm -ql php-fpm | grep /etc/systemd /etc/systemd/system/php-fpm.service.d
And perhaps we could own (%ghost) the override.conf file
Remi
P.S. this directory wad added, because of comments in deprecated /etc/sysconfig/php-fpm about dropping a file there, now mostly replaced by a comment about using "systemctl edit" command.