Hello,

On Mon, Jun 11, 2018 at 12:58 PM, Kevin Olbrich <ko@sv01.de> wrote:
Hi!

I uploaded a new package to COPR with source located at GitHub.
Every time I try to build it by either starting it manually or with the webhook, it fails with:

Downloading None
None
Exception raised during package import.
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/helpers.py", line 171, in download_file
    r = get(url, stream=True, verify=False)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 494, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 437, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 305, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 379, in prepare_url
    raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/copr/dist_git/importer.py", line 75, in do_import
    workdir
  File "/usr/share/copr/dist_git/helpers.py", line 173, in download_file
    raise FileDownloadException(str(e))
dist_git.exceptions.FileDownloadException: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
sending a response for task {'build_id': 765433}
Sending back: 
{"build_id": 765433}

Using the same spec as URL (manual build) works perfectly.
This package does not need any external component, as it only bundles a shell script.


Any idea what's causing this?

look at https://copr-be.cloud.fedoraproject.org/results/kolbrich/k2update/srpm-builds/00765433/builder-live.log.

cmd: ['rpkg', '-C', '/etc/rpkg.conf', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results/tmpntem662b', '--spec', '/tmp/tmp0l4ce8ed/k2update/rpm/kolbrich-k2update.spec']
cwd: /tmp/tmp0l4ce8ed/k2update/rpm
rc: 0
stdout: Wrote: /var/lib/copr-rpmbuild/results/tmpntem662b/kolbrich-k2update.spec
stderr: Source zero not found

Output: ['kolbrich-k2update.spec']
The src.rpm file is actually not being successfully generated (and the subsequent copr-dist-git import error is misleading). The problem is that you have no 'Source' directive in the spec file and the deprecated rpkg auto-packing feature (description can be found here: https://pagure.io/rpkg-util) requires one. You should be able to fix it by putting rpkg.conf file into your Git repository with the following content:

[rpkg]
auto_pack = False

You can either put it into the Git repo top-level or into the 'rpm' subdirectory - both should work. That setting will disable the deprecated auto-packing functionality that is being kept in Copr right now for backward compatibility but will be disabled eventually.

Thanks for the clear issue description!
clime


Kind regards,
Kevin

_______________________________________________
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/CXJXCA4Y72HKEPSY42NPMKCEIXTY2HL4/