diff options
Diffstat (limited to 'bin/local-build-package')
-rwxr-xr-x | bin/local-build-package | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/bin/local-build-package b/bin/local-build-package index fd4fdab..e0b02dc 100755 --- a/bin/local-build-package +++ b/bin/local-build-package @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # build one package to test if modifications are ok (before opening a pull # request in https://github.com/archlinux32/packages) @@ -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 @@ -212,7 +231,7 @@ if ${bootstrap}; then esac scp -P "${bootstrap_port}" -rC "${tmp_dir}/"*"-${arch}.pkg.tar.zst" "${tmp_dir}/"*"-${arch}.pkg.tar.zst.sig" "${bootstrap_host}:${bootstrap_dir}/${staging_repo}/." - ssh -p "${bootstrap_port}" "${bootstrap_host}" bash -l -c "'cd ${bootstrap_dir}/${staging_repo} && repo-add -n bootstrap-${staging_repo}.db.tar.gz *-${arch}.pkg.tar.zst'" + ssh -o PasswordAuthentication=No -p "${bootstrap_port}" "${bootstrap_host}" bash -l -c "'cd ${bootstrap_dir}/${staging_repo} && repo-add -n bootstrap-${staging_repo}.db.tar.gz *-${arch}.pkg.tar.zst'" fi # do not delete build reports, why might actually to want to have a look for things |