Bug 1472006 - RFE: Recognize file:// URLs (and/or absolute paths) for retrieval by spectool
Summary: RFE: Recognize file:// URLs (and/or absolute paths) for retrieval by spectool
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-17 23:34 UTC by Japheth Cleaver
Modified: 2018-12-11 21:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1658379 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Japheth Cleaver 2017-07-17 23:34:07 UTC
Description of problem:
We have an rpmbuild server which NFS mounts a directory with build artifacts from a separate server farm. We had hoped to use spectool to automatically transfer Source#: files in .SPECS to our SOURCEDIR, which works fine for remote URLs but doesn't do anything useful with absolute paths. 


Version-Release number of selected component (if applicable):
rpmdevtools-8.10-2.fc26.noarch
Should be applicable back to >= rpmdevtools 8.0 (2011-02-06)

How reproducible:
Always

Steps to Reproduce:
1. Specify a SOURCE# using a file:// URL or absolute path in package.spec
2. spectool -v -g -S -R package.spec
3.

Actual results:
Couldn't fetch file:///mnt/foobar/build/package/1.0.0/package-1.0.0.tar.gz: missing URL

Expected results:
spectool copies the specified file into rpm's %{_sourcedir}


Additional info:
Recent versions of spectool in rpmdevtools use curl instead of wget and curl natively understands file:// URLs.

Suggest either supporting absolute paths directly, or just adding "file" to the allowed list of protocols:

> my @protocols = qw/ftp http https file/;

Comment 1 Ville Skyttä 2017-07-18 08:47:25 UTC
I opted to remove the internal check for specific protocols altogether, everything that looks like it has a protocol is passed to curl now:

https://pagure.io/rpmdevtools/c/ecbe7300237b74abfbaa7c429b0e0b78468a89c6

Comment 2 Japheth Cleaver 2018-08-27 23:31:41 UTC
Thank you. Is there any chance this patch could be backported into RHEL? file URLs are a useful feature for those wanting to automate this.

Comment 3 Neal Gompa 2018-12-11 21:21:14 UTC
I can't do anything about RHEL rpmdevtools, a separate bug will need to be filed against the RHEL package.


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