From nobody Sat May 14 11:30:43 2022 X-Original-To: bugs@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 DF25B1AE6428 for ; Sat, 14 May 2022 11:30:43 +0000 (UTC) (envelope-from bugzilla-noreply@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 4L0jxb3msRz3pFQ for ; Sat, 14 May 2022 11:30:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 62C4816883 for ; Sat, 14 May 2022 11:30:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 24EBUhB0047924 for ; Sat, 14 May 2022 11:30:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24EBUhhP047923 for bugs@FreeBSD.org; Sat, 14 May 2022 11:30:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263969] Trailing whitespace change to uname -v output not carried to motd Date: Sat, 14 May 2022 11:30:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jarrod@downtools.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652527843; 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=4JekOPwknqZbGnuxWsMhP8nmYwIqeJMBOuD7HqAR+6s=; b=YTvCfchXX5FAFtFYQeaQSIMCcEBcXpsRlf+2/V0CC1RbyXV0A9x/bC/TNwwTUNHM+IUQxl 9zUlCtUopGQpqLUTjCox9mu85qBn7ZwggR+TH5I4gqejD/+DwIjAtEGAx+1vqK+n2LInUu 9+CubT4UN4hk71bNocwlPwlXREwNtlkJX4xeOjG+PLglP6aQzv2CTfLS/yk+Np5NDRAwxQ +j+SKgrLYEyYeyRnzedhBZjQbPTLrwPqyNvmqO31GLiys+a4qx5gVGDYzrHG+uVN2iXbq3 Hczzva+CPFl0zhTF2xYM71NpqkQVaoEZKjd22u/WKROMpEOZmG4XIzu1QRU97Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652527843; a=rsa-sha256; cv=none; b=yz1n5shDKRZSHiv6UT50KMlVGNN+wHdpkDSfN+2mrEHUFvv/bI7kWeZIIVCnowYWxnfe/c 8eq6oKD4XV15Z6GFftycWCvD1hSucvitqkiUglWxu4jIc6+xrTQftU7CAvv6hQn43Y8fJW uojEtIoDti+7yRxrmzQXrAMHuHbib+7lHTBDiXlZb2MzPRX5HXlnceR2g2nazQGXFAJqxp S5tabusyJRzQfYzAlI7uksrilQV06cvh7laIKTjLtsGo84MW0N6LFBRm7yd7Ri/edzVW6N ubHddRMUosDn0vnwQIyLTqZCB5w8cHjBoW40FDdNL4PUnPoSQvpYDsGqSYpXCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263969 Bug ID: 263969 Summary: Trailing whitespace change to uname -v output not carried to motd Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jarrod@downtools.com.au Created attachment 233907 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233907&action= =3Dedit libexec/rc/rc.d/motd patch Commit ed87197672b44f7f76b38e6450df2b4071c88a67 to usr.bin/uname/uname.c removed a trailing space from the end of "uname -v" output however this was= not carried through to the regular expression used in libexec/rc/rc.d/motd. Prior to the removal, the installed /etc/rc.d/motd script would update /etc/motd (now /var/run/motd) with output similar to below. amnesiac> uname -v | tr " " "-" FreeBSD-13.0-RELEASE-p7-#8:-Thu-Feb--3-17:40:35-ACDT-2022-----root@amnesiac= :/usr/obj/usr/src/amd64.amd64/sys/GENERIC- amnesiac> grep "uname -v" /etc/rc.d/motd | sed "s# >.*##" | sh <-- example to run the included rc.d/motd regex FreeBSD 13.0-RELEASE-p7 (GENERIC) #8: Thu Feb 3 17:40:35 ACDT 2022 <-- = note the GENERIC kernel name and removed path amnesiac> Having now updated the host to FreeBSD 13.1-RELEASE, the output is no longer modified. amnesiac> uname -v | tr " " "-" FreeBSD-13.1-RELEASE-#15:-Sat-May-14-17:38:59-ACST-2022-----root@amnesiac:/= usr/obj/usr/src/amd64.amd64/sys/GENERIC amnesiac> grep "uname -v" /etc/rc.d/motd | sed "s# >.*##" | sh FreeBSD 13.1-RELEASE #15: Sat May 14 17:38:59 ACST 2022=20=20=20=20 root@amnesiac:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amnesiac> The attached patch makes the trailing space optional to the regular express= ion though it may be more appropriate to drop the requirement for the trailing space altogether. This restores the previous behaviour. amnesiac> uname -v | tr " " "-" FreeBSD-13.1-RELEASE-#15:-Sat-May-14-17:38:59-ACST-2022-----root@amnesiac:/= usr/obj/usr/src/amd64.amd64/sys/GENERIC amnesiac> grep "uname -v" /etc/rc.d/motd | sed "s# >.*##" | sh FreeBSD 13.1-RELEASE (GENERIC) #15: Sat May 14 17:38:59 ACST 2022 amnesiac> --=20 You are receiving this mail because: You are the assignee for the bug.=