fix: resolve remaining build failures
debian/rules: Source cargo env before calling cargo - Add `. "$HOME/.cargo/env"` to override_dh_auto_build build-alpine.sh: Use /home/builduser for all paths - PKGDIR=/home/builduser/apk-package (accessible by builduser) - WORKSPACE_DIR=/home/builduser (for APKBUILD package function) - Removed duplicate else line build-arch.sh: Copy repo to accessible directory - Copy repo contents to /home/builduser/repo before makepkg - Run makepkg in /home/builduser/repo (not act cache path)
This commit is contained in:
@ -44,8 +44,8 @@ else
|
||||
echo "Skipping cargo build (SKIP_CARGO_BUILD is set)"
|
||||
fi
|
||||
|
||||
# Create package directory
|
||||
PKGDIR=$(pwd)/apk-package
|
||||
# Create package directory in /home/builduser (accessible by builduser)
|
||||
PKGDIR=/home/builduser/apk-package
|
||||
mkdir -p "$PKGDIR"/usr/bin
|
||||
mkdir -p "$PKGDIR"/etc/linux_patch_api
|
||||
mkdir -p "$PKGDIR"/etc/init.d
|
||||
@ -57,8 +57,8 @@ cp configs/linux-patch-api-openrc "$PKGDIR"/etc/init.d/linux-patch-api
|
||||
chmod 755 "$PKGDIR"/etc/init.d/linux-patch-api
|
||||
cp configs/whitelist.yaml.example "$PKGDIR"/etc/linux_patch_api/whitelist.yaml
|
||||
|
||||
# Determine workspace path for APKBUILD
|
||||
WORKSPACE_DIR=$(pwd)
|
||||
# Use /home/builduser as workspace for APKBUILD
|
||||
WORKSPACE_DIR=/home/builduser
|
||||
|
||||
# Create APKBUILD
|
||||
echo "Creating APKBUILD..."
|
||||
@ -96,6 +96,11 @@ if [ "$(id -u)" = "0" ]; then
|
||||
adduser -D -s /bin/sh builduser 2>/dev/null || true
|
||||
addgroup builduser abuild 2>/dev/null || usermod -aG abuild builduser
|
||||
|
||||
# Copy repo contents to builduser home (accessible directory)
|
||||
cp -r . /home/builduser/repo/
|
||||
chown -R builduser:builduser /home/builduser/repo/
|
||||
chown -R builduser:builduser /home/builduser/apk-package/
|
||||
|
||||
# Set up builduser home directory for abuild
|
||||
mkdir -p /home/builduser/.abuild
|
||||
cp /root/.abuild/* /home/builduser/.abuild/ 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user