Subject: Re: bug#54069: [PATCH 0/2] gnu: pciutils: Unbundle pci.ids and use latest.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 21 Feb 2022 14:40:38 -0500

Hi,

Brendan Tildesley <[email-masked]> writes:

> * gnu/packages/pciutils.scm (pciutils):
> [inputs]: Remove zlib. Add hwdata. pci.ids was never gzip'd anyway.
> [arguments]: Don't install update-pciids script or it's man page. Don't
> install bundled old pci.ids file. Copy pci.ids file from latest hwdata package.
> ---
>  gnu/packages/pciutils.scm | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
>
> diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
> index 416328bda2..3975854f84 100644
> --- a/gnu/packages/pciutils.scm
> +++ b/gnu/packages/pciutils.scm
> @@ -110,17 +110,28 @@ (define-public pciutils
>                 (("^SHARED=.*$")
>                  ;; Build libpciutils.so.
>                  "SHARED := yes\n")
> -               (("^ZLIB=.*$")
> -                ;; Ask for zlib support, for 'pci.ids.gz' decompression.
> -                "ZLIB := yes\n")

It seems to me perhaps a more proper fix would be to have hwdata used as
an input, replacing the bundled copy of the pci.ids file file, and then
letting pciutils proceed as usual?  Disabling compression makes the
database about 4.3 times larger (1.2 MiB instead of 0.273 MiB).

I feel like applications parsing pci.ids themselves should probably rely
on the pciutils library API instead (libpci.so) to retrieve or filter
PCI identifiers without being concerned with the actual format of the
database.

What do others think?

Maxim