summaryrefslogtreecommitdiff
path: root/repo/virt-manager
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
committerdavidovski <david@davidovski.xyz>2022-06-27 23:09:07 +0100
commitf6332a43c35387c4a2dea1746be5fd092890ae0e (patch)
treed6599f63de04096f3fc21a98e0b3bb39d55a3531 /repo/virt-manager
parentf13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (diff)
added lf and iptables
Diffstat (limited to 'repo/virt-manager')
-rw-r--r--repo/virt-manager/fix-latest-libvirt-xml-output.patch108
-rw-r--r--repo/virt-manager/tests-remove-sgio-unfiltered.patch65
-rw-r--r--repo/virt-manager/virt-manager.xibuild30
3 files changed, 203 insertions, 0 deletions
diff --git a/repo/virt-manager/fix-latest-libvirt-xml-output.patch b/repo/virt-manager/fix-latest-libvirt-xml-output.patch
new file mode 100644
index 0000000..f81c44d
--- /dev/null
+++ b/repo/virt-manager/fix-latest-libvirt-xml-output.patch
@@ -0,0 +1,108 @@
+From 87ce425197c2d6bfaf675dc4c0f92a2f615a39a5 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso@redhat.com>
+Date: Tue, 6 Apr 2021 15:21:00 -0400
+Subject: [PATCH] tests: storage: Fix with latest libvirt XML output
+Patch-Source: https://github.com/virt-manager/virt-manager/commit/87ce425197c2d6bfaf675dc4c0f92a2f615a39a5
+
+Signed-off-by: Cole Robinson <crobinso@redhat.com>
+---
+ tests/data/storage/pool-fs-volclone.xml | 2 --
+ tests/data/storage/pool-logical-volclone.xml | 2 --
+ tests/data/storage/pool-netfs-volclone.xml | 2 --
+ tests/test_storage.py | 11 ++++++-----
+ 6 files changed, 6 insertions(+), 15 deletions(-)
+
+diff --git a/tests/data/storage/pool-fs-volclone.xml b/tests/data/storage/pool-fs-volclone.xml
+index 34e8cd088..6c7d3b9dd 100644
+--- a/tests/data/storage/pool-fs-volclone.xml
++++ b/tests/data/storage/pool-fs-volclone.xml
+@@ -1,8 +1,6 @@
+ <volume type="file">
+ <name>pool-fs-volclone</name>
+ <key>/var/lib/libvirt/images/pool-fs/pool-fs-vol</key>
+- <source>
+- </source>
+ <capacity unit="bytes">10737418240</capacity>
+ <allocation unit="bytes">5368709120</allocation>
+ <target>
+diff --git a/tests/data/storage/pool-logical-volclone.xml b/tests/data/storage/pool-logical-volclone.xml
+index c012017ef..8abcfa64c 100644
+--- a/tests/data/storage/pool-logical-volclone.xml
++++ b/tests/data/storage/pool-logical-volclone.xml
+@@ -1,8 +1,6 @@
+ <volume type="file">
+ <name>pool-logical-volclone</name>
+ <key>/dev/pool-logical/pool-logical-vol</key>
+- <source>
+- </source>
+ <capacity unit="bytes">10737418240</capacity>
+ <allocation unit="bytes">10737418240</allocation>
+ <target>
+diff --git a/tests/data/storage/pool-netfs-volclone.xml b/tests/data/storage/pool-netfs-volclone.xml
+index b6b39f79d..b7fd26507 100644
+--- a/tests/data/storage/pool-netfs-volclone.xml
++++ b/tests/data/storage/pool-netfs-volclone.xml
+@@ -1,8 +1,6 @@
+ <volume type="file">
+ <name>pool-netfs-volclone</name>
+ <key>/var/lib/libvirt/images/pool-netfs/pool-netfs-vol</key>
+- <source>
+- </source>
+ <capacity unit="bytes">10737418240</capacity>
+ <allocation unit="bytes">5368709120</allocation>
+ <target>
+diff --git a/tests/test_storage.py b/tests/test_storage.py
+index ee33ab32e..ba0e4e711 100644
+--- a/tests/test_storage.py
++++ b/tests/test_storage.py
+@@ -65,11 +65,6 @@ def createVol(conn, poolobj, volname=None, input_vol=None, clone_vol=None):
+ if volname is None:
+ volname = poolobj.name() + "-vol"
+
+- # Format here depends on libvirt-1.2.0 and later
+- if clone_vol and conn.local_libvirt_version() < 1002000:
+- log.debug("skip clone compare")
+- return
+-
+ alloc = 5 * 1024 * 1024 * 1024
+ cap = 10 * 1024 * 1024 * 1024
+ vol_inst = StorageVolume(conn)
+@@ -91,6 +86,12 @@ def createVol(conn, poolobj, volname=None, input_vol=None, clone_vol=None):
+
+ vol_inst.validate()
+ filename = os.path.join(BASEPATH, vol_inst.name + ".xml")
++
++ # Format here depends on libvirt-7.2.0 and later
++ if clone_vol and conn.local_libvirt_version() < 7002000:
++ log.debug("skip clone compare")
++ return
++
+ utils.diff_compare(vol_inst.get_xml(), filename)
+ return vol_inst.install(meter=False)
+
+diff --git a/tests/data/storage/pool-disk-volclone.xml b/tests/data/storage/pool-disk-volclone.xml
+index a4e9c3d..24f71a1 100644
+--- a/tests/data/storage/pool-disk-volclone.xml
++++ b/tests/data/storage/pool-disk-volclone.xml
+@@ -1,8 +1,6 @@
+ <volume type="file">
+ <name>pool-disk-volclone</name>
+ <key>/dev/pool-disk-vol</key>
+- <source>
+- </source>
+ <capacity unit="bytes">10737418240</capacity>
+ <allocation unit="bytes">5368709120</allocation>
+ <target>
+diff --git a/tests/data/storage/pool-dir-volclone.xml b/tests/data/storage/pool-dir-volclone.xml
+index c8bde66..16f1e56 100644
+--- a/tests/data/storage/pool-dir-volclone.xml
++++ b/tests/data/storage/pool-dir-volclone.xml
+@@ -1,8 +1,6 @@
+ <volume type="file">
+ <name>pool-dir-volclone</name>
+ <key>/var/lib/libvirt/images/pool-dir/pool-dir-vol</key>
+- <source>
+- </source>
+ <capacity unit="bytes">10737418240</capacity>
+ <allocation unit="bytes">5368709120</allocation>
+ <target>
diff --git a/repo/virt-manager/tests-remove-sgio-unfiltered.patch b/repo/virt-manager/tests-remove-sgio-unfiltered.patch
new file mode 100644
index 0000000..905dc73
--- /dev/null
+++ b/repo/virt-manager/tests-remove-sgio-unfiltered.patch
@@ -0,0 +1,65 @@
+diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
+index 49e9dcc..cf48427 100644
+--- a/tests/data/cli/compare/virt-install-many-devices.xml
++++ b/tests/data/cli/compare/virt-install-many-devices.xml
+@@ -71,7 +71,7 @@
+ <source file="/var/lib/libvirt/images/disk.qcow2"/>
+ <target dev="vdc" bus="virtio"/>
+ </disk>
+- <disk type="block" device="lun" sgio="unfiltered" rawio="yes">
++ <disk type="block" device="lun" sgio="filtered" rawio="yes">
+ <driver name="qemu" type="raw"/>
+ <source dev="/iscsi-pool/diskvol1"/>
+ <target dev="sdab" bus="scsi"/>
+diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
+index ea90f0f..beed8f0 100644
+--- a/tests/data/testdriver/testdriver.xml
++++ b/tests/data/testdriver/testdriver.xml
+@@ -245,7 +245,7 @@ Foo bar baz &amp; yeah boii &lt; &gt; yeahfoo
+ <shareable/>
+ </disk>
+
+- <disk type='block' device='lun' rawio='no' sgio='unfiltered'>
++ <disk type='block' device='lun' rawio='no'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/szz'>
+ <reservations managed="yes"/>
+diff --git a/tests/data/xmlparse/change-disk-out.xml b/tests/data/xmlparse/change-disk-out.xml
+index f65a1bc..263c9f9 100644
+--- a/tests/data/xmlparse/change-disk-out.xml
++++ b/tests/data/xmlparse/change-disk-out.xml
+@@ -37,7 +37,7 @@
+ <disk type="file" device="floppy">
+ <target dev="fde" bus="fdc"/>
+ </disk>
+- <disk type="block" device="lun" sgio="unfiltered" rawio="yes">
++ <disk type="block" device="lun">
+ <driver name="qemu" type="raw"/>
+ <source dev="/dev/sda"/>
+ <target dev="hdd" bus="scsi"/>
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index 5e69a13..72ff4df 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -590,7 +590,7 @@ vcpus.vcpu1.id=2,vcpus.vcpu1.enabled=yes
+ --disk source.file=%(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace,discard=unmap,detect_zeroes=unmap,address.type=drive,address.controller=0,address.target=2,address.unit=0
+ --disk device=cdrom,bus=sata,read_bytes_sec=1,read_iops_sec=2,write_bytes_sec=5,write_iops_sec=6,driver.copy_on_read=on,geometry.cyls=16383,geometry.heads=16,geometry.secs=63,geometry.trans=lba
+ --disk size=1
+---disk /iscsi-pool/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=unfiltered,rawio=yes
++--disk /iscsi-pool/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=filtered,rawio=yes
+ --disk /dev/default-pool/iso-vol,seclabel.model=dac,seclabel1.model=selinux,seclabel1.relabel=no,seclabel0.label=foo,bar,baz,iotune.read_bytes_sec=1,iotune.read_iops_sec=2,iotune.write_bytes_sec=5,iotune.write_iops_sec=6
+ --disk /dev/default-pool/iso-vol,format=qcow2,startup_policy=optional,iotune.total_bytes_sec=10,iotune.total_iops_sec=20,
+ --disk source_pool=rbd-ceph,source_volume=some-rbd-vol,size=.1,driver_type=raw
+diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py
+index 6d1aadd..116fd35 100644
+--- a/tests/test_xmlparse.py
++++ b/tests/test_xmlparse.py
+@@ -311,8 +311,6 @@ def testAlterDisk():
+ check = _make_checker(disk)
+ check("type", "block")
+ check("device", "lun")
+- check("sgio", None, "unfiltered")
+- check("rawio", None, "yes")
+
+ disk = _get_disk("sda")
+ check = _make_checker(disk)
diff --git a/repo/virt-manager/virt-manager.xibuild b/repo/virt-manager/virt-manager.xibuild
new file mode 100644
index 0000000..8397bbd
--- /dev/null
+++ b/repo/virt-manager/virt-manager.xibuild
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+NAME="virt-manager"
+DESC="GUI for managing virtual machines"
+
+MAKEDEPS="intltool glib python-docutils"
+DEPS="libvirt"
+
+PKG_VER=3.2.0
+SOURCE="https://releases.pagure.org/virt-manager/virt-manager-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+fix-latest-libvirt-xml-output.patch
+tests-remove-sgio-unfiltered.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ python3 setup.py build
+}
+
+
+package() {
+ python3 setup.py --no-update-icon-cache --no-compile-schemas install --root "$PKG_DEST"
+ python3 -m compileall "$PKG_DEST/usr/share/virt-manager"
+ python3 -O -m compileall "$PKG_DEST/usr/share/virt-manager"
+}