Bug 1472006 - RFE: Recognize file:// URLs (and/or absolute paths) for retrieval by spectool
RFE: Recognize file:// URLs (and/or absolute paths) for retrieval by spectool
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-17 19:34 EDT by Japheth Cleaver
Modified: 2017-07-18 04:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Japheth Cleaver 2017-07-17 19:34:07 EDT
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):
Should be applicable back to >= rpmdevtools 8.0 (2011-02-06)

How reproducible:

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

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 04:47:25 EDT
I opted to remove the internal check for specific protocols altogether, everything that looks like it has a protocol is passed to curl now:


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