Bug 1142367 - libvirt %preun script is broken
Summary: libvirt %preun script is broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-16 16:10 UTC by Jerry James
Modified: 2014-09-17 16:09 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-17 16:09:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2014-09-16 16:10:54 UTC
Description of problem:
While updating packages on a Rawhide box today:

...
  Cleanup    : libvirt-daemon-driver-storage-1.2.8-1.fc22.x86_64        130/189 
/var/tmp/rpm-tmp.w5Leu0: line 8: libvirtd.socket: command not found
error: %preun(libvirt-daemon-1.2.8-1.fc22.x86_64) scriptlet failed, exit status 127
Error in PREUN scriptlet in rpm package libvirt-daemon-1.2.8-1.fc22.x86_64
  Cleanup    : libvirt-daemon-1.2.8-1.fc22.x86_64                       131/189 
...
$ rpm -q --scripts libvirt-daemon
...
preuninstall scriptlet (using /bin/sh):
            
if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable \ > /dev/null 2>&1 || : 
        systemctl stop \ > /dev/null 2>&1 || : 
fi 
                libvirtd.socket \
                libvirtd.service \
                virtlockd.socket \
                virtlockd.service
...

The new version of the package has the same broken %preun script.

Version-Release number of selected component (if applicable):
libvirt-daemon-1.2.8-2.fc22.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Have a previous version of libvirt-daemon installed on a Rawhide box
2. yum upgrade libvirt-daemon
3.

Actual results:
The update fails because of an error in %preun.

Expected results:
Clean upgrade.

Additional info:

Comment 1 Eric Blake 2014-09-16 16:20:55 UTC
same as bug 1136736 for RHEL; fix is 

commit 6209454d5b10c2d89faab8a56b250f1569d823fe
Author: Jiri Denemark <jdenemar>
Date:   Wed Sep 3 10:51:14 2014 +0200

    spec: Fix preun script for daemon
    
    %systemd_preun macro cannot be split into several lines.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1136736
    
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 2 Cole Robinson 2014-09-17 16:09:13 UTC
Fixed in libvirt-1.2.8-3.fc22


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