Red Hat Bugzilla – Bug 850186
Introduce new systemd-rpm macros in libvirt spec file
Last modified: 2014-05-06 13:28:56 EDT
Fedora 18 changes the way how to work with services in spec files. It introduces new macros - %systemd_post, %systemd_preun and %systemd_postun; which replace scriptlets from Fedora 17 and older (see https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd, https://bugzilla.redhat.com/show_bug.cgi?id=850016).
Created attachment 630021 [details]
Patch replaces scriptlets with new systemd macros
Would you mind also posting the proposed patch upstream at firstname.lastname@example.org for a faster review?
Posted to the list.
Unfortunately, the libvirt.spec file has to continue to work with Fedora 17, and therefore, we cannot convert to the scriptlets until F17 is retired as obsolete. I'm tempted to close this as WONTFIX, except that I want something still around so that we remember to revisit this in a year.
(In reply to comment #4)
> Unfortunately, the libvirt.spec file has to continue to work with Fedora 17,
> and therefore, we cannot convert to the scriptlets until F17 is retired as
Another alternative would be to backport the scriptlet support into F17, so that use of the scriptlets when building on F17 doesn't break libvirt, but that would require a bug against systemd.
(In reply to comment #3)
> Posted to the list.
For reference, here is the list conversation:
I sent new patch upstream. Do you need another updated patch for Fedora?
I think we can just wait to apply this until after F18 is out, then we don't need to worry about virt-preview
The upstream patch is now applied, and conditional on snippet support being present, so it should be safe for F18 (via 0.10.2.2) without negatively impacting F17 fedora-virt-preview.
Author: Václav Pavlín <email@example.com>
Date: Thu Oct 25 12:10:55 2012 +0200
spec: replace scriptlets with new systemd macros
I added %with_systemd_macros so it should now work in F17 with old
scriptlets and in F18+/RHEL7+ with systemd macros
I missed libvirt-guests.service because there is no systemctl call for
it. So I only added systemd macros calls.
libvirt-0.10.2.2-1.fc18 has been submitted as an update for Fedora 18.
*** Bug 1094914 has been marked as a duplicate of this bug. ***