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 BBCB11382C5 for ; Wed, 13 Jan 2021 01:55:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4DC4E0ABA; Wed, 13 Jan 2021 01:55:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 AC06DE0ABA for ; Wed, 13 Jan 2021 01:55:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 3938B340952 for ; Wed, 13 Jan 2021 01:55:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B07C646B for ; Wed, 13 Jan 2021 01:55:46 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1610136543.0c7067713b7495aa26a45d85ccebc9f0843c50c3.dilfridge@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto tools/catalyst-auto-riscv.conf X-VCS-Directories: tools/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 0c7067713b7495aa26a45d85ccebc9f0843c50c3 X-VCS-Branch: master Date: Wed, 13 Jan 2021 01:55:46 +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: 141638fc-8068-419c-b793-7a6baa8af76f X-Archives-Hash: 927714d331a99d49dba2b9e5da2df120 commit: 0c7067713b7495aa26a45d85ccebc9f0843c50c3 Author: Andreas K. Huettel gentoo org> AuthorDate: Wed Jan 6 15:46:02 2021 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Fri Jan 8 20:09:03 2021 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=0c706771 Add catalyst-auto option --nonetwork Signed-off-by: Andreas K. Huettel gentoo.org> tools/catalyst-auto | 16 +++++++++++++++- tools/catalyst-auto-riscv.conf | 15 ++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index d71ad5a2..203abe81 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -24,6 +24,7 @@ preclean=0 lastrun=0 lock_file= parallel_sets=1 +nonetwork=0 usage() { local msg=$1 @@ -45,12 +46,16 @@ Options: -t|--test Stop after mangling specs and copying files --interval Exit if last successful run was less than ago -l|--lock File to grab a lock on to prevent multiple invocations + -X|--nonetwork Do not perform network operations (like uploading result) + This needs to be supported by the config file as well. -h|--help Show this message and quit EOH } send_email() { + if [[ ${nonetwork} == 0 ]]; then + local subject="${EMAIL_SUBJECT_PREPEND} $1" local message=$2 local logfile=$3 @@ -65,6 +70,8 @@ send_email() { printf 'From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%b' \ "${EMAIL_FROM}" "${EMAIL_TO}" "${subject}" "${body}" | \ /usr/sbin/sendmail -f "${EMAIL_FROM}" ${EMAIL_TO//,/ } + + fi } # Usage: run_cmd @@ -151,6 +158,9 @@ parse_args() { -C|--preclean) preclean=1 ;; + -X|--nonetwork) + nonetwork=1 + ;; --interval) lastrun=$1 shift @@ -215,7 +225,7 @@ containerize() { # the script whenever there's an update. git_update() { # If we've already relaunched, nothing to do. - if [[ ${GIT_UPDATE} == "true" ]] ; then + if [[ ${GIT_UPDATE} == "true" || ${nonetwork} == 1 ]] ; then return fi @@ -240,6 +250,8 @@ git_update() { # SSH fingerprint from DNS. To do this securely, we need to ensure DNSSEC is # working. verify_dnssec() { + if [[ ${nonetwork} == 0 ]]; then + which dig >/dev/null || { echo "net-dns/bind-tools is needed to verify DNSSEC is working" exit 1 @@ -254,6 +266,8 @@ verify_dnssec() { echo "DNSSEC is not enabled in /etc/resolv.conf" exit 1 fi + + fi } run_catalyst_commands() { diff --git a/tools/catalyst-auto-riscv.conf b/tools/catalyst-auto-riscv.conf index 4a5d40b5..6a7e8657 100644 --- a/tools/catalyst-auto-riscv.conf +++ b/tools/catalyst-auto-riscv.conf @@ -24,15 +24,6 @@ SET_ilp32_SPECS="stage1-ilp32.spec stage2-ilp32.spec stage3-ilp32.spec" #KCONFIG_DIR=${REPO_DIR}/releases/kconfig/${ARCH} -send_email() { - : -} - -# no upload -> no dnssec needed -verify_dnssec() { - : -} - update_symlinks() { # Symlink the latest stages3 to build from local d f @@ -47,8 +38,10 @@ update_symlinks() { } upload() { - echo NOT Uploading "$@" -# rsync -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' "$@" alpha@releng-incoming.gentoo.org: + if [[ ${nonetwork} == 0 ]]; then + echo Uploading "$@" + rsync -e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' "$@" riscv@releng-incoming.gentoo.org: + fi } post_build() {