Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#80266 - [certbot] Issue with .BUILDINFO in recent versions
Attached to Project:
Arch Linux
Opened by Iyan (iyanmv) - Wednesday, 15 November 2023, 21:45 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:21 GMT
Opened by Iyan (iyanmv) - Wednesday, 15 November 2023, 21:45 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:21 GMT
|
DetailsDescription:
It would be nice to make all certbot-* packages reproducible. It is critical software managing TLS certificates, and in Debian all these packages are marked as reproducible (see, for example, https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/python-certbot.html). However, in the Arch Linux `rebuilderd` instance (https://reproducible.archlinux.org/), they are all marked as unreproducible. The logs show that `archlinux-repro` fails to build the package because there is a discrepancy between the PKGBUILD and .BUILDINFO in recent versions (`certbot>2.6.0-1`). PKGBUILD contains `"python-acme=$pkgver"` in the depends array, so both PKGBUILD and .BUILDINFO should include the same version of `python-acme`, synced with the `pkgver` of the package. This is not the case for the last released packages. Current package in the repos, certbot-2.7.4-1-any.pkg.tar.zst has `installed = python-acme-2.7.2-1-any` instead of `installed = python-acme-2.7.4-1-any`. Same issue can be checked for certbot-2.7.2-1-any.pkg.tar.zst (https://archive.archlinux.org/packages/c/certbot/certbot-2.7.2-1-any.pkg.tar.zst) Steps to reproduce: The issue can be reproduce locally: ``` curl -OL https://archive.archlinux.org/packages/c/certbot/certbot-2.7.4-1-any.pkg.tar.zst repro certbot-2.7.4-1-any.pkg.tar.zst ``` However, I cannot reproduce how the wrong version of `python-acme` ended up in the recent .BUILDINFO files. For example, running this: ``` pkgctl repo clone --protocol=https --switch 2.7.2-1 certbot cd certbot pkgctl build --clean --pkgver=2.7.4 ``` Generates the correct package, with the right python-acme, and it is reproducible. |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:21 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/certbot/issues/1
Saturday, 25 November 2023, 20:21 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/certbot/issues/1
1. pkgctl repo clone --protocol=https --switch 2.7.2-1 certbot
2. Update $_commit variable b62133e3e19367b82b5fde3d5f5ad97e6ced5447, but leave $pkgver unmodified
3. Download python-acme 2.7.2-1 from archive: https://archive.archlinux.org/packages/p/python-acme/python-acme-2.7.2-1-any.pkg.tar.zst
4. Run pkgctl build -I python-acme-2.7.2-1-any.pkg.tar.zst
This produces a certbot-2.7.4-1-any.pkg.tar.zst with python-acme-2.7.2-1-any in .BUILDINFO.
The reason is that dependencies are resolved before the pkgver() function is called. Because the PKGBUILD contains "python-acme=$pkgver", python-acme=2.7.2-1 is fetched and installed. Then, pkgver() modified the $pkgver of the package to 2.7.4.
IIUC, there is no packaging issue here at all.. and this is some kind of tooling problem? If so, it needs to be tracked in the issue tracker for said tooling.. Which tool is at fault? Color me confused...
Regarding the tooling issue, I'm happy to open a different bug report to have a proper discussion. I think to prevent similar issues in the future, pkgctl should abort if pkgver is modified after dependencies have been fetched and .BUILDINFO has been generated.
It uses the pkgver() to update the pkgver variable. But the dependencies get resolved before pkgver is updated. So dependencies such as "python-acme=$pkgver" can end up wrong.
Solutions:
1) always build twice
2) don't use pkgver()
The conclusion is that the proposed solution 1 also doesn't really work: either the first run fails or the second run fails, but with the same input packages and without manually touching the $pkgver variable it is impossible to build twice (the dependency constraint is different).
IMO this leaves:
1) never use $pkgver in dependency resolution variables (*depends) if a pkgver function exists
PS: makepkg linting may want to warn or plain forbid this usage.