Bug 1009888

Summary: unexpanded macros in scripts
Product: [Fedora] Fedora Reporter: David Juran <djuran>
Component: keepalivedAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact: Ryan O'Hara <rohara>
Priority: unspecified    
Version: 19CC: matthias, rohara
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: keepalived-1.2.8-2.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-29 01:23:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Juran 2013-09-19 12:31:08 UTC
Description of problem:
[djuran@localhost ~]$ rpm -q --scripts keepalived
postinstall scriptlet (using /bin/sh):
%systemd_post keepalived.service
preuninstall scriptlet (using /bin/sh):
%systemd_preun keepalived.service
postuninstall scriptlet (using /bin/sh):
%systemd_postun_with_restart keepalived.service



Version-Release number of selected component (if applicable):
keepalived-1.2.8-1.fc19

Comment 1 Ryan O'Hara 2013-09-19 15:37:48 UTC
Looks like I forgot the BuildRequires: systemd in the spec file. I also changed Requires(post,preun,postun) to systemd. Thanks for catching this bug.

Comment 2 Ryan O'Hara 2013-09-19 15:38:43 UTC
With fix:

$ rpm -q --scripts keepalived
postinstall scriptlet (using /bin/sh):

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset keepalived.service >/dev/null 2>&1 || : 
fi
preuninstall scriptlet (using /bin/sh):

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable keepalived.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop keepalived.service > /dev/null 2>&1 || : 
fi
postuninstall scriptlet (using /bin/sh):

/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        /usr/bin/systemctl try-restart keepalived.service >/dev/null 2>&1 || : 
fi

Comment 3 Fedora Update System 2013-09-19 15:53:17 UTC
keepalived-1.2.8-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/keepalived-1.2.8-2.fc19

Comment 4 Fedora Update System 2013-09-19 20:05:53 UTC
keepalived-1.2.8-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/keepalived-1.2.8-2.fc20

Comment 5 David Juran 2013-09-20 11:22:19 UTC
Problem with the fix is that the %preuninstall of the old package fails so if you run "yum update", you'll end up with both the new and the old version. On the other hand, I'm not sure how to fix this in a good way either )-:

Comment 6 Fedora Update System 2013-09-20 16:20:41 UTC
Package keepalived-1.2.8-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing keepalived-1.2.8-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17193/keepalived-1.2.8-2.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-09-29 01:23:00 UTC
keepalived-1.2.8-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-09-30 00:33:16 UTC
keepalived-1.2.8-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.