16 Commits
Author SHA1 Message Date
Mike Wilson 548efe62e9 test
Validate Package Build / resolve-dependencies (pull_request) Successful in 8s
2026-09-29 18:06:31 -04:00
Mike Wilson 8af1aeda05 test
Validate Package Build / resolve-dependencies (pull_request) Failing after 5s
2026-09-29 18:06:04 -04:00
Mike Wilson 69a82e2094 test 2026-09-29 18:05:27 -04:00
Mike Wilson 06021b4858 test 2026-09-29 18:02:48 -04:00
Mike Wilson 8c6568e85d test
Validate Package Build / resolve-dependencies (pull_request) Failing after 5s
2026-09-29 17:55:36 -04:00
Mike Wilson 439f7c82e2 test
Validate Package Build / resolve-dependencies (pull_request) Failing after 5s
2026-09-29 17:54:26 -04:00
Mike Wilson 89fcdf6f0b test
Validate Package Build / resolve-dependencies (pull_request) Failing after 5s
2026-09-29 17:53:35 -04:00
Mike Wilson 2859a996d6 test
Validate Package Build / resolve-dependencies (pull_request) Failing after 7s
2026-09-29 17:52:57 -04:00
Mike Wilson 9624359a7e test
Validate Package Build / resolve-dependencies (pull_request) Failing after 5s
2026-09-29 17:51:14 -04:00
Mike Wilson 2f9e66bf4a test
Validate Package Build / resolve-dependencies (pull_request) Failing after 7s
2026-09-29 17:38:57 -04:00
Mike Wilson b80ad9b419 test
Validate Package Build / resolve-dependencies (pull_request) Failing after 8s
2026-09-29 17:36:57 -04:00
Mike Wilson 198833f154 test installing aurutils
Validate Package Build / resolve-dependencies (pull_request) Failing after 7s
2026-09-29 17:30:01 -04:00
Mike Wilson 92d86246cd Switch to archlinux:base-devel
Validate Package Build / resolve-dependencies (pull_request) Successful in 25s
2026-09-29 17:27:17 -04:00
Mike Wilson 12b92bd3c2 Test archlinux container
Validate Package Build / resolve-dependencies (pull_request) Failing after 1s
2026-09-29 17:25:19 -04:00
Mike Wilson a44ac86eb3 Syntax fix
Validate Package Build / resolve-dependencies (pull_request) Successful in 31s
2026-09-29 17:20:40 -04:00
Mike Wilson bb48ec4bbe Clean out arch-ppa files 2026-09-29 17:07:56 -04:00
7 changed files with 22 additions and 590 deletions
+22 -5
View File
@@ -4,16 +4,33 @@ on:
pull_request:
branches:
- master
types: [opened, synchronized, reopened]
types: [opened, synchronize, reopened]
jobs:
resolve-dependencies:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
steps:
- name: Echo Test
- name: Install aurutils dependencies
shell: bash
run: echo "Actions runner working"
run: pacman -Syu --noconfirm git sudo
- name: Create and become build user
run: |
useradd builduser -m # Create the builduser
passwd -d builduser # Delete the buildusers password
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo
# This is only temporary, for bootstrapping, until this repo itself contains aurutils and can be installed via the repo
- name: Install aurutils
shell: bash
run: |
su - builduser -c '
set -e
cd
git clone https://aur.archlinux.org/aurutils.git
cd aurutils
makepkg -si --noconfirm
'
-48
View File
@@ -1,48 +0,0 @@
#!/bin/bash
# this is meant to be put in /usr/bin and allowed to use for for a user
# cp /home/ppa/arch-ppa/arch-chroot-helper /usr/bin/; chown root.root /usr/bin/arch-chroot-helper; chmod 555 /usr/bin/arch-chroot-helper
# then add this using visudo:
# ppa ALL= NOPASSWD: /usr/bin/arch-chroot-helper
ccm_root='/scratch/.chroot64'
prepare() {
if [ -d "${ccm_root}/root" ]; then
# this exists, so just update it
arch-nspawn "${ccm_root}/root" pacman -Syu --noconfirm
#yes | arch-nspawn "${ccm_root}/root" pacman -Scc
else
# does not exist, create it...
mkdir -p "${ccm_root}"
mkarchroot -C /etc/pacman.conf -M /etc/makepkg.conf "${ccm_root}/root" base-devel
fi
}
nuke() {
rm -rf "${ccm_root}"
}
make() {
set -e
prepare
makechrootpkg -c -u -r "${ccm_root}"
}
case $1 in
prepare)
prepare
exit $?
;;
nuke)
nuke
exit $?
;;
make)
make
exit $?
;;
*)
echo "Must specify command: prepare, nuke, make"
exit 1
esac
-304
View File
@@ -1,304 +0,0 @@
#!/bin/bash
basedir=$(cd $(dirname $0); pwd)
chroot=$basedir/chroot
if [ `whoami` == 'root' ]; then
echo "Must not be run as root."
exit 1;
fi
exe() { echo "\$ $@" ; "$@" ; }
create_chroot() {
(
set -e
if [ ! -d $chroot ]; then
echo "## Creating arch chroot ..."
exe mkdir $chroot
exe mkarchroot $chroot/root base-devel
# install cower:
gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53
TMP_BUILD=`mktemp -d`
exe cd $TMP_BUILD
curl https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz | tar xz
exe cd cower
exe makechrootpkg -r $chroot -l root -- -i
exe rm -rf $TMP_BUILD
echo "## Root chroot build complete."
fi
)
}
install_system_deps() {
(
set -e
pkg_dep() {
if !(pacman -Q $1 > /dev/null 2>&1); then
echo "Installing $1..."
exe sudo pacman -S --noconfirm $1
fi
}
pkg_dep devtools
pkg_dep git
pkg_dep findutils
)
}
package_build() {
# Build a package in a container. $1=container $2=package
# PKGBUILD must already exist in src/
# If package has dependencies we also maintain in src/, recursively build those first.
(
set -e
if [ "$#" -ne 2 ]; then
echo "package_build takes two args: repo_name and package_name"
return 1
fi
repo_name=$1
package_name=$2
setup
pkgdir=$basedir/src/$package_name
if [ ! -d $pkgdir ]; then
echo "Package $package_name not found in $pkgdir"
echo "Try running: package_add $package_name"
return 1
fi
if [ ! -f $pkgdir/PKGBUILD ]; then
echo "Cannot find PKGBUILD in $pkgdir"
return 1
fi
if (arch-nspawn $chroot/$repo_name pacman -Q $package_name > /dev/null 2>&1); then
echo "Package $package_name already built"
return
fi
# Find and build dependencies:
find_deps $package_name | while read dep; do
# Build the dep if we haven't already yet:
if !(arch-nspawn $chroot/$repo_name pacman -Q $dep > /dev/null 2>&1); then
package_build $repo_name $dep
fi
done
# Build package:
cd $pkgdir
rm -f *.pkg.tar.xz
mkdir -p $basedir/$repo_name
exe makechrootpkg -r $chroot -l $repo_name -- -i
exe mv *.pkg.tar.xz $basedir/$repo_name
)
}
sign_packages() {
if [ "$#" -lt 1 ]; then
echo "sign_packages requires specifying the list of packages to sign"
return 1
fi
(
set -e
cd $(dirname $1)
for pkg in "$@"; do
gpg -v "${pkg}.sig" 2>/dev/null || (rm -f "${pkg}.sig"; gpg -u 'ECB9B8CBAAC68C03!' --detach-sign --use-agent "$pkg")
done
)
}
find_deps() {
# Inspect package srcinfo and pull out the dependencies that we maintain in src
(
set -e
setup
cat $basedir/src/$1/.SRCINFO | sed -nr 's/^\W*depends = ([-a-zA-Z0-9]+).*$/\1/p' | while read dep; do
if [ -d $basedir/src/$dep ]; then
echo $dep
fi
done
)
}
add() {
# Add packages and their AUR dependencies to src
(
set -e
if [ "$#" -lt 1 ]; then
echo "Must specify package(s) to add"
return 1
fi
setup
if [ ! -d $basedir/src ]; then
mkdir $basedir/src
fi
for pkg in "$@"; do
arch-nspawn $chroot/root --bind=$basedir/src:/src cower -q -t /src -f -d -d $pkg
done
sudo chown $USER -R $basedir/src
echo "## All requested packages added"
)
}
update() {
# Update a package and it's dependencies from the AUR
(
#set -e # breaks updating all if one fails, ignore errors
if [ "$#" -eq 0 ]; then
cd $basedir/src
update *
return
fi
for pkg in "$@"; do
if [ ! -d $basedir/src/$pkg ]; then
echo "No package called $pkg found in src"
return 1
fi
done
for pkg in "$@"; do
check_in_git() {
(
cd $basedir
if (! git ls-files $1 --error-unmatch >/dev/null 2>&1); then
echo "$1 is not under git control yet. Add and commit it before updating."
return 1
fi
)
}
check_in_git $basedir/src
check_in_git $basedir/src/$pkg
find_deps $pkg | while read dep; do
check_in_git $basedir/src/$dep
done
# Check if package has uncommited changes
if [ $(git -C $basedir diff HEAD $basedir/src/$pkg | wc -l) -gt 0 ]; then
echo "warning: Package $pkg has uncommited changes. Commit or discard those changes first."
#return 1
fi
# Use a temporary dir to download all PKGBUILDS atomically
[ -z "$tmp_dl" ] && tmp_dl=`mktemp -d`
cd $tmp_dl
arch-nspawn $chroot/root --bind=$tmp_dl:/src cower -q -t /src -d -d $pkg >/dev/null 2>&1
cp -a * $basedir/src
done
git -C $basedir diff --name-status $basedir/src/
)
}
list() {
if [ "$#" -ne 1 ]; then
echo "Must specify repository name to list"
return 1
fi
setup
arch-nspawn $chroot/$1 pacman -Qm
}
setup() {
mkdir -p $basedir/src
install_system_deps
create_chroot
}
clean() {
(
set -e
if [ "$#" -lt 1 ]; then
echo "Must specify repository names to clean"
return 1
fi
for repo in "$@"; do
# Clean repository and chroot
if [ -d $basedir/chroot/$repo ]; then
# Test if chroot uses BTRFS and remove using btrfs subvolume delete
if [ `stat --format=%i $basedir/chroot/$repo` -eq 256 ] && [ `stat -f --format=%T $basedir/chroot/$repo` ] ; then
exe sudo btrfs subvolume delete $basedir/chroot/$repo
exe sudo rm $basedir/chroot/$repo.lock
# Otherwise delete using rm
else
exe sudo rm -rf $basedir/chroot/$repo $basedir/chroot/$repo.lock
fi
fi
if [ -d $basedir/$repo ]; then
exe rm -rf $basedir/$repo
fi
done
)
}
build() {
(
set -e
if [ "$#" -lt 1 ]; then
echo "Must specify repository name to build (and optional package list to include)"
return 1
fi
setup
repo_name=$1
mkdir -p $basedir/$repo_name
shift
if [ "$#" -gt 0 ]; then
# Build only requested packages
for pkg in "$@"; do
package_build $repo_name $pkg
done
echo "## All requested packages built"
else
# Build all packages:
cd $basedir/src
find -type d | sed 's/\.\///' | tail -n +2 | while read pkg; do
package_build $repo_name $pkg
done
echo "## All packages built"
fi
echo "## Updating repository database"
cd $basedir/$repo_name
if [ `ls *.pkg.tar.xz 2> /dev/null | wc -l` -lt 1 ]; then
echo "No packages found in $basedir/$repo_name"
return 1;
fi
sign_packages *.pkg.tar.xz
repose -f -z $repo_name
sign_packages $repo_name.db $repo_name.files
)
}
rebuild() {
(
set -e
if [ "$#" -lt 1 ]; then
echo "Must specify repository name to build (and optional package list to include)"
return 1
fi
setup
repo_name=$1
mkdir -p $basedir/$repo_name
shift
arch-nspawn $chroot/$repo_name pacman -Rscn --noconfirm "$@" || true
build "$repo_name" "$@"
)
}
build_changed() {
(
# git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | xargs -n1 arch-nspawn chroot/aur pacman -Rscn --noconfirm
# git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | xargs -n1 ./arch-ppa build aur
set -e
if [ "$#" -lt 1 ]; then
echo "Must specify repository name to build (and optional package list to include)"
return 1
fi
setup
repo_name=$1
mkdir -p $basedir/$repo_name
shift
commit="$1"
[ "$commit" == "" ] && commit=HEAD
changed_pkgbuilds="$(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')"
# remove them
arch-nspawn $chroot/$repo_name pacman -Rscn --noconfirm $changed_pkgbuilds || true
build "$repo_name" $changed_pkgbuilds
)
}
if [ "$#" -gt 0 ]; then
$*
else
echo "Must specify a command, eg: add, build, list, clean"
exit 1
fi
-11
View File
@@ -1,11 +0,0 @@
libgcj17-bin
emulationstation-autoscraper
pdftk-bin
cloog mingw-w64-gcc-base mingw-w64-crt mingw-w64-winpthreads zpaq zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys pdftk-bin openconnect-git mingw-w64-gcc kodi-standalone-socket-activation filebot emulationstation-themes
zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys openconnect-git filebot emulationstation-themes
zelda-roth wireguard-module-arch truecraft-git rusty-keys-git rusty-keys filebot emulationstation-themes
-205
View File
@@ -1,205 +0,0 @@
#!/bin/bash
# requires:
# https://aur.archlinux.org/packages/clean-chroot-manager
# https://aur.archlinux.org/packages/aurutils
basedir="$(pwd)"
src_dir="${basedir}/src"
repo_name=aur
pkg_dir="${basedir}/$repo_name"
aurweb='https://aur.archlinux.org'
if [ `whoami` == 'root' ]; then
echo "Must not be run as root."
exit 1;
fi
[ -e ppa.cfg ] && source ppa.cfg
clone_update_aur() {
declare -r startdir=$PWD
while IFS= read -r; do
if [[ -d $REPLY ]]
then
if [[ ! -d $REPLY/.git-nosub ]]
then
rm -rf tmp
git clone "$aurweb/$REPLY".git tmp
mv tmp/.git "$REPLY"/.git-nosub
rm -rf tmp
fi
cd "$REPLY"
mv .git-nosub .git
git fetch -v # returns 0 even if nothing was fetched
git reset --hard HEAD
git merge
cd "$startdir"
else
git clone "$aurweb/$REPLY".git
fi
# .git folders make it a git submodule, we don't want that, need to gitignore .git-nosub
mv "$REPLY"/.git "$REPLY"/.git-nosub
# we don't ever want to track these
rm -f "$REPLY"/.SRCINFO
done
}
add() {
cd "$src_dir"
aurchain "$@" | clone_update_aur
}
update() {
cd "$src_dir"
if [ "$#" -gt 0 ]; then
aurchain "$@" | clone_update_aur
else
aurchain * | clone_update_aur
fi
}
sign_packages() {
cd "$pkg_dir"
for pkg in "$@"; do
gpg -v "${pkg}.sig" 2>/dev/null || (rm -f "${pkg}.sig"; gpg --detach-sign --use-agent "$pkg")
done
}
build() {
cd "$src_dir"
if [ "$#" -gt 0 ]; then
failed=''
# create .SRCINFO, so aurqueue can use it next
for dir in "$@"
do
cd $dir
makepkg --printsrcinfo > .SRCINFO
cd "$src_dir"
done
for dir in $(aurqueue "$@")
do
cd $dir
# delete any existing packages
grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | xargs -I {} sh -c 'rm -f {}*pkg.tar*'
sudo arch-chroot-helper make
if [ $? -ne 0 ]; then
# failed, append to failed string
failed="$failed $dir"
else
#list_of_packages="$(grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | sort -u | tr '\n' ' ')"
list_of_package_files="$(grep '^pkgname = ' .SRCINFO | sed 's/^pkgname = //' | xargs -I {} sh -c 'ls {}*pkg.tar*' 2>/dev/null | sort -u | tr '\n' ' ')"
mv $list_of_package_files "$pkg_dir"
cd "$pkg_dir"
sign_packages $list_of_package_files
# repose appears to work the same with both $list_of_packages and $list_of_package_files
repose -f -z $repo_name $list_of_package_files
sign_packages $repo_name.db $repo_name.files
fi
cd "$src_dir"
done
if [ "$failed" == "" ]
then
# success!, nuke the chroot
echo sudo arch-chroot-helper nuke
else
# some failures
echo "failed packages:$failed"
fi
else
build *
fi
}
rebuild_db() {
cd "$pkg_dir"
repose -v -f -z $repo_name
sign_packages $repo_name.db $repo_name.files
}
echo_deps() {
cd "$src_dir"
aurchain "$@"
}
build_deps() {
cd "$src_dir"
if [ "$#" -gt 0 ]; then
build $(aurchain "$@")
else
# regular build? if we are building all no use looking up deps...
build
fi
}
build_changed() {
commit="$1"
[ "$commit" == "" ] && commit=HEAD
build $(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')
}
build_changed_deps() {
commit="$1"
[ "$commit" == "" ] && commit=HEAD
build_deps $(git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' ')
}
echo_changed() {
commit="$1"
[ "$commit" == "" ] && commit=HEAD
git diff-tree --no-commit-id --name-status -r "$commit" | grep -v ^D | grep PKGBUILD$ | sed -e 's@/PKGBUILD$@@' -e 's@.*/@@' | tr '\n' ' '
}
list_official_packages() {
cd "$src_dir"
ls | xargs -n1 -I {} pacman -Ss '^{}$' | egrep -v "^($repo_name| )"
}
list_installed_paclist() {
paclist $repo_name | cut -d' ' -f1
}
list_installed() {
comm -12 <(pacman -Qq | sort) <(pacman -Slq $repo_name | sort)
}
reinstall() {
list_installed | xargs sudo pacman -S --noconfirm
}
update_installed() {
update $(list_installed | xargs aurchain)
}
clean() {
# git clean -e 'aur/*' -dxn | grep -v .git
git clean -e '*.git*' -e 'aur/*' -dxf
}
undo() {
patch -p1 -R < undo.diff
}
grep_deps() {
grep "$1" src/*/PKGBUILD
}
git_add_changes() {
git add -f $(git status | grep -E '^.+(modified|deleted):' | sed 's/.* //' | tr '\n' ' ')
}
if [ "$#" -gt 0 ]; then
[ -d "$src_dir" ] || mkdir -p "$src_dir"
[ -d "$pkg_dir" ] || mkdir -p "$pkg_dir"
$*
else
echo "Must specify a command, eg: add, build, list, clean"
exit 1
fi
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
set -e
cd aur
cp -a /etc/pacman.conf /etc/pacman.d/mirrorlist ./
# sign everything
gpg -v pacman.conf.sig 2>/dev/null || (rm -f pacman.conf.sig; gpg -u 'ECB9B8CBAAC68C03!' -b pacman.conf)
gpg -v mirrorlist.sig 2>/dev/null || (rm -f mirrorlist.sig; gpg -u 'ECB9B8CBAAC68C03!' -b mirrorlist)
rsync -av --stats --progress --delete ./ root@mytorrentflux:/pacman/aur/ "$@"
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
script="./arch-ppa"
[ "$1" == '-d' ] && script="echo $script" && shift
$script rebuild aur $(comm -23 <(git status | grep -o 'src/[^/]*/PKGBUILD' | sed -e 's@^src/@@' -e 's@/PKGBUILD$@@' | sort | uniq) <(echo "$@" | tr ' ' '\n' | sort | uniq) | tr '\n' ' ')