From 9159704921b9d50d0f719678fdb2eeda6a12e16902a44fbaf7344048354e3d0d Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 8 Sep 2014 17:56:04 +0000 Subject: [PATCH 1/2] - Wait for ntp service before running libvirt-guests libvirt-guests-wait-for-ntp.patch bnc#895194 - Canonicalize host arch name ppc64le to ppc64 ppc64le-canonical-name.patch bnc#894956 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=405 --- libvirt-guests-wait-for-ntp.patch | 30 ++++++++++++++++++++++++++++++ libvirt.changes | 14 ++++++++++++++ libvirt.spec | 23 ++++++++++++++--------- ppc64le-canonical-name.patch | 17 +++++++++++++++++ 4 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 libvirt-guests-wait-for-ntp.patch create mode 100644 ppc64le-canonical-name.patch diff --git a/libvirt-guests-wait-for-ntp.patch b/libvirt-guests-wait-for-ntp.patch new file mode 100644 index 0000000..b096829 --- /dev/null +++ b/libvirt-guests-wait-for-ntp.patch @@ -0,0 +1,30 @@ +From 79a752f1eb5a6b6b4b900d8899dfb9712be824ec Mon Sep 17 00:00:00 2001 +From: Jim Fehlig +Date: Mon, 8 Sep 2014 10:22:14 -0600 +Subject: [PATCH] libvirt-guests: wait for ntp service + +If an NTP server is configured on the host, it is possible for +libvirt-guests to start before the NTP service, in which case +guest clocks won't be synchronized to the host clock. + +Add ntp-wait.service to "After" in libvirt-guests systemd service +file, ensuring NTP has synchronized the host clock before starting +any guests. + +Signed-off-by: Jim Fehlig +--- + tools/libvirt-guests.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libvirt-1.2.8/tools/libvirt-guests.service.in +=================================================================== +--- libvirt-1.2.8.orig/tools/libvirt-guests.service.in ++++ libvirt-1.2.8/tools/libvirt-guests.service.in +@@ -1,6 +1,6 @@ + [Unit] + Description=Suspend Active Libvirt Guests +-After=network.target libvirtd.service ++After=network.target libvirtd.service ntp-wait.service + Documentation=man:libvirtd(8) + Documentation=http://libvirt.org + diff --git a/libvirt.changes b/libvirt.changes index 38e329e..b811083 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Sep 8 11:20:36 MDT 2014 - jfehlig@suse.com + +- Wait for ntp service before running libvirt-guests + libvirt-guests-wait-for-ntp.patch + bnc#895194 + +------------------------------------------------------------------- +Thu Sep 4 16:09:23 MDT 2014 - jfehlig@suse.com + +- Canonicalize host arch name ppc64le to ppc64 + ppc64le-canonical-name.patch + bnc#894956 + ------------------------------------------------------------------- Tue Sep 2 09:17:06 MDT 2014 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index fd510a5..6f4cbe3 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -429,12 +429,15 @@ Source1: libvirtd.init Source2: libvirtd-relocation-server.fw Source99: baselibs.conf # Upstream patches +# Patches pending upstream review +Patch100: libvirt-guests-wait-for-ntp.patch # Need to go upstream -Patch100: xen-name-for-devid.patch -Patch101: xen-pv-cdrom.patch -Patch102: blockcopy-check-dst-identical-device.patch -Patch103: libvirt-ppc64le-support.patch -Patch104: libvirt-power8-models.patch +Patch150: xen-name-for-devid.patch +Patch151: xen-pv-cdrom.patch +Patch152: blockcopy-check-dst-identical-device.patch +Patch153: libvirt-ppc64le-support.patch +Patch154: libvirt-power8-models.patch +Patch155: ppc64le-canonical-name.patch # Our patches Patch200: libvirtd-defaults.patch Patch201: libvirtd-init-script.patch @@ -948,10 +951,12 @@ namespaces. %prep %setup -q %patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 +%patch150 -p1 +%patch151 -p1 +%patch152 -p1 +%patch153 -p1 +%patch154 -p1 +%patch155 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 diff --git a/ppc64le-canonical-name.patch b/ppc64le-canonical-name.patch new file mode 100644 index 0000000..df4e49f --- /dev/null +++ b/ppc64le-canonical-name.patch @@ -0,0 +1,17 @@ +Canonicalize hostarch name ppc64le to ppc64 + +See bnc#894956 + +Index: libvirt-1.2.8/src/util/virarch.c +=================================================================== +--- libvirt-1.2.8.orig/src/util/virarch.c ++++ libvirt-1.2.8/src/util/virarch.c +@@ -169,6 +169,8 @@ virArch virArchFromHost(void) + arch = VIR_ARCH_I686; + } else if (STREQ(ut.machine, "amd64")) { + arch = VIR_ARCH_X86_64; ++ } else if (STREQ(ut.machine, "ppc64le")) { ++ arch = VIR_ARCH_PPC64; + } else { + /* Otherwise assume the canonical name */ + if ((arch = virArchFromString(ut.machine)) == VIR_ARCH_NONE) { From 805eccbdffba48b62098860e11ab854272adc294e3d7c50d3266f98b89b9c8cf Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 10 Sep 2014 16:28:04 +0000 Subject: [PATCH 2/2] Fix a '%endif' that was misplaced during recent refactoring of the spec file. - spec: do not require dmidecode on older code 11 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=406 --- libvirt.changes | 5 +++++ libvirt.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libvirt.changes b/libvirt.changes index b811083..214f483 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 10 10:24:26 MDT 2014 - jfehlig@suse.com + +- spec: do not require dmidecode on older code 11 + ------------------------------------------------------------------- Mon Sep 8 11:20:36 MDT 2014 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 6f4cbe3..68ba539 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -513,11 +513,11 @@ Recommends: polkit >= 0.93 %else Recommends: PolicyKit >= 0.6 %endif -%endif %ifarch i386 i586 i686 x86_64 ia64 # For virConnectGetSysinfo Requires: dmidecode %endif +%endif %if %{with_systemd} # For service management %{?systemd_requires}