Fix issues in Arch Linux AUR publishing process

This commit is contained in:
Sean Casey
2026-04-03 15:57:54 -06:00
parent 09f7bdf063
commit f0461242ea
3 changed files with 35 additions and 12 deletions

View File

@@ -128,13 +128,15 @@ jobs:
# METADATA GENERATION:
# '.SRCINFO' is a machine-readable version of the PKGBUILD.
# The AUR website uses this file to display package details like dependencies and version.
# We generate it inside an Arch container to ensure 'makepkg' is available.
# We must run this as a non-root user ('builduser') inside the container.
docker run --rm -v $(pwd):/pkg archlinux:latest /bin/bash -c "
pacman -Syu --noconfirm --needed binutils git
pacman -Syu --noconfirm --needed binutils git sudo
useradd -m builduser
chown -R builduser:builduser /pkg
cd /pkg
git config --global --add safe.directory '*'
makepkg --printsrcinfo > .SRCINFO
sudo -u builduser git config --global --add safe.directory '*'
# "makepkg -od" fetches the source first so pkgver() can calculate the version.
sudo -u builduser makepkg -od && sudo -u builduser makepkg --printsrcinfo > .SRCINFO
"
# Set the commit identity using secrets for security and auditability.