fix: resolve final build failures
debian/rules: Escape $HOME for make (use $$HOME) - Make interprets $H as variable, $$ escapes it build-alpine.sh: Install signing public key - Copy .abuild/*.rsa.pub to /etc/apk/keys/ - Fixes UNTRUSTED signature error on index update build-arch.sh: Use /home/builduser/repo for all paths - PKGDIR=/home/builduser/repo/arch-package - WORKSPACE_DIR=/home/builduser/repo - Fixes permission denied on act cache path
This commit is contained in:
@ -122,6 +122,9 @@ if [ "$(id -u)" = "0" ]; then
|
|||||||
# Run abuild as builduser in /home/builduser where APKBUILD exists
|
# Run abuild as builduser in /home/builduser where APKBUILD exists
|
||||||
su - builduser -c "cd /home/builduser && abuild checksum && abuild -d -F"
|
su - builduser -c "cd /home/builduser && abuild checksum && abuild -d -F"
|
||||||
|
|
||||||
|
# Install public key to fix UNTRUSTED signature error
|
||||||
|
cp /home/builduser/.abuild/*.rsa.pub /etc/apk/keys/ 2>/dev/null || true
|
||||||
|
|
||||||
# Copy APK from builduser packages to releases
|
# Copy APK from builduser packages to releases
|
||||||
mkdir -p releases
|
mkdir -p releases
|
||||||
cp /home/builduser/packages/x86_64/*.apk releases/ 2>/dev/null || cp /home/builduser/packages/*.apk releases/ 2>/dev/null || find /home/builduser/packages -name "*.apk" -exec cp {} releases/ \; 2>/dev/null || true
|
cp /home/builduser/packages/x86_64/*.apk releases/ 2>/dev/null || cp /home/builduser/packages/*.apk releases/ 2>/dev/null || find /home/builduser/packages -name "*.apk" -exec cp {} releases/ \; 2>/dev/null || true
|
||||||
|
|||||||
@ -25,8 +25,8 @@ else
|
|||||||
echo "Skipping cargo build (SKIP_CARGO_BUILD is set)"
|
echo "Skipping cargo build (SKIP_CARGO_BUILD is set)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create package directory
|
# Create package directory in /home/builduser/repo (accessible by builduser)
|
||||||
PKGDIR=$(pwd)/arch-package
|
PKGDIR=/home/builduser/repo/arch-package
|
||||||
mkdir -p "$PKGDIR"/usr/bin
|
mkdir -p "$PKGDIR"/usr/bin
|
||||||
mkdir -p "$PKGDIR"/etc/linux_patch_api
|
mkdir -p "$PKGDIR"/etc/linux_patch_api
|
||||||
mkdir -p "$PKGDIR"/usr/lib/systemd/system
|
mkdir -p "$PKGDIR"/usr/lib/systemd/system
|
||||||
@ -38,8 +38,8 @@ cp configs/linux-patch-api.service "$PKGDIR"/usr/lib/systemd/system/
|
|||||||
cp configs/config.yaml.example "$PKGDIR"/etc/linux_patch_api/config.yaml
|
cp configs/config.yaml.example "$PKGDIR"/etc/linux_patch_api/config.yaml
|
||||||
cp configs/whitelist.yaml.example "$PKGDIR"/etc/linux_patch_api/whitelist.yaml
|
cp configs/whitelist.yaml.example "$PKGDIR"/etc/linux_patch_api/whitelist.yaml
|
||||||
|
|
||||||
# Determine workspace path for PKGBUILD
|
# Use /home/builduser/repo as workspace for PKGBUILD
|
||||||
WORKSPACE_DIR=$(pwd)
|
WORKSPACE_DIR=/home/builduser/repo
|
||||||
|
|
||||||
# Create PKGBUILD
|
# Create PKGBUILD
|
||||||
echo "Creating PKGBUILD..."
|
echo "Creating PKGBUILD..."
|
||||||
|
|||||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -8,7 +8,7 @@ export DEB_CARGO_BUILD_FLAGS=--release
|
|||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
. "$HOME/.cargo/env"
|
. "$$HOME/.cargo/env"
|
||||||
cargo build --release --target x86_64-unknown-linux-gnu
|
cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
|
|||||||
Reference in New Issue
Block a user