From nobody Tue May 23 05:06:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QQMjQ1qvmz4T25g; Tue, 23 May 2023 05:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQMjQ1L77z3vRK; Tue, 23 May 2023 05:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684818378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16++P8pEjmHjxSHUKdwJ0deXztXLMyJ0hQ2RqlQ487E=; b=rF/8T7KV/iSkEAZidFXa9usSxsmWjKb+kl+gaKa64kOlXIpyfsMQzKI5d4zwZGPng5/pth jAdZbbAD9HQ8Fp5lJ+mM3V/SqnmRPbYnvD2xOFb17CrLs/6lslX6aX5yR/8IPMOygdkiyo PmJCPxI+VGiIn2WXNzR14iqR/AVswI1rjdedN1uUOZWeHgY9MKjAIFe3zUzsk/AgacN4nO JtVvbeVVlE0uvvrO8vChgEDXHvnzzppu2E2R1XhzRkfzHiee38lrttaFdokwkUkHuhsYOh OfSuYVkG51wctaCPWtUQ92udFFJaEbbEWiKtHAbiDfY/hzLlH99xJJp1V82sJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684818378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16++P8pEjmHjxSHUKdwJ0deXztXLMyJ0hQ2RqlQ487E=; b=JMaHUZ9OgFU9NwtMIoh6svFZUb5U+oiyZlOrbNe9Wsq2zpfI8uE7vI46VAIwx5bg7+xQbB UaBgMJoFBhZBQtUGnXyI53RW0XyRw+z9E6od2tYhxcFwIsmJ/hbhFPugyCJxFjarfZIqDh iKQ60J1FGxoJnStzbxXfUTQ51IYJVDORc+rV+b0DJRXfDBHZ0+pIiP2Om8fOOrU3ToKvnp ItMFqIW3tSEeMDfdtNbaqCfj36NGQsI+35Du0wVxMz/w98rl3zi+so0ZtZG1NJQ9ZBvafP QThIt58uV1/hUDtZWLOBZkIcQoxpRY2cpBZ5NO3zhBQjWCT3KhE7yJIVBQnqBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684818378; a=rsa-sha256; cv=none; b=G0fkxPd8Wy0HRhQ1kI3gfKMD+yPt5QwJGSx346UEh7oHurmki5tN2EVqDVoQYVqjKvSl8f IxfTMSaCelfQgDBIA/VDc1otfIS8yMUBDNNZ3xyMPuPfoipNm3HCJpuAZ04jNS/KKFe2mN YLAci0JJ3n35un44dEAS5ZkOqwU+x5EiRHzOFby19YAD+wznKo0vID31sKdy31UU8bhgZl ypcDuPVWdLdG7J0HL/Lr0XR+2umMA42K8NM6OUMLI5RyYlDZmpOVaxAp4pz6azxaAjkmiS ZUfBhjpVFtRDoshFh6Kk4v9xgNNN/HFXl7WwDpioa2f2v4rIhW1xUPzvmdKxKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QQMjQ0FFHzn7S; Tue, 23 May 2023 05:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34N56HlS093634; Tue, 23 May 2023 05:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34N56HQV093633; Tue, 23 May 2023 05:06:17 GMT (envelope-from git) Date: Tue, 23 May 2023 05:06:17 GMT Message-Id: <202305230506.34N56HQV093633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 634a770a5e16 - main - /etc/rc.d/motd: Update to accommodate changes in uname(1) and newvers.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 634a770a5e16b424c096b74ac33a145e766dd7af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=634a770a5e16b424c096b74ac33a145e766dd7af commit 634a770a5e16b424c096b74ac33a145e766dd7af Author: Xin LI AuthorDate: 2023-05-23 04:23:57 +0000 Commit: Xin LI CommitDate: 2023-05-23 05:05:35 +0000 /etc/rc.d/motd: Update to accommodate changes in uname(1) and newvers.sh The recent changes to the uname(1) command removed trailing spaces for better POSIX conformance, but it broke the regular expression used by the motd script which expected it. This commit addresses this by removing the requirement, as it is no longer present. Additionally, a recent change in newvers.sh introduced a new format for uname -v, which omited the build number and build dates to improve reproducible build support. This commit adds support for this new format. Reported-by: Jamie Landeg-Jones Reviewed-by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40225 --- libexec/rc/rc.d/motd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/motd b/libexec/rc/rc.d/motd index d9dd60a0f59a..e27cf273741d 100755 --- a/libexec/rc/rc.d/motd +++ b/libexec/rc/rc.d/motd @@ -45,7 +45,8 @@ motd_start() fi T=`mktemp -t motd` - uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T} + uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\)$,\1 (\3) #\2,' \ + -e 's,^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\)$,\1 \2 (\4) \3,' > ${T} cat "${TEMPLATE}" >> ${T} install -C -o root -g wheel -m "${PERMS}" "$T" "${TARGET}"