GNU bug report logs - #39579
[PATCH 0/3] Include operating systems list in virt-manager.

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Wed, 12 Feb 2020 16:31:02 UTC

Severity: normal

Tags: patch

Done: Jakub Kądziołka <kuba <at> kadziolka.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39579 in the body.
You can then email your comments to 39579 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Wed, 12 Feb 2020 16:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Waegeneire <brice <at> waegenei.re>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 12 Feb 2020 16:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Include operating systems list in virt-manager.
Date: Wed, 12 Feb 2020 17:30:46 +0100
When creating a new virtual machine in virt-manager, the OS list was empty and
we were forced to use the non-descriptive "Generic default" OS. This patch
serie fixes it.

Brice Waegeneire (3):
  gnu: osinfo-db-tools: Add osinfo-db-tools.
  gnu: osinfo-db: Add osinfo-db.
  gnu: virt-manager: Include operating systems list.

 gnu/packages/virtualization.scm | 91 ++++++++++++++++++++++++++++++++-
 1 file changed, 89 insertions(+), 2 deletions(-)

-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Wed, 12 Feb 2020 16:38:01 GMT) Full text and rfc822 format available.

Message #8 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH 1/3] gnu: osinfo-db-tools: Add osinfo-db-tools.
Date: Wed, 12 Feb 2020 17:37:09 +0100
* gnu/packages/virtualization.scm (osinfo-db-tools): New variable.
---
 gnu/packages/virtualization.scm | 40 +++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 3670b396a5..57d433599a 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Sou Bunnbu <iyzsong <at> member.fsf.org>
 ;;; Copyright © 2018 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon <at> gmail.com>
+;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
@@ -1382,3 +1384,41 @@ which is a hypervisor.")
     ;; TODO: Some files are licensed differently.  List those.
     (license license:gpl2)
     (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
+
+(define-public osinfo-db-tools
+  (package
+    (name "osinfo-db-tools")
+    (version "1.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
+                                  version ".tar.xz"))
+
+              (sha256
+               (base32
+                "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--prefix=" (assoc-ref %outputs "out")))))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("json-glib" ,json-glib)
+       ("libarchive" ,libarchive)
+       ("gobject-introspection" ,gobject-introspection)))
+    (native-inputs
+     `(("perl" ,perl)
+       ("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)
+       ;; Tests
+       ("python" ,python)
+       ("pytest" ,python-pytest)
+       ("requests" ,python-requests)
+       ))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
+    (synopsis "Tools for managing the osinfo database")
+    (description "This package contains a set of tools to assist administrators and
+developers in managing the database.")
+    (license license:lgpl2.0+)))
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Wed, 12 Feb 2020 16:38:01 GMT) Full text and rfc822 format available.

Message #11 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH 2/3] gnu: osinfo-db: Add osinfo-db.
Date: Wed, 12 Feb 2020 17:37:10 +0100
* gnu/packages/virtualization.scm (osinfo-db): New variable.
---
 gnu/packages/virtualization.scm | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 57d433599a..3769ece889 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -92,6 +92,7 @@
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -1422,3 +1423,39 @@ which is a hypervisor.")
     (description "This package contains a set of tools to assist administrators and
 developers in managing the database.")
     (license license:lgpl2.0+)))
+
+(define-public osinfo-db
+  (package
+    (name "osinfo-db")
+    (version "20200203")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((out (assoc-ref %outputs "out"))
+                (osinfo-dir (string-append out "/share/osinfo"))
+                (source (assoc-ref %build-inputs "source")))
+           (set-path-environment-variable
+            "PATH" '("bin")
+            (list (assoc-ref %build-inputs "osinfo-db-tools")))
+           (mkdir-p osinfo-dir)
+           (invoke "osinfo-db-import" "--dir" osinfo-dir source)
+           #t))))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("osinfo-db-tools" ,osinfo-db-tools)))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db")
+    (synopsis "Database of information about operating systems")
+    (description "Osinfo-db provides the database files for use with the
+libosinfo library. It provides information about guest operating systems for
+use with virtualization provisioning tools")
+    (license license:lgpl2.0+)))
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Wed, 12 Feb 2020 16:38:02 GMT) Full text and rfc822 format available.

Message #14 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH 3/3] gnu: virt-manager: Include operating systems list.
Date: Wed, 12 Feb 2020 17:37:11 +0100
* gnu/packages/virtualization.scm (virt-manager)[inputs]: Add osinfo-db.
[arguments]: Add phase patch.
---
 gnu/packages/virtualization.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 3769ece889..222d59d8bc 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -328,12 +328,22 @@ server and embedded PowerPC, and S390 guests.")
        (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")))))
+                            (assoc-ref %build-inputs "pci.ids")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "osinfo/osinfo_loader.c"
+               (("path = DATA_DIR.*")
+                (string-append "path = \"" (assoc-ref inputs "osinfo-db")
+                               "/share/osinfo\";")))
+             #t)))))
     (inputs
      `(("libsoup" ,libsoup)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("gobject-introspection" ,gobject-introspection)))
