Bug 705342

Summary: rpm -ivh doesn't follow redirects (302) when installing from http source
Product: Red Hat Enterprise Linux 5 Reporter: Miroslav Vadkerti <mvadkert>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 07:05:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Miroslav Vadkerti 2011-05-17 12:28:25 UTC
Description of problem:
# rpm -ivh  http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/5/ia64/epel-release-5-4.noarch.rpm
error: skipping http://download.fedoraproject.org/pub/epel/5/ia64/epel-release-5-4.noarch.rpm - transfer failed - Unknown or unexpected error
warning: u 0x1005efe8 ctrl 0x1078d338 nrefs != 0 (download.fedoraproject.org http)

When I download the package via wget we can see the location is 302:
# wget  http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
...
Connecting to download.fedoraproject.org|66.35.62.166|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
...

Version-Release number of selected component (if applicable):
rpm-4.4.2.3-22.el5
rpm-build-4.4.2.3-22.el5
rpm-devel-4.4.2.3-22.el5
rpm-devel-4.4.2.3-22.el5
rpm-libs-4.4.2.3-22.el5
rpm-libs-4.4.2.3-22.el5
rpm-python-4.4.2.3-22.el5

How reproducible:
always

Steps to Reproduce:
1. rpm -ivh  http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Actual results:
Warning is displayed and installation fails

Expected results:
Installation succeeds for redirected locations

Notes:
This works in RHEL6/F14

Comment 1 Panu Matilainen 2011-05-25 05:11:46 UTC
*** Bug 705292 has been marked as a duplicate of this bug. ***

Comment 2 Panu Matilainen 2011-05-25 05:55:20 UTC
This works in newer versions because they use curl for fetching remote items instead of the rather limited internal ftp/http implementation which rpm 4.4.x has.

Redirect support would be a new feature and is not going to be added at this point to an otherwise dead-end codebase. A more meaningful error message in case of redirects could be considered.

Comment 3 Panu Matilainen 2011-08-23 06:45:19 UTC
devel_nack, see comment #2, and upon closer inspection even a more meaningful error message is not reasonably achievable as the error reporting path is rather fundamentally broken in this case and changing that would risk memory leaks + other breakage due to changes fixing it would require.

Comment 4 RHEL Program Management 2011-08-23 07:05:15 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.