From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0JIaHrCr5GUaCAEAe85BDQ:P1 (envelope-from ) for ; Sun, 03 Mar 2024 17:56:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0JIaHrCr5GUaCAEAe85BDQ (envelope-from ) for ; Sun, 03 Mar 2024 17:56:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=UM5lxERC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=jpoiret.xyz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709484976; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=BOL7Et59u/zEa/KupJKp232RDCzXOxgOhZ4QEkCo9oA=; b=RaehWBnyg3YDLWWWzvsfJf3GmfKDSgnGzNczzyQcJFxeg36tUr3qtZWypTo7kGHN0vAfbE vWGRxCGM0fCwhI5kKa6ELWp3Yh7Cv72xN3j2Jv+Wz6rZbELDz0xKQXg/HfKkuPXa82Enqm 5eIdrC3CijQdp+qONS64zuz30dX6L9Dw6/yWV4hhLhbvVe3AUAJUuzAfT3vx40SW7gcC1z x/OqTmwPHcFItp6ouc4Ok0wlIQHZ5Fz3cXnyzBQ11YLXeT0p/iMbclNNdiTasTtJPE5MeG IN1J617WQMcFK1wbAXuib6xuCQZW7FI3l1v2d92iaVArbNwAeE8VkNLTfB45qw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=UM5lxERC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=reject) header.from=jpoiret.xyz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709484976; a=rsa-sha256; cv=none; b=RlD8iuykGJMDGvT4l7Ndt27YTzzf3ijr1W6ti1Lb8pMIVpWzEtjbr4SwyYRNn/Bb1I5buD a90bYGhOwHOH7nR7YKfp0eTNxXhTYf5IOmQxu9TFINhNZJpQsxObHMGX+VS/footo/0ttT dV5sjbb/1zma2mD9oC5jsxVDMZC4DmtbaKpIDD4vGrAmBgsN/9UTGFSiJI+GmLenlUxfwB BjFeHUpdkSV51nBZK0s1DB+z4yTZgL2j/coDGOhfHkUB6WZS2p0D+mfwhB1gOlp68akVcI bQMncUhQf009K0LpU5uFz7svixp1pjl9WDN1h3N1kJrgDtYk2+FUbz3AeeiCQg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 54E613554E for ; Sun, 3 Mar 2024 17:56:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgouu-0005wC-Sr; Sun, 03 Mar 2024 11:42:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgour-0005vv-Hs for guix-devel@gnu.org; Sun, 03 Mar 2024 11:42:21 -0500 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgouo-0006Sm-RP for guix-devel@gnu.org; Sun, 03 Mar 2024 11:42:20 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id BB57518545F; Sun, 3 Mar 2024 16:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1709484136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOL7Et59u/zEa/KupJKp232RDCzXOxgOhZ4QEkCo9oA=; b=UM5lxERCb6VqvA6olVWVRq+D3zC4XGuIT35XA7dylJKU1Mqjz7ADfusboTzIpHXqsigZz1 IK/Etp4rBpaVHqhK+Mzm4jcpL8hLLv5sGAQD+3I0oaiDx4WqxMO8NyIpD4UkRy704zQKlP UD9tBCY/L/sybBoy7Wl1hoAXPCXljMzJco9G2zBNUfZfvtc0TTBASMOeJBmGA4c1uIRWPL 57PLvjd+dNZ8QgVCXcF/C2Y1aIbolU0SutiMzk6u2z4n8DY7Q7TsryvELC8Pi4sxqka5CC I/5fCETaIq6h/FVDrf6g0W2Cp3pQzF2qOnvNUVlMCzGsHQKtFgtLfqlg6zo4Gw== From: Josselin Poiret To: Fabio Natali , Josselin Poiret Cc: guix-devel@gnu.org, Oleg Pykhalov , Felix Lechner Subject: [PATCH 1/2] gnu: grub: Update to 2.12. Date: Sun, 3 Mar 2024 17:42:13 +0100 Message-ID: <99fd518452f3d5c822f61de09d01e7393cda9369.1709484088.git.dev@jpoiret.xyz> In-Reply-To: <87bk7vhett.fsf@fabionatali.com> References: <87bk7vhett.fsf@fabionatali.com> MIME-Version: 1.0 X-Debbugs-Cc: Efraim Flashner , Vagrant Cascadian Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ++ Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.31 X-Spam-Score: -7.31 X-Migadu-Queue-Id: 54E613554E X-TUID: jr8dHy3tbsXQ From: Josselin Poiret * gnu/packages/bootloaders.scm (grub): Update to 2.12. Change-Id: I5d9ae3952b61b47418cb5666671fc0bcb5318e72 --- gnu/packages/bootloaders.scm | 182 ++++++++++++++++++++--------------- 1 file changed, 102 insertions(+), 80 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 986f0ac035..1327055484 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -103,94 +103,113 @@ (define unifont (define-public grub (package (name "grub") - (version "2.06") + (version "2.12") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz")) (sha256 (base32 - "1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp")) + "1ahgzvvvwdxx7rl08pv5dyqlgp76jxz0q2cflxvsdsn4yy8p7jgk")) (patches (search-patches "grub-efi-fat-serial-number.patch" - "grub-setup-root.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Adjust QEMU invocation to not use a deprecated device - ;; name that was removed in QEMU 6.0. Remove for >2.06. - (substitute* "tests/ahci_test.in" - (("ide-drive") - "ide-hd")))))) + "grub-setup-root.patch")))) (build-system gnu-build-system) (arguments - `(#:configure-flags - ;; Counterintuitively, this *disables* a spurious Python dependency by - ;; calling the ‘true’ binary instead. Python is only needed during - ;; bootstrapping (for genptl.py), not when building from a release. - (list "PYTHON=true") - ;; Grub fails to load modules stripped with --strip-unneeded. - #:strip-flags '("--strip-debug" "--enable-deterministic-archives") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-stuff - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (substitute* "grub-core/Makefile.in" - (("/bin/sh") (which "sh"))) - - ;; Give the absolute file name of 'mdadm', used to determine the - ;; root file system when it's a RAID device. Failing to do that, - ;; 'grub-probe' silently fails if 'mdadm' is not in $PATH. - (when (assoc-ref inputs "mdadm") - (substitute* "grub-core/osdep/linux/getroot.c" - (("argv\\[0\\] = \"mdadm\"") - (string-append "argv[0] = \"" - (assoc-ref inputs "mdadm") - "/sbin/mdadm\"")))) - - ;; Make the font visible. - (copy-file (assoc-ref (or native-inputs inputs) - "unifont") - "unifont.bdf.gz") - (system* "gunzip" "unifont.bdf.gz") - - ;; Give the absolute file name of 'ckbcomp'. - (substitute* "util/grub-kbdcomp.in" - (("^ckbcomp ") - (string-append - (search-input-file inputs "/bin/ckbcomp") - " "))))) - (add-after 'unpack 'set-freetype-variables - ;; These variables need to be set to the native versions of the - ;; dependencies because they are used to build programs which are - ;; executed during build time. - (lambda* (#:key native-inputs #:allow-other-keys) - (when (assoc-ref native-inputs "freetype") - (let ((freetype (assoc-ref native-inputs "freetype"))) - (setenv "BUILD_FREETYPE_LIBS" - (string-append "-L" freetype - "/lib -lfreetype")) - (setenv "BUILD_FREETYPE_CFLAGS" - (string-append "-I" freetype - "/include/freetype2")))))) - (add-before 'check 'disable-flaky-test - (lambda _ - ;; This test is unreliable. For more information, see: - ;; . - (substitute* "Makefile.in" - (("grub_cmd_date grub_cmd_set_date grub_cmd_sleep") - "grub_cmd_date grub_cmd_sleep")))) - (add-before 'check 'disable-pixel-perfect-test - (lambda _ - ;; This test compares many screenshots rendered with an older - ;; Unifont (9.0.06) than that packaged in Guix. - (substitute* "Makefile.in" - (("test_unset grub_func_test") - "test_unset"))))) - ;; Disable tests on ARM and AARCH64 platforms or when cross-compiling. - #:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system) - (%current-system))) - '("arm" "aarch64")) - (%current-target-system))))) + (list + #:configure-flags + ;; Counterintuitively, this *disables* a spurious Python dependency by + ;; calling the ‘true’ binary instead. Python is only needed during + ;; bootstrapping (for genptl.py), not when building from a release. + ''("PYTHON=true") + ;; Grub fails to load modules stripped with --strip-unneeded. + #:strip-flags ''("--strip-debug" "--enable-deterministic-archives") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'add-missing-extra-deps + (lambda _ + (call-with-output-file "grub-core/extra_deps.lst" + (lambda (port) + (format port "depends bli part_gpt~%"))))) + (add-after 'unpack 'patch-stuff + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "grub-core/Makefile.in" + (("/bin/sh") (which "sh"))) + + ;; Give the absolute file name of 'mdadm', used to determine the + ;; root file system when it's a RAID device. Failing to do that, + ;; 'grub-probe' silently fails if 'mdadm' is not in $PATH. + (let ((mdadm (false-if-exception + (search-input-file inputs "/sbin/mdadm")))) + (when mdadm + (substitute* "grub-core/osdep/linux/getroot.c" + (("argv\\[0\\] = \"mdadm\"") + (string-append "argv[0] = \"" + mdadm "\""))))) + + ;; Make the font visible. + (copy-file (assoc-ref (or native-inputs inputs) + "unifont") + "unifont.bdf.gz") + (system* "gunzip" "unifont.bdf.gz") + + ;; Give the absolute file name of 'ckbcomp'. + (substitute* "util/grub-kbdcomp.in" + (("^ckbcomp ") + (string-append + (search-input-file inputs "/bin/ckbcomp") + " "))))) + (add-after 'unpack 'set-freetype-variables + ;; These variables need to be set to the native versions of the + ;; dependencies because they are used to build programs which are + ;; executed during build time. + (lambda* (#:key native-inputs #:allow-other-keys) + (let ((freetype + (false-if-exception + (dirname + (dirname + (search-input-directory (or native-inputs inputs) + "/include/freetype2")))))) + (when freetype + (setenv "BUILD_FREETYPE_LIBS" + (string-append "-L" freetype + "/lib -lfreetype")) + (setenv "BUILD_FREETYPE_CFLAGS" + (string-append "-I" freetype + "/include/freetype2")))))) + (add-before 'check 'disable-flaky-test + (lambda _ + (define* (skip-tests #:rest tests) + (for-each + (lambda (s) + (copy-file #$(program-file "skip-test.scm" #~(exit 77)) + s)) + tests)) + ;; Rely on the built-in `command` instead of coreutils `which`. + (substitute* + (cons* + "tests/partmap_test.in" + (map (lambda (s) (string-append "tests/" s "compress_test.in")) + '("gz" "lzo" "xz"))) + (("which") + "command -v")) + (skip-tests + ;; This test is unreliable. For more information, see: + ;; . + "grub_cmd_set_date" + ;; This test compares many screenshots rendered with an older + ;; Unifont (9.0.06) than that packaged in Guix. + "grub_func_test" + ;; Theses tests require root, disable them for now. + "ext234_test" "squashfs_test" "iso9660_test" "hfsplus_test" + "ntfs_test" "reiserfs_test" "fat_test" "minixfs_test" + "xfs_test" "f2fs_test" "nilfs2_test" "romfs_test" "exfat_test" + "tar_test" "udf_test" "hfs_test" "jfs_test" "btrfs_test" + "zfs_test" "cpio_test" "luks1_test" "luks2_test" + "grub_cmd_cryptomount")))) + ;; Disable tests on ARM and AARCH64 platforms or when cross-compiling. + #:tests? (not (or (target-arm32?) + (target-aarch64?) + (%current-target-system))))) (inputs `(("gettext" ,gettext-minimal) @@ -252,11 +271,14 @@ (define-public grub ;; Dependencies for the test suite. The "real" QEMU is needed here, ;; because several targets are used. + ("gzip" ,gzip) + ("lzop" ,lzop) ("parted" ,parted) ,@(if (member (%current-system) (package-supported-systems qemu-minimal)) `(("qemu" ,qemu-minimal)) '()) - ("xorriso" ,xorriso))) + ("xorriso" ,xorriso) + ("xz" ,xz))) (home-page "https://www.gnu.org/software/grub/") (synopsis "GRand Unified Boot loader") (description base-commit: efdaa885b083e85bd380ca914addfcf32d0834f7 prerequisite-patch-id: 0804a38590177dfed12fd7a69a96c0bfed9b0991 prerequisite-patch-id: c55fab450e37b6202898b430c21597042e067d31 prerequisite-patch-id: 51b6fbcd8a513f1c644d0958811cf4731a0d8c5e -- 2.41.0