+       ("gobject-introspection" ,gobject-introspection)
+       ("osinfo-db" ,osinfo-db)))
     (native-inputs
      `(("glib" ,glib "bin")  ; glib-mkenums, etc.
        ("gtk-doc" ,gtk-doc)
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 19:10:02 GMT) Full text and rfc822 format available.

Message #17 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 39579 <at> debbugs.gnu.org
Subject: Re: [bug#39579] [PATCH 1/3] gnu: osinfo-db-tools: Add osinfo-db-tools.
Date: Sun, 16 Feb 2020 20:10:16 +0100
[Message part 1 (text/plain, inline)]
On Wed, Feb 12, 2020 at 05:37:09PM +0100, Brice Waegeneire wrote:
> +(define-public osinfo-db-tools
> +  (package
> +    (name "osinfo-db-tools")
> +    (version "1.7.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
> +                                  version ".tar.xz"))
> +
> +              (sha256
> +               (base32
> +                "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     `(#:configure-flags
> +       (list (string-append "--prefix=" (assoc-ref %outputs "out")))))
If I'm reading the source correctly, this argument isn't even used by
meson-build-system. Why is this necessary?

> +    (inputs
> +     `(("libsoup" ,libsoup)
> +       ("libxml2" ,libxml2)
> +       ("libxslt" ,libxslt)
> +       ("json-glib" ,json-glib)
> +       ("libarchive" ,libarchive)
> +       ("gobject-introspection" ,gobject-introspection)))
guix lint suggests that g-i should be a native-input

> +    (native-inputs
> +     `(("perl" ,perl)
> +       ("gettext" ,gettext-minimal)
> +       ("pkg-config" ,pkg-config)
> +       ;; Tests
> +       ("python" ,python)
> +       ("pytest" ,python-pytest)
> +       ("requests" ,python-requests)
> +       ))
You cruel madman, these parenthesis must be feeling quite lonely ;)

> +    (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
> +    (synopsis "Tools for managing the osinfo database")
> +    (description "This package contains a set of tools to assist administrators and
> +developers in managing the database.")
Please break lines at 80 characters when not inconvenient.

> +    (license license:lgpl2.0+)))
> -- 
> 2.25.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 19:13:01 GMT) Full text and rfc822 format available.

Message #20 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 39579 <at> debbugs.gnu.org
Subject: Re: [bug#39579] [PATCH 2/3] gnu: osinfo-db: Add osinfo-db.
Date: Sun, 16 Feb 2020 20:13:04 +0100
[Message part 1 (text/plain, inline)]
On Wed, Feb 12, 2020 at 05:37:10PM +0100, Brice Waegeneire wrote:
> +(define-public osinfo-db
> +  (package
> +    (name "osinfo-db")
> +    (version "20200203")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
> +                                  version ".tar.xz"))
> +              (sha256
> +               (base32
> +                "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
> +    (build-system trivial-build-system)
> +    (arguments
> +     `(#:modules ((guix build utils))
> +       #:builder
> +       (begin
> +         (use-modules (guix build utils))
> +         (let* ((out (assoc-ref %outputs "out"))
> +                (osinfo-dir (string-append out "/share/osinfo"))
> +                (source (assoc-ref %build-inputs "source")))
> +           (set-path-environment-variable
> +            "PATH" '("bin")
> +            (list (assoc-ref %build-inputs "osinfo-db-tools")))
> +           (mkdir-p osinfo-dir)
> +           (invoke "osinfo-db-import" "--dir" osinfo-dir source)
Wouldn't it be simpler to invoke osinfo-db-import with a full path to
the binary instead of adding to $PATH?

> +           #t))))
> +    (native-inputs
> +     `(("intltool" ,intltool)
> +       ("osinfo-db-tools" ,osinfo-db-tools)))
> +    (home-page "https://gitlab.com/libosinfo/osinfo-db")
> +    (synopsis "Database of information about operating systems")
> +    (description "Osinfo-db provides the database files for use with the
> +libosinfo library. It provides information about guest operating systems for
                    ^^
Use two spaces after a sentence. (please run guix lint on your packages)

> +use with virtualization provisioning tools")
> +    (license license:lgpl2.0+)))
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 19:27:02 GMT) Full text and rfc822 format available.

Message #23 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 39579 <at> debbugs.gnu.org
Subject: Re: [bug#39579] [PATCH 3/3] gnu: virt-manager: Include operating
 systems list.
Date: Sun, 16 Feb 2020 20:27:27 +0100
[Message part 1 (text/plain, inline)]
On Wed, Feb 12, 2020 at 05:37:11PM +0100, Brice Waegeneire wrote:
> * gnu/packages/virtualization.scm (virt-manager)[inputs]: Add osinfo-db.
> [arguments]: Add phase patch.
> ---
>  gnu/packages/virtualization.scm | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
> index 3769ece889..222d59d8bc 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -328,12 +328,22 @@ server and embedded PowerPC, and S390 guests.")
>         (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")))))
> +                            (assoc-ref %build-inputs "pci.ids")))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "osinfo/osinfo_loader.c"
> +               (("path = DATA_DIR.*")
> +                (string-append "path = \"" (assoc-ref inputs "osinfo-db")
> +                               "/share/osinfo\";")))
> +             #t)))))
'patch is somewhat non-descriptive, how about 'patch-osinfo-path ?

