From 6b6496fcbbe42336405e6054519e95b2e183f750 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 18 Feb 2022 08:26:36 +0100 Subject: added build-support straw to local-build-package (to fix broken build chroots) --- bin/local-build-package | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'bin/local-build-package') diff --git a/bin/local-build-package b/bin/local-build-package index fd4fdab..c6fb029 100755 --- a/bin/local-build-package +++ b/bin/local-build-package @@ -31,8 +31,15 @@ usage() { >&2 echo ' Specify tmpdir instead of using a random one, usually with -N' >&2 echo ' -N|--nobuild:' >&2 echo ' Assume packages have already been built, just upload them.' - >&2 echo ' -s|--signkey:' + >&2 echo ' --signkey:' >&2 echo ' Use explicit sign key instead of the one from the configuration.' + >&2 echo ' -s|--straw $straw:' + >&2 echo ' Use this straw instead of the preconfigured ones. -- May be' + >&2 echo ' given multiple times to allow using multiple straws.' + >&2 echo '' + >&2 echo 'known straws (separated by and enclosed in ":", sets of straws separated by " "):' + >&2 echo ' :with_build_support:' + >&2 echo ' allow using [build-support]' [ -z "$1" ] && exit 1 || exit "$1" } @@ -47,6 +54,7 @@ eval set -- "$( --long host \ --long tmpdir \ --long signkey \ + --long straw \ --long help \ -n "$(basename "$0")" -- "$@" || \ echo usage @@ -61,6 +69,7 @@ bootstrap_host='' bootstrap_dir='' tmp_dir=$(mktemp -d "${work_dir}/tmp.XXXXXX") signkey="${package_key}" +declare -A straws while true do case "$1" in @@ -93,10 +102,14 @@ do shift tmp_dir="$1" ;; - -s|--signkey) + --signkey) shift signkey="$1" ;; + -s|--straw) + shift + straws["$1"]=1 + ;; -h|--help) usage 0 ;; @@ -162,8 +175,14 @@ if ! ${nobuild}; then if [ -z "${mod_git_revision}" ]; then mod_git_revision=$(git -C "${repo_paths__archlinux32}" rev-parse HEAD) fi - build_command="staging-${arch}-build" - parameters='' + + if [[ -z "${straws[:with_build_support:]}" ]]; then + build_command="staging-${arch}-build" + else + build_command='staging-with-build-support-'"${arch}"'-build' + fi + + parameters="-r ${archbuild_chroots}" if ${nocheck}; then parameters='-- -- --nocheck' fi -- cgit v1.2.3