summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-05-18 21:25:42 +0200
committerErich Eckner <git@eckner.net>2022-05-18 21:25:42 +0200
commit8e8978be5008688350dbdf0f0cc12a760d9042e3 (patch)
tree12f74b1b47db4671c411ea4c73e5ed126106e481
parentfd01e709dca462a052fec404a7887545b635223d (diff)
downloadbuilder-8e8978be5008688350dbdf0f0cc12a760d9042e3.tar.xz
bin/build-packages: new straw :on_x86_64:
* this allows to build "any" packages with the x86_64 toolchain * only applicaple with -p (for security reasons)
-rwxr-xr-xbin/build-packages27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 8405579..16c9008 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -78,6 +78,8 @@ usage() {
>&2 echo ' compile from source tarbal from sources.archlinux.org if possible'
>&2 echo ' :mirrored_source_by_hash:'
>&2 echo ' download sources from sources.archlinux32.org by hash if possible'
+ >&2 echo ' :on_x86_64:'
+ >&2 echo ' build any package with x86_64 arch'
>&2 echo ' :without_check:'
>&2 echo ' run makepkg with "--no-check"'
>&2 echo ' :without_systemd_nspawn:'
@@ -291,6 +293,9 @@ while [ "${count}" -ne 0 ] && \
package="${package% *}"
if [ "${arch}" = 'any' ]; then
arch="${my_arch}"
+ assignment_was_any=true
+ else
+ assignment_was_any=false
fi
if [ -n "${diff_source_dir}" ] &&
@@ -485,6 +490,28 @@ while [ "${count}" -ne 0 ] && \
outerParameters="${innerParameters} -fcrs --asdeps --noconfirm --holdver"
middleParameters=''
innerParameters=''
+ elif echo "${straw}" | \
+ grep -qF ':on_x86_64:'; then
+ if [ -z "${prefered_package}" ]; then
+ >&2 echo 'straw :on_x86_64: only allowed with -p'
+ exit 2
+ fi
+ if [ "${prefered_package}" != "${package}" ]; then
+ >&2 echo 'The prefered package was not handed out.'
+ >&2 echo 'Because straw :on_x86_64: is active, I will abort.'
+ # shellcheck disable=SC2029
+ ssh \
+ -i "${master_build_server_identity}" \
+ -p "${master_build_server_port}" \
+ "${master_build_server_user}@${master_build_server}" \
+ 'return-assignment' 'ABORT'
+ exit 2
+ fi
+ if ! ${assignment_was_any}; then
+ >&2 printf 'Can only build "any" packages with :on_x86_64:, but got a "%s" package.\n' "${arch}"
+ exit 2
+ fi
+ build_command='staging-x86_64-build'
else
build_command='staging-'"${arch}"'-build'
fi