pacman/scripts
Guoxin Pu 680169fb61 libmakepkg: set CCACHE_PREFIX to absolute path of distcc when using both
The current logic sets CCACHE_PREFIX to distcc when both distcc and
ccache are enabled. However, according to the source of ccache, it would
execute the command with execv, which would not look up arg0 from PATH,
unlike those exec functions with _p suffix.

This would result in the following error, when building a package with
both ccache and distcc enabled:
```
ccache: error: execute_noreturn of distcc failed: No such file or directory
```

This breaks package builds in different ways: packages that use make/cc
directly would yield the actual error which is the same as the above
line, packages that rely on other build systems wouldn't go through
compiler check and complain on a bad compiler.

To reproduce the problem, try to build a simple package:
```
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/abc.git
cd abc
cp /etc/makepkg.conf .
echo 'BUILDENV=(distcc color ccache check !sign)' >> makepkg.conf
makepkg --config makepkg.conf
```

refs:
f887434d35/src/ccache/execute.cpp (L348)
https://man.archlinux.org/man/exec.3.en#v_-_execv(),_execvp(),_execvpe()

Signed-off-by: Guoxin Pu <pugokushin@gmail.com>
2025-01-18 05:08:44 +00:00
..
completion Correct typos in zsh_completion.in 2023-10-02 04:34:24 +00:00
libmakepkg libmakepkg: set CCACHE_PREFIX to absolute path of distcc when using both 2025-01-18 05:08:44 +00:00
po Update translations for release 2024-07-14 19:11:18 +10:00
.gitignore libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
libmakepkg.pc.in Update urls to not use www. for archlinux.org 2021-04-08 10:14:33 +10:00
makepkg-template.pl.in Update copyright years 2024-02-24 18:40:44 +10:00
makepkg.sh.in libmakepkg: strip - parallelize stripping of files 2024-12-28 13:54:27 +00:00
meson.build meson: do not use meson.source_root() and meson.build_root() 2022-03-06 16:26:34 +10:00
pacman-db-upgrade.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
pacman-key.sh.in pacman-key: fix permission checks for non-root operations 2024-04-05 00:47:45 +00:00
repo-add.sh.in repo-add: unconditionally create the database if it is missing 2024-06-27 22:04:28 +10:00
wrapper.sh.in Update copyright years 2024-02-24 18:40:44 +10:00