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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C939115808B for ; Sun, 13 Mar 2022 05:55:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14BDFE0855; Sun, 13 Mar 2022 05:55:27 +0000 (UTC) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C1F03E0855 for ; Sun, 13 Mar 2022 05:55:26 +0000 (UTC) Received: by mail-qv1-xf33.google.com with SMTP id hu12so10273546qvb.6 for ; Sat, 12 Mar 2022 21:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boet.cc; s=google; h=mime-version:from:date:message-id:subject:to; bh=+JX0/9kYe6NStbl6X8LmDh2huCWvV3ysj9SkvQ1cf3s=; b=mYTrc6DTbmeX59HmgPKMhWc1uTyNuvI5SlWsYixIUlPxP7V11A2Dupv2mq2saoUNba QPuSv5XW7Gxlppq0lNep7HPDJvEgoJpYXzeb0tolVB+Ca9qhLZc8Ot2CulC+Hcr0ab74 j6UQEm5GDoovm9a0OPgh1VGOLZO5LFe/6RdXQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+JX0/9kYe6NStbl6X8LmDh2huCWvV3ysj9SkvQ1cf3s=; b=z7xmewdoU4XnHYlREnEtrypCgH4Nsc7Vl1kDJdtAzA4+B59qj2LYHOgfjOpKkcrxD9 iALPO2GMcTCS9dr7huI1qlzwmJYWnC0RJ9nvUX7Sqb5aevqxOt6SyE0CvKu7+3nT3zDn tz1zYJJMyFWImFqZ5k2JKmfNW3ntG8O0ZmuQUQ+F726Q+k0/E7dWw9wKWSNKUBXxwF8g Dxi8csAgvrxwp8aff0iPwIv5Hl48R3Zjr28aUcLpl8eV2QkH1LEFSTUfS8W9PPxIOa+d a1NCscO2UnAfuH+oIW9ZyVEuljEtlF77UxITQ+9s7UNq8UBufvoGg2mplnY38IZ5qeSS 7yUg== X-Gm-Message-State: AOAM533yxF46ytXJXIeZy2bwPFjWzeppivfuqEPaKOMF4UVxWjJZflYj 9dnU8QU+po4FjYjnECm3Pd+wPybCDqy3y1D36zFXn0nA+5sFdlP9cYw= X-Google-Smtp-Source: ABdhPJx0I16+hH9PNIm0xaS6ECFwqdXFxuqYdpZeEx6MCzVKBK78U0LhLPXRENqQZGv+C/u7FmiN8vv4iRzM7epqWBU= X-Received: by 2002:a0c:f605:0:b0:438:9629:f8ac with SMTP id r5-20020a0cf605000000b004389629f8acmr10844551qvm.47.1647150925745; Sat, 12 Mar 2022 21:55:25 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 From: nic boet Date: Sat, 12 Mar 2022 23:55:14 -0600 Message-ID: Subject: [gentoo-catalyst] releng catalyst-auto misc cleanups To: gentoo-catalyst@lists.gentoo.org Content-Type: multipart/mixed; boundary="000000000000d29dea05da1335ac" X-Archives-Salt: 5ddfd977-5497-4197-9146-47b0d393a601 X-Archives-Hash: e4f266123548b2e2f541c4b66b9eeef4 --000000000000d29dea05da1335ac Content-Type: multipart/alternative; boundary="000000000000d29de805da1335aa" --000000000000d29de805da1335aa Content-Type: text/plain; charset="UTF-8" Greetings- Please find attached patch for cleanups and bug fixes of releng ./tools/catalyst-auto script. I realize there is more than one issue fixed, and some if not most is cosmetic. Happy to split into multiple patch files, each diff section is unique and is in order as described here. == update copyright header Cosmetic :) == improve send_mail() because it acts more like the logger * output failure events to stdout if verbose set, useful for those without a mailer * do not email if recipient var is undef; allows flexibility for non-releng use cases I was trying to troubleshoot why the script kept terminating, I didn't have a mailer setup on that build system yet. Figured it would also be handy to disable broadcasting messages to the gentoo devs if testing or for unofficial user builds == do not source catalyst.conf as it's not bash syntax * non-bash formatted lines are executed; results in several "command not found" errors * instead, parse the file for the specific var These errors are cleared /etc/catalyst/catalyst.conf: line 13: digests: command not found /etc/catalyst/catalyst.conf: line 19: envscript: command not found /etc/catalyst/catalyst.conf: line 22: options: command not found /etc/catalyst/catalyst.conf: line 26: autoresume,: command not found /etc/catalyst/catalyst.conf: line 33: bindist,: command not found /etc/catalyst/catalyst.conf: line 39: distcc,: command not found /etc/catalyst/catalyst.conf: line 50: kerncache,: command not found /etc/catalyst/catalyst.conf: line 53: pkgcache,: command not found /etc/catalyst/catalyst.conf: line 57: seedcache,: command not found /etc/catalyst/catalyst.conf: line 66: ]: command not found /etc/catalyst/catalyst.conf: line 87: distcc_hosts: command not found == make it more apparent that bash time is not used. This will still output "which: no time", with more info now as how to correct which: no time in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/13/bin) == snapshot_cache was removed Apr 2020 catalyst commit 6493f3bc534f97468c514a12035b10e3107c4ecf * --preclean would fail as catalyst.conf is invalid Storedir now becomes the only var extracted from /etc/catalyst/catalyst.cong using the new catalyst_var() function redefined in this patch Hope this helps Thank you :) -- Nic --000000000000d29de805da1335aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings-
Please find attached patch for c= leanups and bug fixes of releng ./tools/catalyst-auto script.
I r= ealize there is more than one issue fixed, and some if not most is cosmetic= . Happy to split into multiple patch files, each diff section is unique and= is in order as described here.

