Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VvFxh-0008OJ-RZ for mharc-grub-devel@gnu.org; Mon, 23 Dec 2013 19:35:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvFxf-0008Lu-6d for grub-devel@gnu.org; Mon, 23 Dec 2013 19:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvFxe-0005kL-Ab for grub-devel@gnu.org; Mon, 23 Dec 2013 19:35:03 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:57567 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvFxe-0005hY-51 for grub-devel@gnu.org; Mon, 23 Dec 2013 19:35:02 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1VvFxc-0001uY-Ka for grub-devel@gnu.org; Tue, 24 Dec 2013 00:35:01 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VvFxN-0007NB-IU for grub-devel@gnu.org; Tue, 24 Dec 2013 00:34:45 +0000 Date: Tue, 24 Dec 2013 00:34:44 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: Breakage from grub-mkconfig changes for grub-file Message-ID: <20131224003444.GA28338@riva.ucam.org> References: <20131223220141.GA25169@riva.ucam.org> <52B8B772.9040007@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52B8B772.9040007@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 00:35:04 -0000 On Mon, Dec 23, 2013 at 11:21:38PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 23.12.2013 23:01, Colin Watson wrote: > > This should be redesigned so that there is some way to declare in a > > grub.d script that it requires multi-platform support and should be > > run multiple times. (It *must* be this way round so that upgrades > > work properly.) > > The idea was that platform-independent scripts were still runnable, > they'll just produce the same output N times and this list is just an > optimisations, specially to avoid running os-prober N times. Granted, but in some cases those scripts might not be idempotent: consider a user-written "42_custom" (or whatever) script that adds a menu entry, for instance. > The alternative will be to have something along the lines of different > hashbang or implementing this functionality as sh functions. How about this simpler option: any script that needs to be run for each platform could have a magic comment that we grep for in grub-mkconfig. > > The platform names used in grub-mkconfig (x86 i386-xen-pae x86_64-xen > > mips mipsel sparc64 powerpc ia64 arm arm64) are not the same as the > > platform names used in the GRUB build system, but yet they're exported > > across the interface to /etc/grub.d/ as GRUB_PLATFORM. This is messy > > and confusing, and it's not clear what promises we make about future > > changes here. > > > > We should rationalise this before issuing anything as part of a stable > > release, perhaps by adopting the same target_cpu/platform terminology > > used in the build system. Furthermore, if we made the namespaces > > match up then it would be fairly straightforward to only run grub.d > > scripts for platforms for which we have installed GRUB modules, which > > seems as though it would be sensible. > > GRUB platform names don't match with the OS compatibility. On x86 other > than xen you can use the same kernel on all the platforms. On ARM, for > what is arm-uboot platform for us may require different kernels for > different hardware. OK, but if it is a different concept then it should have a different name, not "platform" - otherwise it just seems confusing. -- Colin Watson [cjwatson@ubuntu.com]