- Enable sVirt (NB: requires libvirt >= 0.10.2-3, selinux-policy >= 3.11.1-23).

- Add upstream patch to label the custom $TMPDIR used in test-launch-race.
This commit is contained in:
Richard W.M. Jones 2012-09-25 16:50:58 +01:00
parent 178f6aa149
commit 7d92d58f38
3 changed files with 49 additions and 19 deletions

View File

@ -1,11 +0,0 @@
--- 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.

View File

@ -0,0 +1,31 @@
From 7fc838cca334ccf3d388c5598ff7fae88dbe4513 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 25 Sep 2012 12:15:19 +0100
Subject: [PATCH] test-launch-race: Add SELinux label to $TMPDIR.
This is a temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=860235
which can be removed once this bug is fixed.
---
tests/protocol/test-launch-race.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/protocol/test-launch-race.pl b/tests/protocol/test-launch-race.pl
index f933bfe..7e1330b 100755
--- a/tests/protocol/test-launch-race.pl
+++ b/tests/protocol/test-launch-race.pl
@@ -32,6 +32,11 @@ exit 77 if $ENV{SKIP_TEST_LAUNCH_RACE_PL};
my $tmpdir = tempdir (CLEANUP => 1);
$ENV{TMPDIR} = $tmpdir;
+# Temporary workaround for RHBZ#860235 which can be removed
+# once that bug is fixed.
+system ("chcon system_u:object_r:tmp_t:s0 $tmpdir") == 0
+ or warn "chcon: $tmpdir: $!";
+
my $pid = fork();
die ("fork failed: $!") if ($pid < 0);
--
1.7.10.4

View File

@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs Name: libguestfs
Epoch: 1 Epoch: 1
Version: 1.19.44 Version: 1.19.44
Release: 1%{?dist} Release: 2%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
URL: http://libguestfs.org/ URL: http://libguestfs.org/
@ -43,11 +43,9 @@ Patch2: libguestfs-1.19.2-remove-udev-from-packagelist.patch
# on i386 only. This works around a bug in 32-bit qemu (RHBZ#857026). # on i386 only. This works around a bug in 32-bit qemu (RHBZ#857026).
Patch3: 0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch Patch3: 0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch
# Temporary patch (not upstream) to disable sVirt. Before we can # Upstream patch to label the custom $TMPDIR used in test-launch-race.
# enable sVirt we must fix libvirt (at a minimum: RHBZ#853393, but # (Can be removed when 1.19.45 released and/or RHBZ#860235 is fixed).
# also RHBZ#857659 would be good) and SELinux policy (required: Patch4: 0001-test-launch-race-Add-SELinux-label-to-TMPDIR.patch
# RHBZ#857453; nice to have: RHBZ#856634).
Patch4: 0001-Revert-launch-libvirt-Enable-sVirt.patch
%if 0%{?rhel} >= 7 %if 0%{?rhel} >= 7
ExclusiveArch: x86_64 ExclusiveArch: x86_64
@ -67,6 +65,7 @@ BuildRequires: libxml2-devel
BuildRequires: qemu-kvm >= 2:1.1.0 BuildRequires: qemu-kvm >= 2:1.1.0
BuildRequires: createrepo BuildRequires: createrepo
BuildRequires: glibc-static BuildRequires: glibc-static
BuildRequires: libselinux-utils
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: fuse-devel BuildRequires: fuse-devel
BuildRequires: pcre-devel BuildRequires: pcre-devel
@ -294,7 +293,8 @@ Requires: icoutils
Requires: fuse Requires: fuse
# For libvirt attach method. # For libvirt attach method.
Requires: libvirt-daemon-qemu Requires: libvirt-daemon-qemu >= 0.10.2-3
Requires: selinux-policy >= 3.11.1-23
# Provide our own custom requires for the supermin appliance. # Provide our own custom requires for the supermin appliance.
Source1: libguestfs-find-requires.sh Source1: libguestfs-find-requires.sh
@ -688,6 +688,12 @@ for %{name}.
%prep %prep
%setup -q %setup -q
if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
# For sVirt to work, the local temporary directory we use in the
# tests must be labelled the same way as /tmp.
chcon --reference=/tmp tmp
fi
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
%patch1 -p1 %patch1 -p1
autoreconf -i autoreconf -i
@ -698,7 +704,7 @@ autoreconf -i
mkdir -p daemon/m4 mkdir -p daemon/m4
# Replace developer-specific README that ships with libguestfs, with # Replace developer-centric README that ships with libguestfs, with
# our replacement file. # our replacement file.
mv README README.orig mv README README.orig
sed 's/@VERSION@/%{version}/g' < %{SOURCE4} > README sed 's/@VERSION@/%{version}/g' < %{SOURCE4} > README
@ -1005,6 +1011,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog %changelog
* Tue Sep 25 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.44-2
- Enable sVirt (NB: requires libvirt >= 0.10.2-3, selinux-policy >= 3.11.1-23).
- Add upstream patch to label the custom $TMPDIR used in test-launch-race.
* Mon Sep 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.44-1 * Mon Sep 24 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.44-1
- New upstream version 1.19.44. - New upstream version 1.19.44.