Bug 1094910 - ipmiutil: script and/or trigger should not directly enable systemd units
Summary: ipmiutil: script and/or trigger should not directly enable systemd units
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ipmiutil
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andy Cress
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: autoenabled-systemd-units
TreeView+ depends on / blocked
 
Reported: 2014-05-06 17:19 UTC by Andy Lutomirski
Modified: 2014-05-06 21:38 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-06 21:38:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andy Lutomirski 2014-05-06 17:19:36 UTC
My query script thinks that ipmiutil has a script or trigger that directly enables a systemd unit using 'systemctl enable'.  It probably should not.  Please update this packages to use the macroized scriptlet (https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd).

If your package has an exception from FESCo permitting it to enable
itself, please make sure that the service in question is listed in the
appropriate preset file.

There is a general exception described here:

https://fedoraproject.org/wiki/Starting_services_by_default

If your package falls under the general exception, then it is possible
that no change is required.  Nevertheless, if you are relying on the
exception, please make sure that your rpm scripts are sensible.  The
exception is:

In addition, any service which does not remain persistent on the system (aka, it "runs once then goes away"), does not listen to incoming connections during initialization, and does not require configuration to be functional may be enabled by default (but is not required to do so). An example of "runs once then goes away" service is iptables.

Given that this issue can affect Fedora 20 users who install your
package as a dependency, this bug should be fixed in Fedora 20 and
Rawhide.

Comment 1 Andy Cress 2014-05-06 20:03:59 UTC
I'm confused that the query detected this as not already implemented.
In the upstream and rawhide ipmiutil.spec, it shows:

%if 0%{?fedora} >= 18
%systemd_post  ipmiutil_evt.service
%systemd_post  ipmiutil_asy.service
%systemd_post  ipmiutil_wdt.service
%systemd_post  ipmi_port.service
%endif
...
%if 0%{?fedora} >= 18
%systemd_preun  ipmiutil_evt.service
%systemd_preun  ipmiutil_asy.service
%systemd_preun  ipmiutil_wdt.service
%systemd_preun  ipmi_port.service
%else
...
%if 0%{?fedora} >= 18
%systemd_postun_with_restart  ipmi_port.service
%else

See http://pkgs.fedoraproject.org/cgit/ipmiutil.git/tree/ipmiutil.spec?id=39f162e361586ed45ab497c5ac38f67047121f69 

What exactly is not in compliance?

Comment 2 Andy Lutomirski 2014-05-06 21:38:13 UTC
Sorry, script bug on my part.  I caught this:

  # systemctl enable ipmi_port.service >/dev/null 2>&1 || :

because my comment-detecting regex was wrong.


Note You need to log in before you can comment on or make changes to this bug.