Bug 523260

Summary: rpm2cpio misbehaviour on url-like arguments
Product: [Fedora] Fedora Reporter: Dmitry Butskoy <dmitry>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: ffesti, jnovy, pmatilai
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 4.7.1-3.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 557071 (view as bug list) Environment:
Last Closed: 2009-10-27 06:35:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 557071    

Description Dmitry Butskoy 2009-09-14 15:55:42 UTC
Since rpm-4.6, rpm2cpio cannot work with non-local url, ie. commands like:

rpm2cpio <non-local-http-or-ftp-url> | cpio -itv

no more work.

For unprivileged user, "rpm2cpio an-URL" just failed, but under root an extra
directory "/%{_tmppath}" is created under the root "/" system dir.

The issue is rpm2cpio does not initialize macros properly. (The rpm command 
itself works with remote urls fine).

For tests, try:

rpm2cpio http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-11-1.noarch.rpm >/dev/null

with and without root privileges. Both cases fail, and a side-effect -- a directory   named as "/%{_tmppath}" -- is created with root privileges.

This bug is appeared since 4.6, tested under 4.6.1 and seems still present with 4.7.x

Comment 1 Panu Matilainen 2009-09-15 10:03:29 UTC
Right, rpm2cpio is initializing the macros but did so only after opening the file whereas url retrieval in rpm >= 4.6 needs the macros loaded. Fixed upstream now.

Comment 2 Fedora Update System 2009-10-08 10:05:48 UTC
rpm-4.7.1-3.fc11 has been submitted as an update for Fedora 11.

Comment 3 Fedora Update System 2009-10-09 03:40:41 UTC
rpm-4.7.1-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpm'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10354

Comment 4 Fedora Update System 2009-10-27 06:34:44 UTC
rpm-4.7.1-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.