Bug 53980 - rpm install fails on fifo
Summary: rpm install fails on fifo
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 1.0
Hardware: All Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-09-24 21:39 UTC by franz.sirl-kernel
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-24 21:39:27 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 franz.sirl-kernel 2001-09-24 21:39:22 UTC
Description of Problem:
With rpm-4.0.3-1.0[34], glibc-2.2.4cvs and kernel-2.4.10 I see the following 

[root@enzo:/cvsx/rawhide/BUILD]# rpm -Uvh 
Preparing...                ########################################### 
   1:SysVinit               error: unpacking of archive failed on file 
/dev/initctl: cpio: rename failed - Operation not permitted

strace shows this:
lstat("/dev/initctl;3baf9cae", 0x7fffedb8) = -1 ENOENT (No such file or 
mknod("/dev/initctl;3baf9cae", S_IFIFO) = 0
ioctl(1, TCGETS, 0x7fffeda8)            = 0
rename("/dev/initctl;3baf9cae", "/dev/initctl") = -1 EPERM (Operation not 

It seems rpm should create the fifo with S_IFIFO|S_IRUSR|S_IWUSR so the 
rename wouldn't fail and then set the real mode later on?

It's not clear to me which of kernel/glibc/rpm is responsible for this 
change of behaviour...

Version-Release number of selected component (if applicable):

How Reproducible:
Every time.

Steps to Reproduce:
1. rpm -Uvh /cvsx/rawhide/RPMS/ppc/SysVinit-2.78-19.ppc.rpm

Actual Results:

Expected Results:

Additional Information:

Comment 1 Jeff Johnson 2001-09-24 23:54:36 UTC
Take the fifo out of the package, there's little reason
to include a fifo -- particularly for init -- in a

Comment 2 franz.sirl-kernel 2001-09-25 09:47:24 UTC
Well, this wasn't my idea, this is how Red Hat is packaging SysVinit probably
forever (I guess for rpm -V reasons). As I suspected probably a recent kernel or
glibc strictness change is triggering this and I find it disturbing rpm creates
something without proper mode (the stored mode in the package is 010600 as can
be seen with --dump) and then tries to rename it before fixing up the modes.


Comment 3 Jeff Johnson 2001-09-25 13:59:14 UTC
Again, I suggest that depending on rpm's ability to unpack
a fifo correctly for a package as important as init is
crazy and useless (fifo's are always recreated at daemon
startup, which also controls perms). YMMV.

Furthermore, I'm not sure that rpm ever did the right thing
with FIFO's. Because of the recreation, you'ld hardly notice
if the file were unpacked incorrectly. What's new is stricter
checks on syscall return codes.

Yes, rpm-4.0.3 unpacks into a temp file with appended
install transaction id (i.e. ';' followed by time in hex)
and then renames into place. This avoids a (minor IMHO, YMMV)
race wrto shared libraries that may be opened by name
while an install write is in progress. There will be
other uses when I get around to finishing a full blown
--apply/--commit/--undo scheme for unpacking files.

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