FS#70692 - [devtools] makechrootpkg: executable tests should run in the chroot, not in the host
Attached to Project:
Arch Linux
Opened by tinywrkb (tinywrkb) - Monday, 03 May 2021, 13:47 GMT
Last edited by Kristian (klausenbusk) - Saturday, 03 June 2023, 18:05 GMT
Opened by tinywrkb (tinywrkb) - Monday, 03 May 2021, 13:47 GMT
Last edited by Kristian (klausenbusk) - Saturday, 03 June 2023, 18:05 GMT
|
Details
I only confirmed this with ccache and strip, probably other
tests are needed to be run in the chroot, at least distcc
and fakeroot.
When running makechrootpkg, `/usr/share/makepkg/executable/{ccache,strip}.sh` should check executable existence in the chroot, not in the host. This actually breaks makechrootpkg for me as I don't have binutils installed in my base OS. My end goal is Fedora Silverblue like Arch Linux based system, so I would like to avoid unnecessary packages like binutils. |
This task depends upon
Closed by Kristian (klausenbusk)
Saturday, 03 June 2023, 18:05 GMT
Reason for closing: Upstream
Additional comments about closing: Please report upstream if still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
Saturday, 03 June 2023, 18:05 GMT
Reason for closing: Upstream
Additional comments about closing: Please report upstream if still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
==> ERROR: Cannot find the ccache binary required for compiler cache usage.
==> ERROR: Cannot find the strip binary required for object file stripping.
==> ERROR: Could not download sources.
I usually use aurutils but here I run makechrootpkg directly like this
makechrootpkg -r /var/lib/aurbuild/x86_64 -d /tmp/wrk -- --config /tmp/wrk/makepkg.conf
Bind-mounting a `ccache.sh` and `strip.sh` scripts that have `executable_functions+=('executable_XXXXX')` commented-out fixes the problem for me.
If this is the cause then it's a packaging bug, and binutils should be added to depends or optdepends.
And strip is enabled in the stock config, but the other two are NOT.
fakeroot is only checked in the two cases where it needs to be, I know this because I actually changed that on request: https://git.archlinux.org/pacman.git/commit/scripts/libmakepkg/executable/fakeroot.sh.in?id=238fa4af4507c573ae4d478d1d7e176429d2c5c5
I did and do intend to do something similar for the other executable checks, but that went onto the back burner...
Today, you can disable checking for strip by turning it off in your host system's makepkg.conf, and you can disable ccache/distcc by stopping your act of enabling it manually.