=3D=3D
update copyright header
Cosmetic :)

=3D=3D
improve send_mail() because it acts more like the logger=C2=A0* output failure events to stdout if verbose set, useful for those = without a mailer
=C2=A0* do not email if recipient var is undef; allows = flexibility for non-releng use cases

I was try= ing to troubleshoot why the script kept terminating, I didn't have a ma= iler setup on that build system yet.
Figured it would also be han= dy to disable broadcasting messages to the gentoo devs if testing or for un= official user builds

=3D=3D
do not source c= atalyst.conf as it's not bash syntax
=C2=A0* non-bash formatted line= s are executed; results in several "command not found" errors
= =C2=A0* instead, parse the file for the specific var

These errors are cleared
/etc/catalyst/catalyst.conf: line 13: digests: command not found/etc/catalyst/catalyst.conf: line 19: envscript: command not found
/et= c/catalyst/catalyst.conf: line 22: options: command not found
/etc/catal= yst/catalyst.conf: line 26: autoresume,: command not found
/etc/catalyst= /catalyst.conf: line 33: bindist,: command not found
/etc/catalyst/catal= yst.conf: line 39: distcc,: command not found
/etc/catalyst/catalyst.con= f: line 50: kerncache,: command not found
/etc/catalyst/catalyst.conf: l= ine 53: pkgcache,: command not found
/etc/catalyst/catalyst.conf: line 5= 7: seedcache,: command not found
/etc/catalyst/catalyst.conf: line 66: ]= : command not found
/etc/catalyst/catalyst.conf: line 87: distcc_hosts: = command not found


=3D=3D
= make it more apparent that bash time is not used.

= This will still output "which: no time", with more info now as ho= w to correct
which: no time= in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:= /usr/lib/llvm/13/bin)


=3D=3D=
snapshot_cache was removed Apr 2020 catalyst commit 6493f3bc534f97468c5= 14a12035b10e3107c4ecf
* --preclean would fail as catalyst.conf is invali= d

Storedir now becomes the only var extracted from= /etc/catalyst/catalyst.cong using the new catalyst_var() function redefine= d in this patch


Hope this helps=
Thank you :)

--=C2=A0

Nic=


--000000000000d29de805da1335aa-- --000000000000d29dea05da1335ac Content-Type: text/x-patch; charset="US-ASCII"; name="catalyst-auto_misc-cleanups.patch" Content-Disposition: attachment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