mirror of
https://github.com/Luzifer/archrepo.git
synced 2024-11-09 10:00:04 +00:00
Remove special handling for AUR packages
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
81d62ca73f
commit
d3b4fc96b7
4 changed files with 0 additions and 167 deletions
7
Makefile
7
Makefile
|
@ -6,7 +6,6 @@ export DATABASE:=$(REPO_DIR)/luzifer.db.tar.zst
|
|||
|
||||
maintanance: do_updates do_cleanup list_packages upload
|
||||
|
||||
do_updates: aur_update
|
||||
do_updates: repo_update
|
||||
|
||||
do_cleanup: cleanup_repo
|
||||
|
@ -32,12 +31,6 @@ upload: cleanup_files check_archive_mix
|
|||
|
||||
# Maintenance targets
|
||||
|
||||
aur_update: check_tools check_database
|
||||
bash -euo pipefail -c 'for pkg in $$(script_level=1 ./scripts/check_aur_updates.sh); do script_level=1 ./scripts/update-aur.sh $${pkg}; done'
|
||||
|
||||
check_aur_update: check_database
|
||||
bash ./scripts/check_aur_updates.sh
|
||||
|
||||
check_database:
|
||||
test -n '$(DATABASE)'
|
||||
|
||||
|
|
51
aur-packages
51
aur-packages
|
@ -1,51 +0,0 @@
|
|||
adobe-base-14-fonts
|
||||
anydesk-bin
|
||||
archisteamfarm-bin
|
||||
ausweisapp2
|
||||
babel-eslint
|
||||
cef-minimal
|
||||
consul-bin
|
||||
dog-dns-git
|
||||
envrun
|
||||
eslint-plugin-vue
|
||||
exa-git
|
||||
gofumpt
|
||||
golangci-lint-bin
|
||||
google-chrome
|
||||
google-chrome-beta
|
||||
google-chrome-dev
|
||||
google-cloud-sdk
|
||||
gorun
|
||||
hfsprogs
|
||||
jiq
|
||||
kubelogin
|
||||
libajantv2
|
||||
librespeed-cli
|
||||
ltwheelconf-git
|
||||
losslesscut-bin
|
||||
mozjpeg
|
||||
mpd-mpris
|
||||
nerd-fonts-dejavu-complete
|
||||
obs-cli
|
||||
obs-teleport
|
||||
oh-my-posh-bin
|
||||
platformio
|
||||
python-ajsonrpc
|
||||
python-json-rpc
|
||||
python-pulsectl
|
||||
python-vdf
|
||||
qflipper-git
|
||||
rdm-bin
|
||||
reg
|
||||
rustdesk
|
||||
spotify
|
||||
steamcmd
|
||||
streamdeck
|
||||
teams
|
||||
ttyd
|
||||
ulauncher
|
||||
usbtop
|
||||
vault2env
|
||||
wrk
|
||||
xflux
|
||||
yay
|
|
@ -1,75 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source scripts/script_framework.sh
|
||||
|
||||
join_by() {
|
||||
local d=$1
|
||||
shift
|
||||
echo -n "$1"
|
||||
shift
|
||||
printf "%s" "${@/#/$d}"
|
||||
}
|
||||
|
||||
declare -A local_versions
|
||||
declare -A aur_versions
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
database=$(find ${REPO_DIR:-$(pwd)} -maxdepth 1 -mindepth 1 -name '*.db.tar.xz' -or -name '*.db.tar.zst')
|
||||
|
||||
aur_query=("https://aur.archlinux.org/rpc/?v=5&type=info")
|
||||
|
||||
step "Collecting local package versions..."
|
||||
|
||||
# Prime the local_versions array from the package list
|
||||
for package in $(<aur-packages); do
|
||||
local_versions[${package}]=0.0.0
|
||||
aur_query+=("arg[]=${package}")
|
||||
done
|
||||
|
||||
# Update versions in local_versions from database entries
|
||||
known_packages=$(tar -tf ${database} | grep -v /desc | sed -E 's@^(.*)-([^-]+-[0-9]+)/$@\1 \2@')
|
||||
for package in ${known_packages}; do
|
||||
name=$(echo "${package}" | cut -d ' ' -f 1)
|
||||
version=$(echo "${package}" | cut -d ' ' -f 2)
|
||||
|
||||
# If there is no entry most likely this is not an AUR package, skip it
|
||||
[[ -n ${local_versions[${name}]:-} ]] || continue
|
||||
|
||||
local_versions[${name}]=${version}
|
||||
done
|
||||
|
||||
step "Fetching AUR package versions..."
|
||||
aur_packages=$(curl -sSfL "$(join_by "&" "${aur_query[@]}")" | jq -r '.results | .[] | .Name + " " + .Version')
|
||||
|
||||
step "Collecting AUR package versions..."
|
||||
for package in ${aur_packages}; do
|
||||
name=$(echo "${package}" | cut -d ' ' -f 1)
|
||||
version=$(echo "${package}" | cut -d ' ' -f 2)
|
||||
|
||||
aur_versions[${name}]=${version}
|
||||
done
|
||||
|
||||
updates=()
|
||||
|
||||
step "Checking for updates..."
|
||||
for package in "${!local_versions[@]}"; do
|
||||
local_version="${local_versions[${package}]}"
|
||||
aur_version="${aur_versions[${package}]:-}"
|
||||
|
||||
[[ -n ${aur_version} ]] || {
|
||||
error "Package ${package} did not yield a version from AUR (local=${local_version})"
|
||||
continue
|
||||
}
|
||||
|
||||
[ $(vercmp "${local_version}" "${aur_version}") -eq -1 ] && {
|
||||
warn "Package ${package} needs update (${local_version} => ${aur_version})"
|
||||
updates+=("${package}")
|
||||
continue
|
||||
}
|
||||
|
||||
success "Package ${package} is up-to-date (${local_version})"
|
||||
done
|
||||
|
||||
echo "${updates[@]}"
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source ./scripts/script_framework.sh
|
||||
|
||||
REPO_DIR=${REPO_DIR:-$(pwd)}
|
||||
|
||||
PACKAGE=${1:-}
|
||||
[ -z "${PACKAGE}" ] && fail "No package given as CLI argument"
|
||||
|
||||
# Create working dir
|
||||
TMPDIR="/tmp/aur2repo_${PACKAGE}"
|
||||
mkdir -p "${TMPDIR}/cfg"
|
||||
|
||||
# Ensure cleanup on script exit
|
||||
function cleanup() {
|
||||
rm -rf "${TMPDIR}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
step "Fetching signing key"
|
||||
vault read --field=key secret/jenkins/arch-signing >"${TMPDIR}/cfg/signing.asc"
|
||||
|
||||
step "Re-fetching Docker image"
|
||||
docker pull gcr.io/luzifer-registry/arch-repo-builder
|
||||
|
||||
step "Building AUR package ${PACKAGE}"
|
||||
docker run --rm -ti \
|
||||
-v "${TMPDIR}/src:/src" \
|
||||
-v "${TMPDIR}/cfg:/config" \
|
||||
-v "${REPO_DIR}:/repo" \
|
||||
-v "$(pwd)/scripts/pacman.conf:/etc/pacman.conf:ro" \
|
||||
gcr.io/luzifer-registry/arch-repo-builder \
|
||||
"https://aur.archlinux.org/${PACKAGE}.git"
|
Loading…
Reference in a new issue