Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jF6sy-0008KL-IF for mharc-grub-devel@gnu.org; Thu, 19 Mar 2020 21:55:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37624) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jF6sw-0008KE-2S for grub-devel@gnu.org; Thu, 19 Mar 2020 21:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jF6su-0005RC-OH for grub-devel@gnu.org; Thu, 19 Mar 2020 21:55:41 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:38278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jF6su-0005Qo-Fw for grub-devel@gnu.org; Thu, 19 Mar 2020 21:55:40 -0400 Received: by mail-pj1-x1032.google.com with SMTP id m15so1801171pje.3 for ; Thu, 19 Mar 2020 18:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YMOkkXEMnN9+55X56TRwV9kDbbekvDCCjzdxxwXANgM=; b=WxOQWhHAWkvxjs8fBHv/hof4KzUt+kDyD6fWKAOxHezQTu8bbC/gUudIG1x0sGMf3y foa4Mbts2xMDvV2BJL6goqsTZWzWAf27pFFMhA0v8SEmMTNpddfIqdxUOPRgdczVDi9F ZEz126/ALOywby+es0rIpL3oK9rV83e7vVQGLJFWe/QnLy+MHYbbjiLLslCWB83vkUtU Ct703zpLbALTrpLcqyZssbm4UD8+mU6guRehcP02XhJozqMSH0GOyDwDuhBdje2zz55+ pO0AvVzU6YvsY5+g9kLxXbOojRs5l8rGuwCeuO/0NrWOBdqqgzWbBpSUK09+ewdD8/OV oVgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YMOkkXEMnN9+55X56TRwV9kDbbekvDCCjzdxxwXANgM=; b=q4BYKBjIhQts7eQXyBBQTTObFz8PXyaPB4mB0729iDBGXcveV2H55qkUqsSMOVI6kg nUG1NNFXHDG2iZ+A/CQGFvyDi6eapyBpDrpW1x+LNtS+CGHqtMV/Ef+14tMKvjj0Iaok kYIan24/pCdVqJ2Bq3dm+m+51iC0PV66rKQpT5jE+4ep1BJr6TaJ3aIdWIFqfibSuI8g QjCOZcZKXAOIZTDrrMjr1kxK0kCkA/25pmP/PzKWE3t0zG4nb9Nsxl5+DKRBN5c7BVvD +cSZGDiEEZkwenamqlJiNn1o0uGjFQ89+AwwDI/WJ+CTk3YRFOcec0FT+qn2UYdMQ25J 5SRg== X-Gm-Message-State: ANhLgQ1637GQFZzFett14g8ek9D9SgU/RV5ScWpVHQBjukzX8LJWcvN+ 7qCG3SAJ7HsbNszuDvNZAmw= X-Google-Smtp-Source: ADFU+vueolFzI9/KjxAivgUZOuRUnrzLkeGFvYcLSFa7pJg7Gx+yoyToZpxwChaJq/zlndgXCiaglA== X-Received: by 2002:a17:90a:cb90:: with SMTP id a16mr7085266pju.80.1584669339348; Thu, 19 Mar 2020 18:55:39 -0700 (PDT) Received: from mua.localhost (99-7-172-215.lightspeed.snmtca.sbcglobal.net. [99.7.172.215]) by smtp.gmail.com with ESMTPSA id p6sm3593302pgb.0.2020.03.19.18.55.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2020 18:55:39 -0700 (PDT) Reply-To: pgnet.dev@gmail.com Subject: Re: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ? To: The development of GNU GRUB , Eli Schwartz References: <429124a9-6de6-8937-361f-d54a48e7c3ba@archlinux.org> From: PGNet Dev Message-ID: <8aa299c8-7133-369e-6efd-52275ca15e88@gmail.com> Date: Thu, 19 Mar 2020 18:55:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <429124a9-6de6-8937-361f-d54a48e7c3ba@archlinux.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1032 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:55:43 -0000 hi, On 3/19/20 6:41 PM, Eli Schwartz wrote: > 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 Ubuntu? I do. Where I directly control them, they're in use. It includes my own spins ... All use Grub. "Happily". ;-) Ubu's a not-infrequent reality nonetheless. > The OP's question is > > "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?" yep. well restated. > The conclusion is simple enough: if you are going to automatically > rewrite this grub file, i'd thought that non-mangling of it would be a reasonable position; that, apparently, is not a mandate, iiuc. tbh, i'm not clear _why_ it's being written at all. i agree with the "this should be the user's responsibility", and would add "only the user's prerogative". but that's me. well, maybe not JUST me ... > 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. +1 > Just my $0.02 as a distro person (not a grub dev). heh. cheap at twice the price! ;-) thx.