Bug 850186

Summary: Introduce new systemd-rpm macros in libvirt spec file
Product: [Fedora] Fedora Reporter: Lukáš Nykrýn <lnykryn>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 18CC: berrange, clalancette, crobinso, eblake, itamar, jforbes, jyang, laine, libvirt-maint, luto, veillard, virt-maint, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-06 20:14:59 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: 850016, 1090684    
Attachments:
Description Flags
Patch replaces scriptlets with new systemd macros none

Description Lukáš Nykrýn 2012-08-21 13:46:45 UTC
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).

Comment 1 Václav Pavlín 2012-10-19 13:01:27 UTC
Created attachment 630021 [details]
Patch replaces scriptlets with new systemd macros

Comment 2 Eric Blake 2012-10-19 13:07:51 UTC
Would you mind also posting the proposed patch upstream at libvir-list for a faster review?

Comment 3 Václav Pavlín 2012-10-24 11:05:46 UTC
Posted to the list.

Comment 4 Eric Blake 2012-10-24 17:18:41 UTC
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.

Comment 5 Eric Blake 2012-10-24 17:19:42 UTC
(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.

Comment 6 Eric Blake 2012-10-24 17:21:04 UTC
(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

Comment 7 Václav Pavlín 2012-10-25 13:02:28 UTC
I sent new patch upstream. Do you need another updated patch for Fedora?

Comment 8 Cole Robinson 2012-10-27 17:04:18 UTC
I think we can just wait to apply this until after F18 is out, then we don't need to worry about virt-preview

Comment 9 Eric Blake 2012-11-05 21:32:03 UTC
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.

Comment 10 Fedora Update System 2012-12-10 00:47:42 UTC
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

Comment 11 Eric Blake 2014-05-06 17:28:56 UTC
*** Bug 1094914 has been marked as a duplicate of this bug. ***