Bug 1751630 - SRPM url parameter (?name=value) ignored by fedora-review -b
Summary: SRPM url parameter (?name=value) ignored by fedora-review -b
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-12 09:44 UTC by Jun Aruga
Modified: 2020-05-01 08:46 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-05-01 08:46:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jun Aruga 2019-09-12 09:44:43 UTC
Description of problem:

This happened at https://bugzilla.redhat.com/show_bug.cgi?id=1326504 ticket.

The latest SRPM URL is on the comment 14.

> https://bugzilla.redhat.com/show_bug.cgi?id=1326504#c14
> Spec URL: https://raw.githubusercontent.com/SamStudio8/htslib-pkg/master/htslib.spec
> SRPM URL: https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm?raw=true

But when running `fedora-review -b <bug>`, the SRPM url's "?raw=true" is not considered as the URL, seeing below log.

As this happens when using GitHub repository to put the files, I want to see the  issue will be fixed.


```
$ fedora-review -b 1326504
INFO: Processing bugzilla bug: 1326504
INFO: Getting .spec and .srpm Urls from : 1326504
INFO:   --> SRPM url: https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm
INFO:   --> Spec url: https://raw.githubusercontent.com/SamStudio8/htslib-pkg/master/htslib.spec
INFO: Using review directory: /home/jaruga/git/fedora-packages/review/1326504-htslib
WARNING: For multilib systems, both architectures of nosync library need to be installed
INFO: Downloading .spec and .srpm files
WARNING: For multilib systems, both architectures of nosync library need to be installed
argument is not an RPM package
cpio: premature end of archive
WARNING: Cannot unpack /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm/htslib-1.9-1.fc32.src.rpm into /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm-unpacked
argument is not an RPM package
cpio: premature end of archive
WARNING: Cannot unpack /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm/htslib-1.9-1.fc32.src.rpm into /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm-unpacked
INFO: Downloading (Source0): https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2
INFO: Running checks and generating report
WARNING: For multilib systems, both architectures of nosync library need to be installed
ERROR: Cannot find/open srpm: /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm/htslib-1.9-1.fc32.src.rpm. Error: error reading package header
WARNING: For multilib systems, both architectures of nosync library need to be installed
ERROR: 'mock build failed, see /home/jaruga/git/fedora-packages/review/1326504-htslib/results/build.log'
```

Below command worked with the local SRPM file as the alternative way.

```
$ fedora-review -n ~/fed/htslib/htslib-1.9-1.fc32.src.rpm --rpm-spec
```

Thanks.


Version-Release number of selected component (if applicable):
$ rpm -q fedora-review
fedora-review-0.7.2-1.fc30.noarch


How reproducible:


Steps to Reproduce:
1. fedora-review -b 1326504

Actual results:
The command finishes with the above error.

Expected results:
The command finishes successfully.

Additional info:

Comment 1 Alec Leamas 2019-09-12 10:09:09 UTC
Please note that the behaviour is as documented in the manpage (see the 'URL limitations' section).

Comment 2 Jun Aruga 2019-09-12 11:32:41 UTC
(In reply to Alec Leamas from comment #1)
> Please note that the behaviour is as documented in the manpage (see the 'URL
> limitations' section).

Hi Alec, thanks for the info. I found it in the manpage now.
What is the reason that we are currently removing parameters from a srpm url?

Comment 3 Alec Leamas 2019-09-12 11:39:17 UTC
IIRC, it is a heuristic to handle a number of sites. Changing this should not be done lightly, it will most likely break some existing sites.

Note that the manpage also lists a workaround for this specific case (in EXAMPLES).

Comment 4 Jun Aruga 2019-09-12 12:07:04 UTC
Sure. if it's not be done lightly, at least I want to see the warning message or the srpm url with parameters are checked.

Seeing the log, fedora-review command downloads the SRPM url, then try to extract the SRPM, and fails to open. The error handling can be at early timing.

```
INFO:   --> SRPM url: https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm
INFO:   --> Spec url: https://raw.githubusercontent.com/SamStudio8/htslib-pkg/master/htslib.spec
...
ERROR: Cannot find/open srpm: /home/jaruga/git/fedora-packages/review/1326504-htslib/srpm/htslib-1.9-1.fc32.src.rpm. Error: error reading package header
```

I think the log can be like this.

```
INFO:   --> SRPM url: https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm?raw=true <= Show the URL including parameters.
ERROR: the SRPM url with parameters are not supported. See fedora-review (1) man page - EXAMPLES for the alternative workaround.
ERROR: 'mock build failed, see /home/jaruga/git/fedora-packages/review/1326504-htslib/results/build.log'
```

Comment 5 Remi Collet 2020-04-03 05:59:32 UTC
Probably same issue than #1505030

Comment 6 Ben Cotton 2020-04-30 20:16:33 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Jun Aruga 2020-05-01 08:46:33 UTC
> SRPM URL: https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm?raw=true

In the GitHub case, I found an alternative workflow with the URL without the URL parameters.

That is for example, do right click on "Download" on Firefox, and "Copy link location" on the following page.
https://github.com/SamStudio8/htslib-pkg/blob/master/htslib-1.9-1.fc32.src.rpm

Then we can get the following URL without the URL parameters.
https://github.com/SamStudio8/htslib-pkg/raw/master/htslib-1.9-1.fc32.src.rpm

So, I am fine to close this ticket.
Thank you.


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