Mailinglist Archive: opensuse-bugs (4251 mails)

< Previous Next >
[Bug 1038401] libvirt: Usage of systemctrl enable should be changed to %sytemd_add_pre/post
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 10 May 2017 20:36:39 +0000
  • Message-id: <>

James Fehlig <jfehlig@xxxxxxxx> changed:

What |Removed |Added
CC| |behlert@xxxxxxxx,
| |mlatimer@xxxxxxxx
Flags| |needinfo?(behlert@xxxxxxxx)

--- Comment #1 from James Fehlig <jfehlig@xxxxxxxx> ---
(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

Those guidelines only talk about the simple scenario of enabling a single

The package

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 || :
/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 || :

I don't really see how to replace this logic with '%service_*' macros.
Suggestions or references for further reading are welcome. Thanks!

You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >