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 libvir-list 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 > obsolete. 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: https://www.redhat.com/archives/libvir-list/2012-October/msg01427.html
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. commit ec02d49dfd98313d1c8c4179e88754f10a82ca46 Author: Václav Pavlín <vpavlin> Date: Thu Oct 25 12:10:55 2012 +0200 spec: replace scriptlets with new systemd macros https://bugzilla.redhat.com/850186 I added %with_systemd_macros so it should now work in F17 with old scriptlets and in F18+/RHEL7+ with systemd macros (see https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd) 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. https://admin.fedoraproject.org/updates/libvirt-0.10.2.2-1.fc18
*** Bug 1094914 has been marked as a duplicate of this bug. ***