summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>2024-03-01 14:07:04 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-03-15 17:17:20 +0000
commita7ca71f70b39cd44fe6719af6cf0cc624d4c6743 (patch)
treeb6f4da89528df8a1d24a4a438caf6cb1f294fab3
parent8c18554d3eb280aa767208fec0de18ff37df4feb (diff)
downloadmeta-virtualization-a7ca71f70b39cd44fe6719af6cf0cc624d4c6743.tar.gz
virt-manager: add package
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> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch76
-rw-r--r--recipes-extended/virt-manager/virt-manager_4.1.0.bb54
2 files changed, 130 insertions, 0 deletions
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..2a08aa19
--- /dev/null
+++ b/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
@@ -0,0 +1,76 @@
1From bcdb3555b924573e85039b54d63d6173ad99b846 Mon Sep 17 00:00:00 2001
2From: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
3Date: Wed, 28 Feb 2024 10:24:00 +0100
4Subject: [PATCH] setup.py: move global args to install args
5
6Presently, during the installation process, global arguments such as
7`no-update-icon-cache` and `no-compile-schemas` are utilized to
8prevent the installation of specific graphical components. These
9arguments are essential, for instance, when installing virt-manager
10without any GUI dependencies on the target system. However, these
11global arguments must be set before the install command, yet they only
12take effect during the execution of the command.
13
14Since the Yocto `setuptools3_legacy` class parses arguments after the
15command, this commit aims to make these arguments applicable locally to
16the install command.
17
18Signed-off-by: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
19---
20 setup.py | 20 ++++++++++++--------
21 1 file changed, 12 insertions(+), 8 deletions(-)
22
23diff --git a/setup.py b/setup.py
24index cd6cd83e..faca546a 100755
25--- a/setup.py
26+++ b/setup.py
27@@ -242,6 +242,16 @@ class my_egg_info(setuptools.command.install_egg_info.install_egg_info):
28
29
30 class my_install(setuptools.command.install.install):
31+ setuptools.command.install.install.user_options += [
32+ ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
33+ ("no-compile-schemas", None, "Don't compile gsettings schemas"),
34+ ]
35+
36+ def initialize_options(self):
37+ setuptools.command.install.install.initialize_options(self)
38+ self.no_update_icon_cache = None
39+ self.no_compile_schemas = None
40+
41 """
42 Error if we weren't 'configure'd with the correct install prefix
43 """
44@@ -266,12 +276,12 @@ class my_install(setuptools.command.install.install):
45 def run(self):
46 setuptools.command.install.install.run(self)
47
48- if not self.distribution.no_update_icon_cache:
49+ if not self.no_update_icon_cache:
50 print("running gtk-update-icon-cache")
51 icon_path = os.path.join(self.install_data, "share/icons/hicolor")
52 self.spawn(["gtk-update-icon-cache", "-q", "-t", icon_path])
53
54- if not self.distribution.no_compile_schemas:
55+ if not self.no_compile_schemas:
56 print("compiling gsettings schemas")
57 gschema_install = os.path.join(self.install_data,
58 "share/glib-2.0/schemas")
59@@ -421,14 +431,8 @@ class CheckPylint(setuptools.Command):
60
61
62 class VMMDistribution(setuptools.dist.Distribution):
63- global_options = setuptools.dist.Distribution.global_options + [
64- ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
65- ("no-compile-schemas", None, "Don't compile gsettings schemas"),
66- ]
67
68 def __init__(self, *args, **kwargs):
69- self.no_update_icon_cache = False
70- self.no_compile_schemas = False
71 setuptools.dist.Distribution.__init__(self, *args, **kwargs)
72
73
74--
752.34.1
76
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 @@
1DESCRIPTION = "virt-manager is a graphical tool for managing virtual machines via libvirt"
2HOMEPAGE = "https://virt-manager.org/"
3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5DEPENDS += "python3-docutils-native"
6SRCREV = "6710ca6969b7d9c4e8344acd0fe3d50b24adc8ec"
7
8SRC_URI = " \
9 git://github.com/virt-manager/virt-manager;branch=main;protocol=https \
10 file://0001-setup.py-move-global-args-to-install-args.patch \
11"
12
13S = "${WORKDIR}/git"
14
15PACKAGECONFIG ??= "gui"
16PACKAGECONFIG[gui] = ",--no-update-icon-cache --no-compile-schemas,python3-pygobject"
17
18inherit ${@bb.utils.contains('PACKAGECONFIG', 'gui', 'gtk-icon-cache', '', d)}
19inherit bash-completion gettext pkgconfig setuptools3_legacy
20
21PACKAGES += " \
22 ${PN}-common \
23 ${PN}-install \
24"
25
26RDEPENDS:${PN}-common += " \
27 libvirt-python \
28 libosinfo \
29"
30
31RDEPENDS:${PN} = "${PN}-common"
32RDEPENDS:${PN}-install = "${PN}-common"
33
34SETUPTOOLS_INSTALL_ARGS += "${PACKAGECONFIG_CONFARGS}"
35
36FILES:${PN} = " \
37 ${bindir}/virt-manager \
38 ${datadir}/icons/* \
39"
40
41FILES:${PN}-common = " \
42 ${libdir}/* \
43 ${libdir}/python3.10/* \
44 ${datadir}/applications \
45 ${datadir}/virt-manager \
46 ${datadir}/glib-2.0/* \
47 ${datadir}/metainfo/* \
48"
49
50FILES:${PN}-install = " \
51 ${bindir}/virt-clone \
52 ${bindir}/virt-install \
53 ${bindir}/virt-xml \
54"