>      (inputs
>       `(("libsoup" ,libsoup)
>         ("libxml2" ,libxml2)
>         ("libxslt" ,libxslt)
> -       ("gobject-introspection" ,gobject-introspection)))
> +       ("gobject-introspection" ,gobject-introspection)
> +       ("osinfo-db" ,osinfo-db)))
>      (native-inputs
>       `(("glib" ,glib "bin")  ; glib-mkenums, etc.
>         ("gtk-doc" ,gtk-doc)
> -- 
> 2.25.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 19:57:02 GMT) Full text and rfc822 format available.

Message #26 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Brice Waegeneire <brice <at> waegenei.re>
Cc: 39579 <at> debbugs.gnu.org
Subject: Re: [bug#39579] [PATCH 1/3] gnu: osinfo-db-tools: Add osinfo-db-tools.
Date: Sun, 16 Feb 2020 20:56:35 +0100
[Message part 1 (text/plain, inline)]
On Sun, Feb 16, 2020 at 08:10:18PM +0100, Jakub Kądziołka wrote:
> On Wed, Feb 12, 2020 at 05:37:09PM +0100, Brice Waegeneire wrote:
> > +(define-public osinfo-db-tools
> > +  (package
> > +    (name "osinfo-db-tools")
> > +    (version "1.7.0")
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
> > +                                  version ".tar.xz"))
> > +
> > +              (sha256
> > +               (base32
> > +                "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
> > +    (build-system meson-build-system)
> > +    (arguments
> > +     `(#:configure-flags
> > +       (list (string-append "--prefix=" (assoc-ref %outputs "out")))))
> If I'm reading the source correctly, this argument isn't even used by
> meson-build-system. Why is this necessary?
Okay, I wasn't reading the source correctly, Vim's
search-at-word-boundaries hid the point where the variable is being
used. Still, the prefix option is already being set by
meson-build-system itself. I'm confused as to what this argument
is supposed to do.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 20:48:02 GMT) Full text and rfc822 format available.

Message #29 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH v2 0/3] Include operating systems list in virt-manager.
Date: Sun, 16 Feb 2020 21:47:09 +0100
The useless configure-flag of osinfo-db-tools has been removed and the
package definition has been linted. osinfo-db has been linted and it's
build call osinfo-db-import by it's absolute path. The commit message
refering to virt-manager has been by the correct libosinfo, the libosinfo
patch phase has been renamed and gobject-introspection has been moved to
native-inputs as suggested by guix lint.

Brice Waegeneire (3):
  gnu: osinfo-db-tools: Add osinfo-db-tools.
  gnu: osinfo-db: Add osinfo-db.
  gnu: libosinfo: Include operating systems list.

 gnu/packages/virtualization.scm | 87 ++++++++++++++++++++++++++++++++-
 1 file changed, 85 insertions(+), 2 deletions(-)

-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 20:48:02 GMT) Full text and rfc822 format available.

Message #32 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH v2 1/3] gnu: osinfo-db-tools: Add osinfo-db-tools.
Date: Sun, 16 Feb 2020 21:47:10 +0100
* gnu/packages/virtualization.scm (osinfo-db-tools): New variable.
---
 gnu/packages/virtualization.scm | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 3670b396a5..ca8f143f51 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Sou Bunnbu <iyzsong <at> member.fsf.org>
 ;;; Copyright © 2018 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon <at> gmail.com>
+;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
@@ -1382,3 +1384,37 @@ which is a hypervisor.")
     ;; TODO: Some files are licensed differently.  List those.
     (license license:gpl2)
     (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
+
+(define-public osinfo-db-tools
+  (package
+    (name "osinfo-db-tools")
+    (version "1.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
+                                  version ".tar.xz"))
+
+              (sha256
+               (base32
+                "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
+    (build-system meson-build-system)
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("json-glib" ,json-glib)
+       ("libarchive" ,libarchive)))
+    (native-inputs
+     `(("perl" ,perl)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)
+       ;; Tests
+       ("python" ,python)
+       ("pytest" ,python-pytest)
+       ("requests" ,python-requests)))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
+    (synopsis "Tools for managing the osinfo database")
+    (description "This package contains a set of tools to assist
+administrators and developers in managing the database.")
+    (license license:lgpl2.0+)))
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 20:48:03 GMT) Full text and rfc822 format available.

Message #35 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH v2 2/3] gnu: osinfo-db: Add osinfo-db.
Date: Sun, 16 Feb 2020 21:47:11 +0100
* gnu/packages/virtualization.scm (osinfo-db): New variable.
---
 gnu/packages/virtualization.scm | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index ca8f143f51..308cadbe14 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -92,6 +92,7 @@
   #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -1418,3 +1419,39 @@ which is a hypervisor.")
     (description "This package contains a set of tools to assist
 administrators and developers in managing the database.")
     (license license:lgpl2.0+)))
