Accepting request 1000755 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/1000755
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=359
This commit is contained in:
Dominique Leuenberger 2022-09-03 21:18:29 +00:00 committed by Git OBS Bridge
commit a483bd2240
27 changed files with 620 additions and 558 deletions

View File

@ -1,28 +1,44 @@
From 661298572a5499ccfafcd36d30d66d091a5be9b6 Mon Sep 17 00:00:00 2001
From 914c37ca3f0af956e69179d49e87e8390560c2b3 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Fri, 23 Mar 2018 17:41:51 -0600
Subject: [PATCH] libxl: add support for BlockResize API
Date: Tue, 5 Jul 2022 11:36:37 -0600
Subject: libxl: add support for BlockResize API
Add support in the libxl driver for the BlockResize API. Use libxl's
libxl_qemu_monitor_command API to issue the block_resize command to qemu.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Note: In its current form, this patch is not upstream material IMO. It uses
the unsupported libxl_qemu_monitor_command() API. Before it can be considered
upstream, we need an upstream solution in qemu and Xen. Bruce will work on
the qemu part. Once done we can consider how to do the Xen part. And only
after we have a supported blockresize API in Xen (libxl) can we consider
reworking this patch and submitting it to upstream libvirt.
---
src/libxl/libxl_driver.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
src/libxl/libxl_api_wrapper.h | 15 ++++++
src/libxl/libxl_driver.c | 90 +++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
Index: libvirt-8.6.0/src/libxl/libxl_driver.c
Index: libvirt-8.7.0/src/libxl/libxl_api_wrapper.h
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.6.0/src/libxl/libxl_driver.c
--- libvirt-8.7.0.orig/src/libxl/libxl_api_wrapper.h
+++ libvirt-8.7.0/src/libxl/libxl_api_wrapper.h
@@ -215,3 +215,18 @@ libxlSetMemoryTargetWrapper(libxl_ctx *c
return ret;
}
+
+static inline int
+libxlQemuMonitorCommandWrapper(libxl_ctx *ctx, uint32_t domid,
+ const char *command_line, char **output)
+{
+ int ret;
+
+#if LIBXL_API_VERSION < 0x041300
+ ret = libxl_qemu_monitor_command(ctx, domid, command_line, output);
+#else
+ ret = libxl_qemu_monitor_command(ctx, domid, command_line, output, NULL);
+#endif
+
+ return ret;
+}
Index: libvirt-8.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-8.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.7.0/src/libxl/libxl_driver.c
@@ -5257,6 +5257,95 @@ libxlDomainMemoryStats(virDomainPtr dom,
#undef LIBXL_SET_MEMSTAT
@ -127,26 +143,3 @@ Index: libvirt-8.6.0/src/libxl/libxl_driver.c
.domainGetJobInfo = libxlDomainGetJobInfo, /* 1.3.1 */
.domainGetJobStats = libxlDomainGetJobStats, /* 1.3.1 */
.domainMemoryStats = libxlDomainMemoryStats, /* 1.3.0 */
Index: libvirt-8.6.0/src/libxl/libxl_api_wrapper.h
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_api_wrapper.h
+++ libvirt-8.6.0/src/libxl/libxl_api_wrapper.h
@@ -215,3 +215,18 @@ libxlSetMemoryTargetWrapper(libxl_ctx *c
return ret;
}
+
+static inline int
+libxlQemuMonitorCommandWrapper(libxl_ctx *ctx, uint32_t domid,
+ const char *command_line, char **output)
+{
+ int ret;
+
+#if LIBXL_API_VERSION < 0x041300
+ ret = libxl_qemu_monitor_command(ctx, domid, command_line, output);
+#else
+ ret = libxl_qemu_monitor_command(ctx, domid, command_line, output, NULL);
+#endif
+
+ return ret;
+}

View File

@ -1,7 +1,7 @@
From 306f15c98fb5626f35f876b1f3fa39dee37e5810 Mon Sep 17 00:00:00 2001
From: Martin Kletzander <mkletzan@redhat.com>
Date: Sat, 11 Dec 2021 14:23:11 +0100
Subject: [PATCH] util: Don't spawn pkttyagent when stdin is not a tty
From be595e5e9e9bc8fa3fdd94358b1c92bd8b30b0eb Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:21:45 -0600
Subject: util: Don't spawn pkttyagent when stdin is not a tty
My idea was that running pkttyagent unconditionally, modulo checks that
pkttyagent itself does to make sure it does not fail, is not going to be an
@ -18,10 +18,10 @@ Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virpolkit.c | 3 +++
1 file changed, 3 insertions(+)
Index: libvirt-8.6.0/src/util/virpolkit.c
Index: libvirt-8.7.0/src/util/virpolkit.c
===================================================================
--- libvirt-8.6.0.orig/src/util/virpolkit.c
+++ libvirt-8.6.0/src/util/virpolkit.c
--- libvirt-8.7.0.orig/src/util/virpolkit.c
+++ libvirt-8.7.0/src/util/virpolkit.c
@@ -235,6 +235,9 @@ virPolkitAgentAvailable(void)
const char *termid = ctermid(NULL);
VIR_AUTOCLOSE fd = -1;

View File

@ -1,35 +0,0 @@
From c4e5f1a711931b95afe05c9077a4b55ba2b9141a Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 1 Aug 2022 15:20:38 -0400
Subject: [PATCH 1/2] lxc: containter: fix build with glibc 2.36
With glibc 2.36, sys/mount.h and linux/mount.h conflict:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in
linux/mount.h.
linux/fs.h isn't required here though. glibc sys/mount.h has had
MS_MOVE since 2.12 in 2010
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
(cherry picked from commit 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90)
---
src/lxc/lxc_container.c | 3 ---
1 file changed, 3 deletions(-)
Index: libvirt-8.6.0/src/lxc/lxc_container.c
===================================================================
--- libvirt-8.6.0.orig/src/lxc/lxc_container.c
+++ libvirt-8.6.0/src/lxc/lxc_container.c
@@ -33,9 +33,6 @@
/* Yes, we want linux private one, for _syscall2() macro */
#include <linux/unistd.h>
-/* For MS_MOVE */
-#include <linux/fs.h>
-
#if WITH_CAPNG
# include <cap-ng.h>
#endif

View File

@ -1,40 +0,0 @@
From 16476d6d80085649c1bc9ff2eb31b9effb5d45ef Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 1 Aug 2022 15:24:01 -0400
Subject: [PATCH 2/2] virfile: Fix build with glibc 2.36
With glibc 2.36, sys/mount.h and linux/mount.h conflict:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
virfile.c imports sys/mount.h and linux/fs.h, which pulls in
linux/mount.h.
Manually define the constants we need from linux/fs.h, like was
done in llvm:
https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
(cherry picked from commit c0d9adf220dc0d223330a7bac37b174132d330ba)
---
src/util/virfile.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: libvirt-8.6.0/src/util/virfile.c
===================================================================
--- libvirt-8.6.0.orig/src/util/virfile.c
+++ libvirt-8.6.0/src/util/virfile.c
@@ -71,7 +71,11 @@
# endif
# include <sys/ioctl.h>
# include <linux/cdrom.h>
-# include <linux/fs.h>
+/* These come from linux/fs.h, but that header conflicts with
+ * sys/mount.h on glibc 2.36+ */
+# define FS_IOC_GETFLAGS _IOR('f', 1, long)
+# define FS_IOC_SETFLAGS _IOW('f', 2, long)
+# define FS_NOCOW_FL 0x00800000
#endif
#if WITH_LIBATTR

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a81847c43ac9ade61b6f8447c44e8ba2cc544ab49bac5c0b18a5b105f5da3ae2
size 8905732

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAmLng4YACgkQymi+gBAI
TJy8BQ//QOfPFgQHE5kpPus8XUEOO3RRRdxZ22KQW+LLMnQczveC8M3IBMY9bIkj
xRpNuK+gEUR76Leg40ND7D1k7xt/FP7Z1ddve9KvuHH5KSAvVbdsL7IpGwT6apdq
hTYJtGJWgyDh6W/Tx4ZN33xbTFE4YSai/LPi9EBnZThlfjtSiCL5/AQHepZhf5LM
wbT01Ma9ZIKbfwPvgclpBzcvRjjOPMoJ1k8yjuI2bN8Ei8KysCueng63VXlrHvRc
WzO4vK9SkTzZ4wNZfPgoyPVQjhY1UVzLFppgM4dVmyOh6b86ZqMNiABtLaEC9+VO
5wUvPTI9LzvhWBdl8M8GBSNZKgfY0ZyYcrC3sEEYWiyZftho8bhzb9aDj+wVhYZY
J3agfQIFc82PuFdfA1dTVJBLdwVmQnhEiobfyN3ZwWFR4KdN2Z2iToVIL3asxPTo
KixaQzcwnDCYH1tYLR3bbRV7GmXtW7wd4wwQGEYD0gyTsqJaVlxRvnsN0PkkKbrl
EHjoWfGCFZ6f5WGhqC27FIMqJkxCskZ2wJIojki9bxbMGSRm3KV3XQ9HHjCL24Xs
moEiwJu2sJ/dWsT5ixjPPzpoTv70t7hQ69G82Y5PqQI0Da1c7+cXSuC1nCkYOame
Lg+KMnz92bNboqlrtxnZBOgu/lT1VnOjJNYA9UBWeFkIK2SsPeQ=
=E+tC
-----END PGP SIGNATURE-----

3
libvirt-8.7.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72e63a0f27911e339afd8269c6e8b029721893940edec11e09e471944f60e538
size 8937316

16
libvirt-8.7.0.tar.xz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAmMQguYACgkQymi+gBAI
TJw+uBAAnAkoDhPUE//FRXmFir04uK1KUbkfNxjNDBUf0FfWDB0rSy24WO8rKTHw
DLEo2KtMGrck2huy2r1YN4O5Vks6IEg1cCpqX+WIvVaofMSCkX5Eg1k4Z6/ZD6kE
SFh+dCbuAx+HF+LHuT2jybn+eE4FzxlM8blY+YPI8Klo6cz2yIFICZnLnwF+jGFj
mlJc3y+Shz7sQTtJGIvWaI+F39zSW0djdLiTsx/o2hk8e2BvMlgiKDh6WxCf4OEx
tPybRhsif6cxwT0chx7NdG2Hs9EKAk5zGYcIU0OglBcDDhj0UIocgjyqYvmNSU25
shnAD4uWz4TGDFuISDz9FnLslVY41iDgXIrzFWHUkknQ5y6G72I4Uy2pP9bj13g2
fzLKsutQEEke1/pods1KTftnMQeZYdgTuoSNbZxEAQKz65CAQq7wdSMKeE3xSTBM
4IXCWRjAblEDPykSQMUGr4XPBLMB6aQwLsJTsdyejZFu/S74maHq3u3449Nl+AI3
aQhR+vwyJE2XsvlNRtOtFyfNd8MOqy0MQPeinkWMomXzrAXJlPotii3k7OU2PxvU
mkmzqURxEFC8sg9vO3qwBEv5vTMnb4yr17ljt/cSVmTyNH0zANxY8PDGQcjQteI5
ZlUZrs3e8Pg6OGOPjZQWvqH8a040etUjUelxrjpRWprvm+6qsNM=
=TSbn
-----END PGP SIGNATURE-----

View File

@ -1,11 +1,17 @@
Add POWER8 v2.0 and v2.1 to cpu map XML
From a9d1dbe65bfbc90c39cc7719b7c9d51d24496931 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:23:13 -0600
Subject: Add POWER8 v2.0 and v2.1 to cpu map XML
From: <ro@suse.de>
---
src/cpu_map/ppc64_POWER8.xml | 2 ++
1 file changed, 2 insertions(+)
Index: libvirt-8.6.0/src/cpu_map/ppc64_POWER8.xml
Index: libvirt-8.7.0/src/cpu_map/ppc64_POWER8.xml
===================================================================
--- libvirt-8.6.0.orig/src/cpu_map/ppc64_POWER8.xml
+++ libvirt-8.6.0/src/cpu_map/ppc64_POWER8.xml
--- libvirt-8.7.0.orig/src/cpu_map/ppc64_POWER8.xml
+++ libvirt-8.7.0/src/cpu_map/ppc64_POWER8.xml
@@ -4,5 +4,7 @@
<pvr value='0x004b0000' mask='0xffff0000'/>
<pvr value='0x004c0000' mask='0xffff0000'/>

View File

@ -1,20 +1,72 @@
Index: libvirt-8.6.0/tools/virsh.c
From a2a8fd82918b5d3e8ac5c8fd6f2f97be1d4bdf11 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:58:35 -0600
Subject: libnetcontrol patch for libvirt
Originally authored by mt@suse.de
---
meson.build | 11 ++++-
meson_options.txt | 1 +
src/interface/interface_backend_netcf.c | 59 ++++++++++++++++++++++++-
src/interface/interface_driver.c | 9 +++-
src/interface/meson.build | 3 +-
tools/virsh.c | 2 +
6 files changed, 80 insertions(+), 5 deletions(-)
Index: libvirt-8.7.0/meson.build
===================================================================
--- libvirt-8.6.0.orig/tools/virsh.c
+++ libvirt-8.6.0/tools/virsh.c
@@ -545,6 +545,8 @@ virshShowVersion(vshControl *ctl G_GNUC_
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
vshPrint(ctl, " netcf");
+# elif defined(WITH_NETCONTROL)
+ vshPrint(ctl, " netcontrol");
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif
Index: libvirt-8.6.0/src/interface/interface_backend_netcf.c
--- libvirt-8.7.0.orig/meson.build
+++ libvirt-8.7.0/meson.build
@@ -1073,6 +1073,12 @@ else
netcf_dep = dependency('', required: false)
endif
+netcontrol_version = '0.2.0'
+netcontrol_dep = dependency('netcontrol', version: '>=' + netcontrol_version, required: get_option('netcontrol'))
+if netcontrol_dep.found()
+ conf.set('WITH_NETCONTROL', 1)
+endif
+
have_gnu_gettext_tools = false
if not get_option('nls').disabled()
have_gettext = cc.has_function('gettext')
@@ -1480,10 +1486,10 @@ elif get_option('driver_hyperv').enabled
error('openwsman is required for the Hyper-V driver')
endif
-if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or conf.has('WITH_NETCF'))
+if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or conf.has('WITH_NETCF') or netcontrol_dep.found())
conf.set('WITH_INTERFACE', 1)
elif get_option('driver_interface').enabled()
- error('Requested the Interface driver without netcf or udev and libvirtd support')
+ error('Requested the Interface driver without netcf, netcontrol or udev and libvirtd support')
endif
if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
@@ -2291,6 +2297,7 @@ libs_summary = {
'libssh2': libssh2_dep.found(),
'libutil': libutil_dep.found(),
'netcf': conf.has('WITH_NETCF'),
+ 'netcontrol': netcontrol_dep.found(),
'NLS': have_gnu_gettext_tools,
'numactl': numactl_dep.found(),
'openwsman': openwsman_dep.found(),
Index: libvirt-8.7.0/meson_options.txt
===================================================================
--- libvirt-8.6.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-8.6.0/src/interface/interface_backend_netcf.c
--- libvirt-8.7.0.orig/meson_options.txt
+++ libvirt-8.7.0/meson_options.txt
@@ -29,6 +29,7 @@ option('libpcap', type: 'feature', value
option('libssh', type: 'feature', value: 'auto', description: 'libssh support')
option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
option('netcf', type: 'feature', value: 'auto', description: 'netcf support')
+option('netcontrol', type: 'feature', value: 'auto', description: 'netcontrol support')
option('nls', type: 'feature', value: 'auto', description: 'nls support')
option('numactl', type: 'feature', value: 'auto', description: 'numactl support')
option('openwsman', type: 'feature', value: 'auto', description: 'openwsman support')
Index: libvirt-8.7.0/src/interface/interface_backend_netcf.c
===================================================================
--- libvirt-8.7.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-8.7.0/src/interface/interface_backend_netcf.c
@@ -21,7 +21,12 @@
#include <config.h>
@ -126,10 +178,10 @@ Index: libvirt-8.6.0/src/interface/interface_backend_netcf.c
if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0)
return -1;
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
Index: libvirt-8.6.0/src/interface/interface_driver.c
Index: libvirt-8.7.0/src/interface/interface_driver.c
===================================================================
--- libvirt-8.6.0.orig/src/interface/interface_driver.c
+++ libvirt-8.6.0/src/interface/interface_driver.c
--- libvirt-8.7.0.orig/src/interface/interface_driver.c
+++ libvirt-8.7.0/src/interface/interface_driver.c
@@ -30,8 +30,15 @@ interfaceRegister(void)
if (netcfIfaceRegister() == 0)
return 0;
@ -147,48 +199,10 @@ Index: libvirt-8.6.0/src/interface/interface_driver.c
if (udevIfaceRegister() == 0)
return 0;
#endif /* WITH_UDEV */
Index: libvirt-8.6.0/meson.build
Index: libvirt-8.7.0/src/interface/meson.build
===================================================================
--- libvirt-8.6.0.orig/meson.build
+++ libvirt-8.6.0/meson.build
@@ -1073,6 +1073,12 @@ else
netcf_dep = dependency('', required: false)
endif
+netcontrol_version = '0.2.0'
+netcontrol_dep = dependency('netcontrol', version: '>=' + netcontrol_version, required: get_option('netcontrol'))
+if netcontrol_dep.found()
+ conf.set('WITH_NETCONTROL', 1)
+endif
+
have_gnu_gettext_tools = false
if not get_option('nls').disabled()
have_gettext = cc.has_function('gettext')
@@ -1480,10 +1486,10 @@ elif get_option('driver_hyperv').enabled
error('openwsman is required for the Hyper-V driver')
endif
-if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or conf.has('WITH_NETCF'))
+if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or conf.has('WITH_NETCF') or netcontrol_dep.found())
conf.set('WITH_INTERFACE', 1)
elif get_option('driver_interface').enabled()
- error('Requested the Interface driver without netcf or udev and libvirtd support')
+ error('Requested the Interface driver without netcf, netcontrol or udev and libvirtd support')
endif
if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
@@ -2298,6 +2304,7 @@ libs_summary = {
'libssh2': libssh2_dep.found(),
'libutil': libutil_dep.found(),
'netcf': conf.has('WITH_NETCF'),
+ 'netcontrol': netcontrol_dep.found(),
'NLS': have_gnu_gettext_tools,
'numactl': numactl_dep.found(),
'openwsman': openwsman_dep.found(),
Index: libvirt-8.6.0/src/interface/meson.build
===================================================================
--- libvirt-8.6.0.orig/src/interface/meson.build
+++ libvirt-8.6.0/src/interface/meson.build
--- libvirt-8.7.0.orig/src/interface/meson.build
+++ libvirt-8.7.0/src/interface/meson.build
@@ -2,7 +2,7 @@ interface_driver_sources = [
'interface_driver.c',
]
@ -206,15 +220,16 @@ Index: libvirt-8.6.0/src/interface/meson.build
udev_dep,
],
'link_args': [
Index: libvirt-8.6.0/meson_options.txt
Index: libvirt-8.7.0/tools/virsh.c
===================================================================
--- libvirt-8.6.0.orig/meson_options.txt
+++ libvirt-8.6.0/meson_options.txt
@@ -29,6 +29,7 @@ option('libpcap', type: 'feature', value
option('libssh', type: 'feature', value: 'auto', description: 'libssh support')
option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
option('netcf', type: 'feature', value: 'auto', description: 'netcf support')
+option('netcontrol', type: 'feature', value: 'auto', description: 'netcontrol support')
option('nls', type: 'feature', value: 'auto', description: 'nls support')
option('numactl', type: 'feature', value: 'auto', description: 'numactl support')
option('openwsman', type: 'feature', value: 'auto', description: 'openwsman support')
--- libvirt-8.7.0.orig/tools/virsh.c
+++ libvirt-8.7.0/tools/virsh.c
@@ -545,6 +545,8 @@ virshShowVersion(vshControl *ctl G_GNUC_
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
vshPrint(ctl, " netcf");
+# elif defined(WITH_NETCONTROL)
+ vshPrint(ctl, " netcontrol");
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Sep 1 20:37:17 UTC 2022 - James Fehlig <jfehlig@suse.com>
- Update to libvirt 8.7.0
- jsc#PED-620, jsc#PED-1540
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html#v8-7-0-2022-09-01
- Dropped patches:
9493c9b7-lxc-containter-fix-build-with-glibc-2.36.patch,
c0d9adf2-virfile-Fix-build-with-glibc-2.36.patch
-------------------------------------------------------------------
Wed Aug 24 23:07:12 UTC 2022 - James Fehlig <jfehlig@suse.com>
- spec: Suppress error messages about nonexistent or unreadable
files from grep
-------------------------------------------------------------------
Fri Aug 19 18:43:03 UTC 2022 - James Fehlig <jfehlig@suse.com>

View File

@ -158,7 +158,7 @@
Name: libvirt
URL: http://libvirt.org/
Version: 8.6.0
Version: 8.7.0
Release: 0
Summary: Library providing a virtualization API
License: LGPL-2.1-or-later
@ -300,8 +300,6 @@ Source6: libvirtd-relocation-server.xml
Source99: baselibs.conf
Source100: %{name}-rpmlintrc
# Upstream patches
Patch0: 9493c9b7-lxc-containter-fix-build-with-glibc-2.36.patch
Patch1: c0d9adf2-virfile-Fix-build-with-glibc-2.36.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@ -1169,7 +1167,7 @@ if test "$DISABLE_RESTART_ON_UPDATE" != yes -a \
"$DISABLE_RESTART_ON_UPDATE" != 1; then
# See if user has previously modified their install to
# tell libvirtd to use --listen
if grep -q -E '^LIBVIRTD_ARGS=.*--listen' %{_sysconfdir}/sysconfig/libvirtd; then
if grep -q -s -E '^LIBVIRTD_ARGS=.*--listen' %{_sysconfdir}/sysconfig/libvirtd; then
# Keep honouring --listen and *not* use systemd socket activation.
# Switching things might confuse management tools that expect the old
# style libvirtd

View File

@ -1,17 +1,21 @@
commit 3ac6e50943a775c545aa7d4e4bde5fcb8a163b64
Author: Jim Fehlig <jfehlig@suse.com>
Date: Mon Jun 23 15:51:20 2014 -0600
libxl: support domainReset
From 02cd96b46167b2b9c27a388ec25d4ffdae6508ba Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:07:05 -0600
Subject: libxl: support domainReset
Currently, libxl_send_trigger() does not implement the LIBXL_TRIGGER_RESET
option, but domainReset can be implemented in the libxl driver by
forcibly destroying the domain and starting it again.
Index: libvirt-8.6.0/src/libxl/libxl_driver.c
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_driver.c | 58 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
Index: libvirt-8.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.6.0/src/libxl/libxl_driver.c
--- libvirt-8.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.7.0/src/libxl/libxl_driver.c
@@ -1354,6 +1354,63 @@ libxlDomainReboot(virDomainPtr dom, unsi
}

View File

@ -1,12 +1,19 @@
https://bugzilla.novell.com/show_bug.cgi?id=879425
---
src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
From 9b37c98cf768eb02afb384522a72ec36850876bf Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:27:47 -0600
Subject: libxl: Allow setting disk cache mode
Index: libvirt-8.6.0/src/libxl/libxl_conf.c
https://bugzilla.novell.com/show_bug.cgi?id=879425
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_conf.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
Index: libvirt-8.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.6.0/src/libxl/libxl_conf.c
--- libvirt-8.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.7.0/src/libxl/libxl_conf.c
@@ -941,6 +941,28 @@ libxlDiskSetDiscard(libxl_device_disk *x
}
}

View File

@ -1,25 +1,24 @@
From 6409e928eb4c2287dca59b139650fab77ea99fb8 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Fri, 9 May 2014 11:55:31 -0600
Subject: [PATCH] libvirt: set migration constraints from cmdline
From 3221868c5ca0be83d4e5f9a9f489e73d5b509a6e Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:26:24 -0600
Subject: libvirt: set migration constraints from cmdline
References: fate#316614
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
include/libvirt/libvirt-domain.h | 25 +++++++++++++++++++++++++
src/libxl/libxl_driver.c | 17 ++++++++++++++++-
src/libxl/libxl_migration.c | 29 +++++++++++++++++++++++++----
src/libxl/libxl_migration.h | 14 +++++++++++++-
tools/virsh-domain.c | 38 ++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 8 ++++++++
6 files changed, 125 insertions(+), 6 deletions(-)
docs/manpages/virsh.rst | 7 +++++
include/libvirt/libvirt-domain.h | 25 +++++++++++++++
src/libxl/libxl_driver.c | 16 ++++++++--
src/libxl/libxl_migration.c | 54 ++++++++++++++++++++++----------
src/libxl/libxl_migration.h | 14 +++++++--
tools/virsh-domain.c | 29 +++++++++++++++++
6 files changed, 124 insertions(+), 21 deletions(-)
Index: libvirt-8.6.0/docs/manpages/virsh.rst
Index: libvirt-8.7.0/docs/manpages/virsh.rst
===================================================================
--- libvirt-8.6.0.orig/docs/manpages/virsh.rst
+++ libvirt-8.6.0/docs/manpages/virsh.rst
--- libvirt-8.7.0.orig/docs/manpages/virsh.rst
+++ libvirt-8.7.0/docs/manpages/virsh.rst
@@ -3297,6 +3297,7 @@ migrate
[--parallel [--parallel-connections connections]]
[--bandwidth bandwidth] [--tls-destination hostname]
@ -41,10 +40,10 @@ Index: libvirt-8.6.0/docs/manpages/virsh.rst
Running migration can be canceled by interrupting virsh (usually using
``Ctrl-C``) or by ``domjobabort`` command sent from another virsh instance.
Index: libvirt-8.6.0/include/libvirt/libvirt-domain.h
Index: libvirt-8.7.0/include/libvirt/libvirt-domain.h
===================================================================
--- libvirt-8.6.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-8.6.0/include/libvirt/libvirt-domain.h
--- libvirt-8.7.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-8.7.0/include/libvirt/libvirt-domain.h
@@ -1367,6 +1367,31 @@ typedef enum {
*/
# define VIR_MIGRATE_PARAM_TLS_DESTINATION "tls.destination"
@ -77,10 +76,10 @@ Index: libvirt-8.6.0/include/libvirt/libvirt-domain.h
/* Domain migration. */
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
unsigned long flags, const char *dname,
Index: libvirt-8.6.0/src/libxl/libxl_driver.c
Index: libvirt-8.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.6.0/src/libxl/libxl_driver.c
--- libvirt-8.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-8.7.0/src/libxl/libxl_driver.c
@@ -6002,6 +6002,9 @@ libxlDomainMigratePerform3Params(virDoma
const char *dname = NULL;
const char *uri = NULL;
@ -121,10 +120,10 @@ Index: libvirt-8.6.0/src/libxl/libxl_driver.c
goto cleanup;
}
Index: libvirt-8.6.0/src/libxl/libxl_migration.c
Index: libvirt-8.7.0/src/libxl/libxl_migration.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_migration.c
+++ libvirt-8.6.0/src/libxl/libxl_migration.c
--- libvirt-8.7.0.orig/src/libxl/libxl_migration.c
+++ libvirt-8.7.0/src/libxl/libxl_migration.c
@@ -329,18 +329,38 @@ libxlMigrateDstReceive(virNetSocket *soc
static int
libxlDoMigrateSrcSend(libxlDriverPrivate *driver,
@ -285,10 +284,10 @@ Index: libvirt-8.6.0/src/libxl/libxl_migration.c
virObjectLock(vm);
if (ret == 0) {
Index: libvirt-8.6.0/src/libxl/libxl_migration.h
Index: libvirt-8.7.0/src/libxl/libxl_migration.h
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_migration.h
+++ libvirt-8.6.0/src/libxl/libxl_migration.h
--- libvirt-8.7.0.orig/src/libxl/libxl_migration.h
+++ libvirt-8.7.0/src/libxl/libxl_migration.h
@@ -35,6 +35,9 @@
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
@ -331,11 +330,11 @@ Index: libvirt-8.6.0/src/libxl/libxl_migration.h
virDomainPtr
libxlDomainMigrationDstFinish(virConnectPtr dconn,
Index: libvirt-8.6.0/tools/virsh-domain.c
Index: libvirt-8.7.0/tools/virsh-domain.c
===================================================================
--- libvirt-8.6.0.orig/tools/virsh-domain.c
+++ libvirt-8.6.0/tools/virsh-domain.c
@@ -11024,6 +11024,18 @@ static const vshCmdOptDef opts_migrate[]
--- libvirt-8.7.0.orig/tools/virsh-domain.c
+++ libvirt-8.7.0/tools/virsh-domain.c
@@ -11026,6 +11026,18 @@ static const vshCmdOptDef opts_migrate[]
.completer = virshCompleteEmpty,
.help = N_("override the destination host name used for TLS verification")
},
@ -354,7 +353,7 @@ Index: libvirt-8.6.0/tools/virsh-domain.c
{.name = NULL}
};
@@ -11044,6 +11056,7 @@ doMigrate(void *opaque)
@@ -11046,6 +11058,7 @@ doMigrate(void *opaque)
unsigned long long ullOpt = 0;
int rv;
virConnectPtr dconn = data->dconn;
@ -362,7 +361,7 @@ Index: libvirt-8.6.0/tools/virsh-domain.c
#ifndef WIN32
sigset_t sigmask, oldsigmask;
@@ -11174,6 +11187,22 @@ doMigrate(void *opaque)
@@ -11176,6 +11189,22 @@ doMigrate(void *opaque)
goto save_error;
}

View File

@ -1,16 +1,22 @@
libxl: set script field of libxl_device_disk
From 1f6dc6fbf1a0741edb6635a1798d1ac14802f8eb Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:54:34 -0600
Subject: libxl: set script field of libxl_device_disk
Add a hack to the libvirt libxl driver to set
libxl_device_disk->script when the disk configuration starts
with some well-known Xen external block scripts: dmmd, drbd,
and npiv.
For more details, see bsc#954872 and FATE#319810
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_conf.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Index: libvirt-8.6.0/src/libxl/libxl_conf.c
Index: libvirt-8.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.6.0/src/libxl/libxl_conf.c
--- libvirt-8.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.7.0/src/libxl/libxl_conf.c
@@ -942,6 +942,20 @@ libxlDiskSetDiscard(libxl_device_disk *x
}

View File

@ -1,23 +1,25 @@
From 3bff82b57564ffc1fe4fff23f9d121fcf410dd5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Wed, 25 Nov 2015 11:43:56 +0100
Subject: [PATCH] Wait for udev events to be handled after removing veth
From 7d83ea171dc86bdec171e14ffdbde8ae7e06fc7a Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 13:50:31 -0600
Subject: Wait for udev events to be handled after removing veth
As per http://www.redhat.com/archives/libvir-list/2013-July/msg01279.html,
wait for udev events to be handled after removing a virtual NIC.
Any udev rule associated to NIC destroy could happen to run with a new
device with the same name that is being created.
From: <cbosdonnat@suse.com>
---
src/lxc/lxc_controller.c | 1 +
src/lxc/lxc_driver.c | 2 ++
src/lxc/lxc_process.c | 1 +
3 files changed, 4 insertions(+)
Index: libvirt-8.6.0/src/lxc/lxc_controller.c
Index: libvirt-8.7.0/src/lxc/lxc_controller.c
===================================================================
--- libvirt-8.6.0.orig/src/lxc/lxc_controller.c
+++ libvirt-8.6.0/src/lxc/lxc_controller.c
@@ -1995,6 +1995,7 @@ static int virLXCControllerDeleteInterfa
--- libvirt-8.7.0.orig/src/lxc/lxc_controller.c
+++ libvirt-8.7.0/src/lxc/lxc_controller.c
@@ -1997,6 +1997,7 @@ static int virLXCControllerDeleteInterfa
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
ret = -1;
}
@ -25,11 +27,11 @@ Index: libvirt-8.6.0/src/lxc/lxc_controller.c
return ret;
}
Index: libvirt-8.6.0/src/lxc/lxc_driver.c
Index: libvirt-8.7.0/src/lxc/lxc_driver.c
===================================================================
--- libvirt-8.6.0.orig/src/lxc/lxc_driver.c
+++ libvirt-8.6.0/src/lxc/lxc_driver.c
@@ -3505,6 +3505,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive
--- libvirt-8.7.0.orig/src/lxc/lxc_driver.c
+++ libvirt-8.7.0/src/lxc/lxc_driver.c
@@ -3507,6 +3507,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive
case VIR_DOMAIN_NET_TYPE_NETWORK:
case VIR_DOMAIN_NET_TYPE_ETHERNET:
ignore_value(virNetDevVethDelete(veth));
@ -37,7 +39,7 @@ Index: libvirt-8.6.0/src/lxc/lxc_driver.c
break;
case VIR_DOMAIN_NET_TYPE_DIRECT:
@@ -3944,6 +3945,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
@@ -3948,6 +3949,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
virDomainAuditNet(vm, detach, NULL, "detach", false);
goto cleanup;
}
@ -45,10 +47,10 @@ Index: libvirt-8.6.0/src/lxc/lxc_driver.c
break;
/* It'd be nice to support this, but with macvlan
Index: libvirt-8.6.0/src/lxc/lxc_process.c
Index: libvirt-8.7.0/src/lxc/lxc_process.c
===================================================================
--- libvirt-8.6.0.orig/src/lxc/lxc_process.c
+++ libvirt-8.6.0/src/lxc/lxc_process.c
--- libvirt-8.7.0.orig/src/lxc/lxc_process.c
+++ libvirt-8.7.0/src/lxc/lxc_process.c
@@ -226,6 +226,7 @@ static void virLXCProcessCleanup(virLXCD
VIR_WARN("Unable to release network device '%s'", NULLSTR(iface->ifname));
}

View File

@ -1,7 +1,7 @@
From 15c7f9a6e7678238ef06f5d805984addb6f8bcdb Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Thu, 15 Dec 2016 10:17:05 +0100
Subject: [PATCH] network: don't use dhcp-authoritative on static networks
From ec5427d1007477b746dde3ba24b7951a6e14a3d7 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:19:41 -0600
Subject: network: don't use dhcp-authoritative on static networks
"Static" DHCP networks are those where no dynamic DHCP range is
defined, only a list of host entries is used to serve permanent
@ -17,11 +17,11 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 -
2 files changed, 8 insertions(+), 2 deletions(-)
Index: libvirt-8.6.0/src/network/bridge_driver.c
Index: libvirt-8.7.0/src/network/bridge_driver.c
===================================================================
--- libvirt-8.6.0.orig/src/network/bridge_driver.c
+++ libvirt-8.6.0/src/network/bridge_driver.c
@@ -1080,7 +1080,14 @@ networkDnsmasqConfDHCP(virBuffer *buf,
--- libvirt-8.7.0.orig/src/network/bridge_driver.c
+++ libvirt-8.7.0/src/network/bridge_driver.c
@@ -1043,7 +1043,14 @@ networkDnsmasqConfDHCP(virBuffer *buf,
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
if (ipdef->nranges || ipdef->nhosts) {
virBufferAddLit(buf, "dhcp-no-override\n");
@ -37,10 +37,10 @@ Index: libvirt-8.6.0/src/network/bridge_driver.c
}
if (ipdef->bootfile) {
Index: libvirt-8.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
Index: libvirt-8.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
===================================================================
--- libvirt-8.6.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-8.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
--- libvirt-8.7.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-8.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
@@ -10,7 +10,6 @@ bind-dynamic
interface=virbr1
dhcp-range=192.168.122.1,static

View File

@ -1,11 +1,19 @@
Canonicalize hostarch name ppc64le to ppc64
From 71a726ca84535a6bfb2ad4795c6d499085df9594 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:24:54 -0600
Subject: Canonicalize hostarch name ppc64le to ppc64
See bnc#894956
Index: libvirt-8.6.0/src/util/virarch.c
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/util/virarch.c | 2 ++
1 file changed, 2 insertions(+)
Index: libvirt-8.7.0/src/util/virarch.c
===================================================================
--- libvirt-8.6.0.orig/src/util/virarch.c
+++ libvirt-8.6.0/src/util/virarch.c
--- libvirt-8.7.0.orig/src/util/virarch.c
+++ libvirt-8.7.0/src/util/virarch.c
@@ -222,6 +222,8 @@ virArch virArchFromHost(void)
arch = VIR_ARCH_X86_64;
} else if (STREQ(ut.machine, "arm64")) {

View File

@ -1,7 +1,17 @@
Index: libvirt-8.6.0/src/security/apparmor/libvirt-qemu
From 99d654438cb259bee70d23363b2d5aefee830c7e Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:56:28 -0600
Subject: apparmor: Add rule allowing qemu to write screenshots
Not sure who added this patch. See bug#904426 for possible suspects.
---
src/security/apparmor/libvirt-qemu | 3 +++
1 file changed, 3 insertions(+)
Index: libvirt-8.7.0/src/security/apparmor/libvirt-qemu
===================================================================
--- libvirt-8.6.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-8.6.0/src/security/apparmor/libvirt-qemu
--- libvirt-8.7.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-8.7.0/src/security/apparmor/libvirt-qemu
@@ -253,3 +253,6 @@
# required for QEMU accessing UEFI nvram variables
owner /var/lib/libvirt/qemu/nvram/*_VARS.fd rwk,

View File

@ -1,9 +1,17 @@
Adjust libvirt-guests service to conform to SUSE standards
From b447f2a3042a206bebb897874af20fdd7d897347 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:41:58 -0600
Subject: Adjust libvirt-guests service to conform to SUSE standards
Index: libvirt-8.6.0/tools/libvirt-guests.sh.in
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
tools/libvirt-guests.sh.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: libvirt-8.7.0/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-8.6.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-8.6.0/tools/libvirt-guests.sh.in
--- libvirt-8.7.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-8.7.0/tools/libvirt-guests.sh.in
@@ -20,10 +20,6 @@ sysconfdir="@sysconfdir@"
localstatedir="@localstatedir@"
libvirtd="@sbindir@"/libvirtd

View File

@ -1,25 +1,23 @@
Disable TLS by default
From 8c89cd65098dde736ff86e90283a8728dfed96d8 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:40:27 -0600
Subject: Disable TLS by default
On SUSE distros, the default is for libvirtd to listen only on the
Unix Domain Socket. The libvirt client still provides remote access
via a SSH tunnel.
Index: libvirt-8.6.0/src/remote/remote_daemon_config.c
===================================================================
--- libvirt-8.6.0.orig/src/remote/remote_daemon_config.c
+++ libvirt-8.6.0/src/remote/remote_daemon_config.c
@@ -97,7 +97,7 @@ daemonConfigNew(bool privileged G_GNUC_U
#ifdef WITH_IP
# ifdef LIBVIRTD
- data->listen_tls = true; /* Only honoured if --listen is set */
+ data->listen_tls = false; /* Only honoured if --listen is set */
# else /* ! LIBVIRTD */
data->listen_tls = false; /* Always honoured, --listen doesn't exist. */
# endif /* ! LIBVIRTD */
Index: libvirt-8.6.0/src/remote/libvirtd.conf.in
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/remote/libvirtd.conf.in | 4 ++--
src/remote/remote_daemon_config.c | 2 +-
src/remote/test_libvirtd.aug.in | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Index: libvirt-8.7.0/src/remote/libvirtd.conf.in
===================================================================
--- libvirt-8.6.0.orig/src/remote/libvirtd.conf.in
+++ libvirt-8.6.0/src/remote/libvirtd.conf.in
--- libvirt-8.7.0.orig/src/remote/libvirtd.conf.in
+++ libvirt-8.7.0/src/remote/libvirtd.conf.in
@@ -19,8 +19,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -31,10 +29,23 @@ Index: libvirt-8.6.0/src/remote/libvirtd.conf.in
# Listen for unencrypted TCP connections on the public TCP/IP port.
#
Index: libvirt-8.6.0/src/remote/test_libvirtd.aug.in
Index: libvirt-8.7.0/src/remote/remote_daemon_config.c
===================================================================
--- libvirt-8.6.0.orig/src/remote/test_libvirtd.aug.in
+++ libvirt-8.6.0/src/remote/test_libvirtd.aug.in
--- libvirt-8.7.0.orig/src/remote/remote_daemon_config.c
+++ libvirt-8.7.0/src/remote/remote_daemon_config.c
@@ -97,7 +97,7 @@ daemonConfigNew(bool privileged G_GNUC_U
#ifdef WITH_IP
# ifdef LIBVIRTD
- data->listen_tls = true; /* Only honoured if --listen is set */
+ data->listen_tls = false; /* Only honoured if --listen is set */
# else /* ! LIBVIRTD */
data->listen_tls = false; /* Always honoured, --listen doesn't exist. */
# endif /* ! LIBVIRTD */
Index: libvirt-8.7.0/src/remote/test_libvirtd.aug.in
===================================================================
--- libvirt-8.7.0.orig/src/remote/test_libvirtd.aug.in
+++ libvirt-8.7.0/src/remote/test_libvirtd.aug.in
@@ -3,7 +3,7 @@ module Test_@DAEMON_NAME@ =
test @DAEMON_NAME_UC@.lns get conf =

View File

@ -1,4 +1,7 @@
libxl: disable autoballooning
From a844460158d37bc6f984384f8edb9d369208e390 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 13:51:37 -0600
Subject: libxl: disable autoballooning
Xen 4.12 introduced a CONFIG_DOM0_MEM option, which our xen package uses
to configure dom0 with a sensible initial memory value and disables
@ -6,10 +9,17 @@ autoballooning. This patch changes libvirt to also disable autoballooning
by default. It can only be enabled with the 'autoballoon' setting in
libxl.conf. See jsc#SLE-3059 for more details.
Index: libvirt-8.6.0/src/libxl/libxl.conf
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl.conf | 9 ++++-----
src/libxl/libxl_conf.c | 16 +++-------------
src/libxl/test_libvirtd_libxl.aug.in | 2 +-
3 files changed, 8 insertions(+), 19 deletions(-)
Index: libvirt-8.7.0/src/libxl/libxl.conf
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl.conf
+++ libvirt-8.6.0/src/libxl/libxl.conf
--- libvirt-8.7.0.orig/src/libxl/libxl.conf
+++ libvirt-8.7.0/src/libxl/libxl.conf
@@ -4,12 +4,11 @@
# Enable autoballooning of domain0
@ -27,11 +37,11 @@ Index: libvirt-8.6.0/src/libxl/libxl.conf
# In order to prevent accidentally starting two domains that
Index: libvirt-8.6.0/src/libxl/libxl_conf.c
Index: libvirt-8.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.6.0/src/libxl/libxl_conf.c
@@ -1731,15 +1731,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa
--- libvirt-8.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.7.0/src/libxl/libxl_conf.c
@@ -1737,15 +1737,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa
/*
* Get domain0 autoballoon configuration. Honor user-specified
* setting in libxl.conf first. If not specified, autoballooning
@ -48,7 +58,7 @@ Index: libvirt-8.6.0/src/libxl/libxl_conf.c
int res;
res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon);
@@ -1748,15 +1745,8 @@ libxlGetAutoballoonConf(libxlDriverConfi
@@ -1754,15 +1751,8 @@ libxlGetAutoballoonConf(libxlDriverConfi
else if (res == 1)
return 0;
@ -66,10 +76,10 @@ Index: libvirt-8.6.0/src/libxl/libxl_conf.c
return 0;
}
Index: libvirt-8.6.0/src/libxl/test_libvirtd_libxl.aug.in
Index: libvirt-8.7.0/src/libxl/test_libvirtd_libxl.aug.in
===================================================================
--- libvirt-8.6.0.orig/src/libxl/test_libvirtd_libxl.aug.in
+++ libvirt-8.6.0/src/libxl/test_libvirtd_libxl.aug.in
--- libvirt-8.7.0.orig/src/libxl/test_libvirtd_libxl.aug.in
+++ libvirt-8.7.0/src/libxl/test_libvirtd_libxl.aug.in
@@ -2,7 +2,7 @@ module Test_libvirtd_libxl =
@CONFIG@

View File

@ -1,4 +1,7 @@
SUSE adjustments to qemu.conf
From 700dcddea3d9940e45b6888ee60ebf8879f39ce1 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:43:19 -0600
Subject: SUSE adjustments to qemu.conf
This patch contains SUSE-specific adjustments to the upstream
qemu.conf configuration file. In the future, it might make
@ -7,35 +10,17 @@ suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch,
etc.), but for now they are all lumped together in this
single patch.
Index: libvirt-8.6.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/qemu/qemu_conf.c
+++ libvirt-8.6.0/src/qemu/qemu_conf.c
@@ -256,7 +256,7 @@ virQEMUDriverConfig *virQEMUDriverConfig
cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER);
cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON);
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/qemu/qemu.conf.in | 32 ++++++++++++++++++++++++------
src/qemu/qemu_conf.c | 2 +-
src/qemu/test_libvirtd_qemu.aug.in | 1 +
3 files changed, 28 insertions(+), 7 deletions(-)
- cfg->securityDefaultConfined = true;
+ cfg->securityDefaultConfined = false;
cfg->securityRequireConfined = false;
cfg->keepAliveInterval = 5;
Index: libvirt-8.6.0/src/qemu/test_libvirtd_qemu.aug.in
Index: libvirt-8.7.0/src/qemu/qemu.conf.in
===================================================================
--- libvirt-8.6.0.orig/src/qemu/test_libvirtd_qemu.aug.in
+++ libvirt-8.6.0/src/qemu/test_libvirtd_qemu.aug.in
@@ -45,6 +45,7 @@ module Test_libvirtd_qemu =
{ "remote_websocket_port_min" = "5700" }
{ "remote_websocket_port_max" = "65535" }
{ "security_driver" = "selinux" }
+{ "security_driver" = "apparmor" }
{ "security_default_confined" = "1" }
{ "security_require_confined" = "1" }
{ "user" = "@QEMU_USER@" }
Index: libvirt-8.6.0/src/qemu/qemu.conf.in
===================================================================
--- libvirt-8.6.0.orig/src/qemu/qemu.conf.in
+++ libvirt-8.6.0/src/qemu/qemu.conf.in
--- libvirt-8.7.0.orig/src/qemu/qemu.conf.in
+++ libvirt-8.7.0/src/qemu/qemu.conf.in
@@ -491,10 +491,19 @@
# isolation, but it cannot appear in a list of drivers.
#
@ -85,3 +70,28 @@ Index: libvirt-8.6.0/src/qemu/qemu.conf.in
#
#lock_manager = "lockd"
Index: libvirt-8.7.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-8.7.0.orig/src/qemu/qemu_conf.c
+++ libvirt-8.7.0/src/qemu/qemu_conf.c
@@ -256,7 +256,7 @@ virQEMUDriverConfig *virQEMUDriverConfig
cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER);
cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON);
- cfg->securityDefaultConfined = true;
+ cfg->securityDefaultConfined = false;
cfg->securityRequireConfined = false;
cfg->keepAliveInterval = 5;
Index: libvirt-8.7.0/src/qemu/test_libvirtd_qemu.aug.in
===================================================================
--- libvirt-8.7.0.orig/src/qemu/test_libvirtd_qemu.aug.in
+++ libvirt-8.7.0/src/qemu/test_libvirtd_qemu.aug.in
@@ -45,6 +45,7 @@ module Test_libvirtd_qemu =
{ "remote_websocket_port_min" = "5700" }
{ "remote_websocket_port_max" = "65535" }
{ "security_driver" = "selinux" }
+{ "security_driver" = "apparmor" }
{ "security_default_confined" = "1" }
{ "security_require_confined" = "1" }
{ "user" = "@QEMU_USER@" }

View File

@ -1,64 +1,25 @@
Adjust paths of OVMF firmwares on SUSE distros
From 45b03e3c0e3dcf8f75083538b36238e03907e3fb Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 11:44:36 -0600
Subject: Adjust paths of OVMF firmwares on SUSE distros
Note: SLE15 SP2 and newer support automatic firmware selection. Firmwares
advertised and used by libvirt are automatically detected. Until upstream
removes the old DEFAULT_LOADER_NVRAM approach and associated code, this
patch will stay.
Index: libvirt-8.6.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/qemu/qemu_conf.c
+++ libvirt-8.6.0/src/qemu/qemu_conf.c
@@ -82,10 +82,9 @@ VIR_ONCE_GLOBAL_INIT(virQEMUConfig);
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/qemu/qemu.conf.in | 7 +++----
src/qemu/qemu_conf.c | 7 +++----
src/qemu/test_libvirtd_qemu.aug.in | 7 +++----
src/security/virt-aa-helper.c | 3 ++-
4 files changed, 11 insertions(+), 13 deletions(-)
#ifndef DEFAULT_LOADER_NVRAM
# define DEFAULT_LOADER_NVRAM \
- "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd:" \
- "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd:" \
- "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd:" \
- "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd"
+ "/usr/share/qemu/ovmf-x86_64-ms-4m-code.bin:/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin:" \
+ "/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin:" \
+ "/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin"
#endif
Index: libvirt-8.6.0/src/security/virt-aa-helper.c
Index: libvirt-8.7.0/src/qemu/qemu.conf.in
===================================================================
--- libvirt-8.6.0.orig/src/security/virt-aa-helper.c
+++ libvirt-8.6.0/src/security/virt-aa-helper.c
@@ -480,7 +480,8 @@ valid_path(const char *path, const bool
"/usr/share/ovmf/", /* for OVMF images */
"/usr/share/AAVMF/", /* for AAVMF images */
"/usr/share/qemu-efi/", /* for AAVMF images */
- "/usr/share/qemu-efi-aarch64/" /* for AAVMF images */
+ "/usr/share/qemu-efi-aarch64/", /* for AAVMF images */
+ "/usr/share/qemu/" /* SUSE path for OVMF and AAVMF images */
};
/* override the above with these */
const char * const override[] = {
Index: libvirt-8.6.0/src/qemu/test_libvirtd_qemu.aug.in
===================================================================
--- libvirt-8.6.0.orig/src/qemu/test_libvirtd_qemu.aug.in
+++ libvirt-8.6.0/src/qemu/test_libvirtd_qemu.aug.in
@@ -96,10 +96,9 @@ module Test_libvirtd_qemu =
{ "migration_port_max" = "49215" }
{ "log_timestamp" = "0" }
{ "nvram"
- { "1" = "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd" }
- { "2" = "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd" }
- { "3" = "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd" }
- { "4" = "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd" }
+ { "1" = "/usr/share/qemu/ovmf-x86_64-ms-4m-code.bin:/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin" }
+ { "2" = "/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin" }
+ { "3" = "/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin" }
}
{ "stdio_handler" = "logd" }
{ "gluster_debug_level" = "9" }
Index: libvirt-8.6.0/src/qemu/qemu.conf.in
===================================================================
--- libvirt-8.6.0.orig/src/qemu/qemu.conf.in
+++ libvirt-8.6.0/src/qemu/qemu.conf.in
--- libvirt-8.7.0.orig/src/qemu/qemu.conf.in
+++ libvirt-8.7.0/src/qemu/qemu.conf.in
@@ -857,10 +857,9 @@
# for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default
# follows this scheme.
@ -73,3 +34,53 @@ Index: libvirt-8.6.0/src/qemu/qemu.conf.in
#]
# The backend to use for handling stdout/stderr output from
Index: libvirt-8.7.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-8.7.0.orig/src/qemu/qemu_conf.c
+++ libvirt-8.7.0/src/qemu/qemu_conf.c
@@ -82,10 +82,9 @@ VIR_ONCE_GLOBAL_INIT(virQEMUConfig);
#ifndef DEFAULT_LOADER_NVRAM
# define DEFAULT_LOADER_NVRAM \
- "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd:" \
- "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd:" \
- "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd:" \
- "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd"
+ "/usr/share/qemu/ovmf-x86_64-ms-4m-code.bin:/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin:" \
+ "/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin:" \
+ "/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin"
#endif
Index: libvirt-8.7.0/src/qemu/test_libvirtd_qemu.aug.in
===================================================================
--- libvirt-8.7.0.orig/src/qemu/test_libvirtd_qemu.aug.in
+++ libvirt-8.7.0/src/qemu/test_libvirtd_qemu.aug.in
@@ -96,10 +96,9 @@ module Test_libvirtd_qemu =
{ "migration_port_max" = "49215" }
{ "log_timestamp" = "0" }
{ "nvram"
- { "1" = "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd" }
- { "2" = "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd" }
- { "3" = "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd" }
- { "4" = "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd" }
+ { "1" = "/usr/share/qemu/ovmf-x86_64-ms-4m-code.bin:/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin" }
+ { "2" = "/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin" }
+ { "3" = "/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin" }
}
{ "stdio_handler" = "logd" }
{ "gluster_debug_level" = "9" }
Index: libvirt-8.7.0/src/security/virt-aa-helper.c
===================================================================
--- libvirt-8.7.0.orig/src/security/virt-aa-helper.c
+++ libvirt-8.7.0/src/security/virt-aa-helper.c
@@ -480,7 +480,8 @@ valid_path(const char *path, const bool
"/usr/share/ovmf/", /* for OVMF images */
"/usr/share/AAVMF/", /* for AAVMF images */
"/usr/share/qemu-efi/", /* for AAVMF images */
- "/usr/share/qemu-efi-aarch64/" /* for AAVMF images */
+ "/usr/share/qemu-efi-aarch64/", /* for AAVMF images */
+ "/usr/share/qemu/" /* SUSE path for OVMF and AAVMF images */
};
/* override the above with these */
const char * const override[] = {

View File

@ -1,15 +1,22 @@
libxl: Use the SUSE ovmf firmware path for Xen
From e0d6005e7bedd06099201f8be34959b160cf235c Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 13:52:35 -0600
Subject: libxl: Use the SUSE ovmf firmware path for Xen
The libxl driver trivially supports firmware autoselection since as of
June 2021 ovmf only supports one firmware for Xen. This patch adjusts
the firmware path to match the one provided by the ovmf package.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libvirt-8.6.0/src/libxl/libxl_conf.c
Index: libvirt-8.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-8.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.6.0/src/libxl/libxl_conf.c
@@ -1782,7 +1782,7 @@ libxlDriverConfigNew(void)
--- libvirt-8.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-8.7.0/src/libxl/libxl_conf.c
@@ -1788,7 +1788,7 @@ libxlDriverConfigNew(void)
cfg->firmwares = g_new0(virFirmware *, 1);
cfg->nfirmwares = 1;
cfg->firmwares[0] = g_new0(virFirmware, 1);

View File

@ -1,7 +1,140 @@
Index: libvirt-8.6.0/tools/virt-create-rootfs
From 6c33161423fc79092b88b2ea7dba2d2711340052 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 5 Jul 2022 13:53:38 -0600
Subject: Add virt-create-rootfs utility
From <cbosdonnat@suse.com>
---
docs/manpages/meson.build | 1 +
docs/manpages/virt-create-rootfs.rst | 88 ++++++++++
tools/meson.build | 2 +
tools/virt-create-rootfs | 236 +++++++++++++++++++++++++++
4 files changed, 327 insertions(+)
create mode 100644 docs/manpages/virt-create-rootfs.rst
create mode 100644 tools/virt-create-rootfs
Index: libvirt-8.7.0/docs/manpages/meson.build
===================================================================
--- libvirt-8.7.0.orig/docs/manpages/meson.build
+++ libvirt-8.7.0/docs/manpages/meson.build
@@ -19,6 +19,7 @@ docs_man_files = [
{ 'name': 'virt-pki-validate', 'section': '1', 'install': true },
{ 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') },
{ 'name': 'virt-xml-validate', 'section': '1', 'install': true },
+ { 'name': 'virt-create-rootfs', 'section': '1', 'install': true },
{ 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
{ 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
Index: libvirt-8.7.0/docs/manpages/virt-create-rootfs.rst
===================================================================
--- /dev/null
+++ libvirt-8.6.0/tools/virt-create-rootfs
+++ libvirt-8.7.0/docs/manpages/virt-create-rootfs.rst
@@ -0,0 +1,88 @@
+==================
+virt-create-rootfs
+==================
+
+---------------------------------------------------------
+A tool to create a root file system for distro containers
+---------------------------------------------------------
+
+:Manual section: 1
+:Manual group: Virtualization Support
+
+.. contents::
+
+SYNOPSIS
+========
+
+
+``virt-create-rootfs`` [*OPTION*]
+
+
+DESCRIPTION
+===========
+
+The ``virt-create-rootfs`` program is a shell script setting up a root file
+system for a distribution container.
+
+The basic structure of most virt-create-rootfs usage is:
+
+ ``virt-create-rootfs`` -r /path/to/root -d distro-name
+
+
+OPTIONS
+=======
+
+``-h``, ``--help``
+
+Display command line help usage then exit.
+
+``-r``, ``--root``
+
+Set the path where to create the new root file system.
+
+``-d``, ``--distro``
+
+Set the name of distribution to use for the root file system.
+
+As of now, only SLED-<XXX>, SLES-<XXX> and openSUSE-<XXX> are implemented
+where <XXX> is the version number. Examples are openSUSE-15.3, openSUSE-tumbleweed,
+and SLES-15.3. Note that SUSEConnect is required to handle SLE distributions.
+
+``-a``, ``--arch``
+
+Set the target architecture of the root file system to either i586 or x86_64.
+
+``-c``, ``--regcode``
+
+Set the registration code for the product to install in the root file system.
+For SLE distributions, use a registration code from SUSE Customer Center.
+
+``-u``, ``--url``
+
+For SLE distributions, set the registration server to use.
+Default: https://scc.suse.com.
+
+``--dry-run``
+
+Don't do anything, just report what would be done.
+
+
+COPYRIGHT
+=========
+
+Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+
+
+LICENSE
+=======
+
+``virt-create-rootfs`` is distributed under the terms of the GNU LGPL v2+.
+This is free software; see the source for copying conditions. There
+is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE
+
+
+SEE ALSO
+========
+
+virsh(1), `https://libvirt.org/ <https://libvirt.org/>`_
Index: libvirt-8.7.0/tools/meson.build
===================================================================
--- libvirt-8.7.0.orig/tools/meson.build
+++ libvirt-8.7.0/tools/meson.build
@@ -154,6 +154,8 @@ else
virsh_icon_res = []
endif
+install_data('virt-create-rootfs', install_dir: bindir, install_mode: 'rwxr-xr-x',)
+
executable(
'virsh',
[
Index: libvirt-8.7.0/tools/virt-create-rootfs
===================================================================
--- /dev/null
+++ libvirt-8.7.0/tools/virt-create-rootfs
@@ -0,0 +1,236 @@
+#!/bin/sh
+set -e
@ -223,11 +356,11 @@ Index: libvirt-8.6.0/tools/virt-create-rootfs
+ openSUSE-*)
+ TARGET_VERSION=${DISTRO:9}
+ if test $TARGET_VERSION = "tumbleweed"; then
+ REPO="http://download.opensuse.org/tumbleweed/repo/oss/"
+ REPO="https://download.opensuse.org/tumbleweed/repo/oss/"
+ call_zypper ar "$REPO" "openSUSE"
+ else
+ REPO="http://download.opensuse.org/distribution/leap/$TARGET_VERSION/repo/oss/"
+ UPDATE_REPO="http://download.opensuse.org/update/leap/$TARGET_VERSION/oss/"
+ REPO="https://download.opensuse.org/distribution/leap/$TARGET_VERSION/repo/oss/"
+ UPDATE_REPO="https://download.opensuse.org/update/leap/$TARGET_VERSION/oss/"
+ call_zypper ar "$REPO" "openSUSE"
+ call_zypper ar "$UPDATE_REPO" "openSUSE-udpate"
+ fi
@ -239,121 +372,3 @@ Index: libvirt-8.6.0/tools/virt-create-rootfs
+ echo "pts/0" >> "$ROOT/etc/securetty"
+ chroot "$ROOT" /usr/bin/passwd
+fi
Index: libvirt-8.6.0/docs/manpages/virt-create-rootfs.rst
===================================================================
--- /dev/null
+++ libvirt-8.6.0/docs/manpages/virt-create-rootfs.rst
@@ -0,0 +1,88 @@
+==================
+virt-create-rootfs
+==================
+
+---------------------------------------------------------
+A tool to create a root file system for distro containers
+---------------------------------------------------------
+
+:Manual section: 1
+:Manual group: Virtualization Support
+
+.. contents::
+
+SYNOPSIS
+========
+
+
+``virt-create-rootfs`` [*OPTION*]
+
+
+DESCRIPTION
+===========
+
+The ``virt-create-rootfs`` program is a shell script setting up a root file
+system for a distribution container.
+
+The basic structure of most virt-create-rootfs usage is:
+
+ ``virt-create-rootfs`` -r /path/to/root -d distro-name
+
+
+OPTIONS
+=======
+
+``-h``, ``--help``
+
+Display command line help usage then exit.
+
+``-r``, ``--root``
+
+Set the path where to create the new root file system.
+
+``-d``, ``--distro``
+
+Set the name of distribution to use for the root file system.
+
+As of now, only SLED-<XXX>, SLES-<XXX> and openSUSE-<XXX> are implemented
+where <XXX> is the version number. Examples are openSUSE-15.3, openSUSE-tumbleweed,
+and SLES-15.3. Note that SUSEConnect is required to handle SLE distributions.
+
+``-a``, ``--arch``
+
+Set the target architecture of the root file system to either i586 or x86_64.
+
+``-c``, ``--regcode``
+
+Set the registration code for the product to install in the root file system.
+For SLE distributions, use a registration code from SUSE Customer Center.
+
+``-u``, ``--url``
+
+For SLE distributions, set the registration server to use.
+Default: http://scc.suse.com.
+
+``--dry-run``
+
+Don't do anything, just report what would be done.
+
+
+COPYRIGHT
+=========
+
+Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+
+
+LICENSE
+=======
+
+``virt-create-rootfs`` is distributed under the terms of the GNU LGPL v2+.
+This is free software; see the source for copying conditions. There
+is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE
+
+
+SEE ALSO
+========
+
+virsh(1), `https://libvirt.org/ <https://libvirt.org/>`_
Index: libvirt-8.6.0/docs/manpages/meson.build
===================================================================
--- libvirt-8.6.0.orig/docs/manpages/meson.build
+++ libvirt-8.6.0/docs/manpages/meson.build
@@ -19,6 +19,7 @@ docs_man_files = [
{ 'name': 'virt-pki-validate', 'section': '1', 'install': true },
{ 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') },
{ 'name': 'virt-xml-validate', 'section': '1', 'install': true },
+ { 'name': 'virt-create-rootfs', 'section': '1', 'install': true },
{ 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
{ 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
Index: libvirt-8.6.0/tools/meson.build
===================================================================
--- libvirt-8.6.0.orig/tools/meson.build
+++ libvirt-8.6.0/tools/meson.build
@@ -154,6 +154,8 @@ else
virsh_icon_res = []
endif
+install_data('virt-create-rootfs', install_dir: bindir, install_mode: 'rwxr-xr-x',)
+
executable(
'virsh',
[