Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1686037 - fedora-review cannot follow redirects (HTTP 302 response status code)
Summary: fedora-review cannot follow redirects (HTTP 302 response status code)
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 29
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-03-06 15:15 UTC by Jaroslav Škarvada
Modified: 2019-03-06 15:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Jaroslav Škarvada 2019-03-06 15:15:32 UTC
Description of problem:
Downloaded in fedora-review doesn't seem to support temporal redirects (HTTP 302).

Version-Release number of selected component (if applicable):
fedora-review-0.6.1-9.fc29.noarch

How reproducible:
Always

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

Actual results:
INFO: Processing bugzilla bug: 1685975
INFO: Getting .spec and .srpm Urls from : 1685975
INFO:   --> SRPM url: https://github.com/InfrastructureServices/cmocka/blob/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm
INFO:   --> Spec url: https://github.com/InfrastructureServices/cmocka/raw/fedora/contrib/fedora/cmocka.spec
INFO: Using review directory: /var/tmp/x/1685975-cmocka
INFO: Downloading .spec and .srpm files
argument is not an RPM package
cpio: premature end of archive
WARNING: Cannot unpack /var/tmp/x/1685975-cmocka/srpm/cmocka-1.1.3-1.fc31.src.rpm into /var/tmp/x/1685975-cmocka/srpm-unpacked
argument is not an RPM package
cpio: premature end of archive
WARNING: Cannot unpack /var/tmp/x/1685975-cmocka/srpm/cmocka-1.1.3-1.fc31.src.rpm into /var/tmp/x/1685975-cmocka/srpm-unpacked
INFO: Downloading (Source0): https://cmocka.org/files/1.1/cmocka-1.1.3.tar.xz
INFO: Running checks and generating report
ERROR: Cannot find/open srpm: /var/tmp/x/1685975-cmocka/srpm/cmocka-1.1.3-1.fc31.src.rpm. Error: error reading package header
INFO: WARNING: Probably non-rawhide buildroot used. Rawhide should be used for most package reviews
ERROR: 'mock build failed, see /var/tmp/x/1685975-cmocka/results/build.log'

Expected results:
No error about SRPM

Additional info:
It seems it downloaded HTML not the raw, but wget seems to work:
$ wget https://github.com/InfrastructureServices/cmocka/blob/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm?raw=true
--2019-03-06 16:12:18--  https://github.com/InfrastructureServices/cmocka/blob/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm?raw=true
Resolving github.com (github.com)... 140.82.118.3, 140.82.118.4
Connecting to github.com (github.com)|140.82.118.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/InfrastructureServices/cmocka/raw/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm [following]
--2019-03-06 16:12:18--  https://github.com/InfrastructureServices/cmocka/raw/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/InfrastructureServices/cmocka/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm [following]
--2019-03-06 16:12:19--  https://raw.githubusercontent.com/InfrastructureServices/cmocka/fedora/contrib/fedora/cmocka-1.1.3-1.fc31.src.rpm
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 86439 (84K) [audio/pn-realaudio-plugin]
Saving to: 'cmocka-1.1.3-1.fc31.src.rpm'

cmocka-1.1.3-1.fc31.src.rpm                     100%[=====================================================================================================>]  84.41K  --.-KB/s    in 0.06s   

2019-03-06 16:12:19 (1.29 MB/s) - 'cmocka-1.1.3-1.fc31.src.rpm' saved [86439/86439]

And it's correct SRPM.


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