GNU bug report logs - #54069
[PATCH 0/2] gnu: pciutils: Unbundle pci.ids and use latest.

Previous Next

Package: guix-patches;

Reported by: Brendan Tildesley <mail <at> brendan.scot>

Date: Sun, 20 Feb 2022 09:55:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Brendan Tildesley <mail <at> brendan.scot>
To: 54069 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>, Ludovic Courtès <ludo <at> gnu.org>, Maxime Devos <maximedevos <at> telenet.be>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [bug#54069] [PATCH v3 4/7] gnu: pciutils: Unbundle pci.ids and use latest.
Date: Thu, 10 Mar 2022 20:31:42 +1100
* gnu/packages/pciutils.scm (pciutils):
[inputs]: Add hwdata:pci for latest pci.ids file.
[arguments]: Don't install update-pciids script or it's man page. Don't
install bundled old pci.ids file, use hwdata instead. Copy the pci.ids
over so it can be gzipped.
---
 gnu/packages/pciutils.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index 41ba10f1e1..648d1385e4 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -93,8 +93,13 @@ (define-public pciutils
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle-pci.ids
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (copy-file (string-append (assoc-ref inputs "hwdata:pci")
+                                       "/share/hwdata/pci.ids")
+                        "pci.ids")))
          (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; There's no 'configure' script, just a raw makefile.
              (substitute* "Makefile"
                ,@(if (%current-target-system)
@@ -124,13 +129,19 @@ (define-public pciutils
                (("^SHARED=.*$")
                 ;; Build libpciutils.so.
                 "SHARED := yes\n")
+
                (("^ZLIB=.*$")
                 ;; Ask for zlib support, for 'pci.ids.gz' decompression.
                 "ZLIB := yes\n")
 
                (("^IDSDIR=.*$")
                 ;; Installation directory of 'pci.ids.gz'.
-                "IDSDIR = $(SHAREDIR)/hwdata\n"))))
+                "IDSDIR = $(SHAREDIR)/hwdata\n")
+               ;; Don't install update script or its man page,
+               ((".*INSTALL.*update-pciids .*") "")
+               (("update-pciids update-pciids.8 ") "")
+               (("(.*INSTALL.*)(update-pciids.8)(.*)" _ a _ b)
+                (string-append a b)))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install the commands, library, and .pc files.
@@ -159,7 +170,8 @@ (define-public pciutils
        ,@(if (hurd-target?)
              `(("hurd-patch" ,(search-patch "pciutils-hurd-fix.patch")))
              '())
-       ("zlib" ,zlib)))
+       ("zlib" ,zlib)
+       ("hwdata:pci" ,hwdata "pci")))
     (home-page "https://mj.ucw.cz/sw/pciutils/")
     (synopsis "Programs for inspecting and manipulating PCI devices")
     (description
-- 
2.34.0





This bug report was last modified 3 years and 63 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.