From 776c7064dcb8d236201332ab69fc53cbd18e69cf Mon Sep 17 00:00:00 2001 From: Manjeet Saini <33650320+itsManjeet@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:47:53 +0530 Subject: [PATCH] 218 extensions/qemu add support for virt manager (#223) --- elements/components/py/py-libvirt.yml | 18 ++++++++---------- elements/components/py/py-requests.yml | 26 ++++++++++++-------------- elements/components/virt-manager.yml | 13 +++++++++++++ patches/py-requests/cert.patch | 14 ++++++++++++++ 4 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 patches/py-requests/cert.patch diff --git a/elements/components/py/py-libvirt.yml b/elements/components/py/py-libvirt.yml index 5faf29d1e..71020ec6c 100644 --- a/elements/components/py/py-libvirt.yml +++ b/elements/components/py/py-libvirt.yml @@ -1,15 +1,13 @@ id: py-libvirt -version: 8.4.0 +version: 10.5.0 about: libvirt python binding -release: 0 + depends: -- components/libvirt.yml -- components/python.yml + - components/libvirt.yml + - components/python.yml + build-depends: -- components/py/py-setuptools.yml -sources: -- https://libvirt.org/sources/python/libvirt-python-%{version}.tar.gz -script: |- - python setup.py build - python setup.py install --root=%{install-root} --optimize=1 + - components/py/py-setuptools.yml +sources: + - https://libvirt.org/sources/python/libvirt-python-%{version}.tar.gz diff --git a/elements/components/py/py-requests.yml b/elements/components/py/py-requests.yml index 79ff1a001..4a7eba4ef 100644 --- a/elements/components/py/py-requests.yml +++ b/elements/components/py/py-requests.yml @@ -1,20 +1,18 @@ id: py-requests -version: 2.28.1 +version: 2.32.3 about: Python HTTP for Humans -release: 0 + depends: -- components/py/py-chardet.yml -- components/py/py-idna.yml -- components/py/py-urllib3.yml -- components/py/py-socks.yml + - components/py/py-idna.yml + - components/py/py-urllib3.yml + - components/py/py-socks.yml + build-depends: -- components/py/py-setuptools.yml + - components/py/py-setuptools.yml + sources: -- https://github.com/psf/requests/archive/v%{version}/requests-%{version}.tar.gz -pre-script: | - sed -e '/certifi/d' \ - -e "s/,<.*'/'/" \ - -e '/charset_normalizer/d' \ - -i setup.py - patch -p1 -i /files/certs.patch + - https://github.com/psf/requests/archive/v%{version}/requests-%{version}.tar.gz + - patches/py-requests/cert.patch +pre-script: |- + patch -p1 -i cert.patch diff --git a/elements/components/virt-manager.yml b/elements/components/virt-manager.yml index 4d1275157..8827ca578 100644 --- a/elements/components/virt-manager.yml +++ b/elements/components/virt-manager.yml @@ -4,16 +4,29 @@ about: Desktop user interface for managing virtual machines pre-script: |- pip install docutils + + sed -i '80s/.*/ self.gsettings_dir = os.path.join(prefix, "share", "virt-manager", "schemas")/' virtinst/buildconfig.py + sed -i '81d' virtinst/buildconfig.py + + sed -i 's#share/glib-2.0/schemas#share/virt-manager/schemas#' setup.py configure: >- --default-hvs qemu,lxc +post-script: |- + python -m compileall %{install-root}/%{datadir}/virt-manager + python -O -m compileall %{install-root}/%{datadir}/virt-manager + depends: - components/gtk-vnc.yml - components/gtksourceview4.yml - components/libvirt-glib.yml - components/py/py-cairo.yml - components/spice-gtk.yml + - components/libosinfo.yml + - components/libisoburn.yml + - components/py/py-libvirt.yml + - components/py/py-requests.yml build-depends: - components/py/py-setuptools.yml diff --git a/patches/py-requests/cert.patch b/patches/py-requests/cert.patch new file mode 100644 index 000000000..b4ebc378c --- /dev/null +++ b/patches/py-requests/cert.patch @@ -0,0 +1,14 @@ +diff --git a/src/requests/certs.py b/src/requests/certs.py +index be422c3e..9bfe1c80 100644 +--- a/src/requests/certs.py ++++ b/src/requests/certs.py +@@ -11,7 +11,8 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed + environment, you can change the definition of where() to return a separately + packaged CA bundle. + """ +-from certifi import where ++def where(): ++ return "/etc/ssl/certs/ca-certificates.crt" + + if __name__ == "__main__": + print(where())