Bug 1373021 - Git repository url not recognized properly
Summary: Git repository url not recognized properly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: clime
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-04 20:30 UTC by Andy Mender
Modified: 2016-09-05 09:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-05 09:44:23 UTC


Attachments (Terms of Use)

Description Andy Mender 2016-09-04 20:30:19 UTC
Description of problem:
When attempting to build an .rpm package via COPR, using a git repo as a url source of the srpm (.src.rpm) results in a set of Python import errors on COPR. The .src.rpm package is not recognized as a proper srpm. Uploading the srpm directly (from local hard drive) leads to a successful build. 

Version-Release number of selected component (if applicable):
N/A

How reproducible:
Happens every time, regardless of .src.rpm.

Steps to Reproduce:
1.Upload a .src.rpm to a git repository.
2.Link file via url to COPR.
3.Launch build.

Actual results:
The error output below:
2. Task: 449407-f24, importing the package: https://github.com/AndyMender/fedora_packages/blob/master/catcodec-1.0.5-1.src.rpm
downloading package https://github.com/AndyMender/fedora_packages/blob/master/catcodec-1.0.5-1.src.rpm
Verifying packagage, getting  name and version.
Exception raised during srpm import:
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 539, in do_import
    task.package_name, task.package_version = self.pkg_name_evr(fetched_srpm_path)
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 484, in pkg_name_evr
    raise SrpmQueryException('Error querying srpm: %s' % error)
SrpmQueryException: Error querying srpm: error: /tmp/tmpA1RW7n/package.src.rpm: not an rpm package (or package manifest)

Sending back: 
{"task_id": "449407-f24", "error": "srpm_query_failed"}

Expected results:
A successful package build.

Additional info:
N/A

Comment 1 clime 2016-09-05 09:44:23 UTC
Hello, you need to use direct links to the src.rpm file. Not the links to github previews of the file.

E.g. https://github.com/AndyMender/fedora_packages/raw/master/catcodec-1.0.5-1.src.rpm is correct (the "Raw" variant)


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