Add AUR package (PKGBUILD) with systemd service and test script
All checks were successful
CI / test (push) Successful in 2m11s
All checks were successful
CI / test (push) Successful in 2m11s
- deploy/aur/PKGBUILD: builds from source, installs binary + man page + systemd unit - deploy/aur/.SRCINFO: AUR metadata - deploy/aur/test-aur.sh: tests PKGBUILD in Docker Arch container - Supports x86_64, aarch64, armv7h architectures Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
deploy/aur/test-aur.sh
Executable file
40
deploy/aur/test-aur.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
# Test the PKGBUILD in a Docker Arch Linux container.
|
||||
# Usage: ./deploy/aur/test-aur.sh
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
echo "=== Testing AUR PKGBUILD in Arch Linux container ==="
|
||||
|
||||
docker run --rm -v "$(pwd):/src:ro" archlinux:latest bash -c '
|
||||
set -euo pipefail
|
||||
|
||||
# Install base-devel and rust
|
||||
pacman -Syu --noconfirm base-devel rustup git
|
||||
rustup default stable
|
||||
|
||||
# Create build user (makepkg refuses to run as root)
|
||||
useradd -m builder
|
||||
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
|
||||
# Copy source and PKGBUILD
|
||||
su builder -c "
|
||||
mkdir -p /tmp/build && cd /tmp/build
|
||||
cp /src/deploy/aur/PKGBUILD .
|
||||
|
||||
# Build the package
|
||||
makepkg -si --noconfirm
|
||||
|
||||
# Verify
|
||||
echo ''
|
||||
echo '=== Installed ==='
|
||||
btest --version
|
||||
btest --help | head -5
|
||||
echo ''
|
||||
echo '=== Files ==='
|
||||
pacman -Ql btest-rs
|
||||
echo ''
|
||||
echo '=== SUCCESS ==='
|
||||
"
|
||||
'
|
||||
Reference in New Issue
Block a user