Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_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!
Tasklist

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 Andreas Radke (AndyRTR) - Tuesday, 04 May 2021, 05:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Pierre Schmitz (Pierre)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

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

Comment by Allan McRae (Allan) - Monday, 03 May 2021, 14:02 GMT
Can you supply actual errors? makechrootpkg enters the chroot before calling makepkg, so I suspect something else is happening here.
Comment by tinywrkb (tinywrkb) - Monday, 03 May 2021, 14:21 GMT
Errors looks like this:

==> 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.
Comment by Morten Linderud (Foxboron) - Monday, 03 May 2021, 14:30 GMT
You omitting the packages in the rootfs of the container?
Comment by tinywrkb (tinywrkb) - Monday, 03 May 2021, 14:35 GMT
No, the container has binutils, it's installed with the base-devel group.
Comment by Eli Schwartz (eschwartz) - Monday, 03 May 2021, 15:35 GMT
makechrootpkg runs makepkg --verifysource on the host system.
Comment by tinywrkb (tinywrkb) - Tuesday, 04 May 2021, 09:54 GMT
> makechrootpkg runs makepkg --verifysource on the host system.

If this is the cause then it's a packaging bug, and binutils should be added to depends or optdepends.
Comment by Allan McRae (Allan) - Tuesday, 04 May 2021, 10:25 GMT
My first impression is makepkg should be less stringent in its software checks for --verifysource....
Comment by Eli Schwartz (eschwartz) - Tuesday, 04 May 2021, 13:20 GMT
It's not a packaging bug, these are only checked if you enable their buildoptions in makepkg.conf or override the option to on in the PKGBUILD.


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.

Loading...