Bug 723729
Summary: | "was suposed to be installed but is not" for read-only $CWD | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Frank Ch. Eigler <fche> | ||||||
Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | ffesti, james.antill, jnovy, maxamillion, pmatilai, tim.lauridsen, zpavlas | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-07-21 13:29:57 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: | |||||||||
Attachments: |
|
Description
Frank Ch. Eigler
2011-07-20 22:27:21 UTC
Hi, I'm having problems reproducing it. Tried FC14 and the current git HEAD, not rawhide though. Are you sure that only the CWD was ro? $ dd if=/dev/zero of=bla bs=1M count=50 && mkfs -f bla $ mkdir p && mount -o loop bla p -o ro && cd p $ sudo touch P touch: cannot touch `P': Read-only file system $ sudo yum install gnuchess [unicorns dance] I have an strace -f yum .... log for the working & non-working cases, but I could find the smoking gun, perhaps because of dbus or whatnot other parties, but I'll attach them. It may matter that it was /home that was itself read-only. Created attachment 514183 [details]
yum run from read-only /home
Created attachment 514186 [details]
yum run from read-write /tmp
$ grep ' open(\".\"' strace* strace-ro:5277 open(".", O_RDONLY) = -1 EACCES (Permission denied) strace-ro:5277 open(".", O_RDONLY) = -1 EACCES (Permission denied) strace-rw:5309 open(".", O_RDONLY) = 15 strace-rw:5309 open(".", O_RDONLY) = 8 It's the RPM chroot() thing... lib/rpmchroot.c open()s ".", to fchdir() into it later. This open() surprisingly fails on RO filesystems. It's a RPM bug, and seems mine version (4.8.1) is not affected. I think It's quite easy to fix - just strdup() paths instead of FDs, however I'm not a RPM developer. Well, I just gave a try- and it works, so it's probably OK to open directories RDONLY on a RO filesystem.. $ touch x touch: cannot touch `x': Read-only file system $ python -c 'import os; print os.open(".", os.O_RDONLY)' 3 Can you try this on your /home? What kind of filesystem is there? That works the same way here. It's an NFS filesystem mounted ro. selinux is disabled on this machine (VM). Are we sure this isn't a dup of bug 698795 ? > That works the same way here.
Err, sorry.. Forgot to tell you to try it as root.
sudo python -c 'import os; print os.open(".", os.O_RDONLY)' Traceback (most recent call last): File "<string>", line 1, in <module> OSError: [Errno 13] Permission denied: '.' *** This bug has been marked as a duplicate of bug 698795 *** |