Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 850186 - Introduce new systemd-rpm macros in libvirt spec file
Summary: Introduce new systemd-rpm macros in libvirt spec file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 18
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1094914 (view as bug list)
Depends On:
Blocks: 850016 autoenabled-systemd-units
TreeView+ depends on / blocked
 
Reported: 2012-08-21 13:46 UTC by Lukáš Nykrýn
Modified: 2014-05-06 17:28 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-06 20:14:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch replaces scriptlets with new systemd macros (2.21 KB, patch)
2012-10-19 13:01 UTC, Václav Pavlín
no flags Details | Diff

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. ***


Note You need to log in before you can comment on or make changes to this bug.