From fc3156843f7d0fa5aea23dba8c63e9335508d1df Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 18 Feb 2014 11:09:41 +0000 Subject: [PATCH] Add upstream patch, workaround for libvirt on ARM bug. --- ...on-t-include-hpet-XML-fragment-on-AR.patch | 46 +++++++++++++++++++ libguestfs.spec | 8 +++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0001-launch-libvirt-Don-t-include-hpet-XML-fragment-on-AR.patch diff --git a/0001-launch-libvirt-Don-t-include-hpet-XML-fragment-on-AR.patch b/0001-launch-libvirt-Don-t-include-hpet-XML-fragment-on-AR.patch new file mode 100644 index 0000000..9bd496c --- /dev/null +++ b/0001-launch-libvirt-Don-t-include-hpet-XML-fragment-on-AR.patch @@ -0,0 +1,46 @@ +From 62cb3a606d4b349d45f2d178945a998a90d1e130 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 17 Feb 2014 15:17:27 -0500 +Subject: [PATCH] launch: libvirt: Don't include hpet XML fragment on ARM. + +See comment and https://bugzilla.redhat.com/show_bug.cgi?id=1066145 +for explanation. +--- + src/launch-libvirt.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c +index 60213fd..9e59e36 100644 +--- a/src/launch-libvirt.c ++++ b/src/launch-libvirt.c +@@ -1001,6 +1001,7 @@ construct_libvirt_xml_cpu (guestfs_h *g, + + start_element ("clock") { + attribute ("offset", "utc"); ++ + /* These are recommended settings, see RHBZ#1053847. */ + start_element ("timer") { + attribute ("name", "rtc"); +@@ -1010,10 +1011,19 @@ construct_libvirt_xml_cpu (guestfs_h *g, + attribute ("name", "pit"); + attribute ("tickpolicy", "delay"); + } end_element (); ++ ++ /* libvirt has a bug (RHBZ#1066145) where it adds the -no-hpet ++ * flag on ARM even though this causes qemu-system-arm to break ++ * and ARM has never had a High Precision Timer anyway. It's not ++ * worth arguing about who is right or wrong here, just disable ++ * this XML fragment on ARM. ++ */ ++#ifndef __arm__ + start_element ("timer") { + attribute ("name", "hpet"); + attribute ("present", "no"); + } end_element (); ++#endif + } end_element (); + + return 0; +-- +1.8.4.2 + diff --git a/libguestfs.spec b/libguestfs.spec index 0c26d79..cb502a9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -12,13 +12,16 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.25.36 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Source and patches. URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.25-development/%{name}-%{version}.tar.gz +# Upstream workaround for libvirt on ARM bug. +Patch0001: 0001-launch-libvirt-Don-t-include-hpet-XML-fragment-on-AR.patch + # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -981,6 +984,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog +* Tue Feb 18 2014 Richard W.M. Jones - 1:1.25.36-2 +- Add upstream patch, workaround for libvirt on ARM bug. + * Mon Feb 17 2014 Richard W.M. Jones - 1:1.25.36-1 - New upstream version 1.25.36.