diff --git a/0001-command-Move-environ-adding-code-to-common-function-.patch b/0001-command-Move-environ-adding-code-to-common-function-.patch deleted file mode 100644 index 7c93580..0000000 --- a/0001-command-Move-environ-adding-code-to-common-function-.patch +++ /dev/null @@ -1,94 +0,0 @@ -From f644361b1eeb78fd59be4cd7ec85567bbf300506 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 24 Sep 2012 17:30:18 +0100 -Subject: [PATCH 1/2] command: Move environ-adding code to common function - virCommandAddEnv. - -This is just code motion. The semantics of the code should be -identical after this change. ---- - src/util/command.c | 40 ++++++++++++++++++++-------------------- - 1 file changed, 20 insertions(+), 20 deletions(-) - -diff --git a/src/util/command.c b/src/util/command.c -index 5d6e17b..f7d92dd 100644 ---- a/src/util/command.c -+++ b/src/util/command.c -@@ -984,6 +984,22 @@ virCommandNonblockingFDs(virCommandPtr cmd) - cmd->flags |= VIR_EXEC_NONBLOCK; - } - -+/* Add an environment variable to the cmd->env list. 'env' is a -+ * string like "name=value". -+ */ -+static inline void -+virCommandAddEnv(virCommandPtr cmd, char *env) -+{ -+ /* Arg plus trailing NULL. */ -+ if (VIR_RESIZE_N(cmd->env, cmd->maxenv, cmd->nenv, 1 + 1) < 0) { -+ VIR_FREE(env); -+ cmd->has_error = ENOMEM; -+ return; -+ } -+ -+ cmd->env[cmd->nenv++] = env; -+} -+ - /** - * virCommandAddEnvFormat: - * @cmd: the command to modify -@@ -1009,14 +1025,7 @@ virCommandAddEnvFormat(virCommandPtr cmd, const char *format, ...) - } - va_end(list); - -- /* Arg plus trailing NULL. */ -- if (VIR_RESIZE_N(cmd->env, cmd->maxenv, cmd->nenv, 1 + 1) < 0) { -- VIR_FREE(env); -- cmd->has_error = ENOMEM; -- return; -- } -- -- cmd->env[cmd->nenv++] = env; -+ virCommandAddEnv(cmd, env); - } - - /** -@@ -1056,14 +1065,7 @@ virCommandAddEnvString(virCommandPtr cmd, const char *str) - return; - } - -- /* env plus trailing NULL */ -- if (VIR_RESIZE_N(cmd->env, cmd->maxenv, cmd->nenv, 1 + 1) < 0) { -- VIR_FREE(env); -- cmd->has_error = ENOMEM; -- return; -- } -- -- cmd->env[cmd->nenv++] = env; -+ virCommandAddEnv(cmd, env); - } - - -@@ -1084,9 +1086,7 @@ virCommandAddEnvBuffer(virCommandPtr cmd, virBufferPtr buf) - return; - } - -- /* env plus trailing NULL. */ -- if (virBufferError(buf) || -- VIR_RESIZE_N(cmd->env, cmd->maxenv, cmd->nenv, 1 + 1) < 0) { -+ if (virBufferError(buf)) { - cmd->has_error = ENOMEM; - virBufferFreeAndReset(buf); - return; -@@ -1096,7 +1096,7 @@ virCommandAddEnvBuffer(virCommandPtr cmd, virBufferPtr buf) - return; - } - -- cmd->env[cmd->nenv++] = virBufferContentAndReset(buf); -+ virCommandAddEnv(cmd, virBufferContentAndReset(buf)); - } - - --- -1.7.10.4 - diff --git a/0002-command-Change-virCommandAddEnv-so-it-replaces-exist.patch b/0002-command-Change-virCommandAddEnv-so-it-replaces-exist.patch deleted file mode 100644 index 00f0cc3..0000000 --- a/0002-command-Change-virCommandAddEnv-so-it-replaces-exist.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2b32735af480055e27400068d27364d521071117 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 24 Sep 2012 17:35:47 +0100 -Subject: [PATCH 2/2] command: Change virCommandAddEnv so it replaces existing - environment variables. - ---- - src/util/command.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/util/command.c b/src/util/command.c -index f7d92dd..1adf7b9 100644 ---- a/src/util/command.c -+++ b/src/util/command.c -@@ -985,11 +985,26 @@ virCommandNonblockingFDs(virCommandPtr cmd) - } - - /* Add an environment variable to the cmd->env list. 'env' is a -- * string like "name=value". -+ * string like "name=value". If the named environment variable is -+ * already set, then it is replaced in the list. - */ - static inline void - virCommandAddEnv(virCommandPtr cmd, char *env) - { -+ size_t namelen; -+ size_t i; -+ -+ /* Search for the name in the existing environment. */ -+ namelen = strcspn(env, "="); -+ for (i = 0; i < cmd->nenv; ++i) { -+ /* + 1 because we want to match the '=' character too. */ -+ if (STREQLEN(cmd->env[i], env, namelen + 1)) { -+ VIR_FREE(cmd->env[i]); -+ cmd->env[i] = env; -+ return; -+ } -+ } -+ - /* Arg plus trailing NULL. */ - if (VIR_RESIZE_N(cmd->env, cmd->maxenv, cmd->nenv, 1 + 1) < 0) { - VIR_FREE(env); --- -1.7.10.4 - diff --git a/libvirt.spec b/libvirt.spec index 6d84ea7..08b1965 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -319,8 +319,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 0.10.2 -Release: 4%{?dist}%{?extra_release} +Version: 0.10.2.1 +Release: 1%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -330,15 +330,11 @@ URL: http://libvirt.org/ %define mainturl stable_updates/ %endif Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz - # Fix qemu -> qemu-system-i386 (RHBZ#857026). -# NB: This patch is Fedora-specific and not upstream. +# keep: This patch is Fedora-specific and not upstream. Patch1: 0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch -# Don't duplicate environment variables -# (RHBZ#859596, upstream after 0.10.2). -Patch2: 0001-command-Move-environ-adding-code-to-common-function-.patch -Patch3: 0002-command-Change-virCommandAddEnv-so-it-replaces-exist.patch + %if %{with_libvirtd} Requires: libvirt-daemon = %{version}-%{release} @@ -1055,8 +1051,6 @@ of recent versions of Linux (and other OSes). %prep %setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build %if ! %{with_xen} @@ -1379,6 +1373,15 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \ sed -i -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests +%if %{with_dtrace} +%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 +mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ + $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp +mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ + $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp +%endif +%endif + %clean rm -fr %{buildroot} @@ -1827,8 +1830,8 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd %{_libdir}/lib*.so.* %if %{with_dtrace} -%{_datadir}/systemtap/tapset/libvirt_probes.stp -%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp +%{_datadir}/systemtap/tapset/libvirt_probes*.stp +%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp %endif @@ -1900,11 +1903,23 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd %endif %changelog +* Sat Oct 27 2012 Cole Robinson - 0.10.2.1-1 +- Rebased to version 0.10.2.1 +- Fix lvm volume creation when alloc=0 (bz #866481) +- Clarify virsh send-keys man page example (bz #860004) +- Fix occasional deadlock via virDomainDestroy (bz #859009) +- Fix LXC deadlock from ctrl-c (bz #848119) +- Fix occasional selinux denials with macvtap (bz #798605) +- Fix multilib conflict with systemtap files (bz #831425) +- Don't trigger keytab warning in system logs (bz #745203) +- Fix qemu domxml-2-native NIC model out (bz #636832) +- Fix error message if not enough space for lvm vol (bz #609104) + * Thu Oct 25 2012 Cole Robinson - 0.10.2-4 - Disable libxl driver, since it doesn't build with xen 4.2 in rawhide * Mon Sep 24 2012 Richard W.M. Jones - 0.10.2-3 -- Re-add 0001-Use-qemu-system-i386-as-binary-instead-of-qemu.patch +- Re-add Use-qemu-system-i386-as-binary-instead-of-qemu.patch NB: This patch is Fedora-specific and not upstream. - Add upstream patches: don't duplicate environment variables (RHBZ#859596). diff --git a/sources b/sources index 06d38b9..1543a73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a5e50860d9da238ba270b528411c4a0d libvirt-0.10.2.tar.gz +c090c8abc89653456e3342f9aa9f18fe libvirt-0.10.2.1.tar.gz