Rebase sVirt (disable) patch.
This commit is contained in:
parent
a92feea581
commit
e72e9e192a
@ -1,59 +1,11 @@
|
||||
From 3479b9b37f95ec37e1203d3c7bce15df7c2a20e8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 16 Sep 2012 13:16:59 +0100
|
||||
Subject: [PATCH] Revert "launch: libvirt: Enable sVirt."
|
||||
|
||||
This reverts commit 6575ac4c61cc41a2e3c662b58fd0e0cee2b6a2e3.
|
||||
---
|
||||
src/launch-libvirt.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
|
||||
index c4ca817..9b082a4 100644
|
||||
--- a/src/launch-libvirt.c
|
||||
+++ b/src/launch-libvirt.c
|
||||
@@ -418,6 +418,7 @@ launch_libvirt (guestfs_h *g, const char *libvirt_uri)
|
||||
static int construct_libvirt_xml_name (guestfs_h *g, xmlTextWriterPtr xo);
|
||||
static int construct_libvirt_xml_cpu (guestfs_h *g, xmlTextWriterPtr xo);
|
||||
static int construct_libvirt_xml_boot (guestfs_h *g, xmlTextWriterPtr xo, const char *kernel, const char *initrd, size_t appliance_index);
|
||||
+static int construct_libvirt_xml_seclabel (guestfs_h *g, xmlTextWriterPtr xo);
|
||||
static int construct_libvirt_xml_lifecycle (guestfs_h *g, xmlTextWriterPtr xo);
|
||||
static int construct_libvirt_xml_devices (guestfs_h *g, xmlTextWriterPtr xo, const char *appliance, size_t appliance_index, const char *guestfsd_sock, const char *console_sock);
|
||||
static int construct_libvirt_xml_qemu_cmdline (guestfs_h *g, xmlTextWriterPtr xo);
|
||||
@@ -481,6 +482,8 @@ construct_libvirt_xml (guestfs_h *g, const char *capabilities_xml,
|
||||
goto err;
|
||||
if (construct_libvirt_xml_boot (g, xo, kernel, initrd, appliance_index) == -1)
|
||||
goto err;
|
||||
+ if (construct_libvirt_xml_seclabel (g, xo) == -1)
|
||||
+ goto err;
|
||||
if (construct_libvirt_xml_lifecycle (g, xo) == -1)
|
||||
goto err;
|
||||
if (construct_libvirt_xml_devices (g, xo, appliance, appliance_index,
|
||||
@@ -635,6 +638,24 @@ construct_libvirt_xml_boot (guestfs_h *g, xmlTextWriterPtr xo,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static int
|
||||
+construct_libvirt_xml_seclabel (guestfs_h *g, xmlTextWriterPtr xo)
|
||||
+{
|
||||
+ XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "seclabel"));
|
||||
+ /* XXX This disables SELinux/sVirt confinement. Remove this
|
||||
+ * once we've worked out how to label guestfsd_sock.
|
||||
+ */
|
||||
+ XMLERROR (-1,
|
||||
+ xmlTextWriterWriteAttribute (xo, BAD_CAST "type",
|
||||
+ BAD_CAST "none"));
|
||||
+ XMLERROR (-1, xmlTextWriterEndElement (xo));
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+ err:
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
/* qemu -no-reboot */
|
||||
static int
|
||||
construct_libvirt_xml_lifecycle (guestfs_h *g, xmlTextWriterPtr xo)
|
||||
--
|
||||
1.7.10.4
|
||||
--- libguestfs-1.19.42.old/src/launch-libvirt.c 2012-09-18 08:27:39.242142221 +0100
|
||||
+++ libguestfs-1.19.42/src/launch-libvirt.c 2012-09-18 08:35:46.604801952 +0100
|
||||
@@ -115,7 +115,7 @@
|
||||
int console = -1, r;
|
||||
uint32_t size;
|
||||
void *buf = NULL;
|
||||
- int disable_svirt = is_custom_qemu (g);
|
||||
+ const int disable_svirt = 1;
|
||||
|
||||
/* At present you must add drives before starting the appliance. In
|
||||
* future when we enable hotplugging you won't need to do this.
|
||||
|
@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
|
||||
Name: libguestfs
|
||||
Epoch: 1
|
||||
Version: 1.19.42
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
URL: http://libguestfs.org/
|
||||
@ -1005,8 +1005,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.42-1
|
||||
* Tue Sep 18 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.42-2
|
||||
- New upstream version 1.19.42.
|
||||
- Rebase sVirt (disable) patch.
|
||||
|
||||
* Sun Sep 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.41-1
|
||||
- New upstream version 1.19.41.
|
||||
|
Loading…
Reference in New Issue
Block a user