pacman: fix scripts

- makepkg: fix upstream issue https://gitlab.archlinux.org/pacman/pacman/-/issues/171

- pacman-key: drop KEYRING_IMPORT_DIR hack
This commit is contained in:
SamLukeYes 2024-08-18 02:50:53 +08:00
parent c3aa7b8938
commit 8479c60228
No known key found for this signature in database
GPG Key ID: 5574FF7A0C9AC292

View File

@ -89,17 +89,17 @@ stdenv.mkDerivation (final: {
]; in ''
echo 'export PATH=${lib.makeBinPath compressionTools}:$PATH' >> scripts/libmakepkg/util/compress.sh.in
substituteInPlace meson.build \
--replace "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
--replace "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
--replace "join_paths(PREFIX, DATAROOTDIR, get_option('keyringdir'))" "'\$KEYRING_IMPORT_DIR'" \
--replace "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
--replace-fail "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
--replace-fail "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
--replace-fail "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
substituteInPlace doc/meson.build \
--replace "/bin/true" "${coreutils}/bin/true"
--replace-fail "/bin/true" "${coreutils}/bin/true"
substituteInPlace scripts/repo-add.sh.in \
--replace bsdtar "${libarchive}/bin/bsdtar"
substituteInPlace scripts/pacman-key.sh.in \
--replace "local KEYRING_IMPORT_DIR='@keyringdir@'" "" \
--subst-var-by keyringdir '\$KEYRING_IMPORT_DIR'
--replace-fail bsdtar "${libarchive}/bin/bsdtar"
# Fix https://gitlab.archlinux.org/pacman/pacman/-/issues/171
substituteInPlace scripts/libmakepkg/source/git.sh.in \
--replace-warn "---mirror" "--mirror"
'';
mesonFlags = [