Bug 56656

Summary: rpmb is producing packages with messed-up man page links
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <jik>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-23 18:09:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 55960, 56653, 56654, 56655    

Description Jonathan Kamens 2001-11-23 14:38:10 UTC
I have found four different Rawhide packages with man-page links messed up
in the same way (the links point at ".gz" instead of "<whatever>.gz") --
nfs-utils, pinfo, ncompress and dump.  It seems more likely that there is a
bug in rpm which broke all of these man page links, than that all of their
spec files and/or install procedures were modified in the same way to cause
the same brokenness.

Comment 1 Jeff Johnson 2001-11-23 15:00:38 UTC
Report against the packages, not rpm. It's up to
the package owners to get the bits into the package
correctly, not up to rpm.

Comment 2 Jonathan Kamens 2001-11-23 17:20:22 UTC
It irritates me when I file a bug and the owner of the bug assumes that I'm
wrong rather than taking the time to check.

There is no bug in the other packages about which I filed this bug.  The bug is
in rpm-build, in particular, in this line in /usr/lib/rpm/brp-compress:

	l=`ls -l $f | awk '{ print $11 }' | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e
's/\.Z$//'`

The output format of "ls" changed recently (perhaps as the result of something
related to my locale settings combined with a change in how ls handles various
locale settings?), such that $11 is no longer the correct field number for
retrieving the file name to which a link points:

  jik:/tmp!39> ls -l /usr/share/man/man1/zsoelim.1.gz 
  lrwxrwxrwx    1 root     root           11 10-12 09:55
/usr/share/man/man1/zsoelim.1.gz -> soelim.1.gz

Rather than simply changing the script to rely on a different field number,
which is prone to work on some systems and not others and which in any case may
break again in the future, here's a better fix:

--- /usr/lib/rpm/brp-compress	Thu Sep 13 17:03:15 2001
+++ /tmp/brp-compress	Fri Nov 23 12:18:31 2001
@@ -48,7 +48,7 @@
 
     for f in `find $d -type l`
     do
-	l=`ls -l $f | awk '{ print $11 }' | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e
's/\.Z$//'`
+	l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.gz$//' -e 's/\.bz2$//' -e
's/\.Z$//'`
 	rm -f $f
 	b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'`
 	ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT


Comment 3 Jeff Johnson 2001-11-23 17:49:02 UTC
It irritates me when a user makes assumptions about my behavior
and then presumes to criticize me for problems outside my control.

I carry the brp-compress script for the os-devel group. I do not,
and can not, change those bits without consensus and approval.

Yes the script is feeble and broken. I've known that for quite awhile.

And thanks for the patch :-)

Comment 4 Mike A. Harris 2001-11-23 18:09:38 UTC
I blame it all on jbj.  In fact, I am starting to think a good 50 or
so XFree86 bugs are actually the result of bugs introduced by RPM.

;o)


Comment 5 Jeff Johnson 2001-11-24 15:21:31 UTC

*** This bug has been marked as a duplicate of 56336 ***