From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4DAB11382C5 for ; Sat, 16 May 2020 18:26:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B96AE0A94; Sat, 16 May 2020 18:26:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 60374E0A94 for ; Sat, 16 May 2020 18:26:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D84F334F3FF for ; Sat, 16 May 2020 18:26:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D76A0239 for ; Sat, 16 May 2020 18:26:20 +0000 (UTC) From: "Ben Kohler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ben Kohler" Message-ID: <1589564052.60a1326315870e1cc5780b721db5a5567393d968.bkohler@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto-amd64-experimental.conf tools/catalyst-auto-amd64.conf tools/catalyst-auto-x86-experimental.conf tools/catalyst-auto-x86.conf X-VCS-Directories: tools/ X-VCS-Committer: bkohler X-VCS-Committer-Name: Ben Kohler X-VCS-Revision: 60a1326315870e1cc5780b721db5a5567393d968 X-VCS-Branch: master Date: Sat, 16 May 2020 18:26:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fbb964c0-97b2-435b-bd19-859617396112 X-Archives-Hash: 8c6233acc9ac33dda106acacbec0fbe7 commit: 60a1326315870e1cc5780b721db5a5567393d968 Author: Ben Kohler gentoo org> AuthorDate: Fri May 15 17:34:12 2020 +0000 Commit: Ben Kohler gentoo org> CommitDate: Fri May 15 17:34:12 2020 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=60a13263 catalyst-auto-{amd64,x86}*.conf: change cmd array to upload function Use an easier-to-read "upload" function in place of "${cmd[@]}" array syntax. Added a helper var UPLOAD_DEST to be set in advance so that upload function takes only a list of filenames to be uploaded. Signed-off-by: Ben Kohler gentoo.org> tools/catalyst-auto-amd64-experimental.conf | 48 ++++++++++++++++------------- tools/catalyst-auto-amd64.conf | 48 ++++++++++++++++------------- tools/catalyst-auto-x86-experimental.conf | 29 +++++++++-------- tools/catalyst-auto-x86.conf | 29 +++++++++-------- 4 files changed, 86 insertions(+), 68 deletions(-) diff --git a/tools/catalyst-auto-amd64-experimental.conf b/tools/catalyst-auto-amd64-experimental.conf index 2aa91a03..f09cdb3b 100644 --- a/tools/catalyst-auto-amd64-experimental.conf +++ b/tools/catalyst-auto-amd64-experimental.conf @@ -26,7 +26,6 @@ SET_minimal_nomultilib_OPTIONAL_SPECS="stage4-nomultilib-minimal.spec" SET_x32_SPECS="stage1-x32.spec stage2-x32.spec stage3-x32.spec" - SET_hardened_multilib_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec" SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec" SET_minimal_hardened_multilib_OPTIONAL_SPECS="hardened/stage4-minimal.spec" @@ -62,16 +61,19 @@ update_symlinks() { done } +upload() { + rsync \ + -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' \ + -a \ + --omit-dir-times \ + --delay-updates \ + "$@" \ + "${UPLOAD_DEST}" +} + post_build() { local set=$1 spec=$2 - cmd=( - rsync - -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' - -a - --omit-dir-times - --delay-updates - ) case $HOSTNAME in # If you ever need to ensure it's copied somewhere local, drop a hostname in here! LOCAL) @@ -85,53 +87,55 @@ post_build() { esac pushd "${BUILD_SRCDIR_BASE}"/default >/dev/null || exit + UPLOAD_DEST=${DEST_DEFAULT} case ${spec} in stage3.spec) - "${cmd[@]}" stage3-amd64-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-amd64-${TIMESTAMP}.tar.xz* ;; installcd-stage2-minimal.spec) - "${cmd[@]}" install-amd64-minimal-${TIMESTAMP}.iso* "${DEST_DEFAULT}" + upload install-amd64-minimal-${TIMESTAMP}.iso* ;; stage4-minimal.spec) - "${cmd[@]}" stage4-amd64-minimal-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage4-amd64-minimal-${TIMESTAMP}.tar.xz* ;; stage3-nomultilib.spec) - "${cmd[@]}" stage3-amd64-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-amd64-nomultilib-${TIMESTAMP}.tar.xz* ;; stage4-nomultilib-minimal.spec) - "${cmd[@]}" stage4-amd64-minimal-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage4-amd64-minimal-nomultilib-${TIMESTAMP}.tar.xz* ;; stage3-x32.spec) - "${cmd[@]}" stage3-x32-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-x32-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit pushd "${BUILD_SRCDIR_BASE}"/hardened >/dev/null || exit + UPLOAD_DEST=${DEST_HARDENED} case ${spec} in hardened/stage3.spec) - "${cmd[@]}" stage3-amd64-hardened-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2.spec) - "${cmd[@]}" admincd-amd64-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-amd64-${TIMESTAMP}.iso* ;; hardened/stage4-minimal.spec) - "${cmd[@]}" stage4-amd64-hardened+minimal-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage4-amd64-hardened+minimal-${TIMESTAMP}.tar.xz* ;; hardened/stage3-nomultilib.spec) - "${cmd[@]}" stage3-amd64-hardened+nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened+nomultilib-${TIMESTAMP}.tar.xz* ;; hardened/stage4-nomultilib-minimal.spec) - "${cmd[@]}" stage4-amd64-hardened+minimal-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage4-amd64-hardened+minimal-nomultilib-${TIMESTAMP}.tar.xz* ;; hardened/stage3-selinux.spec) - "${cmd[@]}" stage3-amd64-hardened-selinux-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-selinux-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2-selinux.spec) - "${cmd[@]}" admincd-amd64-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-amd64-${TIMESTAMP}.iso* ;; hardened/stage3-selinux-nomultilib.spec) - "${cmd[@]}" stage3-amd64-hardened-selinux+nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-selinux+nomultilib-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit diff --git a/tools/catalyst-auto-amd64.conf b/tools/catalyst-auto-amd64.conf index 585c22c6..15f691d4 100644 --- a/tools/catalyst-auto-amd64.conf +++ b/tools/catalyst-auto-amd64.conf @@ -26,7 +26,6 @@ SET_minimal_nomultilib_OPTIONAL_SPECS="stage4-nomultilib-minimal.spec" SET_x32_SPECS="stage1-x32.spec stage2-x32.spec stage3-x32.spec" - SET_hardened_multilib_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec" SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec" SET_minimal_hardened_multilib_OPTIONAL_SPECS="hardened/stage4-minimal.spec" @@ -62,16 +61,19 @@ update_symlinks() { done } +upload() { + rsync \ + -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' \ + -a \ + --omit-dir-times \ + --delay-updates \ + "$@" \ + "${UPLOAD_DEST}" +} + post_build() { local set=$1 spec=$2 - cmd=( - rsync - -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' - -a - --omit-dir-times - --delay-updates - ) case $HOSTNAME in # If you ever need to ensure it's copied somewhere local, drop a hostname in here! LOCAL) @@ -85,53 +87,55 @@ post_build() { esac pushd "${BUILD_SRCDIR_BASE}"/default >/dev/null || exit + UPLOAD_DEST=${DEST_DEFAULT} case ${spec} in stage3.spec) - "${cmd[@]}" stage3-amd64-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-amd64-${TIMESTAMP}.tar.xz* ;; installcd-stage2-minimal.spec) - "${cmd[@]}" install-amd64-minimal-${TIMESTAMP}.iso* "${DEST_DEFAULT}" + upload install-amd64-minimal-${TIMESTAMP}.iso* ;; stage4-minimal.spec) - "${cmd[@]}" stage4-amd64-minimal-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage4-amd64-minimal-${TIMESTAMP}.tar.xz* ;; stage3-nomultilib.spec) - "${cmd[@]}" stage3-amd64-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-amd64-nomultilib-${TIMESTAMP}.tar.xz* ;; stage4-nomultilib-minimal.spec) - "${cmd[@]}" stage4-amd64-minimal-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage4-amd64-minimal-nomultilib-${TIMESTAMP}.tar.xz* ;; stage3-x32.spec) - "${cmd[@]}" stage3-x32-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-x32-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit pushd "${BUILD_SRCDIR_BASE}"/hardened >/dev/null || exit + UPLOAD_DEST=${DEST_HARDENED} case ${spec} in hardened/stage3.spec) - "${cmd[@]}" stage3-amd64-hardened-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2.spec) - "${cmd[@]}" admincd-amd64-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-amd64-${TIMESTAMP}.iso* ;; hardened/stage4-minimal.spec) - "${cmd[@]}" stage4-amd64-hardened+minimal-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage4-amd64-hardened+minimal-${TIMESTAMP}.tar.xz* ;; hardened/stage3-nomultilib.spec) - "${cmd[@]}" stage3-amd64-hardened+nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened+nomultilib-${TIMESTAMP}.tar.xz* ;; hardened/stage4-nomultilib-minimal.spec) - "${cmd[@]}" stage4-amd64-hardened+minimal-nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage4-amd64-hardened+minimal-nomultilib-${TIMESTAMP}.tar.xz* ;; hardened/stage3-selinux.spec) - "${cmd[@]}" stage3-amd64-hardened-selinux-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-selinux-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2-selinux.spec) - "${cmd[@]}" admincd-amd64-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-amd64-${TIMESTAMP}.iso* ;; hardened/stage3-selinux-nomultilib.spec) - "${cmd[@]}" stage3-amd64-hardened-selinux+nomultilib-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-amd64-hardened-selinux+nomultilib-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit diff --git a/tools/catalyst-auto-x86-experimental.conf b/tools/catalyst-auto-x86-experimental.conf index 061cab92..5f0e475e 100644 --- a/tools/catalyst-auto-x86-experimental.conf +++ b/tools/catalyst-auto-x86-experimental.conf @@ -48,16 +48,19 @@ update_symlinks() { done } +upload() { + rsync \ + -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' \ + -a \ + --omit-dir-times \ + --delay-updates \ + "$@" \ + "${UPLOAD_DEST}" +} + post_build() { local set=$1 spec=$2 - cmd=( - rsync - -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' - -a - --omit-dir-times - --delay-updates - ) case $HOSTNAME in # If you ever need to ensure it's copied somewhere local, drop a hostname in here! LOCAL) @@ -71,26 +74,28 @@ post_build() { esac pushd "${BUILD_SRCDIR_BASE}"/default >/dev/null || exit + UPLOAD_DEST=${DEST_DEFAULT} case ${spec} in stage3.spec) - "${cmd[@]}" stage3-i486-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-i486-${TIMESTAMP}.tar.xz* ;; installcd-stage2-minimal.spec) - "${cmd[@]}" install-x86-minimal-${TIMESTAMP}.iso* "${DEST_DEFAULT}" + upload install-x86-minimal-${TIMESTAMP}.iso* ;; i686/stage3.spec) - "${cmd[@]}" stage3-i686-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-i686-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit pushd "${BUILD_SRCDIR_BASE}"/hardened >/dev/null || exit + UPLOAD_DEST=${DEST_HARDENED} case ${spec} in hardened/stage3.spec) - "${cmd[@]}" stage3-i686-hardened-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-i686-hardened-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2.spec) - "${cmd[@]}" admincd-x86-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-x86-${TIMESTAMP}.iso* ;; esac popd >/dev/null || exit diff --git a/tools/catalyst-auto-x86.conf b/tools/catalyst-auto-x86.conf index e778ce8e..aa00dde1 100644 --- a/tools/catalyst-auto-x86.conf +++ b/tools/catalyst-auto-x86.conf @@ -48,16 +48,19 @@ update_symlinks() { done } +upload() { + rsync \ + -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' \ + -a \ + --omit-dir-times \ + --delay-updates \ + "$@" \ + "${UPLOAD_DEST}" +} + post_build() { local set=$1 spec=$2 - cmd=( - rsync - -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' - -a - --omit-dir-times - --delay-updates - ) case $HOSTNAME in # If you ever need to ensure it's copied somewhere local, drop a hostname in here! LOCAL) @@ -71,26 +74,28 @@ post_build() { esac pushd "${BUILD_SRCDIR_BASE}"/default >/dev/null || exit + UPLOAD_DEST=${DEST_DEFAULT} case ${spec} in stage3.spec) - "${cmd[@]}" stage3-i486-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-i486-${TIMESTAMP}.tar.xz* ;; installcd-stage2-minimal.spec) - "${cmd[@]}" install-x86-minimal-${TIMESTAMP}.iso* "${DEST_DEFAULT}" + upload install-x86-minimal-${TIMESTAMP}.iso* ;; i686/stage3.spec) - "${cmd[@]}" stage3-i686-${TIMESTAMP}.tar.xz* "${DEST_DEFAULT}" + upload stage3-i686-${TIMESTAMP}.tar.xz* ;; esac popd >/dev/null || exit pushd "${BUILD_SRCDIR_BASE}"/hardened >/dev/null || exit + UPLOAD_DEST=${DEST_HARDENED} case ${spec} in hardened/stage3.spec) - "${cmd[@]}" stage3-i686-hardened-${TIMESTAMP}.tar.xz* "${DEST_HARDENED}" + upload stage3-i686-hardened-${TIMESTAMP}.tar.xz* ;; hardened/admincd-stage2.spec) - "${cmd[@]}" admincd-x86-${TIMESTAMP}.iso* "${DEST_HARDENED}" + upload admincd-x86-${TIMESTAMP}.iso* ;; esac popd >/dev/null || exit