See the question at https://stackoverflow.com/questions/71805959/copr-fedoraproject-org-builder-refuses-to-download-sources-specified-in-my-spec/71858554
I created a .spec file that uses rpkg to pack local repository, and in addition to that, as Source1 it downloads a tar.gz from Apache.org.
Source1
The problem is that COPR build packs the local repo, but then it fails on the qpid-proton tar.gz from Apache.
git_dir_pack: Wrote: /var/lib/copr-rpmbuild/results/skupper-router-cb2a2900.tar.gz error: Bad source: /var/lib/copr-rpmbuild/results/qpid-proton-0.37.0.tar.gz: No such file or directory
Looking at https://pagure.io/copr/copr/blob/6ace54092572223a223957d2eb7cd13c6bcda621/f/rpmbuild/copr_rpmbuild/providers/base.py#_107 it seems that source downloads should be enabled in COPR.
I suspect a rpkg bug here somewhere.
Hello,
normally, downloading the qpid-proton file by https would work in Copr - as you correctly noted, it's done by rpmbuild (being invoked by rpkg) if there is %_disable_source_fetch 0 defined in rpm macros somewhere.
%_disable_source_fetch 0
The problem is that one of the lines in the spec file is: %undefine _disable_source_fetch which disables this behavior for the given spec file.
%undefine _disable_source_fetch
:facepalm: Right, makes sense; I'll go try it. Will you post this answer on the StackOverflow question, or should I do it, after I verify it?
%define _disable_source_fetch 0 works! Thanks!
%define _disable_source_fetch 0
Metadata Update from @jdanek: - Issue status updated to: Closed (was: Open)
Great! I've updated the SO thread also.
This issue has been migrated to GitHub: https://github.com/fedora-copr/rpkg-util/issues/44 Don't forget to subscribe for notifications about new comments.