fix: resolve all build job failures
CI workflow (ci.yml): - Proper YAML structure for all steps - curl+tar checkout (act runners lack git) - GITEATOKEN authentication for private repo access - build-essential/gcc added to all jobs - dpkg-buildpackage -d flag (skip apt dep check) Build scripts: - build-alpine.sh: Copy APKBUILD to /home/builduser before abuild - build-arch.sh: Use REPO_DIR variable instead of $(pwd) in su commands
This commit is contained in:
@ -5,6 +5,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Store working directory at script start (before any su commands)
|
||||
REPO_DIR=$(pwd)
|
||||
|
||||
echo "=== Linux Patch API - Arch Build Script ==="
|
||||
echo ""
|
||||
|
||||
@ -61,13 +64,14 @@ echo "Creating .SRCINFO..."
|
||||
# Build package
|
||||
echo "Building Arch package..."
|
||||
|
||||
# For CI environments where we may run as root
|
||||
# For CI environments where we may run as root
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
echo "Running as root - creating build user for makepkg..."
|
||||
useradd -m builduser 2>/dev/null || true
|
||||
chown -R builduser:builduser "$(pwd)"
|
||||
su - builduser -c "cd $(pwd) && makepkg --printsrcinfo > .SRCINFO"
|
||||
su - builduser -c "cd $(pwd) && makepkg -f --noconfirm"
|
||||
chown -R builduser:builduser "$REPO_DIR"
|
||||
su - builduser -c "cd $REPO_DIR && makepkg --printsrcinfo > .SRCINFO"
|
||||
su - builduser -c "cd $REPO_DIR && makepkg -f --noconfirm"
|
||||
else
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
makepkg -f --noconfirm
|
||||
|
||||
Reference in New Issue
Block a user