| Summary: | postinstall, postuninstall, preuninstall scriptlets broken | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ralf Corsepius <rc040203> | ||||||
| Component: | usbmuxd | Assignee: | Ralf Corsepius <rc040203> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 19 | CC: | bnocera, bnrj.rudra, cfergeau, collura, feng.haibo, fweimer, mikhail.v.gavrilov, orion, pbrobinson, robatino, uebkwa.odbxm | ||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | usbmuxd-1.0.8-10.fc19 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-10-14 07:09:11 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: | |||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1018118 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ralf Corsepius
2013-10-10 03:16:38 UTC
I just realized, the macro expansion issue seems to be fixed in usbmuxd-1.0.8-9.fc20, with mess the unexpanded macros had caused having confused me. However, there is another scriptlet bug in usbmuxd %post which added to the confusion in attempts to cleanup the earlier issus. I am closing this bug and will submit another one. I have to correct myself. This bug is not fixed: $ rpm -q --scripts -p usbmuxd-1.0.8-9.fc20.i686.rpm warning: usbmuxd-1.0.8-9.fc20.i686.rpm: Header V3 RSA/SHA256 Signature, key ID 246110c1: NOKEY preinstall scriptlet (using /bin/sh): getent group usbmuxd >/dev/null || groupadd -r usbmuxd -g 113 getent passwd usbmuxd >/dev/null || \ useradd -r -g usbmuxd -d / -s /sbin/nologin \ -c "usbmuxd user" -u 113 usbmuxd exit 0 postinstall scriptlet (using /bin/sh): /sbin/ldconfig %systemd_post usbmuxd.service preuninstall scriptlet (using /bin/sh): %systemd_preun usbmuxd.service postuninstall scriptlet (using /bin/sh): /sbin/ldconfig %systemd_postun_with_restart usbmuxd.service $ rpm -q --scripts -p usbmuxd-1.0.8-9.fc20.x86_64.rpm warning: usbmuxd-1.0.8-9.fc20.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 246110c1: NOKEY preinstall scriptlet (using /bin/sh): getent group usbmuxd >/dev/null || groupadd -r usbmuxd -g 113 getent passwd usbmuxd >/dev/null || \ useradd -r -g usbmuxd -d / -s /sbin/nologin \ -c "usbmuxd user" -u 113 usbmuxd exit 0 postinstall scriptlet (using /bin/sh): /sbin/ldconfig %systemd_post usbmuxd.service preuninstall scriptlet (using /bin/sh): %systemd_preun usbmuxd.service postuninstall scriptlet (using /bin/sh): /sbin/ldconfig %systemd_postun_with_restart usbmuxd.service Created attachment 810282 [details]
Proposed fix
On fedora >= 20 packages using systemd-macros need to BR: systemd, otherwise systemd-macros won't get expanded.
Unless somebody objects soonish, I'll apply this patch to rawhide and f20.
No objection, feel free to push usbmuxd-1.0.8-10.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/usbmuxd-1.0.8-10.fc20 (In reply to Peter Robinson from comment #4) > No objection, feel free to push Thanks, done. This is a problem for F18+. (In reply to Orion Poplawski from comment #7) > This is a problem for F18+. You are right. I am going to also push f19. usbmuxd-1.0.8-10.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/usbmuxd-1.0.8-10.fc19 Package usbmuxd-1.0.8-10.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 usbmuxd-1.0.8-10.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-18797/usbmuxd-1.0.8-10.fc19 then log in and leave karma (feedback). After updating to usbmuxd-1.0.8-10.fc19, removing the old version manually, and then reinstalling this version, didn't get any scriptlet errors. Same with usbmuxd-1.0.8-10.fc20. *** Bug 1018119 has been marked as a duplicate of this bug. *** i didnt try manual remove but when updates came through to fc19 i got a yum error: "/var/tmp/rpm-tmp.RdWmpu: line 1: fg: no job control error: %preun(usbmuxd-1.0.8-9.fc19.x86_64) scriptlet failed, exit status 1 Error in PREUN scriptlet in rpm package usbmuxd-1.0.8-9.fc19.x86_64 error: usbmuxd-1.0.8-9.fc19.x86_64: erase failed " Yes, when you updated to the new version 1.0.8-10.fc19, the old version 1.0.8-9.fc19 was uninstalled, and its associated PREUN scriptlet, which is broken, caused this error. You have to remove the old version manually with "rpm -e --nopreun usbmuxd-1.0.8-9.fc19.x86_64". After that, you can verify that the new version's PRE and POST scriptlets are good by yum reinstalling it, and if you yum downgrade to the old version again, you won't see any errors, showing that the new version's PREUN and POSTUN scriptlets are also good. (Of course, when you update back to the new version you'll see the old version's PREUN error again, and have to again manually remove it.) Created attachment 811508 [details]
how manual did you have to get for the packaging remove?
AFAIK you can't turn off rpm scriptlets with yum, you have to use the rpm command directly as indicated above. thanks i had missed your comment#14 before i posted #15, sorry these crossed in ether. :') i used your 'rpm -e' as you suggested. 'rpm -e' gave an error but 1.0.8-9 is then gone from the list afterwards so looks like that cleared it: rpm -e --nopreun usbmuxd-1.0.8-9.fc19.x86_64 /var/tmp/rpm-tmp.Jnh1Pi: line 2: fg: no job control warning: %postun(usbmuxd-1.0.8-9.fc19.x86_64) scriptlet failed, exit status 1 sudo yum list usbmuxd Loaded plugins: langpacks, refresh-packagekit Installed Packages usbmuxd.x86_64 1.0.8-10.fc19 @updates-testing Available Packages usbmuxd.i686 thanks again. I believe that without the --nopreun, it will say "error", not "warning", and not remove the rpm. I don't know why it still says "warning" - the rpm man page seems to indicate that --nopreun is supposed to turn off the PREUN, so you shouldn't see a warning, but it looks like what actually happens is that it tries to run it, but ignores it when it fails, so the package gets removed. (In reply to collura from comment #13) > "/var/tmp/rpm-tmp.RdWmpu: line 1: fg: no job control > error: %preun(usbmuxd-1.0.8-9.fc19.x86_64) scriptlet failed, exit status 1 > Error in PREUN scriptlet in rpm package usbmuxd-1.0.8-9.fc19.x86_64 > error: usbmuxd-1.0.8-9.fc19.x86_64: erase failed > " Note: There are 2 errors with this package interacting. One was fixed in *-9, another one was fixed in *-10. The rpmdb scriptlet error/rpmdb-breakage only occurs when upgrading from *-8 or *-9 to *-10. With current update paths, this means * On F19, this hard error only occurs when *-9 from updates-testing was installed. When not having updates-testing installed, an update from *-7 to *-10 will happen, which only exposes a warning: /var/tmp/rpm-tmp.GqgIut: line 8: fg: no job control * On F20, this hard-error always occurs, because the current version in "Fedora+updates" is *-8. To cut a long story short: On "yum update"s, normal F19 users, who don't have updates-testing activated, will see a warning. F19-users, who have updates-testing activated and F20 users will face the error and duplicate rpmdb entries. *** Bug 1018418 has been marked as a duplicate of this bug. *** usbmuxd-1.0.8-10.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. usbmuxd-1.0.8-10.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. usbmuxd-1.0.8-10.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 1022420 has been marked as a duplicate of this bug. *** *** Bug 1028824 has been marked as a duplicate of this bug. *** *** Bug 1031507 has been marked as a duplicate of this bug. *** |