meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-virtualization][0/1] add support of virt-manager
@ 2024-03-01 13:07 Paul Le Guen de Kerneizon
  2024-03-01 13:07 ` [meta-virtualization][PATCH 1/1] virt-manager: add package Paul Le Guen de Kerneizon
  2024-03-08 19:38 ` [meta-virtualization][0/1] add support of virt-manager Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Le Guen de Kerneizon @ 2024-03-01 13:07 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Paul Le Guen de Kerneizon

Hello community,
This patch adds the support of virt-manager. The recipe has direct dependency on
some packages available currently on Yocto Nanbield which are `usbids` and
`libosinfo` from meta-openembedded.
virt-manager patch is currently under review on virt-manager repository. See the
PR at: https://github.com/virt-manager/virt-manager/pull/631

Waiting for your review, feel free to ask any questions or remarks.
Regards,
Paul Le Guen de Kerneizon, Savoir-faire Linux

Paul Le Guen de Kerneizon (1):
  virt-manager: add package

 ....py-move-global-args-to-install-args.patch | 76 +++++++++++++++++++
 .../virt-manager/virt-manager_4.1.0.bb        | 54 +++++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
 create mode 100644 recipes-extended/virt-manager/virt-manager_4.1.0.bb

--
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [meta-virtualization][PATCH 1/1] virt-manager: add package
  2024-03-01 13:07 [meta-virtualization][0/1] add support of virt-manager Paul Le Guen de Kerneizon
@ 2024-03-01 13:07 ` Paul Le Guen de Kerneizon
  2024-03-08 19:38 ` [meta-virtualization][0/1] add support of virt-manager Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Le Guen de Kerneizon @ 2024-03-01 13:07 UTC (permalink / raw)
  To: meta-virtualization; +Cc: Paul Le Guen de Kerneizon

virt-manager is a graphical tool for managing virtual machines via
libvirt. By default, virt-manager is compiled with GUI dependency using
`gui` flag.
Build tested on aarch64 and x86-64 machines, with both with and without
gui PACKAGECONFIG flag.

Signed-off-by: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
---
 ....py-move-global-args-to-install-args.patch | 76 +++++++++++++++++++
 .../virt-manager/virt-manager_4.1.0.bb        | 54 +++++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
 create mode 100644 recipes-extended/virt-manager/virt-manager_4.1.0.bb

