diff options
-rw-r--r-- | recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch | 76 | ||||
-rw-r--r-- | recipes-extended/virt-manager/virt-manager_4.1.0.bb | 54 |
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 @@ | |||
1 | From bcdb3555b924573e85039b54d63d6173ad99b846 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com> | ||
3 | Date: Wed, 28 Feb 2024 10:24:00 +0100 | ||
4 | Subject: [PATCH] setup.py: move global args to install args | ||
5 | |||
6 | Presently, during the installation process, global arguments such as | ||
7 | `no-update-icon-cache` and `no-compile-schemas` are utilized to | ||
8 | prevent the installation of specific graphical components. These | ||
9 | arguments are essential, for instance, when installing virt-manager | ||
10 | without any GUI dependencies on the target system. However, these | ||
11 | global arguments must be set before the install command, yet they only | ||
12 | take effect during the execution of the command. | ||
13 | |||
14 | Since the Yocto `setuptools3_legacy` class parses arguments after the | ||
15 | command, this commit aims to make these arguments applicable locally to | ||
16 | the install command. | ||
17 | |||
18 | Signed-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 | |||
23 | diff --git a/setup.py b/setup.py | ||
24 | index 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 | -- | ||
75 | 2.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 @@ | |||
1 | DESCRIPTION = "virt-manager is a graphical tool for managing virtual machines via libvirt" | ||
2 | HOMEPAGE = "https://virt-manager.org/" | ||
3 | LICENSE = "GPL-2.0-only" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
5 | DEPENDS += "python3-docutils-native" | ||
6 | SRCREV = "6710ca6969b7d9c4e8344acd0fe3d50b24adc8ec" | ||
7 | |||
8 | SRC_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 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | PACKAGECONFIG ??= "gui" | ||
16 | PACKAGECONFIG[gui] = ",--no-update-icon-cache --no-compile-schemas,python3-pygobject" | ||
17 | |||
18 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'gui', 'gtk-icon-cache', '', d)} | ||
19 | inherit bash-completion gettext pkgconfig setuptools3_legacy | ||
20 | |||
21 | PACKAGES += " \ | ||
22 | ${PN}-common \ | ||
23 | ${PN}-install \ | ||
24 | " | ||
25 | |||
26 | RDEPENDS:${PN}-common += " \ | ||
27 | libvirt-python \ | ||
28 | libosinfo \ | ||
29 | " | ||
30 | |||
31 | RDEPENDS:${PN} = "${PN}-common" | ||
32 | RDEPENDS:${PN}-install = "${PN}-common" | ||
33 | |||
34 | SETUPTOOLS_INSTALL_ARGS += "${PACKAGECONFIG_CONFARGS}" | ||
35 | |||
36 | FILES:${PN} = " \ | ||
37 | ${bindir}/virt-manager \ | ||
38 | ${datadir}/icons/* \ | ||
39 | " | ||
40 | |||
41 | FILES:${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 | |||
50 | FILES:${PN}-install = " \ | ||
51 | ${bindir}/virt-clone \ | ||
52 | ${bindir}/virt-install \ | ||
53 | ${bindir}/virt-xml \ | ||
54 | " | ||