Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jF6f0-0006dN-7H for mharc-grub-devel@gnu.org; Thu, 19 Mar 2020 21:41:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35448) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jF6ex-0006Zp-9s for grub-devel@gnu.org; Thu, 19 Mar 2020 21:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jF6ev-00019r-Le for grub-devel@gnu.org; Thu, 19 Mar 2020 21:41:14 -0400 Received: from orion.archlinux.org ([2a01:4f8:160:6087::1]:33570) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jF6ev-00017p-3Q for grub-devel@gnu.org; Thu, 19 Mar 2020 21:41:13 -0400 Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 1CB081A3E0196E for ; Fri, 20 Mar 2020 01:41:08 +0000 (UTC) Received: from [IPv6:2600:1700:57f0:ca20:763a:c795:fcf6:91ea] (unknown [IPv6:2600:1700:57f0:ca20:763a:c795:fcf6:91ea]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: eschwartz) by orion.archlinux.org (Postfix) with ESMTPSA id C250B1A3E0196D for ; Fri, 20 Mar 2020 01:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1584668468; bh=SC36eDAuTbgUqGUnrLI5ZKpqvlGN/6QCKg0VkagENUA=; h=Subject:To:References:From:Date:In-Reply-To; b=CUuMuO10jAUXQtzRxEJGTUBw5ilkadM6oGoowMs1QBnzxxFus1ZDKtZqetC+o0KAg FUrWxtFE9+RzSXhaHOH/n9/N/qrhkKALoMxnOisERyY8jTJILcJybzEwvZIKrrvE6L shgUv7DYet4mXfLjAUOvaYMsBH3wCYXOOneAMI8L5mEOwIQ7Y5yvlDpemz4+a4TIGs wFRiTcKnOJR9/RkvfIYrEBMcA8yrI+pYutlT7kcIjWKk6dVxSYAERZLNufADlY1OWD PBd8lj63DNGjJdmMN6i0Fy+hUcSp//YabulHcWhME28pBdlQgaw6o5K0CFIl5/AnPy jgUWoNyyYcsSLKQGTp+TsTarLupKCTl0OGi8QDALHzm+EDoKqbr5HgqtsJKPitYYoO 2HFrUS0PUQBzyQIgSmENCCoiH3qwaHTseYidYzeSQp7yDzq+83ZtHvnPmM2tqyMBNc 1Ju+DN+K9jq5iwF/Upd8+gKne81UDqdYUNtYY7SViaV19heVUyfQyJIORsDSVE4yuF FFaQ8a5cyZI13yBdtzl+45PA0LPVH4FjcMBTbD8AQlSv0LOLal/ppuS739OqRunVfN jTbtwUZVJ4J0wmcIzLcCHxlnMUsbaYmLr/v6wDbzOlY3Q713+iJCX+tsF5zfuZDteA JOeLTGUoz/5fxdpTTelfptDI= Subject: Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ? To: grub-devel@gnu.org References: From: Eli Schwartz X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <429124a9-6de6-8937-361f-d54a48e7c3ba@archlinux.org> Date: Thu, 19 Mar 2020 21:41:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JzwabajMSTdktzyutbVpfOX0Qe8auheVx" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:160:6087::1 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 01:41:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JzwabajMSTdktzyutbVpfOX0Qe8auheVx Content-Type: multipart/mixed; boundary="tf4tkqgmMRjoVHCiKG7hXd8BTwVtUIFy5" --tf4tkqgmMRjoVHCiKG7hXd8BTwVtUIFy5 Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable On 3/19/20 8:57 PM, Dimitri John Ledkov wrote: > Have you opened a launchpad bug report against the grub2 package with b= oth > configs before and after? What is the bug number there? >=20 > In general, we do parse and rewrite configs using debconf which is Perl= / C > / Shell processing using tools external to grub. In general, we advise = to > customize via grub.d drop-in files instead of modifying etc/default/gru= b > file itself. >=20 > This is a bit out of scope for the upstream mailing list, as debconf > integration is downstream specific on Ubuntu/Debian systems. In general, other distros avoid parsing and rewriting configs because this should be the user's responsibility. :p The OP should consider that maybe such distros are more stable than Ubunt= u? =2E.. Anyway, it seems clear-cut to me, as per the question which is NOT about what should be done with debconf. The OP's question is very simple: "Does the grub project consider /etc/default/grub as a shell-compatible file which is sourced, to be the PUBLIC INTERFACE of this configuration file?" It seems clear-cut to me. The quoted manual section explicitly documents that it is POSIX shell format, then calls out the idea of KEY=3DVALUE assignments and declares this to be *merely* "normally", thus highlighting the possibility that it isn't exclusively so. Compare this to, for example, the os-release(5) man page which states the following format for /etc/os-release: """ The basic file format of os-release is a newline-separated list of environment-like shell-compatible variable assignments. It is possible to source the configuration from shell scripts, however, beyond mere variable assignments, no shell features are supported (this means variable expansion is explicitly not supported), allowing applications to read the file without implementing a shell compatible execution engine= =2E """ Note how os-release(5) explicitly goes to some lengths to declare the need for parsing this file in C, that it is *not* valid to simply use shell code, and then continues on to enumerate which subset of shell code it supports. The conclusion is simple enough: if you are going to automatically rewrite this grub file, you must do so using a parser engine that implements POSIX shell and knows how to properly tokenize and rewrite the full range of language features permitted by POSIX shell. Doing otherwise is YOLO, rash, buggy, and prone to breakage as demonstrated by the OP's bug report. If a downstream project making use of grub, then goes ahead and calls the use of backslash escapes for the very simple purpose of line continuation across multiple lines (of all the things one might do in a POSIX sh formatted configuration file, this is pretty tame), an issue of "highly unusual abuse of POSIX shell semantics", this is pretty bad I have to say. Also, it's victim blaming. Just my $0.02 as a distro person (not a grub dev). --=20 Eli Schwartz Arch Linux Bug Wrangler and Trusted User --tf4tkqgmMRjoVHCiKG7hXd8BTwVtUIFy5-- --JzwabajMSTdktzyutbVpfOX0Qe8auheVx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEvSewel70XCra9w4EhIGKaBmvSpsFAl50HzAACgkQhIGKaBmv Sptw6w/+OyX8hgzqCmwcyUp5Hy+KkTkpR1/W3qStkZ0b/S3d7iW6Qkf2yoPul8LO CCoMCUNy6NQq6KeFj0HML7QS9JvHWM8Pps3TnjJ8UFptNzQtUQ4599kBqGS9gJY0 iXuyKOqsV/tt9Kd+gIUvaeSVj4k9qyJ7H6/8YGkn+57Awa0fSEraQovpXKwYSQq9 LcWxDDa21XV2C2T+D+7aQL2xamwbtYZpmYlPkcZlTcl7+2b/F8wVATSTACt+Ec3w LZeb0052aTXI+7nR4UNlKKwZNzMdYNIxHNsHCKFa+1fGTjVoBph7uge9P9PE9pez tzskvd4Aks/mgkhIeccRKWEP1600RzvWRa9rm9pn6fS4pKmTAd57O5ENsw47hb3Y +34sfKvNoSWVxGN5CN619KI9Pj05a9LdqVHHMaAO+JPflQqDTCIczKilIyM8LIJL iEA8WsV47krSEzXRv5eQMHe9RFVetl0Yf/kls0JuJp2Y0KRrJ3IIL7Z/7nHs8Mo7 ezKPa2AEejCmhcN8oBj4Ae+rLukzorvhSwLvheJcjUMEoOCqkua7f+z9qvi8IgC7 NMJgEuF+kpv/VIURxTefRXYn4M7B1GxJWuQQ4SFWRqe4EQ67C+MAvXKyoOT2nZpR jim/8j85WAR4NHYabL7oD7VritTFz1EWqB1nfxwOFo3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