+
+(define-public osinfo-db
+  (package
+    (name "osinfo-db")
+    (version "20200203")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((out (assoc-ref %outputs "out"))
+                (osinfo-dir (string-append out "/share/osinfo"))
+                (source (assoc-ref %build-inputs "source"))
+                (osinfo-db-import
+                 (string-append (assoc-ref %build-inputs "osinfo-db-tools")
+                                "/bin/osinfo-db-import")))
+           (mkdir-p osinfo-dir)
+           (invoke osinfo-db-import "--dir" osinfo-dir source)
+           #t))))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("osinfo-db-tools" ,osinfo-db-tools)))
+    (home-page "https://gitlab.com/libosinfo/osinfo-db")
+    (synopsis "Database of information about operating systems")
+    (description "Osinfo-db provides the database files for use with the
+libosinfo library.  It provides information about guest operating systems for
+use with virtualization provisioning tools")
+    (license license:lgpl2.0+)))
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39579; Package guix-patches. (Sun, 16 Feb 2020 20:48:03 GMT) Full text and rfc822 format available.

Message #38 received at 39579 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 39579 <at> debbugs.gnu.org
Subject: [PATCH v2 3/3] gnu: libosinfo: Include operating systems list.
Date: Sun, 16 Feb 2020 21:47:12 +0100
* gnu/packages/virtualization.scm (libosinfo)[inputs]: Add osinfo-db and
remove gobject-introspection.
[native-inputs]: Add gobject-introspection.
[arguments]: Add phase patch.

squash! gnu: virt-manager: Include operating systems list.
---
 gnu/packages/virtualization.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 308cadbe14..c34f742655 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -328,14 +328,24 @@ server and embedded PowerPC, and S390 guests.")
        (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")))))
+                            (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\";")))
+             #t)))))
     (inputs
      `(("libsoup" ,libsoup)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("gobject-introspection" ,gobject-introspection)))
+       ("osinfo-db" ,osinfo-db)))
     (native-inputs
      `(("glib" ,glib "bin")  ; glib-mkenums, etc.
+       ("gobject-introspection" ,gobject-introspection)
        ("gtk-doc" ,gtk-doc)
        ("vala" ,vala)
        ("intltool" ,intltool)
-- 
2.25.0





Reply sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
You have taken responsibility. (Wed, 19 Feb 2020 22:06:02 GMT) Full text and rfc822 format available.

Notification sent to Brice Waegeneire <brice <at> waegenei.re>:
bug acknowledged by developer. (Wed, 19 Feb 2020 22:06:02 GMT) Full text and rfc822 format available.

Message #43 received at 39579-done <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39579-done <at> debbugs.gnu.org
Subject: Done: Include operating systems list in virt-manager
Date: Wed, 19 Feb 2020 23:06:07 +0100
[Message part 1 (text/plain, inline)]
It seems that my mail didn't get sent due to flaky internet, but I've
pushed the patches to master - closing.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Mar 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 31 days ago.

Previous Next


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