From f6332a43c35387c4a2dea1746be5fd092890ae0e Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 27 Jun 2022 23:09:07 +0100 Subject: added lf and iptables --- .../fix-latest-libvirt-xml-output.patch | 108 +++++++++++++++++++++ .../tests-remove-sgio-unfiltered.patch | 65 +++++++++++++ repo/virt-manager/virt-manager.xibuild | 30 ++++++ 3 files changed, 203 insertions(+) create mode 100644 repo/virt-manager/fix-latest-libvirt-xml-output.patch create mode 100644 repo/virt-manager/tests-remove-sgio-unfiltered.patch create mode 100644 repo/virt-manager/virt-manager.xibuild (limited to 'repo/virt-manager') 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 +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 +--- + 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 @@ + + pool-fs-volclone + /var/lib/libvirt/images/pool-fs/pool-fs-vol +- +- + 10737418240 + 5368709120 + +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 @@ + + pool-logical-volclone + /dev/pool-logical/pool-logical-vol +- +- + 10737418240 + 10737418240 + +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 @@ + + pool-netfs-volclone + /var/lib/libvirt/images/pool-netfs/pool-netfs-vol +- +- + 10737418240 + 5368709120 + +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 @@ + + pool-disk-volclone + /dev/pool-disk-vol +- +- + 10737418240 + 5368709120 + +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 @@ + + pool-dir-volclone + /var/lib/libvirt/images/pool-dir/pool-dir-vol +- +- + 10737418240 + 5368709120 + 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 @@ + + + +- ++ + + + +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 & yeah boii < > yeahfoo + + + +- ++ + + + +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 @@ + + + +- ++ + + + +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" +} -- cgit v1.2.1