Actually:
for exe in "${pkgdir}"/usr/bin/*; do
if [[ -f ${exe} && $(head -c4 "${exe}") = $'\x7fELF' ]]; then
mv "${exe}" "${exe}"-static
else
rm "${exe}"
fi
done
makes static versions of things which are recognized as ELF binaries. pacman-key
and all the other "binaries" you mentioned are shell scripts.
The shell scripts might contain calls to pacman
instead of pacman-static
, that
might be something one could patch, on the other hand the pacman to use can be
set via environment:
# set pacman command if not already defined
PACMAN=${PACMAN:-pacman}
So, something like PACMAN=pacman-static makepkg -s
should actually work. pacman-key
should actually just manipulate the keys in /etc/pacman.d/gnupg
without
the help of pacman
or pacman-static
(as far as I can tell).
Besides, those can also be manipulated directly with gpg
.
Building packages while your standard pacman
is broken, is maybe not a smart idea to begin with and
you should fix your standard pacman first.
Well, "repo-elaphants" are actually absolutely crucial to run statically.. ;-)
Opinions?
Pinned Comments
Morganamilo commented on 2022-02-20 18:30 (UTC)
There's now a custom repo and binaries again. Though only for x86_64 currently.
Custom Repo
Pre compiled binaries
https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/