From patchwork Thu Mar 10 09:31:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 37722 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 ED7D727BBEA; Thu, 10 Mar 2022 09:34:35 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 6B01627BBE9 for ; Thu, 10 Mar 2022 09:34:35 +0000 (GMT) Received: from localhost ([::1]:48476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSFBq-0002WK-Ij for patchwork@mira.cbaines.net; Thu, 10 Mar 2022 04:34:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSFAP-0001Ju-Nw for guix-patches@gnu.org; Thu, 10 Mar 2022 04:33:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nSFAP-0005Q3-Dn for guix-patches@gnu.org; Thu, 10 Mar 2022 04:33:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nSFAO-0002X6-9s for guix-patches@gnu.org; Thu, 10 Mar 2022 04:33:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54069] [PATCH v3 5/7] gnu: libosinfo: Unbundle usb.ids, pci.ids. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Mar 2022 09:33:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54069 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54069@debbugs.gnu.org Cc: John Kehayias , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxime Devos , Maxim Cournoyer Received: via spool by 54069-submit@debbugs.gnu.org id=B54069.16469047759667 (code B ref 54069); Thu, 10 Mar 2022 09:33:04 +0000 Received: (at 54069) by debbugs.gnu.org; 10 Mar 2022 09:32:55 +0000 Received: from localhost ([127.0.0.1]:33206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSFAC-0002Vh-4b for submit@debbugs.gnu.org; Thu, 10 Mar 2022 04:32:55 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:42770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSFA9-0002VA-WA for 54069@debbugs.gnu.org; Thu, 10 Mar 2022 04:32:50 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4KDkPR41w1z9sc3; Thu, 10 Mar 2022 10:32:43 +0100 (CET) From: Brendan Tildesley DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1646904761; 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=1LxrSGoVBoCBpdsu7xexlcD8+MCaI9sy4XGFnBiqsJY=; b=2KJz6X17r3UdXlxsmOGCu3wkHFDG+HBPAfZCer5BXXTvsCFpMMUE5mbL/YW4EeNWmoZfI7 oCLAEODiiBvFSd+JRBODXoQ5E2ltu3GiNVRvFPBhVBsZw0ZFkbz+0fAGBrr9bpgclMhZ7w i2fFcoyLwZzXgiLvfANtwM71BmnJYqJHJl32UIQGuEjyPUHYKVPXLutw2JNrdY0xBEJEan Q7FRBVeq8b6OqvZkpx7RGnV8Uo9ckxrGKmGrpetNflCLdTkR5nUT7x5Ts6wii5CvxQVsbR epWavWaaNNA6gY8UZJvI1O1u7WTb5m8dqaB5ypDDQNo8SYQ6rhkL5GOmaqCLvw== Date: Thu, 10 Mar 2022 20:31:43 +1100 Message-Id: <20220310093145.31649-6-mail@brendan.scot> In-Reply-To: <20220310093145.31649-1-mail@brendan.scot> References: <20220310093145.31649-1-mail@brendan.scot> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/virtualization.scm (libosinfo): [arguments]: Use Gexp style. Use hwdata package for latest usb.ids and pci.ids. [inputs]: Add hwdata:pci, hwdata:usb. remove pci.ids, usb.ids origins. Use new input style. --- gnu/packages/virtualization.scm | 68 +++++++++++++++------------------ 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 8098a0aec3..5756c49b07 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Raghav Gururajan ;;; Copyright © 2022 Oleg Pykhalov +;;; Copyright © 2022 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -98,6 +99,7 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) #:use-module (gnu packages perl) + #:use-module (gnu packages pciutils) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) @@ -1031,46 +1033,36 @@ (define-public libosinfo "0nd360c9ampw8hb6xh5g45q858df2r4jj9q88bcl6gzgaj0l3wxl")))) (build-system meson-build-system) (arguments - `(#:configure-flags - (list (string-append "-Dwith-usb-ids-path=" - (assoc-ref %build-inputs "usb.ids")) - (string-append "-Dwith-pci-ids-path=" - (assoc-ref %build-inputs "pci.ids"))) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-osinfo-path - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "osinfo/osinfo_loader.c" - (("path = DATA_DIR.*") - (string-append "path = \"" (assoc-ref inputs "osinfo-db") - "/share/osinfo\";")))))))) + (list + #:configure-flags + #~(list + (string-append "-Dwith-usb-ids-path=" + (ungexp (this-package-input "hwdata") "usb") + "/share/hwdata/usb.ids") + (string-append "-Dwith-pci-ids-path=" + (ungexp (this-package-input "hwdata") "pci") + "/share/hwdata/pci.ids")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-osinfo-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "osinfo/osinfo_loader.c" + (("path = DATA_DIR.*") + (string-append "path = \"" #$osinfo-db "/share/osinfo\";")))))))) (inputs - `(("libsoup" ,libsoup-minimal-2) - ("libxml2" ,libxml2) - ("libxslt" ,libxslt) - ("osinfo-db" ,osinfo-db))) + (list libsoup-minimal-2 + libxml2 + libxslt + osinfo-db + `(,hwdata "pci") + `(,hwdata "usb"))) (native-inputs - `(("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection) - ("gtk-doc" ,gtk-doc/stable) - ("vala" ,vala) - ("intltool" ,intltool) - ("pkg-config" ,pkg-config) - ("pci.ids" - ,(origin - (method url-fetch) - (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids") - (sha256 - (base32 - "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw")))) - ("usb.ids" - ,(origin - (method url-fetch) - (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681") - (file-name "usb.ids") - (sha256 - (base32 - "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r")))))) + (list `(,glib "bin") ; glib-mkenums, etc. + gobject-introspection + gtk-doc/stable + vala + intltool + pkg-config)) (home-page "https://libosinfo.org/") (synopsis "Operating system information database") (description "libosinfo is a GObject based library API for managing