pacman/scripts/libmakepkg
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
..
autodep Fix typos 2024-05-20 02:30:50 -03:00
buildenv libmakepkg: set CCACHE_PREFIX to absolute path of distcc when using both 2025-01-18 05:08:44 +00:00
executable debugedit: only check for debugedit if we build a package 2024-03-14 23:07:08 +01:00
integrity Update copyright years 2024-02-24 18:40:44 +10:00
lint_config Remove executable permissions from source file 2025-01-08 03:08:18 +00:00
lint_package Update copyright years 2024-02-24 18:40:44 +10:00
lint_pkgbuild Detect repeated values in the arch array 2025-01-16 23:14:22 +00:00
reproducible libmakepkg: remove python hashseed handling 2024-12-12 13:28:55 +00:00
source Fix typo in git source handling 2024-07-16 18:51:03 +10:00
tidy libmakepkg: strip - disguard error messages when copying source files 2024-12-28 13:54:27 +00:00
util libmakepkg: make configured BUILDENV readonly 2024-05-31 16:15:54 +00:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
autodep.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
buildenv.sh.in libmakepkg: do not unset CHOST with !buildflags 2024-04-20 11:37:54 +10:00
executable.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
integrity.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
lint_config.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
lint_package.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
lint_pkgbuild.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
meson.build libmakepkg: automatically add library sonames to provides 2021-12-29 15:20:05 +10:00
reproducible.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
source.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
srcinfo.sh.in libmakepkg/srcinfo.sh: fix missing extglob in srcinfo_write_attr 2024-02-28 21:30:22 +01:00
tidy.sh.in Update copyright years 2024-02-24 18:40:44 +10:00
util.sh.in Update copyright years 2024-02-24 18:40:44 +10:00