Bug 160627 - rpm --root not working with sudo
rpm --root not working with sudo
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
: 160628 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-16 03:23 EDT by Steven Shiau
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-26 22:07:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steven Shiau 2005-06-16 03:23:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-TW; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
When I run 
sudo rpm -Uvh --root /tftpboot/node_root ...
It fails.
However, if I su as root, then run
rpm -Uvh --root /tftpboot/node_root
It works.

Version-Release number of selected component (if applicable):
rpm-4.4.1-21, sudo-1.6.8p8-1

How reproducible:
Always

Steps to Reproduce:
1. as root
2. mkdir -p /tftpboot/node_root/var/lib/rpm/
3. rsync -a /var/lib/rpm/* /tftpboot/node_root/var/lib/rpm/
4. sudo rpm -Uvh -v -v -v -v -v --root /tftpboot/node_root/ --force --nodeps --noscripts http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm

  

Actual Results:  The resulet is
---
Retrieving http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm
error: skipping http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm - transfer failed - Unknown or unexpected error



Expected Results:  Install the kernel-2.6.11-1.1369_FC4.i586.rpm in /tftpboot/node_root successfully with sudo.


Additional info:

By adding more "-v", i.e.
sudo rpm -Uvh -v -v -v -v -v --root /tftpboot/node_root/ --force --nodeps --noscripts http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm

The results show
---
Retrieving http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm
D:  ... as /tftpboot/node_root/home/steven/rpmbuild/tmp/rpm-xfer.5dIm3z
D: failed to create /tftpboot/node_root/home/steven/rpmbuild/tmp/rpm-xfer.5dIm3z: No such file or directory
error: skipping http://free.nchc.org.tw//fedora/linux/core/4/i386/os/Fedora/RPMS/kernel-2.6.11-1.1369_FC4.i586.rpm - transfer failed - Unknown or unexpected error
D: May free Score board((nil))
---
So I think rpm should can use another temp directory if it can not find the one it want.
Comment 1 Paul Nasrat 2005-06-20 08:34:49 EDT
*** Bug 160628 has been marked as a duplicate of this bug. ***
Comment 2 Jeff Johnson 2005-08-26 22:07:47 EDT
You appear to have %_tmppath configured to /home/steven/rpmbuild/tmp/.

rpm is doing exactly what you specified, using "another temp directory" is not the right solution.

Either configure some other path or insure that the directory exists within the chroot path.

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