Bug 849344

Summary: Uninstall script failure for pltcl
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bruno, devrim, hhorak, pmatilai, tgl
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: 2012-09-07 11:24:02 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 Bruno Wolff III 2012-08-18 15:21:22 UTC
Description of problem:
  Cleanup    : postgresql-pltcl-9.1.4-5.fc19.i686                       208/260 
/sbin/ldconfig: relative path `1' used to build cache
warning: %postun(postgresql-pltcl-9.1.4-5.fc19.i686) scriptlet failed, exit status 1
Non-fatal POSTUN scriptlet failure in rpm package postgresql-pltcl-9.1.4-5.fc19.i686

Comment 1 Tom Lane 2012-08-18 16:46:50 UTC
Hm, the postun trigger for the pltcl subpackage is written

%postun -p /sbin/ldconfig pltcl

(and likewise for the other PLs); which is a bit odd-looking.  I bet it's supposed to be spelled

%postun pltcl -p /sbin/ldconfig

However, that part of the specfile dates to approximately the late Bronze Age, so I'm wondering why we've not heard about this before.  Did RPM used to be laxer about interpreting these?  Panu, can you shed any light?

It's also possible that we don't need ldconfig here at all, since the .so's in question are only meant to be dlopen'd with absolute paths.  But right now I think something has changed outside the postgres package, and I'm wondering what.

Comment 2 Bruno Wolff III 2012-08-18 18:45:39 UTC
I am also seeing this in f17. I don't remember seeing it when I upgraded to 9.1.4-5 (but could have missed it).

Comment 3 Devrim Gündüz 2012-08-19 09:08:30 UTC
Hi Tom,

I also noticed this while working on an internal packaging for EnterpriseDB on RHEL 6.

Regards,
Devrim

Comment 4 Tom Lane 2012-08-19 18:30:11 UTC
I tried to replicate this myself, and I see no such warning on either F16 or F17, so now I'm even more confused: what is the extra condition needed to cause the warning?

Comment 5 Panu Matilainen 2012-08-20 06:34:15 UTC
"%postun -p /sbin/ldconfig pltcl" and "%postun pltcl -p /sbin/ldconfig" do exactly the same thing, options vs argument order is free there. The problem is this:

[pmatilai@localhost Downloads]$ rpm -qp --scripts postgresql-pltcl-9.1.4-5.fc19.x86_64.rpm 
postinstall program: /sbin/ldconfig
postuninstall scriptlet (using /sbin/ldconfig):

# FILES section.
[pmatilai@localhost Downloads]$

Note how the "# FILES section" comment ends up being a part of the %postun scriptlet - that's what causes ldconfig to whine. As specs dont have section-end markers, you need to be careful with comments. AFAICS that comment has been there "forever", what has recently exposed it is this innocent-looking spec cleanup in PostgreSQL 9.1.5 update:

---
@@ -678,13 +691,9 @@ fi
 %postun -p /sbin/ldconfig pltcl
 %endif
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 # FILES section.
---

Prior to that, the "# FILES section" comment ended up in the spec %clean script where it doesn't belong either, but is harmless as its really just a comment in a shell-script. Now with the %clean section gone, it ends up as a scriptlet body to /sbin/ldconfig where it's not so harmless.

Comment 6 Tom Lane 2012-08-20 14:16:06 UTC
(In reply to comment #5)
> Note how the "# FILES section" comment ends up being a part of the %postun
> scriptlet - that's what causes ldconfig to whine.

Hah! ... but then why can't I reproduce the message on my own F17 machine?

Comment 7 Tom Lane 2012-08-28 05:14:38 UTC
(In reply to comment #6)
> Hah! ... but then why can't I reproduce the message on my own F17 machine?

It's still not clear to me why I don't see this message here.  But in any case, these ldconfig scriptlets seem quite unnecessary on closer examination: these subpackages do not install anything into /usr/lib(64) proper, so ldconfig has nothing to do for them.  So I've fixed this by removing the scriptlets rather than removing the comment.

Comment 8 Fedora Update System 2012-08-28 05:31:58 UTC
postgresql-9.1.5-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/postgresql-9.1.5-2.fc18

Comment 9 Fedora Update System 2012-08-28 05:33:59 UTC
postgresql-9.1.5-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/postgresql-9.1.5-2.fc17

Comment 10 Fedora Update System 2012-08-28 05:34:10 UTC
postgresql-9.1.5-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/postgresql-9.1.5-2.fc16

Comment 11 Fedora Update System 2012-08-28 23:29:29 UTC
Package postgresql-9.1.5-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 postgresql-9.1.5-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12875/postgresql-9.1.5-2.fc17
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-09-07 11:24:02 UTC
postgresql-9.1.5-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2012-09-07 11:32:19 UTC
postgresql-9.1.5-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.