Description of Problem: When building a binary rpm from man-1.5i2-0.6x.5.src.rpm [RHSA-2001:072-14], rpm dies when trying to gzip the man pages because it is looking in the wrong place. The following patch fixes the problem. --- man.spec~ Fri Aug 24 12:55:13 2001 +++ man.spec Wed Sep 26 23:17:32 2001 @@ -41,6 +41,7 @@ Requires: less, groff, findutils, mktemp >= 1.5-2.1.5x %if %{legacypaths} %define cache /var/catman +%define _mandir /usr/man %else %define cache /var/cache/man %endif Version-Release number of selected component (if applicable): 1.5i2-0.6x.5 How Reproducible: completely Steps to Reproduce: 1. rpm --rebuild man-1.5i2-0.6x.5.src.rpm 2. 3. Actual Results: <...> install -m 644 man2html.1 /var/tmp/man-root/usr/man/man1/man2html.1 + strip -R .comment /var/tmp/man-root/usr/bin/man2html + gzip -9f /var/tmp/man-root/usr/share/man/*/* /var/tmp/man-root/usr/share/man/*/*: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.11587 (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.11587 (%install) Expected Results: <...> install -m 644 man2html.1 /var/tmp/man-root/usr/man/man1/man2html.1 + strip -R .comment /var/tmp/man-root/usr/bin/man2html + gzip -9f /var/tmp/man-root/usr/man/man1/apropos.1 /var/tmp/man-root/usr/man/man1/man.1 /var/tmp/man-root/usr/man/man1/man2html.1 /var/tmp/man-root/usr/man/man1/whatis.1 /var/tmp/man-root/usr/man/man5/man.config.5 /var/tmp/man-root/usr/man/man8/makewhatis.8 + cd /var/tmp/man-root <...> + exit 0 Additional Information: I am using rpm-4.0.2-6x.
Looks like the current rpm for 6.x doesn't set _mandir correctly. Not sure whether this is a problem in the actual rpm errata package or a local config issue, reassigning for now.
In my initial report, I did not choose the correct platform - please accept my apologies for this mistake...
Internalizing %_mandir, particularly for the man package, is the best solution, as detecting the correct value of mandir during a transition from /usr/man to /usr/share/man is difficult to get right in rpm, particularly since build configuartion preferences are involved.