Bug 1126960 - Syncing rpm ignores the xml:base attribute of the package tag
Summary: Syncing rpm ignores the xml:base attribute of the package tag
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 2.5.0
Assignee: Barnaby Court
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 18:11 UTC by Barnaby Court
Modified: 2014-11-24 21:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-24 21:33:32 UTC


Attachments (Terms of Use)

Description Barnaby Court 2014-08-05 18:11:40 UTC
Description of problem:
When syncing an RPM from an upstream repo the URL for the feed is used instead of the base url specified in the location tag specified for the package in the primary xml.  

For example, if the repo feed is http://server1.foo.com/myrepo
The primary.xml should contain a package with a location tag as follows:
<location xml:base="http://server2.foo.com:8081/some/other/location" href="Foo/Bar/Baz/Bar-Baz.rpm"/>

The download request done as part of the sync fails because it is attempting to download http://server1.foo.com/myrepo/Foo/Bar/Baz/Bar-Baz.rpm instead of http://server2.foo.com:8081/some/other/location/Foo/Bar/Baz/Bar-Baz.rpm

Version-Release number of selected component (if applicable):


How reproducible: always


Steps to Reproduce:
1. Create a repository with a single package (outside of pulp)
2. Serve a copy of that package on a different server or a different port
3. Update the primary.xml to point to the package specified in step 2
4. Remove the package rpm from the original repository (manually if necessary)
5. Create a pulp repo to sync the repo.  The sync will fail because it can't find the package

Comment 1 Barnaby Court 2014-08-19 21:17:38 UTC
PR: https://github.com/pulp/pulp_rpm/pull/549

Comment 2 Barnaby Court 2014-08-21 19:19:42 UTC
Updated PR to target 2.4.2
https://github.com/pulp/pulp_rpm/pull/551

Comment 3 Chris Duryee 2014-09-30 13:52:43 UTC
build: 2.5.0-0.6.beta

Comment 4 Preethi Thomas 2014-10-22 21:47:37 UTC
verified
[root@cloud-qe-22 ~]# rpm -qa pulp-server
pulp-server-2.5.0-0.10.beta.el6.noarch
[root@cloud-qe-22 ~]# 

 1: create & publish pulp_unittest repo on server A. 
 2) Create & publish the pulp_unittest repo on server B
 3) Removed all the rpms except for 1 in both the repos
 4) Edit the primary.xml from the published repo on server A to point to one of the RPMS on server B
        on Server A  added

<location xml:base="http://cloud-qe-1-vm-1.idmqe.lab.eng.bos.redhat.com/pulp/repos/repos/pulp/pulp/demo_repos/pulp_unittest/" href="pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm"/>


                       
 5. On server Remove the RPMS from Server A

 6. On server C create a repo with the feed to server A

 pulp-admin rpm repo create --repo-id pulp --feed http://cloud-qe-22.idm.lab.bos.redhat.com/pulp/repos/repos/pulp/pulp/demo_repos/pulp_unittest/

7. Sync the repo


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