Bug 1094899

Summary: avahi: script and/or trigger should not directly enable systemd units
Product: [Fedora] Fedora Reporter: Andy Lutomirski <luto>
Component: avahiAssignee: Lennart Poettering <lpoetter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: lpoetter, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-10 13:40:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1090684    

Description Andy Lutomirski 2014-05-06 17:18:53 UTC
My query script thinks that avahi 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 Jaroslav Reznik 2015-03-03 15:46:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 Rex Dieter 2015-10-10 12:39:35 UTC
Those in question include:

%triggerun -- avahi < 0.6.28-1
/usr/bin/systemd-sysv-convert --save avahi-daemon >/dev/null 2>&1 || :
/usr/bin/systemctl --no-reload enable avahi-daemon.service >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart avahi-daemon.service >/dev/null 2>&1 || :

%triggerun dnsconfd -- avahi-dnsconfd < 0.6.28-1
/usr/bin/systemd-sysv-convert --save avahi-dnsconfd >/dev/null 2>&1 || :
/usr/bin/systemctl --no-reload enable avahi-dnsconfd.service >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart avahi-dnsconfd.service >/dev/null 2>&1 || :


Which I think we can probably safely drop now, handling the case of upgrading from < f16 (f16 shipped with avahi-0.6.30-4.fc16).

Comment 3 Rex Dieter 2015-10-10 13:40:38 UTC
%changelog
* Sat Oct 10 2015 Rex Dieter <rdieter> - 0.6.32-0.1.rc
- avahi-0.6.32-rc
- -devel: move dbus-1/interfaces here
- Avahi's IPv6 support is disabled by default (#821127)
- avahi: script and/or trigger should not directly enable systemd units (#1094899)