From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXvv4-0005oL-5q for guix-patches@gnu.org; Wed, 19 Jul 2017 16:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXvv0-0001cu-AV for guix-patches@gnu.org; Wed, 19 Jul 2017 16:50:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45509) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXvv0-0001cZ-72 for guix-patches@gnu.org; Wed, 19 Jul 2017 16:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dXvuz-0004dd-SO for guix-patches@gnu.org; Wed, 19 Jul 2017 16:50:01 -0400 Subject: [bug#27705] [PATCH 3/4] gnu: grub-efi: Add grub. Resent-Message-ID: Date: Wed, 19 Jul 2017 22:48:59 +0200 From: Danny Milosavljevic Message-ID: <20170719152543.01a0b071@scratchpost.org> In-Reply-To: <87wp7669ht.fsf@fastmail.com> References: <20170715133532.9687-1-dannym@scratchpost.org> <20170715133756.9883-1-dannym@scratchpost.org> <20170715133756.9883-2-dannym@scratchpost.org> <87wp7669ht.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Marius Bakke Cc: 27705@debbugs.gnu.org Hi Marius, On Mon, 17 Jul 2017 23:26:06 +0200 Marius Bakke wrote: >However... The 'grub-hybrid' approach seems okay to me (although >building grub-efi again is unnecessary :)). No, it's not unnecessary. When you do not use this approach (for example when you create a new package which has "grub" and "grub-efi" as input) then the resulting executables (for example grub-efi's grub-mkrescue) will not find the platform support files - because the search path for multiple platforms is being hardcoded at build time. Doesn't work: +(define-public grub-hybrid + (package + (name "grub-hybrid") + (version (package-version grub-efi)) + (inputs + `(("grub-efi" ,grub-efi) ; keep as first (preferred) entry + ("grub" ,grub))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build union)) + #:builder (begin + (use-modules (ice-9 match) + (guix build union)) + (match %build-inputs + (((names . directories) ...) + ;; Take "lib/grub/i386-pc" from grub, the remainder + ;; from grub-efi. + (union-build (assoc-ref %outputs "out") + directories)))))) + (home-page "https://www.gnu.org/software/grub/") + (synopsis "GRand Unified Boot loader (Hybrid version)") + (description "This version of GRUB tries the @code{grub-efi} and +then the traditional @code{grub}."))) + > FWIW Gentoo has taken the 'hybrid' approach for many years (building > once for each target platform and consolidating out/lib/grub). But it > would be good to know whether this configuration is supported upstream. I'm using it for grub-mkrescue and, there, it's definitely supported in the sense of there's explicit case analysis in the source code for it and also big structures to enable this kind of using multiple platforms. For other uses I don't know.