Bug 1899112 - [spectool] Restore ability to rename source tarballs with #/ [rhel-7.9.z]
Summary: [spectool] Restore ability to rename source tarballs with #/ [rhel-7.9.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpmdevtools
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-18 14:40 UTC by Michal Domonkos
Modified: 2020-12-15 11:21 UTC (History)
2 users (show)

Fixed In Version: rpmdevtools-8.3-8.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 11:21:13 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:5457 0 None None None 2020-12-15 11:21:15 UTC

Description Michal Domonkos 2020-11-18 14:40:40 UTC
Description of problem:
The patch for Bug 1337544 shipped in RHEL-7.9 has introduced a regression to the following use case (excerpt from https://fedoraproject.org/wiki/Packaging:SourceURL#Troublesome_URLs):

---8<---
When upstream has URLs for the download that do not end with the tarball name rpm will be unable to parse the tarball out of the source URL. One workaround for many cases is to construct a URL where the tarball is listed in a "URL fragment":

Source0: http://example.com/foo/1.0/download.cgi#/%{name}-%{version}.tar.gz

rpm will then use %{name}-%{version}.tar.gz as the tarball name. If you use spectool -g foo.spec to download the tarball, it will rename the tarball for you.
---8<---

This no longer works when the URL contains a query string, e.g:
Source0: http://example.com/foo/1.0/download.cgi?param=value#/%{name}-%{version}.tar.gz

I'd like to thank the anonymous reporter who raised this issue with me via email.

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

How reproducible:
always

Steps to Reproduce:
1. Create a spec file with the following Source tag:
Source0: http://some.url/source.tar.gz?some=query#/foo.tar.gz
2. Run "spectool -g foo.spec"

Actual results:
Getting http://some.url/source.tar.gz?some=query#/foo.tar.gz to ./source.tar.gz
[...]

Expected results:
Getting http://some.url/source.tar.gz?some=query#/foo.tar.gz to ./foo.tar.gz
[...]
(This is how it worked up to RHEL-7.8)

Comment 17 errata-xmlrpc 2020-12-15 11:21:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rpmdevtools bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:5457


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