Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 160628 - rpm --root not working with sudo
Summary: rpm --root not working with sudo
Keywords:
Status: CLOSED DUPLICATE of bug 160627
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-16 07:24 UTC by Steven Shiau
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-20 12:34:25 UTC


Attachments (Terms of Use)

Description Steven Shiau 2005-06-16 07:24:21 UTC
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 12:34:25 UTC

*** This bug has been marked as a duplicate of 160627 ***


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