Bug 14271 - rpm-3.0.3-5x calls chmod incorrectly
Summary: rpm-3.0.3-5x calls chmod incorrectly
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 5.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
: 9411 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2000-07-19 09:45 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-07-21 14:01:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2000-07-19 09:45:10 UTC
After problems with rpm-3.0.4-5x (see bug 10763) I decided to downgrade to 
rpm-3.0.3-5x to build me a OpenSSH. However, the build breaks in %prep 

+ /bin/chown -Rhf root .
/bin/chown: --no-dereference (-h) is not supported on this system
Bad exit status from /var/tmp/rpm-tmp.29466 (%prep)

[root@saturnin SPECS]# rpm -qf `which chown`

The 3.0.3-5x rpm has no special requirements about fileutils. The %prep 
stage of the openssh.spec file contains only %setup -a 1, nothing more.

[This sucks: OpenSSH requires rpm>=3.0.3 to --rebuild. 3.0.3 can't do 
chmod, 3.0.4 completely zarks up the cpio archive (see bug 10763), 3.0.5 
doesn't exist for 5.x (glibc2.0) systems, the precompiled OpenSSH packages 
require glibc2.1. Doh!]

Comment 1 Need Real Name 2000-07-19 09:51:01 UTC
I should perhaps add that rpm 3.0.4 recompiles the whole package correctly 
(without any problems with chmod) but then fails to create a valid cpio archive 
(and consequently a valid .i386.rpm binary package).

Comment 2 Jeff Johnson 2000-07-19 14:20:04 UTC
To use rpm-3.0.4 on Red Hat 5.x
	add --nolibio to the command line

To revert to rpm-3.0.3, grab the definitions of
from /usr/lib/rpm/macros in rpm-3.0.4, put in /etc/rpm/macros. Or simply comment
the values
out of /usr/lib/rpm/macros in rpm-3.0.3.

Comment 3 Jeff Johnson 2000-07-21 14:01:01 UTC
*** Bug 9411 has been marked as a duplicate of this bug. ***

Comment 4 Jeff Johnson 2000-07-24 19:51:17 UTC
More information on chmod:

For hysterical reasons, lchown is not supported at all in 2.0.x kernels and
libc5. That's the reason
why chmod is failing.

For other hysterical reasons, rpm does chown/chgrp/chmod when unpacking and
patching virgin
sources at the end of %prep, and this is a rather largish problem when running
across, for example, a dangling symlink contained in a tarball.

I still suggest that the correct solution is to undefine all of
and to control for ownership and mode within packaging. However, the support
(and enabled in the default configuration!)  for this "feature" must remain in
rpm for legacy reasons.

The other issue, building with rpm-3.0.4 using --nolibio, has been fixed in

Note You need to log in before you can comment on or make changes to this bug.