Bug 1005675

Summary: Broken postinstall script
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: nalin, nathaniel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: krb5-1.11.3-11.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-09 14:12:42 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 Mattias Ellert 2013-09-09 07:05:52 UTC
Description of problem:

  Uppdaterar  : krb5-libs-1.11.3-10.fc21.x86_64                            7/68 
/sbin/ldconfig: relativ sökväg "2" använd för att bygga cache
varning: %post(krb5-libs-1.11.3-10.fc21.x86_64)-skript misslyckades, slutstatus 1
Non-fatal POSTIN scriptlet failure in rpm package krb5-libs-1.11.3-10.fc21.x86_64

Version-Release number of selected component (if applicable)

# rpm -q krb5-libs
krb5-libs-1.11.3-10.fc21.x86_64

How reproducible:

Always

Steps to Reproduce:
1. install/update krb5-libs using yum
2. watch terminal output of yum command

Actual results:

See above

Expected results:

No errors

Additional info:

The scripts look like this;

# rpm -q --scripts krb5-libs
postinstall scriptlet (using /sbin/ldconfig):

# Roughly the version where this logic was introduced.
postuninstall program: /sbin/ldconfig

As can be seen there is a difference between the postuninstall script (that is correct) which asks for running /sbin/ldconfig without arguments and input, and the postinstall script wich ask for running a two line script (containing one empty line and one line starting with #) using the /sbin/ldconfig as an interpreter.

My guess is that this is really a badly placed comment in the specfile that was not intended to be part of the postinstall script, but rather a comment explaining the section following the postinstall section. But since this comment technically is inside the postinstall section it becomes part of the postinstall script.

Comment 1 Mattias Ellert 2013-09-09 07:59:55 UTC
Changing


%post libs -p /sbin/ldconfig

%if 0%{?configure_default_ccache_name}
# Roughly the version where this logic was introduced.
%triggerun libs -- krb5-libs < 1.11.3-10
# Try to add a default_ccache_name to /etc/krb5.conf.  


to


%post libs -p /sbin/ldconfig

%if 0%{?configure_default_ccache_name}
%triggerun libs -- krb5-libs < 1.11.3-10
# Roughly the version where this logic was introduced.
# Try to add a default_ccache_name to /etc/krb5.conf.  


would fix this.

Comment 2 Nalin Dahyabhai 2013-09-09 14:12:42 UTC
Looks good.  Thanks for catching it!