[libvirt] [PATCH] vbox: fix typo in warning message
by Guido Günther
---
src/vbox/vbox_tmpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 07f25ba24f..dffeabde02 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1836,7 +1836,7 @@ _mediumCreateDiffStorage(IMedium *medium ATTRIBUTE_UNUSED,
if (variantSize == 0)
return 0;
if (variantSize > 1)
- VIR_WARN("Only one variant is avaible in current version");
+ VIR_WARN("Only one variant is available in current version");
return medium->vtbl->CreateDiffStorage(medium, target, variant[0], progress);
#else /* VBOX_API_VERSION >= 4003000 */
return medium->vtbl->CreateDiffStorage(medium, target, variantSize, variant, progress);
--
2.14.0
7 years, 3 months
[libvirt] [PATCH 0/2] Two Coverity Fixes (thanks John!)
by Laine Stump
John found these two problems with Coverity after I pushed my series
fixing MAC address saving/setting on Mellanox dual port NICs.
Laine Stump (2):
util: fix Coverity complaint (and actual bug) in
virHostdevReadNetConfig()
util: fix Coverity complaint in virNetDevSetNetConfig()
src/util/virhostdev.c | 2 +-
src/util/virnetdev.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
--
2.13.3
7 years, 3 months
[libvirt] [PATCH v2] Update to latest keycodemapdb content
by Daniel P. Berrange
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/Makefile.am | 2 +-
src/keycodemapdb | 2 +-
src/util/virkeycode.c | 5 ++---
tests/virkeycodetest.c | 4 ++--
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b8e875482..45b58c0ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -252,7 +252,7 @@ util/virkey%.7: util/virkey%.pod
rm -f $@-t1 && \
mv $@-t2 $@
-KEYCODES = linux osx atset1 atset2 atset3 xt xtkbd usb win32 rfb
+KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 rfb
KEYNAMES = linux osx win32
KEYTABLES = \
diff --git a/src/keycodemapdb b/src/keycodemapdb
index 7bf5710b2..267157b96 160000
--- a/src/keycodemapdb
+++ b/src/keycodemapdb
@@ -1 +1 @@
-Subproject commit 7bf5710b22aa8d58b7eeaaf3dc6960c26cade4f0
+Subproject commit 267157b96c62b5445de9cddd21de42fcd943ffe6
diff --git a/src/util/virkeycode.c b/src/util/virkeycode.c
index e09aaadaa..eda263218 100644
--- a/src/util/virkeycode.c
+++ b/src/util/virkeycode.c
@@ -30,7 +30,6 @@
#include "virkeycodetable_rfb.h"
#include "virkeycodetable_usb.h"
#include "virkeycodetable_win32.h"
-#include "virkeycodetable_xt.h"
#include "virkeycodetable_xtkbd.h"
#include "virkeynametable_linux.h"
#include "virkeynametable_osx.h"
@@ -44,7 +43,8 @@ static const char **virKeymapNames[VIR_KEYCODE_SET_LAST] = {
static const unsigned short *virKeymapValues[VIR_KEYCODE_SET_LAST] = {
[VIR_KEYCODE_SET_LINUX] = virKeyCodeTable_linux,
- [VIR_KEYCODE_SET_XT] = virKeyCodeTable_xt,
+ /* XT is same as AT Set1 - it was included by mistake */
+ [VIR_KEYCODE_SET_XT] = virKeyCodeTable_atset1,
[VIR_KEYCODE_SET_ATSET1] = virKeyCodeTable_atset1,
[VIR_KEYCODE_SET_ATSET2] = virKeyCodeTable_atset2,
[VIR_KEYCODE_SET_ATSET3] = virKeyCodeTable_atset3,
@@ -57,7 +57,6 @@ static const unsigned short *virKeymapValues[VIR_KEYCODE_SET_LAST] = {
#define VIR_KEYMAP_ENTRY_MAX ARRAY_CARDINALITY(virKeyCodeTable_linux)
-verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_xt));
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_atset1));
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_atset2));
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_atset3));
diff --git a/tests/virkeycodetest.c b/tests/virkeycodetest.c
index d754385be..4092aa119 100644
--- a/tests/virkeycodetest.c
+++ b/tests/virkeycodetest.c
@@ -56,9 +56,9 @@ static int testKeycodeMapping(const void *data ATTRIBUTE_UNUSED)
TRANSLATE(LINUX, USB, 111, 76);
TRANSLATE(LINUX, RFB, 88, 88);
TRANSLATE(LINUX, RFB, 160, 163);
- TRANSLATE(ATSET2, ATSET3, 259, 55);
+ TRANSLATE(ATSET2, ATSET3, 131, 55);
TRANSLATE(OSX, WIN32, 90, 131);
- TRANSLATE(OSX, ATSET1, 90, 0);
+ TRANSLATE(OSX, ATSET1, 90, 90);
TRANSLATE(OSX, ATSET1, 3200, -1);
#undef TRANSLATE
--
2.13.3
7 years, 3 months
[libvirt] [PATCH v2 0/7] properly deal with multiple netdevs on a single PF (i.e. Mellanox dual port NICS)
by Laine Stump
I had already sent 3 patches to properly support macvtap passthrough
of both ports of a dual port VF, and those patches were ACKed by
Michal:
https://www.redhat.com/archives/libvir-list/2017-August/msg00170.html
When Michal sent the ACK, I was already working on a V2 that updated
Patch 2 (now Patch 3), and added on some more patches in order to
properly support VFIO device assignment of VFs on these cards (but
only if they've been setup in single port mode). A scorecard:
Patch 1 - same as V1, already ACKed
Patch 2 - NEW trivial patch to make an arg of a function const
Patch 3 - update virPCIGetNetName() - improved from V1
Patch 4 - match phys_port_id, slightly modified from V1 due to change
in virPCIGetNetName in new Patch 3.
Patch 5 - NEW save/set/restore using correct PF netdev during vfio
Patch 6 - NEW eliminate bogus error logs when trying to read saved net config
Patch 7 - NEW fix checking of PF online status for dual port cards
Here's the original cover letter blurb:
The commit log of Patch 1 explains the majority of the reason for
these patches. In short, they disambiguate the multiple netdevs per
PCI device on the SRIOV PF and VFs of a Mellanox dual port NIC *when
converting from a VF netdev to a PF netdev and vice versa*. This
permits us to set the vlan tag and MAC address for the correct VF
netdev (and detect the online status of the correct PF netdev for that
VF) when using a VF in macvtap passthrough mode. (in other words, with
these patches in place, it is possible to use *all* the VF netdevs on
both ports of a dual port mellanox NIC for macvtap passthrough.)
These patches *do not* solve the problem of saving/setting the mac
address/vlan tag for *both* ports when using a dual port VF for PCI
device assignment with VFIO (see my RFC email from last week). Since I
learned from responses to the RFC that these "dual netdevs on a single
PCI PF/VF" cards are legacy, and all new Mellanox products have only
one netdev per PF/VF (like all the other SRIOV NICs on the market),
I've decided that it's not worth cluttering up libvirt's XML with
config for a dying breed. Since it's possible to support VFIO device
assignment on those cards when the VFs are in single port mode, I
think it is worthwhile to make that work, so that owners of the older
cards can get maximum value from their investment.
Laine Stump (7):
util: new function virNetDevGetPhysPortID()
util: Fix const'ness of 1st arg to virPCIGetNetName()
util: make virPCIGetNetName() more versatile
util: match phys_port_id when converting PF-netdev to/from VF-netdev
util: save the correct VF's info when using a dual port SRIOV NIC in
single port mode
util: restructure virNetDevReadNetConfig() to eliminate false error
logs
util: check for PF online status earlier in guest startup
src/libvirt_private.syms | 1 +
src/util/virhostdev.c | 137 ++++++++++++++++++++++++++------------
src/util/virnetdev.c | 159 ++++++++++++++++++++++++++++++++++----------
src/util/virnetdev.h | 5 ++
src/util/virnetdevmacvlan.c | 5 +-
src/util/virpci.c | 97 +++++++++++++++++++++++----
src/util/virpci.h | 9 ++-
7 files changed, 316 insertions(+), 97 deletions(-)
--
2.13.3
7 years, 3 months
[libvirt] [PATCH] apparmor, libvirt-qemu: Allow QEMU to gather information about available host resources.
by intrigeri
---
examples/apparmor/libvirt-qemu | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
index f462d7428c..dcfb1a5985 100644
--- a/examples/apparmor/libvirt-qemu
+++ b/examples/apparmor/libvirt-qemu
@@ -169,3 +169,9 @@
@{PROC}/device-tree/ r,
@{PROC}/device-tree/** r,
/sys/firmware/devicetree/** r,
+
+ # for gathering information about available host resources
+ /sys/devices/system/cpu/ r,
+ /sys/devices/system/node/ r,
+ /sys/devices/system/node/node[0-9]*/meminfo r,
+ /sys/module/vhost/parameters/max_mem_regions r,
--
2.14.0
7 years, 3 months
[libvirt] [PATCH] m4: workaround clang/glibc problem with isnan()
by Daniel P. Berrange
When building libvirt with clang we get bogus warnings about
'double' being promoted to 'long double' when calling isnan().
https://bugzilla.redhat.com/show_bug.cgi?id=1472437
Detect this broken isnan() / compiler combination and disable
the -Wdouble-promotion flag.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
m4/virt-compile-warnings.m4 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index fa0940fc6..7b56115ce 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -134,6 +134,24 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
[lv_cv_gcc_wlogical_op_equal_expr_broken=yes])
CFLAGS="$save_CFLAGS"])
+ AC_CACHE_CHECK([whether clang gives bogus warnings for -Wdouble-promotion],
+ [lv_cv_clang_double_promotion_broken], [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-O2 -Wdouble-promotion -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <math.h>
+ ]], [[
+ float f = 0.0;
+ return isnan(f);]])],
+ [lv_cv_clang_double_promotion_broken=no],
+ [lv_cv_clang_double_promotion_broken=yes])
+ CFLAGS="$save_CFLAGS"])
+
+ if test "$lv_cv_clang_double_promotion_broken" = "yes";
+ then
+ dontwarn="$dontwarn -Wdouble-promotion"
+ fi
+
# We might fundamentally need some of these disabled forever, but
# ideally we'd turn many of them on
dontwarn="$dontwarn -Wfloat-equal"
--
2.13.3
7 years, 3 months
[libvirt] [PATCH 0/5] Random pre-CAT cleanups
by Martin Kletzander
There are some patches that don't look related, but I found out they
are messed up when working on previous versions that got discarded.
Why not keep the cleanups, though, right?
Martin Kletzander (5):
virxml: Fix indentation
tests: Fix indentation in virfilewrapper.c
Move resctrl-related code from conf/capabilities to util/virresctrl
util: Make virResctrlGetCacheControlType() behave like other functions
util: Rename virResctrl to virResctrlInfo
include/libvirt/virterror.h | 1 +
src/Makefile.am | 1 +
src/conf/capabilities.c | 144 +++++-----------------------------
src/conf/capabilities.h | 26 +-----
src/libvirt_private.syms | 7 ++
src/util/virerror.c | 1 +
src/util/virresctrl.c | 187 ++++++++++++++++++++++++++++++++++++++++++++
src/util/virresctrl.h | 63 +++++++++++++++
src/util/virxml.c | 34 ++++----
tests/virfilewrapper.c | 4 +-
10 files changed, 302 insertions(+), 166 deletions(-)
create mode 100644 src/util/virresctrl.c
create mode 100644 src/util/virresctrl.h
--
2.14.0
7 years, 3 months
[libvirt] [PATCH] qemuBuildMemoryBackendStr: Handle one more corner case
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1458638
This code is so complicated because we allow enabling the same
bits at many places. Just like in this case: huge pages can be
enabled by global <hugepages/> element under <memoryBacking> or
on per <memory/> basis. To complicate things a bit more, users
are allowed to not specify any specific page size in which case
the default page size is used. And this is what is causing this
bug. If no page size is specified, @pagesize is keeping value of
zero throughout whole function. Therefore we need yet another
boolean to hold [use, don't use] information as we can't sue
@pagesize for that.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_command.c | 22 ++++++--
.../qemuxml2argv-hugepages-pages7.args | 35 ++++++++++++
.../qemuxml2argv-hugepages-pages7.xml | 65 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
.../qemuxml2xmlout-hugepages-pages7.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
6 files changed, 120 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-hugepages-pages7.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 604650596..68fc13706 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3250,8 +3250,6 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
virBitmapPtr autoNodeset,
bool force)
{
- virDomainHugePagePtr master_hugepage = NULL;
- virDomainHugePagePtr hugepage = NULL;
virDomainNumatuneMemMode mode;
const long system_page_size = virGetSystemPageSizeKB();
virDomainMemoryAccess memAccess = mem->access;
@@ -3264,6 +3262,13 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, mem->targetNode);
unsigned long long pagesize = mem->pagesize;
bool needHugepage = !!pagesize;
+ bool useHugepage = !!pagesize;
+
+ /* The difference between @needHugepage and @useHugepage is that the latter
+ * is true whenever huge page is defined for the current memory cell.
+ * Either directly, or transitively via global domain huge pages. The
+ * former is true whenever "memory-backend-file" must be used to satisfy
+ * @useHugepage. */
*backendProps = NULL;
*backendType = NULL;
@@ -3290,6 +3295,8 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT;
if (pagesize == 0) {
+ virDomainHugePagePtr master_hugepage = NULL;
+ virDomainHugePagePtr hugepage = NULL;
bool thisHugepage = false;
/* Find the huge page size we want to use */
@@ -3327,8 +3334,10 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
hugepage = master_hugepage;
}
- if (hugepage)
+ if (hugepage) {
pagesize = hugepage->size;
+ useHugepage = true;
+ }
}
if (pagesize == system_page_size) {
@@ -3336,17 +3345,18 @@ qemuBuildMemoryBackendStr(virJSONValuePtr *backendProps,
* of regular system page size, it's as if they
* hasn't specified any huge pages at all. */
pagesize = 0;
- hugepage = NULL;
+ needHugepage = false;
+ useHugepage = false;
}
if (!(props = virJSONValueNewObject()))
return -1;
- if (pagesize || mem->nvdimmPath || memAccess ||
+ if (useHugepage || mem->nvdimmPath || memAccess ||
def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_FILE) {
*backendType = "memory-backend-file";
- if (pagesize) {
+ if (useHugepage) {
if (qemuGetDomainHupageMemPath(def, cfg, pagesize, &memPath) < 0)
goto cleanup;
prealloc = true;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.args b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.args
new file mode 100644
index 000000000..e4229dce6
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.args
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name fedora \
+-S \
+-M pc-i440fx-2.3 \
+-m size=1048576k,slots=16,maxmem=1099511627776k \
+-smp 2,sockets=2,cores=1,threads=1 \
+-mem-prealloc \
+-mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \
+-numa node,nodeid=0,cpus=0-1,mem=1024 \
+-object memory-backend-file,id=memdimm0,prealloc=yes,\
+mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,\
+host-nodes=1-3,policy=bind \
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
+-object memory-backend-file,id=memdimm1,prealloc=yes,\
+mem-path=/dev/hugepages2M/libvirt/qemu/-1-fedora,share=no,size=536870912 \
+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
+-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
+-nographic \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-fedora/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-boot c \
+-usb \
+-drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,\
+id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,\
+id=virtio-disk0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.xml b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.xml
new file mode 100644
index 000000000..d75cf5afa
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages7.xml
@@ -0,0 +1,65 @@
+<domain type='qemu'>
+ <name>fedora</name>
+ <uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
+ <maxMemory slots='16' unit='KiB'>1099511627776</maxMemory>
+ <memory unit='KiB'>2621439</memory>
+ <currentMemory unit='KiB'>2621439</currentMemory>
+ <memoryBacking>
+ <hugepages/>
+ </memoryBacking>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu>
+ <numa>
+ <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/fedora.qcow2'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </memballoon>
+ <memory model='dimm'>
+ <source>
+ <nodemask>1-3</nodemask>
+ <pagesize unit='KiB'>1048576</pagesize>
+ </source>
+ <target>
+ <size unit='KiB'>1048576</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='0'/>
+ </memory>
+ <memory model='dimm' access='private'>
+ <target>
+ <size unit='KiB'>524287</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='1'/>
+ </memory>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 655c89bc3..993805231 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -844,6 +844,8 @@ mymain(void)
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-pages5", QEMU_CAPS_MEM_PATH);
DO_TEST("hugepages-pages6", NONE);
+ DO_TEST("hugepages-pages7", QEMU_CAPS_MEM_PATH,
+ QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-memaccess", QEMU_CAPS_OBJECT_MEMORY_FILE,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_DEVICE_PC_DIMM,
QEMU_CAPS_NUMA);
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-hugepages-pages7.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hugepages-pages7.xml
new file mode 120000
index 000000000..9aafa6e95
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-hugepages-pages7.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/qemuxml2argv-hugepages-pages7.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 0d549adec..311b71356 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -433,6 +433,7 @@ mymain(void)
DO_TEST("hugepages-pages4", NONE);
DO_TEST("hugepages-pages5", NONE);
DO_TEST("hugepages-pages6", NONE);
+ DO_TEST("hugepages-pages7", NONE);
DO_TEST("hugepages-shared", NONE);
DO_TEST("hugepages-memaccess", NONE);
DO_TEST("hugepages-memaccess2", NONE);
--
2.13.0
7 years, 3 months
[libvirt] [PATCH python] rpm: rename packages to python2-libvirt / python3-libvirt
by Daniel P. Berrange
This compiles with Fedora naming policy for python packages
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt-python.spec.in | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in
index ed9f2bd..e4fb17a 100644
--- a/libvirt-python.spec.in
+++ b/libvirt-python.spec.in
@@ -25,14 +25,32 @@ written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).
-%package -n libvirt-python3
+%package -n python2-libvirt
+Summary: The libvirt virtualization API python2 binding
+Url: http://libvirt.org
+License: LGPLv2+
+Group: Development/Libraries
+%{?python_provide:%python_provide python2-libvirt}
+Provides: libvirt-python = %{version}-%{release}
+Obsoletes: libvirt-python < %{version}-%{release}
+
+%description -n python2-libvirt
+The libvirt-python2 package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libvirt library to use the virtualization capabilities
+of recent versions of Linux (and other OSes).
+
+%package -n python3-libvirt
Summary: The libvirt virtualization API python3 binding
Url: http://libvirt.org
License: LGPLv2+
Group: Development/Libraries
+%{?python_provide:%python_provide python3-libvirt}
+Provides: libvirt-python3 = %{version}-%{release}
+Obsoletes: libvirt-python3 < %{version}-%{release}
-%description -n libvirt-python3
-The libvirt-python package contains a module that permits applications
+%description -n python3-libvirt
+The libvirt-python3 package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).
@@ -57,7 +75,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%{__python} setup.py test
%{__python3} setup.py test
-%files
+%files -n python2-libvirt
%defattr(-,root,root)
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
%{_libdir}/python2*/site-packages/libvirt.py*
@@ -66,7 +84,7 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%{_libdir}/python2*/site-packages/libvirtmod*
%{_libdir}/python2*/site-packages/*egg-info
-%files -n libvirt-python3
+%files -n python3-libvirt
%defattr(-,root,root)
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
%{_libdir}/python3*/site-packages/libvirt.py*
--
2.13.3
7 years, 3 months