From patchwork Sun Nov 10 10:38:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70194 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 33A6427BC05; Sun, 10 Nov 2024 10:41:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B2E1127BBEB for ; Sun, 10 Nov 2024 10:41:14 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA5Mg-00019W-AW; Sun, 10 Nov 2024 05:40:18 -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 1tA5MZ-000133-UM for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tA5MZ-0008I1-HA for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=nPYNfTa/3ucO7U+OuWF9dNFD6+EfXPsC1V6KnzNYCDA=; b=XajZ5DT2HJLbIqkLYUqHPub6Fzm/2xkswfj+IkghPdGfopey7B9LCeetIDptujqMvlO+5Qng/w/wwLMwjtrW+USA6lbHLCnwWF5TtrAkEnsF/BZEXIKrHBI3U5B1EiZ4Wx1O2p9XtUibwsDYa6RRqF7i0gTEr1bHmPzmCwDcSzXdicQ81jRk+RHIgbwvSMAHnWuCQhVF5OMqMTLoGZSnV/nnArcUDFz1myaBCvryfFL+wYsho1g8bHZmMP1+jtr7/fcuFxMwQIefQvKHIg789UM6X04oiv+G3WCn++tRDrlrjsi1736gjdbylAGHow6VTBbnN96BRzu5RPgN624dow==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA5MZ-0002nz-Cy; Sun, 10 Nov 2024 05:40:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH 29/31] gnu: grub: Fix build for the 64bit Hurd. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Sun, 10 Nov 2024 10:40:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74290 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74290@debbugs.gnu.org Cc: Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173123516910308 (code B ref 74290); Sun, 10 Nov 2024 10:40:11 +0000 Received: (at 74290) by debbugs.gnu.org; 10 Nov 2024 10:39:29 +0000 Received: from localhost ([127.0.0.1]:55811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5Ls-0002g7-Qp for submit@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5Lm-0002dP-05 for 74290@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA5Lg-0007vi-QF; Sun, 10 Nov 2024 05:39:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=nPYNfTa/3ucO7U+OuWF9dNFD6+EfXPsC1V6KnzNYCDA=; b=rEOdAx4kf0IwL4tpPPui Fc6UO7HOZqylnncAa8Y3gh2S/jG370AsS/W6Ss3OWCgf4ymbSarwimJmi3buXqcDJGZHrTSlgiJlh xAn8/0RnOj603mM/M5F3JDrRD1Nt9kKX3QvcWa+zkDMPuBa+VM2q3lxtu1zvxgsVRbB2AXj9yMEAm sVyfxU3+pN1R3KTF6Oe1njl8hTY3t8FSiTQG2hpgldbBUDeJ6Wlc6PF50zH9xlgUnvx9ZOnJkwmgU /C/Q0h4Jf8UnQag2iq/PG+KGw8VDaQlZfDVUzlVu13P+5zIgsHFArxVa+eSn69hfuFA0KtFNqds8C nipdEgJWYPkfFg==; From: Janneke Nieuwenhuizen Date: Sun, 10 Nov 2024 11:38:25 +0100 Message-ID: <83a995681b1b8cf9894b9fbc1e3c65cbbb855bbf.1731232753.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/grub-hurd64.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (grub)[arguments]: When building for the 64bit Hurd, use it in new "apply-hurd64-patch" stage. Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428 --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 8 +++++++ gnu/packages/patches/grub-hurd64.patch | 32 ++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 gnu/packages/patches/grub-hurd64.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6a46241e5f..11955c7a49 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1487,6 +1487,7 @@ dist_patch_DATA = \ %D%/packages/patches/gromacs-tinyxml2.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ + %D%/packages/patches/grub-hurd64.patch \ %D%/packages/patches/grub-setup-root.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 8ae9621e5b..781000af1b 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -192,6 +192,14 @@ (define-public grub (setenv "BUILD_FREETYPE_CFLAGS" (string-append "-I" freetype "/include/freetype2")))))) + #$@(if (target-hurd64?) + #~((add-after 'unpack 'apply-hurd64-patch + (lambda _ + (let ((patch + #$(local-file + (search-patch "grub-hurd64.patch")))) + (invoke "patch" "--force" "-p1" "-i" patch))))) + #~()) (add-before 'check 'disable-flaky-test (lambda _ ;; This test is unreliable. For more information, see: diff --git a/gnu/packages/patches/grub-hurd64.patch b/gnu/packages/patches/grub-hurd64.patch new file mode 100644 index 0000000000..d5acd99eb8 --- /dev/null +++ b/gnu/packages/patches/grub-hurd64.patch @@ -0,0 +1,32 @@ +Upstream-status: Not presented upstream. + +From a4eb7d1f2cbd02132a9f5512f1294182576d4653 Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Fri, 8 Nov 2024 11:47:49 +0100 +Subject: [PATCH] osdep/hurd: Support the 64bit Hurd. +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +* grub-core/osdep/hurd/getroot.c (grub_util_find_hurd_root_device): +Use mach_msg_type_number_t instead of size_t. +--- + grub-core/osdep/hurd/getroot.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c +index 0efefdab4..b849700e6 100644 +--- a/grub-core/osdep/hurd/getroot.c ++++ b/grub-core/osdep/hurd/getroot.c +@@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path) + file_t file; + error_t err; + char *argz = NULL, *name = NULL, *ret; +- size_t argz_len = 0; ++ mach_msg_type_number_t argz_len = 0; + int i; + + file = file_name_lookup (path, 0, 0); +-- +Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org +Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com +