hi,
I've got a local .spec file (working on an nginx build) that's using %forgemeta macros with '%undefine _disable_source_fetch'.
Local rpmbuild & mock builds for fedora-32-x86_64 work as expected -- sources are auto-pulled from upstream scm as intended.
The created RPMs seem healthy -- from both rpmbuild & mock builds -- & they're locally installed without error, and the apps launch/exec.
On submit of the known-to-work-locally .spec file to an my COPR account,
copr-cli build <proj> <spec>
the build quickly fails, not finding the retrieved/tar.gz'd source: "No such file or directory".
_Does_ automated source_fetch function in COPR using '%undefine _disable_source_fetch' in the spec? Or is there different/additional config needed?
Looking at the failed-build log,
https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/srpm...
the build dies at
stderr: error: Bad source: /tmp/copr-rpmbuild-s7uo_x65/nginx-release-1.19.0.tar.gz: No such file or directory Failed to execute command.
Again -- works without error on local builds with the same .spec file.
I notice the %forgemeta %dist tag is set as
dist: .gitrelease.1.19.0.fc31
-- note the "fc31", even though the repo settings at
https://copr.fedorainfracloud.org/coprs/pgfed/nginx-mainline/edit/
explicitly set/select the fc32
fedora-32-x86_64
chroot.
Is %forgemeta source retrieval and subsequent tarball creation & population into BUILDROOT on COPR known to work?
If so, I'm obviously missing _something_.
Any suggestions/hints would be appreciated; the "No such file or directory" isn't particularly informative to me ...
On Thursday, June 25, 2020 4:41:06 AM CEST PGNet Dev wrote:
_Does_ automated source_fetch function in COPR using '%undefine _disable_source_fetch' in the spec? Or is there different/additional config needed?
Yes, but you need to do `%define _disable_source_fetch 0` instead. Undefining the macro for some reason breaks rpmbuild.
Well, copr code already does that for you (so you don't have to actually touch the _disable_source_fetch macro at all).
If so, I'm obviously missing _something_.
Any suggestions/hints would be appreciated; the "No such file or directory" isn't particularly informative to me ...
Not even to me. I had to look at the code to see what is happening: 1. we create rpmmacros file with some macros: https://pagure.io/copr/copr/blob/58af9ef7cf4b4eccd829b17a2de2afd043b95ce0/f/...
2. then we do https://pagure.io/copr/copr/blob/58af9ef7cf4b4eccd829b17a2de2afd043b95ce0/f/...
First, this is wrong. We shouldn't use 'rpkg' on host for this task, perhaps we should just use 'mock --buildsrpm --enable-network' here.
Pavel
copr-devel@lists.fedorahosted.org