From nobody Sun Dec 05 16:56:28 2021 X-Original-To: dev-commits-src-all@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 0784118CEC7F; Sun, 5 Dec 2021 16:56:29 +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 4J6XlJ5Lsmz4Qxy; Sun, 5 Dec 2021 16:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 979291B774; Sun, 5 Dec 2021 16:56:28 +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 1B5GuStK082559; Sun, 5 Dec 2021 16:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B5GuSX5082558; Sun, 5 Dec 2021 16:56:28 GMT (envelope-from git) Date: Sun, 5 Dec 2021 16:56:28 GMT Message-Id: <202112051656.1B5GuSX5082558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 94d31c72d87e - stable/12 - os-release: Quote variables as documented in the manual List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 94d31c72d87ee6746c665ee8af697c25768f9467 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638723388; 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=4p4xNCrfix3uI5h4rSWQKHT79DXr51ujjy1+uDxudPc=; b=kq7KR8bbJfSt5qz9F9anptDUUwKlFqRyG8yLTJLpORkiNn8XmSwT21Hq7+4de3p5RPK80Z Sj6Gbsc+jbAMl4HLzXawnlWhtrAZamxHGTYJLDd3FlrE5UtA0Bo5brdlR0WIkmLPctq/l9 GOjp2z7roOW3QabWVK7bMwZbPYbAsAlghOCUPpSAbZVQWPBKwsslzjq9mU8k8EJ+J1j3N6 VFlVbULz1nTbRqM4ZPwo29KgJ7vp8eB8X5hinRhzyCvVViaEUFXBr2ld6O97sTm4ZIwkgn 61wsD7wJj4uc1oBlTTAqWDnIIWGwMOPC2TfSfpwvQVPo5cKRVCjotOUI5JGR3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638723388; a=rsa-sha256; cv=none; b=VivtJk9yM4nL2ABHYPUsJaZn1l+J5Mu9QfqtCayu3k1a7p8Jjg7nNPkQI+cKu+94OcdGHN uo2/OgEZIKP4owF8AcSSpGBoodA9GEzh4p/KHEAwo/LGqcQ1spLsZGQuK+vt56lgXfDuOk l2U0xrE1ZO6YPcmGq6L5OK7C0jeSkXx+0CdXgmgeZuI1J07VGTKQPvFDEQ6UkYOPb0mjF1 qLBmo3WQEiI17uFBZ3qvmojDShcgrifSRdqJ34lLtZriRF3yZqCSFoBIUgvbNwVibMz6ZT JqH/oryVSjZGFKaMGEQk83wtDok/6L956vq2zTneFSn95PqPvoJ6iyCuTnHE5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=94d31c72d87ee6746c665ee8af697c25768f9467 commit 94d31c72d87ee6746c665ee8af697c25768f9467 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-23 10:26:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-12-05 16:44:32 +0000 os-release: Quote variables as documented in the manual Variables must be quoted if they contain non-alphanumeric characters. Warner noted in the review that the lack of quoting causing problems here is rather an edge case. I believe that it's worth adding the quotes here anyway because this is what the specification says and there is no good reason not to follow it. Reviewed by: imp Approved by: imp (src) MFC after: 7 days (cherry picked from commit 169e06fa7852810f4ced2cce7a3c14ca9443bf39) --- libexec/rc/rc.d/os-release | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release index 411348a43668..39d2cbe0086d 100755 --- a/libexec/rc/rc.d/os-release +++ b/libexec/rc/rc.d/os-release @@ -26,14 +26,14 @@ osrelease_start() t=$(mktemp -t os-release) cat > "$t" <<-__EOF__ NAME=FreeBSD - VERSION=$_version - VERSION_ID=$_version_id + VERSION="$_version" + VERSION_ID="$_version_id" ID=freebsd ANSI_COLOR="0;31" PRETTY_NAME="FreeBSD $_version" - CPE_NAME=cpe:/o:freebsd:freebsd:$_version_id - HOME_URL=https://FreeBSD.org/ - BUG_REPORT_URL=https://bugs.FreeBSD.org/ + CPE_NAME="cpe:/o:freebsd:freebsd:$_version_id" + HOME_URL="https://FreeBSD.org/" + BUG_REPORT_URL="https://bugs.FreeBSD.org/" __EOF__ install -C -o root -g wheel -m ${osrelease_perms} "$t" "${osrelease_file}" rm -f "$t"