我在
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
(完整登录 https://download.copr.fedorainfracloud.org/results/jdanek/jdanek/skupper-router/srpm-builds/04126008/builder-live-live-live-live-live-live.gz.gz
) RPKG SRPM
成功。
我四处搜寻,在我看来,如果COPR通过HTTPS分发,则应该下载它们,这是我的。
我可以以某种方式使用LookAside Cache功能吗?
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?
发布评论
评论(3)
通常,通过 https 下载 qpid-proton 文件可以在 Copr 中使用。如果 rpm 宏中某处定义了
%_disable_source_fetch 0
,则由 rpmbuild(由 rpkg 调用)完成。问题是 规范文件中的其中一行 是:
%undefine _disable_source_fetch
为给定的规范文件禁用此行为。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.您的构建失败了
git_dir_pack
(rpkg-util,akarpkg
fafer)。这发生在rpmbuild
过程甚至开始之前。v3 。随时查看如何如何
要解决类似的问题。
或者也可以联系 rpkg-util上游以获取指导。
Your build fails on the
git_dir_pack
(rpkg-util, akarpkg
failure). This happened before therpmbuild
process even started.A few weeks ago we migrated the Copr builders to Fedora 35,
and thus also to rpkg-util
v3
. Feel free to take a look howto fix similar issues.
Or perhaps contact the rpkg-util upstream for a guidance.
问题是源文件显然必须从后备缓存中下载。那么,让我们自己创建一个吧。或者至少是一个人的外观。
首先,将所需的源存档下载到您的计算机上的 git repo checkout 目录,然后使用 rpkg 执行“离线上传”,
这将创建
sources
文件。将其提交到存储库。撤消对.gitignore
的编辑,这也是如此。 (如果 rpkg 命令失败,只要创建了sources
文件,就忽略它。)使用以下内容创建新文件
rpkg.conf
,并将其提交到存储库。现在推动它并在 COPR 中构建它。
(不要对下面打印的明显错误的
download_url
感到困惑;我们在 repo 目录中的rpkg.conf
会覆盖它。)成功!
The problem is that the sources file apparently must be downloaded from the lookaside cache. So, let's create ourselves one. Or at least, the appearance of one.
First, download the required source archive to your computer, to the git repo checkout dir, and do an "offline upload" using rpkg
This creates
sources
file. Commit that to the repo. Undo the edit to.gitignore
that this also did. (If that rpkg command fails, ignore that as long as thesources
file got created.)Create new file
rpkg.conf
with the following content, and commit it to repo.Now push that and build it in COPR.
(Don't get confused by the obviously wrong
download_url
printed below; ourrpkg.conf
in the repo directory is overriding that.)Success!