COPR fedoraproject.org 构建器拒绝下载我的 .spec 文件中指定的源

发布于 2025-01-20 01:48:38 字数 2188 浏览 2 评论 0 原文

我在

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

树深时见影 2025-01-27 01:48:38

通常,通过 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.

梦里°也失望 2025-01-27 01:48:38

您的构建失败了 git_dir_pack (rpkg-util,aka rpkg fafer)。这发生在 rpmbuild 过程甚至开始之前。

v3 。随时查看如何如何
要解决类似的问题

或者也可以联系 rpkg-util上游以获取指导。

Your build fails on the git_dir_pack (rpkg-util, aka rpkg failure). This happened before the rpmbuild 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 how
to fix similar issues
.
Or perhaps contact the rpkg-util upstream for a guidance.

暮色兮凉城 2025-01-27 01:48:38

问题是源文件显然必须从后备缓存中下载。那么,让我们自己创建一个吧。或者至少是一个人的外观

首先,将所需的源存档下载到您的计算机上的 git repo checkout 目录,然后使用 rpkg 执行“离线上传”,

wget https://www.apache.org/dist/qpid/proton/0.37.0/qpid-proton-0.37.0.tar.gz
rpkg upload --offline qpid-proton-0.37.0.tar.gz

这将创建 sources 文件。将其提交到存储库。撤消对 .gitignore 的编辑,这也是如此。 (如果 rpkg 命令失败,只要创建了 sources 文件,就忽略它。)

使用以下内容创建新文件 rpkg.conf,并将其提交到存储库。

[lookaside]
download_url = https://www.apache.org/dist/qpid/proton/0.37.0/%(filename)s

现在推动它并在 COPR 中构建它。

(不要对下面打印的明显错误的 download_url 感到困惑;我们在 repo 目录中的 rpkg.conf 会覆盖它。)

Running: git checkout jd_2022_03_15_rpm_cstdint

cmd: ['git', 'checkout', 'jd_2022_03_15_rpm_cstdint']
cwd: /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router
rc: 0
stdout: branch 'jd_2022_03_15_rpm_cstdint' set up to track 'origin/jd_2022_03_15_rpm_cstdint'.
stderr: Switched to a new branch 'jd_2022_03_15_rpm_cstdint'

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-rmzys1po/.config/rpkg.conf
Running: rpkg srpm --outdir /var/lib/copr-rpmbuild/results --spec /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router

cmd: ['rpkg', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results', '--spec', '/var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router']
cwd: /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router
rc: 0
stdout: Downloading qpid-proton-0.37.0.tar.gz from jiridanek/skupper-router at www.apache.org:

Wrote: /var/lib/copr-rpmbuild/results/skupper-router.spec
Wrote: /var/lib/copr-rpmbuild/results/skupper-router-0.0.git.3560.d7714b9c-2.0.0.fc35.src.rpm
stderr: git_dir_pack: archiving /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router:
commit d7714b9cac0641d4e34c0774b875fcb67cee8793 (HEAD -> jd_2022_03_15_rpm_cstdint, origin/jd_2022_03_15_rpm_cstdint)
Author: Jiri DanÄ›k <[email protected]>
Date:   Wed Apr 13 17:13:22 2022 +0200

    add autopack
git_dir_pack: Wrote: /var/lib/copr-rpmbuild/results/skupper-router-d7714b9c.tar.gz

Output: ['skupper-router.spec', 'qpid-proton-0.37.0.tar.gz', 'skupper-router-0.0.git.3560.d7714b9c-2.0.0.fc35.src.rpm', 'skupper-router-d7714b9c.tar.gz']

成功!

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

wget https://www.apache.org/dist/qpid/proton/0.37.0/qpid-proton-0.37.0.tar.gz
rpkg upload --offline qpid-proton-0.37.0.tar.gz

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 the sources file got created.)

Create new file rpkg.conf with the following content, and commit it to repo.

[lookaside]
download_url = https://www.apache.org/dist/qpid/proton/0.37.0/%(filename)s

Now push that and build it in COPR.

(Don't get confused by the obviously wrong download_url printed below; our rpkg.conf in the repo directory is overriding that.)

Running: git checkout jd_2022_03_15_rpm_cstdint

cmd: ['git', 'checkout', 'jd_2022_03_15_rpm_cstdint']
cwd: /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router
rc: 0
stdout: branch 'jd_2022_03_15_rpm_cstdint' set up to track 'origin/jd_2022_03_15_rpm_cstdint'.
stderr: Switched to a new branch 'jd_2022_03_15_rpm_cstdint'

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-rmzys1po/.config/rpkg.conf
Running: rpkg srpm --outdir /var/lib/copr-rpmbuild/results --spec /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router

cmd: ['rpkg', 'srpm', '--outdir', '/var/lib/copr-rpmbuild/results', '--spec', '/var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router']
cwd: /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router
rc: 0
stdout: Downloading qpid-proton-0.37.0.tar.gz from jiridanek/skupper-router at www.apache.org:

Wrote: /var/lib/copr-rpmbuild/results/skupper-router.spec
Wrote: /var/lib/copr-rpmbuild/results/skupper-router-0.0.git.3560.d7714b9c-2.0.0.fc35.src.rpm
stderr: git_dir_pack: archiving /var/lib/copr-rpmbuild/workspace/workdir-rmzys1po/skupper-router:
commit d7714b9cac0641d4e34c0774b875fcb67cee8793 (HEAD -> jd_2022_03_15_rpm_cstdint, origin/jd_2022_03_15_rpm_cstdint)
Author: Jiri DanÄ›k <[email protected]>
Date:   Wed Apr 13 17:13:22 2022 +0200

    add autopack
git_dir_pack: Wrote: /var/lib/copr-rpmbuild/results/skupper-router-d7714b9c.tar.gz

Output: ['skupper-router.spec', 'qpid-proton-0.37.0.tar.gz', 'skupper-router-0.0.git.3560.d7714b9c-2.0.0.fc35.src.rpm', 'skupper-router-d7714b9c.tar.gz']

Success!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文