What | Removed | Added |
---|---|---|
CC | behlert@suse.com, mlatimer@suse.com | |
Flags | needinfo?(behlert@suse.com) |
(In reply to Stefan Behlert from comment #0) > But currently we can see breakages in some products due to services that are > not following the guidelines as described in > > https://en.opensuse.org/openSUSE: > Systemd_packaging_guidelines#Enabling_systemd_unit_files Those guidelines only talk about the simple scenario of enabling a single service. > The package > libvirt > > was identified to use > "systemctl enable" in its spec-file, and it should get replaced by the > proper use of > %sytemd_add_pre/post and preset. libvirt does use %service_add_{pre,post}, %service_del_{preun,postun}, etc. > Please check your package, thanks. The only use of 'systemctl enable' in libvirt.spec is to handle an upgrade scenario. From Factory libvirt.spec: # In upgrade scenario we must explicitly enable virtlockd/virtlogd # sockets, if libvirtd is already enabled and start them if # libvirtd is running, otherwise you'll get failures to start # guests %triggerpostun daemon -- libvirt-daemon < 1.3.0 if [ $1 -ge 1 ] ; then %if %{with_systemd} /usr/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl enable virtlogd.socket || : /usr/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl start virtlogd.socket || : %else /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && /sbin/chkconfig virtlogd on || : /sbin/service libvirtd status 1>/dev/null 2>&1 && /sbin/service virtlogd start || : %endif fi I don't really see how to replace this logic with '%service_*' macros. Suggestions or references for further reading are welcome. Thanks!