Bug 698795
Summary: | yum doesn't react well to rpm's "doesn't run when in rootsquashed NFS dir." | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jussi Eloranta <eloranta> | ||||
Component: | yum | Assignee: | Nick Jacek <njacek> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 15 | CC: | ddumas, fale, fche, ffesti, herrold, james.antill, jnovy, maxamillion, njacek, pmatilai, tim.lauridsen, trailtotale, wmason | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-07-21 14:15:11 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
Jussi Eloranta
2011-04-21 19:51:06 UTC
An update. If I do this in /tmp (or any other root read/write -able directory), it works fine. However, I was in /home, which is nfs mounted (and root squashed, i.e. no read/write for root). In this case I got the following output from yum install ...: Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 160 k (1/2): switchdesk-4.0.9-8.fc15.2.noarch.rpm | 24 kB 00:00 (2/2): switchdesk-gui-4.0.9-8.fc15.2.noarch.rpm | 136 kB 00:00 -------------------------------------------------------------------------------- Total 154 kB/s | 160 kB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction switchdesk-4.0.9-8.fc15.2.noarch was supposed to be installed but is not! switchdesk-gui-4.0.9-8.fc15.2.noarch was supposed to be installed but is not! Installed: switchdesk.noarch 0:4.0.9-8.fc15.2 switchdesk-gui.noarch 0:4.0.9-8.fc15.2 Complete! The same thing happens if I try to remove any packages with yum in non-read/writeable dir. *** Bug 709283 has been marked as a duplicate of this bug. *** This is related to a change in how rpm handles chroot, see bug 672576. I can easily reproduce the "supposed to be <...> but is not" issue with yum, rpm itself gives the "expected" result in this situation: [root@localhost lorg]# rpm -e --test telnet error: Unable to open current directory: Permission denied [root@localhost lorg]# That yum gives such a confusing output is due to two separate issues with yum: - Yum's test-transaction return code checking doesn't handle the "creative" return codes from ts.run() correctly - Yum's transaction logging redirects the rpm log to a file, silencing this kind of early transaction error message(s) from librpm I'll have a look, expect patches on yum-devel... Patches from Panu would still be fine/good ... otherwise anyone else can look at it ... it might already be much better with upstream yum (should now show an error for the packages), but I don't expect that we tell the user what the problem is, yet (rpm can't open .). Bonus points for any patch that can work out this is going to happen and does a chdir to / :) :) *** Bug 714241 has been marked as a duplicate of this bug. *** *** Bug 723729 has been marked as a duplicate of this bug. *** Note that the latest rawhide yum _should_ spot this ... Frank, what version were you using? James, yum-3.4.3-4.fc16.noarch emits this now: No read/write access in current directory, moving to / and works. OTOH, rpm-4.9.0-7.fc16.x86_64 says: % cd $HOME % sudo rpm -e gnuchess error: Unable to open current directory: Permission denied Yeh, cool ... Nick added the workaround to yum. James, what about the rpm -e EPERM bit? That's an rpm thing, and the best we have atm. is: https://bugzilla.redhat.com/show_bug.cgi?id=672576#c7 ...you can open an rpm bug, but without a working patch I'm guessing it's going to be closed. Also ... don't call rpm -e or rpm -i directly :). Created attachment 514644 [details]
A proposed patch to rpm chroot code.
|