Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jF2aG-0000Jn-1W for mharc-grub-devel@gnu.org; Thu, 19 Mar 2020 17:20:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48195) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jF2aD-0000JO-5Y for grub-devel@gnu.org; Thu, 19 Mar 2020 17:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jF2aB-0007XQ-Ov for grub-devel@gnu.org; Thu, 19 Mar 2020 17:20:04 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:41368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jF2aB-0007X4-Gf for grub-devel@gnu.org; Thu, 19 Mar 2020 17:20:03 -0400 Received: by mail-pl1-x631.google.com with SMTP id t16so1593573plr.8 for ; Thu, 19 Mar 2020 14:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=caUzTMFu4FHcGGkI3JxW4ho05JiO7J5e7XAJJKZ4cBk=; b=IeISwKxDA+3SqMOKWDBRJBbeXXN1zhv95U15QtKA4GeU0wWlMMScOE+WwmruoC2It3 2zgOJrDI+xqAs+05kNATq65/9S4uSgw4yNpaTfRY9tEyiqsl90E0EtWrU1yh855DO7MQ BYQyY7JhauvQApAXA1/AZk/pobuCIXBBSZIT32b8sY2nCDMLNdGmeI2ZwIots0W8gDMo cBeO7zpHLM2Pn1gfrLDczZ2BiFZQLv26m1K92Yy8BqLn1g4BYTn82RRKI/z+nfIq0lJp FxbcvbcpWCGQ9BRJ1AZVOYfAf7gOSSSXwR2DPriEx55aoaMx3Xq08FywOxkTIKB5vgeX OJ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:to:from:subject:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=caUzTMFu4FHcGGkI3JxW4ho05JiO7J5e7XAJJKZ4cBk=; b=gCR4zY37ITt1HxQaj+67gRBw4fs1lnx/K+2ZzbmYiucHUFQ3FCP/QbomTSnQccOqmX zWDE+d14U41rXx0cl/oT57D7Yl1vw8mBmpqnY0IjAei/rZJISjvTrwgX3ztlWNy/gdVb y6OHGKWtI0BcHrtK8YoEKOQQ8bG8JCbO0bbNH2DRipEkalzsROrY1Knpn2aaYG3Zaf7g 1Clh6ekd6xt6gKg5w1oT1cnAKkgf98Yl8UxgrCNa/uOcWzvD43uUwZdRYqZKbiYn5+Jo lepEGsFYBQIdMQAO70581Wpr+tST7FhVQB3gzJvQSO3hinMWznu+NGsrfgUWGKW1dy8K O4OA== X-Gm-Message-State: ANhLgQ2fJpYurEJRutRqEeNzgegez0udsS67DLo63FHnMI4MYiVp863q aE4+Xbbow+cnDtM3RyuBIX31ZRI4 X-Google-Smtp-Source: ADFU+vspalC/IsTthKsoMXiUV3yoS4tmfVJQhly5aXy9lG3hzUL8MpuAQV3HMFsdxWJOoxvzkGGuqw== X-Received: by 2002:a17:90b:228e:: with SMTP id kx14mr5838965pjb.134.1584652801222; Thu, 19 Mar 2020 14:20:01 -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 o66sm3440397pfb.93.2020.03.19.14.20.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2020 14:20:00 -0700 (PDT) Reply-To: pgnet.dev@gmail.com To: grub-devel@gnu.org From: PGNet Dev Subject: are posix-shell-compliant continuation lines valid/supported, or not, in /etc/default/grub ? Message-ID: Date: Thu, 19 Mar 2020 14:19:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::631 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: Thu, 19 Mar 2020 21:20:06 -0000 a recent grub package update, in ubuntu 18LTS, is breaking /etc/default/grub by mangling/overwriting users' entries, in the specific case of using continuation lines in the file/config. and, subsequently, the upgrade process on these servers. as stated clearly at https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html#Simple-configuration-handling "... The file /etc/default/grub controls the operation of grub-mkconfig. It is sourced by a shell script, and so must be valid POSIX shell input; normally, it will just be a sequence of ‘KEY=value’ lines, but if the value contains spaces or other special characters then it must be quoted ..." per POSIX https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_01 "... Escape Character (Backslash) A that is not quoted shall preserve the literal value of the following character, with the exception of a . If a follows the , the shell shall interpret this as line continuation. The and shall be removed before splitting the input into tokens. Since the escaped is removed entirely from the input and is not replaced by any white space, it cannot serve as a token separator. ..." all that's to say that continuation lines appear to be supported in posix-shell-compliant /etc/default/grub they've been in use here, on 100s of servers, in grub configs for ages. with grub 2.04 on other, non Ubu OS, it continues to work fine. re: the use of continuation lines, ubu dev states that "Regardless of what the POSIX spec says, this is highly unusual abuse of POSIX shell semantics, and I do not see a need to support it" it'd be useful/helpful to get clear on what the 'official' grub project support for use of posix-shell-compliant continuation lines is ... are they 'supported' as valid use in /etc/default/grub, or not? also useful to know/understand whether any grub update can/should mangle a user's /etc/default/grub. allowed? expected? thx!