Bug 947627

Summary: transmission-2.77-1.fc17.x86_64 spews errors from Fedora 18+ specific %systemd_post macro
Product: [Fedora] Fedora Reporter: Anders Kaseorg <andersk>
Component: transmissionAssignee: Rahul Sundaram <metherid>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: abdulkarimmemon, arun031283, bill-bugzilla.redhat.com, charles, jhaar, jspaleta, kumarpraveen.nitdgp, metherid, raghusiddarth, sanjay.ankur, tengel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-26 23:56:49 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 Anders Kaseorg 2013-04-02 21:32:05 UTC
transmission-2.77-1.fc17.x86_64 uses the %systemd_post macro (see bug 850345), which was introduced in Fedora 18.  This macro is unexpanded on Fedora 17, resulting in shell errors when the shell mistakes it for a job control command.

Non-fatal POSTIN scriptlet failure in rpm package transmission-2.77-1.fc17.x86_64
/var/tmp/rpm-tmp.4dbqCN: line 1: fg: no job control
warning: %post(transmission-2.77-1.fc17.x86_64) scriptlet failed, exit status 1

Comment 1 Rahul Sundaram 2013-04-02 22:13:00 UTC
ouch.  I will fix this now.

Comment 2 Fedora Update System 2013-04-02 22:46:37 UTC
transmission-2.77-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/transmission-2.77-2.fc17

Comment 3 Fedora Update System 2013-04-04 23:58:35 UTC
Package transmission-2.77-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing transmission-2.77-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4825/transmission-2.77-2.fc17
then log in and leave karma (feedback).

Comment 4 Anders Kaseorg 2013-04-05 02:38:50 UTC
This needs some kind of workaround to clean up after the previous release’s broken %preun.

Running Transaction
  Updating   : transmission-2.77-2.fc17.x86_64                              1/2
Error in PREUN scriptlet in rpm package transmission-2.77-1.fc17.x86_64
/var/tmp/rpm-tmp.GvYgwZ: line 1: fg: no job control
error: %preun(transmission-2.77-1.fc17.x86_64) scriptlet failed, exit status 1
  Verifying  : transmission-2.77-2.fc17.x86_64                              1/2
  Verifying  : transmission-2.77-1.fc17.x86_64                              2/2

Updated:
  transmission.x86_64 0:2.77-2.fc17

Failed:
  transmission.x86_64 0:2.77-1.fc17

Complete!
[root@scripts-f17-dev ~]# rpm -q transmission
transmission-2.77-1.fc17.x86_64
transmission-2.77-2.fc17.x86_64

Comment 5 Rahul Sundaram 2013-04-05 03:38:15 UTC
Ok.  Let me workout what needs to be done.

Comment 6 Rahul Sundaram 2013-04-25 22:12:28 UTC
there doesn't appear to be a way to fix this automatically unfortunately since you have already installed the broken package and the preun of that is going to run when it gets uninstalled.  You can however workaround this manually using rpm -e --noscripts on the older package and then installing the newer one.

Comment 7 Fedora Update System 2013-04-26 23:56:51 UTC
transmission-2.77-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Arun Iyer 2013-06-03 17:30:55 UTC
PSA
Upgrade transmission:
1. sudo yum update transmission
2. Check "rpm -q transmission", should show
$ rpm -q transmission
transmission-2.77-1.fc17.x86_64
transmission-2.77-2.fc17.x86_64
3. Do rpm -e --noscripts transmission-2.77-1.fc17.x86_64

Comment 9 Bill McGonigle 2013-07-02 14:19:09 UTC
Thanks, Arun.  Really, thousands of people have to manually clean up from this packaging error?  I'm skeptical that there's NO way to handle this with yum and the packaging system.  Perhaps no trivial way, but that's part of maintaining a distro.

Comment 10 Jason Haar 2013-07-04 00:33:59 UTC
I was just pinged by this too (and the "--noscripts" worked). Couldn't you use a "pre-script" in the fixed/upgraded version to forcibly uninstall the broken version? A total hack I admit, but otherwise people will not be able to move on without fairly specific knowledge 

Jason

Comment 11 Conrad Meyer 2013-07-17 06:25:26 UTC
*** Bug 981506 has been marked as a duplicate of this bug. ***

Comment 12 Rahul Sundaram 2013-07-17 06:48:09 UTC
I played around with a bit a while back and didn't find a feasible solution.  If one wants to submit a spec file patch (a hack is fine), I would be happy to take it.