Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-packages2
-rwxr-xr-xbin/sanity-check5
-rwxr-xr-xbin/schedule-for-rebuild27
-rwxr-xr-xconf/slave.conf.example3
-rwxr-xr-xlib/load-configuration3
5 files changed, 28 insertions, 12 deletions
diff --git a/bin/build-packages b/bin/build-packages
index fd9e448..b39546d 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -500,7 +500,7 @@ while [ "${count}" -ne 0 ] && \
date -u --iso-8601=seconds | \
cut -d+ -f1
).build-log"
- if CARCH="${arch}" makepkg --verifysource 2> "${log_file}"; then
+ if GIT_TERMINAL_PROMPT=0 CARCH="${arch}" makepkg --verifysource 2> "${log_file}"; then
success=true
rm "${log_file}"
break
diff --git a/bin/sanity-check b/bin/sanity-check
index 281b03a..9682c68 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -590,7 +590,9 @@ while [ $# -gt 0 ]; do
printf '"command=\\\"%s/bin/slave-build-connect ",' \
"${base_dir}"
printf '`build_slaves`.`name`,'
- printf '"\\\" ssh-rsa ",'
+ printf '"\\\" ",'
+ printf '`ssh_keys`.`type`,'
+ printf '" ",'
printf '`ssh_keys`.`fingerprint`'
printf ')'
printf ' FROM'
@@ -603,7 +605,6 @@ while [ $# -gt 0 ]; do
"${tmp_dir}/ssh-keys.mysql"
sed -n '
/^command/ {
- s/ssh-ed25519/ssh-rsa/
s/^\(\(\S\+\s\+\)\{4\}\)\S.*$/\1/
s/\s\+$//
p
diff --git a/bin/schedule-for-rebuild b/bin/schedule-for-rebuild
index d8dae5c..cf2299e 100755
--- a/bin/schedule-for-rebuild
+++ b/bin/schedule-for-rebuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
# shellcheck disable=SC2119,SC2120
@@ -43,6 +43,9 @@ usage() {
>&2 echo ' Never schedule the given package (for the given $arch).'
>&2 echo ' -j|--jostle'
>&2 echo ' Give new build assignments the highest priority.'
+ >&2 echo ' -l|--latest'
+ >&2 echo ' Only pick the latest version of each package.'
+ >&2 echo ' (Ignores the build support and community repos.)'
>&2 echo ' -n|--no-action:'
>&2 echo ' Do not actually schedule anything, just print it.'
>&2 echo ' -p|--package $pkg_regex:'
@@ -61,7 +64,7 @@ tmp_dir=$(mktemp -d 'tmp.schedule-for-rebuild.XXXXXXXXXX' --tmpdir)
trap "rm -rf --one-file-system '${tmp_dir:?}'" EXIT
eval set -- "$(
- getopt -o afhi:jnp:s:tw \
+ getopt -o afhi:jnp:s:tlw \
--long auto \
--long force \
--long help \
@@ -71,6 +74,7 @@ eval set -- "$(
--long package: \
--long skip-arch: \
--long interactive \
+ --long latest \
--long wait \
-n "$(basename "$0")" -- "$@" || \
echo usage
@@ -81,6 +85,7 @@ ignore_mysql_generate_package_metadata_errors=false
jostle=false
update=true
interactive=false
+latest_package_only=false
wait_for_lock='-n'
while true
@@ -124,6 +129,9 @@ do
-t|--interactive)
interactive=true
;;
+ -l|--latest)
+ latest_package_only=true
+ ;;
-w|--wait)
wait_for_lock=''
;;
@@ -277,7 +285,7 @@ if [ -s "${tmp_dir}/package-regexes" ]; then
} | \
mysql_run_query | \
tr '\t' ' ' | \
- sort -u \
+ tac | awk '!seen[$0]++' | tac \
>>"${tmp_dir}/pkgbases"
fi
@@ -465,7 +473,7 @@ if ${auto}; then
} \
| mysql_run_query \
| tr '\t' ' ' \
- | sort -u \
+ | tac | awk '!seen[$0]++' | tac \
>>"${tmp_dir}/pkgbases"
fi
@@ -474,13 +482,19 @@ if [ ! -s "${tmp_dir}/pkgbases" ]; then
exit
fi
-sort -u "${tmp_dir}/pkgbases" \
+# shellcheck disable=SC2016
+awkcmd='!seen[$0]++'
+if ${latest_package_only}; then
+ # shellcheck disable=SC2016
+ awkcmd='$5!="community" && $5!="build-support" && !seen[$2]++'
+fi
+tac "${tmp_dir}/pkgbases" | awk "${awkcmd}" | tac \
| sponge "${tmp_dir}/pkgbases"
if ${interactive}; then
echo "Which packages to rebuild? (Comma separated; Empty means all)"
nl "${tmp_dir}/pkgbases"
- read -p "Choice: " pkg_rebuild_choice
+ read -r -p "Choice: " pkg_rebuild_choice
if [ -n "$pkg_rebuild_choice" ]; then
readarray -td, pkg_rebuild_choice_array < <( printf '%s' "$pkg_rebuild_choice" | sed 's/\s//g;s/,\{2,\}/,/g' )
@@ -492,7 +506,6 @@ fi
if ${update}; then
cut -d' ' -f 2,3,4,5 "${tmp_dir}/pkgbases" \
| while read -r pkgbase git_rev git_mod_rev repo; do
- success=false
# shellcheck disable=SC2154
printf '%s ' "${pkgbase}" "${git_rev}" "${git_mod_rev}" "${repo_heads__archlinux32}" "${repo}" \
| sed 's/ $/\n/'
diff --git a/conf/slave.conf.example b/conf/slave.conf.example
index f378935..ef742a9 100755
--- a/conf/slave.conf.example
+++ b/conf/slave.conf.example
@@ -25,7 +25,8 @@
# ':mirrored_source_by_hash:' \
# ':clean_chroot:haskell_without_check:' \
# ':with_build_support:' \
-# ':with_build_support:clean_chroot:'
+# ':with_build_support:clean_chroot:' \
+# ':with_build_support:haskell_without_check:'
#)
# commands to run to update the i686 package mirror used for installing i686 packages,
diff --git a/lib/load-configuration b/lib/load-configuration
index e7af638..94ec6d9 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -102,7 +102,8 @@ straws_that_might_repair_failing_builds=$(
':mirrored_source_by_hash:' \
':clean_chroot:haskell_without_check:' \
':with_build_support:' \
- ':with_build_support:clean_chroot:'
+ ':with_build_support:clean_chroot:' \
+ ':with_build_support:haskell_without_check:'
)
# root directory of the webserver