From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org> Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mBC9Nb6NMGdwOQEA62LTzQ:P1 (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Sun, 10 Nov 2024 10:41:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mBC9Nb6NMGdwOQEA62LTzQ (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Sun, 10 Nov 2024 11:41:03 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=iQWuNspu; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JagVNS3f; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731235262; a=rsa-sha256; cv=none; b=EuVWyKK+ADylyFd5O3REG+ofBG9fDjpQJPQEwL2ns63TIuiypr0NWEj37nZ1bYK9kQxI+U BLyeIWC6KFQ8kNCbw9qoJqGhQxq3S4iC8nY7Mt4vX8t2bsU4BLeL0hKTJHt1zVbP6NFx4p Ejy2UCy2dKm/Pcto8oh5+wOgMLCTVCYdUeZ8vcvVTtFT+xExx9eF5Y1vjUt98bNJ0Echly c63MtE62w86V82CnJoKIqNyyCWUHMi1/4oL8RNps3SdsShAul1Sko56KHhB4Oc7Oa0aUfp +pg4rpviI7GMZn//I3QiVDGmXdTpfo2YJvLt1cNb5hkG6pG56Z8b1O4OrQF1og== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=iQWuNspu; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JagVNS3f; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731235262; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=m1a3mLpb/3ylbilza/nwuoQcqT33G4s02pDvsTGoLhI=; b=j8FH3HF+ecn7+Vv80TsN0kwiYKHLqopbDEdGkwMO5E1HkuPCMMdkMwD9nz97QFa7sAvI1S M1OO8oJqOSoiCqa1lpS0nPBAFph+8QyoFuYecvuxEK3KUbN3tpLInwE60A4kHFfthFboyU piBO9Qr/aqUod0HcwSRshr7wTa5cVD/Z52Oj3EWrCtVyBfOXz8czsoNudfj9abqIlQdM76 TP9ZuAEYj8d8D9i77DqSXP70ay1o1BTzy+fBFfp99ToZ95nhhlWLJ19aXjrYWOchc0skU3 5V1ameSGo59IPiovb+R6gjBYKgjls+kYxbVZZKLuSLCJ1MZQpVB/hT809UQ3LQ== 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 6CC36673E for <larch@yhetil.org>; Sun, 10 Nov 2024 11:41:02 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tA5MW-00010K-UR; Sun, 10 Nov 2024 05:40:08 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tA5MV-0000xT-8x for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:07 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tA5MU-0008Fb-Dx for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:06 -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=m1a3mLpb/3ylbilza/nwuoQcqT33G4s02pDvsTGoLhI=; b=iQWuNspueJM1iEo8oEJJl6I2ODN/9y9PkmT5pr6w/6brnPfsYm49J3Aq62e/fgG+9lj0vLk9xwKHDK7ax9hUZ+Yz+GBIM6G2KYzZqiIyMVc+LILvzWbudO+enBS0EziBT4My2+i6RIBnXgKLCHhQ27nEr3/UepFHrTiiNQfAvOzA4AgKUGna4dOVFMB8sNspaQOrXdL1UMGo2ZuVeRgk2UHcZN0DxBA4l2rPXEs/qq8JW1uAPwQ0jH0kgnGBKh0buNFhCDBK0de8DhfPRLXT5wqSZSPDqyZ7pHgI0ERJWEghNVZiQiqYJEY/XnH/Mt4JP07HdRRuO1ZhsR5SSBE3Wg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tA5MU-0002ju-93 for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH 20/31] gnu: pciutils: Support the 64bit Hurd. Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Nov 2024 10:40:06 +0000 Resent-Message-ID: <handler.74290.B74290.173123516310222@debbugs.gnu.org> 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 Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173123516310222 (code B ref 74290); Sun, 10 Nov 2024 10:40:06 +0000 Received: (at 74290) by debbugs.gnu.org; 10 Nov 2024 10:39:23 +0000 Received: from localhost ([127.0.0.1]:55783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tA5Lm-0002eh-W1 for submit@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@gnu.org>) id 1tA5LY-0002Zy-PZ for 74290@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:10 -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 <janneke@gnu.org>) id 1tA5LT-0007s4-JB; Sun, 10 Nov 2024 05:39:03 -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=m1a3mLpb/3ylbilza/nwuoQcqT33G4s02pDvsTGoLhI=; b=JagVNS3fpcfHh/Gg5bfV pn8RNIalQ+/4dcfp3qkVaBS1npJxmRWAWBElfr2ZSTjPVm9jWxOeE6EPRxCWFn8ZkqUbcPnHTrZqj wk45hHcOClUJ55pxXgP41MVSBkxL3l/hpM3ae62z+dWlphZaxMkGrL7xIM1gRL3EXv+3c43E8s8AV x0k5402AnNbl7jIaUvoCeSuC6VMkQzNSATtfF45+2Xjr4DZ1iPKEO75VHEn6mxJKwG/Xy6d6ZTVbN Ne55d1cou2qAWuYmQfLuK9jXIAQOVrjfUydwxHTzamq0XjbYQllLcJ5rcLFxPz7khIgJb2fhW1cyE DgrmU7sNmQDZGA==; From: Janneke Nieuwenhuizen <janneke@gnu.org> Date: Sun, 10 Nov 2024 11:38:16 +0100 Message-ID: <93bbee8b3e815afc25b5c833498b4f0e1d339827.1731232753.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1731232753.git.janneke@gnu.org> References: <cover.1731232753.git.janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 1.38 X-Spam-Score: 1.38 X-Migadu-Queue-Id: 6CC36673E X-Migadu-Scanner: mx12.migadu.com X-TUID: CDObe7oW7r+A * gnu/packages/patches/pciutils-hurd64.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/pciutils.scm (pciutils)[arguments]: Use g-expressions. When building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase. Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05 --- gnu/local.mk | 1 + gnu/packages/patches/pciutils-hurd64.patch | 31 ++++++++++++++++++++++ gnu/packages/pciutils.scm | 25 +++++++++++------ 3 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/pciutils-hurd64.patch diff --git a/gnu/local.mk b/gnu/local.mk index 576f60579e..ad18f62eb6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1906,6 +1906,7 @@ dist_patch_DATA = \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/password-store-tree-compat.patch \ + %D%/packages/patches/pciutils-hurd64.patch \ %D%/packages/patches/pdfpc-build-with-vala-0.56.patch \ %D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ diff --git a/gnu/packages/patches/pciutils-hurd64.patch b/gnu/packages/patches/pciutils-hurd64.patch new file mode 100644 index 0000000000..316f12e131 --- /dev/null +++ b/gnu/packages/patches/pciutils-hurd64.patch @@ -0,0 +1,31 @@ +Upstream-status: Not presented upstream. + +--- pciutils-3.8.0/lib/hurd.c.orig 2024-11-07 15:09:20.728973822 +0100 ++++ pciutils-3.8.0/lib/hurd.c 2024-11-07 15:05:08.524682813 +0100 +@@ -213,7 +213,7 @@ + hurd_read(struct pci_dev *d, int pos, byte * buf, int len) + { + int err; +- size_t nread; ++ mach_msg_type_number_t nread; + char *data; + mach_port_t device_port = device_port_lookup(d); + +@@ -266,7 +266,7 @@ + mach_port_t device_port = device_port_lookup(d); + struct pci_bar regions[6]; + char *buf = (char *) ®ions; +- size_t size = sizeof(regions); ++ mach_msg_type_number_t size = sizeof(regions); + + int err = pci_get_dev_regions(device_port, &buf, &size); + if (err) +@@ -305,7 +305,7 @@ + struct pci_xrom_bar rom; + mach_port_t device_port = device_port_lookup(d); + char *buf = (char *) &rom; +- size_t size = sizeof(rom); ++ mach_msg_type_number_t size = sizeof(rom); + + int err = pci_get_dev_rom(device_port, &buf, &size); + if (err) diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index d2a352eb6b..08f1634113 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org> ;;; @@ -81,25 +81,34 @@ (define-public pciutils "01aglgw9ds9qiswcbi2lx90lswncikrlyv8mmp4haix8542bvvci")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:phases + #~(modify-phases %standard-phases (add-after 'unpack 'unbundle-pci.ids (lambda* (#:key native-inputs inputs #:allow-other-keys) (copy-file (search-input-file (or native-inputs inputs) "share/hwdata/pci.ids") "pci.ids"))) + #$@(if (target-hurd64?) + #~((add-after 'unpack 'apply-hurd64-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "pciutils-hurd64.patch")))) + (invoke "patch" "--force" "-p1" "-i" patch-file))))) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) ;; There's no 'configure' script, just a raw makefile. (substitute* "Makefile" - ,@(if (%current-target-system) - `((("^CROSS_COMPILE=.*$") + #$@(if (%current-target-system) + #~((("^CROSS_COMPILE=.*$") (string-append "CROSS_COMPILE=" - ,(%current-target-system) "-" + #$(%current-target-system) "-" "\n")) (("^HOST=.*$") (string-append "HOST=" - ,(gnu-triplet->nix-system + #$(gnu-triplet->nix-system (%current-target-system)) "\n")) ;; Disable 'install' strip option, that would fail when ;; we are cross-compiling. @@ -139,7 +148,7 @@ (define-public pciutils (invoke "make" "install" "install-lib")))) ;; Make sure programs have an RPATH so they can find libpciutils.so. - #:make-flags (list ,(string-append "CC=" + #:make-flags #~(list #$(string-append "CC=" (if (%current-target-system) (cc-for-target) "gcc")) -- Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com