diff --git a/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch b/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
new file mode 100644
index 00000000..e9ab0f53
--- /dev/null
+++ b/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
@@ -0,0 +1,76 @@
+From bcdb3555b924573e85039b54d63d6173ad99b846 Mon Sep 17 00:00:00 2001
+From: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
+Date: Wed, 28 Feb 2024 10:24:00 +0100
+Subject: [PATCH] setup.py: move global args to install args
+
+Presently, during the installation process, global arguments such as
+`no-update-icon-cache` and `no-compile-schemas` are utilized to
+prevent the installation of specific graphical components. These
+arguments are essential, for instance, when installing virt-manager
+without any GUI dependencies on the target system. However, these
+global arguments must be set before the install command, yet they only
+take effect during the execution of the command.
+
+Since the Yocto `setuptools3_legacy` class parses arguments after the
+command, this commit aims to make these arguments applicable locally to
+the install command.
+
+Signed-off-by: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
+---
+ setup.py | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index cd6cd83e..faca546a 100755
+--- a/setup.py
++++ b/setup.py
+@@ -242,6 +242,16 @@ class my_egg_info(setuptools.command.install_egg_info.install_egg_info):
+
+
+ class my_install(setuptools.command.install.install):
++    setuptools.command.install.install.user_options += [
++        ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
++        ("no-compile-schemas", None, "Don't compile gsettings schemas"),
++    ]
++
++    def initialize_options(self):
++        setuptools.command.install.install.initialize_options(self)
++        self.no_update_icon_cache = None
++        self.no_compile_schemas = None
++
+     """
+     Error if we weren't 'configure'd with the correct install prefix
+     """
+@@ -266,12 +276,12 @@ class my_install(setuptools.command.install.install):
+     def run(self):
+         setuptools.command.install.install.run(self)
+
+-        if not self.distribution.no_update_icon_cache:
++        if not self.no_update_icon_cache:
+             print("running gtk-update-icon-cache")
+             icon_path = os.path.join(self.install_data, "share/icons/hicolor")
+             self.spawn(["gtk-update-icon-cache", "-q", "-t", icon_path])
+
+-        if not self.distribution.no_compile_schemas:
++        if not self.no_compile_schemas:
+             print("compiling gsettings schemas")
+             gschema_install = os.path.join(self.install_data,
+                 "share/glib-2.0/schemas")
+@@ -421,14 +431,8 @@ class CheckPylint(setuptools.Command):
+
+
+ class VMMDistribution(setuptools.dist.Distribution):
+-    global_options = setuptools.dist.Distribution.global_options + [
+-        ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
+-        ("no-compile-schemas", None, "Don't compile gsettings schemas"),
+-    ]
+
+     def __init__(self, *args, **kwargs):
+-        self.no_update_icon_cache = False
+-        self.no_compile_schemas = False
+         setuptools.dist.Distribution.__init__(self, *args, **kwargs)
+
+
+--
+2.34.1
+
diff --git a/recipes-extended/virt-manager/virt-manager_4.1.0.bb b/recipes-extended/virt-manager/virt-manager_4.1.0.bb
new file mode 100644
index 00000000..a2395012
--- /dev/null
+++ b/recipes-extended/virt-manager/virt-manager_4.1.0.bb
@@ -0,0 +1,54 @@
+DESCRIPTION = "virt-manager is a graphical tool for managing virtual machines via libvirt"
+HOMEPAGE = "https://virt-manager.org/"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS += "python3-docutils-native"
+SRCREV = "6710ca6969b7d9c4e8344acd0fe3d50b24adc8ec"
+
+SRC_URI = " \
+  git://github.com/virt-manager/virt-manager;branch=main;protocol=https \
+  file://0001-setup.py-move-global-args-to-install-args.patch \
+"
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ??= "gui"
+PACKAGECONFIG[gui] = ",--no-update-icon-cache --no-compile-schemas,python3-pygobject"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'gui', 'gtk-icon-cache', '', d)}
+inherit bash-completion gettext pkgconfig setuptools3_legacy
+
+PACKAGES += " \
+  ${PN}-common \
+  ${PN}-install \
+"
+
+RDEPENDS:${PN}-common += " \
+  libvirt-python \
+  libosinfo \
+"
+
+RDEPENDS:${PN} = "${PN}-common"
+RDEPENDS:${PN}-install = "${PN}-common"
+
+SETUPTOOLS_INSTALL_ARGS += "${PACKAGECONFIG_CONFARGS}"
+
+FILES:${PN} = " \
+  ${bindir}/virt-manager \
+  ${datadir}/icons/* \
+"
+
+FILES:${PN}-common = " \
+  ${libdir}/* \
+  ${libdir}/python3.10/* \
+  ${datadir}/applications \
+  ${datadir}/virt-manager \
+  ${datadir}/glib-2.0/* \
+  ${datadir}/metainfo/* \
+"
+
+FILES:${PN}-install = " \
+  ${bindir}/virt-clone \
+  ${bindir}/virt-install \
+  ${bindir}/virt-xml \
+"
--
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-virtualization][0/1] add support of virt-manager
  2024-03-01 13:07 [meta-virtualization][0/1] add support of virt-manager Paul Le Guen de Kerneizon
  2024-03-01 13:07 ` [meta-virtualization][PATCH 1/1] virt-manager: add package Paul Le Guen de Kerneizon
@ 2024-03-08 19:38 ` Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2024-03-08 19:38 UTC (permalink / raw)
  To: Paul Le Guen de Kerneizon; +Cc: meta-virtualization

I've staged this on master-next, it built fine for me as well. It
would also be nice to get a README that outlines how it can be
tested.

Bruce

In message: [meta-virtualization][0/1] add support of virt-manager
on 01/03/2024 Paul Le Guen de Kerneizon wrote:

> Hello community,
> This patch adds the support of virt-manager. The recipe has direct dependency on
> some packages available currently on Yocto Nanbield which are `usbids` and
> `libosinfo` from meta-openembedded.
> virt-manager patch is currently under review on virt-manager repository. See the
> PR at: https://github.com/virt-manager/virt-manager/pull/631
> 
> Waiting for your review, feel free to ask any questions or remarks.
> Regards,
> Paul Le Guen de Kerneizon, Savoir-faire Linux
> 
> Paul Le Guen de Kerneizon (1):
>   virt-manager: add package
> 
>  ....py-move-global-args-to-install-args.patch | 76 +++++++++++++++++++
>  .../virt-manager/virt-manager_4.1.0.bb        | 54 +++++++++++++
>  2 files changed, 130 insertions(+)
>  create mode 100644 recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
>  create mode 100644 recipes-extended/virt-manager/virt-manager_4.1.0.bb
> 
> --
> 2.34.1

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8600): https://lists.yoctoproject.org/g/meta-virtualization/message/8600
> Mute This Topic: https://lists.yoctoproject.org/mt/104662990/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-08 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 13:07 [meta-virtualization][0/1] add support of virt-manager Paul Le Guen de Kerneizon
2024-03-01 13:07 ` [meta-virtualization][PATCH 1/1] virt-manager: add package Paul Le Guen de Kerneizon
2024-03-08 19:38 ` [meta-virtualization][0/1] add support of virt-manager Bruce Ashfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).