fedorarpmbuildrpm-speccopr

COPR fedoraproject.org builder refuses to download sources specified in my .spec file


I have a package build in https://copr.fedoraproject.org. My spec for rpkg is here. The build is failing with the following

Generated rpkg config:
[rpkg]
preprocess_spec = True

[git]
anon_clone_url = https://github.com/%(repo_path)s

[lookaside]
download_url = https://${git_props:remote_netloc}/repo/pkgs/%(repo_path)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s

Writing config into /var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/.config/rpkg.conf
Running: rpkg srpm --outdir /var/lib/copr-rpmbuild/results --spec /var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/skupper-router

cmd: ['rpkg', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results', '--spec', '/var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/skupper-router']
cwd: /var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/skupper-router
rc: 1
stdout: Wrote: /var/lib/copr-rpmbuild/results/skupper-router.spec
stderr: git_dir_pack: archiving /var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/skupper-router:
commit cb2a29004b1660168cc4a6894e521b0cf71cb25d (HEAD -> jd_2022_03_15_rpm, origin/jd_2022_03_15_rpm)
Date:   Sat Apr 9 01:04:32 2022 +0200

    add static build rpm
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

Copr build error: git_dir_pack: archiving /var/lib/copr-rpmbuild/workspace/workdir-ce16hwto/skupper-router:
commit cb2a29004b1660168cc4a6894e521b0cf71cb25d (HEAD -> jd_2022_03_15_rpm, origin/jd_2022_03_15_rpm)
Date:   Sat Apr 9 01:04:32 2022 +0200

    add static build rpm
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

(full log at https://download.copr.fedorainfracloud.org/results/jdanek/skupper-router/srpm-builds/04126008/builder-live.log.gz)

On my machine, running rpkg srpm succeeds.

I searched around and it seems to me that COPR should be willing to download sources if they are distributed over https, which mine are.

Can I use the lookaside cache feature, somehow, for my sources?


Solution

  • Normally, downloading the qpid-proton file by https would work in Copr. It's done by rpmbuild (being invoked by rpkg) if there is %_disable_source_fetch 0 defined in rpm macros somewhere.

    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.