Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1060801

Summary: [RFE] Support for relative symlinks of RPMs in yum distributor
Product: [Retired] Pulp Reporter: Dennis Gregorovic <dgregor>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: unspecified Docs Contact:
Priority: medium    
Version: 2.3CC: skarmark
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1060803 (view as bug list) Environment:
Last Closed: 2015-02-19 01:12:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1060803    
Attachments:
Description Flags
patch against 2.3 branch none

Description Dennis Gregorovic 2014-02-03 16:23:32 UTC
The yum distributor uses absolute paths for RPM symlinks:

$ ls -l /var/lib/pulp/published/https/repos/foo/
total 16
lrwxrwxrwx. 1 apache apache  178 Feb  3 11:21 abrt-addon-kerneloops-2.1.11-2.el7.x86_64.rpm -> /var/lib/pulp/content/rpm/abrt-addon-kerneloops/2.1.11/2.el7/x86_64/ea5bf1c8708e9bd63b282fe38\
50f9731b2b58ae5af2b6a9742dea17ced12d151/abrt-addon-kerneloops-2.1.11-2.el7.x86_64.rpm
lrwxrwxrwx. 1 apache apache  100 Feb  3 11:12 Packages -> /var/lib/pulp/working/repos/foo/distributors/yum_distributor
drwxr-xr-x. 2 apache apache 4096 Feb  3 11:21 repodata
drwxr-xr-x. 2 apache apache 4096 Feb  3 11:12 repodata.old

It would be helpful to be able to have relative symlinks.  For example, if /var/lib/pulp is on an NFS share and mounted at a different mount point on another host.  Here is what relative links would look like:

$ ls -l /var/lib/pulp/published/https/repos/foo/
total 16
lrwxrwxrwx. 1 apache apache  182 Feb  3 11:11 abrt-addon-kerneloops-2.1.11-2.el7.x86_64.rpm -> ../../../../../../content/rpm/abrt-addon-kerneloops/2.1.11/2.el7/x86_64/ea5bf1c8708e9bd63b282\
fe3850f9731b2b58ae5af2b6a9742dea17ced12d151/abrt-addon-kerneloops-2.1.11-2.el7.x86_64.rpm
lrwxrwxrwx. 1 apache apache  100 Feb  3 11:12 Packages -> /var/lib/pulp/working/repos/foo/distributors/yum_distributor
drwxr-xr-x. 2 apache apache 4096 Feb  3 11:12 repodata
drwxr-xr-x. 2 apache apache 4096 Feb  3 11:11 repodata.old

Comment 1 Dennis Gregorovic 2014-02-03 16:24:50 UTC
Created attachment 858698 [details]
patch against 2.3 branch

Comment 2 Dennis Gregorovic 2014-02-05 20:58:50 UTC
In pulp_rpm/src/pulp_rpm/yum_plugin/util.py the patch has a bug.  It should be:

source_path = os.path.relpath(source_path, os.path.dirname(symlink_path))

Comment 3 Brian Bouterse 2015-02-19 01:12:45 UTC
Moved to https://pulp.plan.io/issues/221