From nobody Thu Dec 02 12:20:32 2021 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 D4F4418B5A87; Thu, 2 Dec 2021 12:20:44 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J4ZmW6p8Xz3s6y; Thu, 2 Dec 2021 12:20:43 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id r25so49114367edq.7; Thu, 02 Dec 2021 04:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to; bh=vwwwILNgNG0miEB3hAJI0xd3LKmkOtjJ8ouXHlXFv3E=; b=F2jNETHhnNUSOMXnKOSaLjxVqVCnIxFp5ummTnwDL79zJt7gegrXFvarnXaixV7OqG 5hWw0QoLpDPuRu0AB7cfztIAoIvNsmz2DDAlU4jq6EbMIFMZOBSk2kP0LZqKCOksuwja WYFkR1n/ePqWj6CptrrZgM41+ygHGJLrbRJ3/I6D5wLdjjiqy1G+c27ofGeP8rP3d05a qzu0JwtuCQCc98vDrc1NvgNduuzsvJ/phdg9JJE32V3cQ2jElv/G2CKFvB4kasqmrlz4 QszeEukzaOpXdfq6aRgoyaA1SUjfDiekWytDvFDgWXUj5Aitb72ac/bnjI1wh3bQOr1p XPMg== X-Gm-Message-State: AOAM530emWbauw2xz9PtqG525Txj8QBea/Hw0SRaQ6t/WUnd3+FFpCFe WzQblpQiQSPBO0vd2/Ld0m1MFaK8w5vH1g== X-Google-Smtp-Source: ABdhPJx3MYPaCz0YKJuA1b4Sea2QAnq6QgAhxjfupdl6CMXNULeZL8lyVwkutwN9XYtvbMkcGV6oPA== X-Received: by 2002:a17:907:7f1a:: with SMTP id qf26mr14795364ejc.543.1638447634583; Thu, 02 Dec 2021 04:20:34 -0800 (PST) Received: from [192.168.0.194] (ip5f5bf437.dynamic.kabel-deutschland.de. [95.91.244.55]) by smtp.gmail.com with ESMTPSA id e7sm2183699edk.3.2021.12.02.04.20.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Dec 2021 04:20:34 -0800 (PST) Content-Type: multipart/alternative; boundary="------------Jkz0a0o05yr6W0y0IcezIL06" Message-ID: Date: Thu, 2 Dec 2021 13:20:32 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-US To: Warner Losh Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202111241528.1AOFSJdf038653@gitrepo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: Re: git: 169e06fa7852 - main - os-release: Quote variables as documented in the manual In-Reply-To: X-Rspamd-Queue-Id: 4J4ZmW6p8Xz3s6y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.53 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.97 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.97)[-0.974]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.53:from]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.53:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[95.91.244.55:received] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------Jkz0a0o05yr6W0y0IcezIL06 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 24/11/2021 17:42, Warner Losh wrote: > On Wed, Nov 24, 2021 at 8:28 AM Mateusz Piotrowski <0mp@freebsd.org> wrote: > > URL: https://cgit.FreeBSD.org/src/commit/?id=169e06fa7852810f4ced2cce7a3c14ca9443bf39 > > > [...] > >     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. > > > The only place it might be needed is for _version. Everything else can't > have troublesome characters. The manual does not say you have to > quote non-alphanumeric characters in variable assignment being my > main point. Certainly not the paths and URLs. That's just gratuitous > and not generally done in shell scripts (which I thought was a good > enough reason to not do it). I'd have preferred if that nuance had > been better reflected in the commit message since the change > itself won't break anything. It is not about the troublesome characters. From the perspective of sh(1) all those assignments were most likely fine as you said. This change is about the os-release(5) manual page. It says that:      •   Variable assignments must be included inside of double quotes if they          contain characters outside of A-Z, a-z and 0-9 The goal of this change was to stay consistent with the format specification. I'll make sure that my future commit messages for similar changes go through a review process as well. Often it's too easy to miss vital details for simple changes. Best, Mateusz --------------Jkz0a0o05yr6W0y0IcezIL06--