Fix qemu.conf dynamic_ownership=0 (bz #1266628)

Fix some spec file warnings
remotes/origin/f23
Cole Robinson 2015-10-06 16:28:50 -04:00
parent 5572a05fbe
commit e9afe9ad5c
3 changed files with 95 additions and 4 deletions

View File

@ -0,0 +1,37 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 28 Sep 2015 19:47:09 -0400
Subject: [PATCH] qemu: Fix dynamic_ownership qemu.conf setting
Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
the DAC driver:
@@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
bool defaultConfined,
bool requireConfined,
bool dynamicOwnership,
+ bool privileged,
virSecurityManagerDACChownCallback chownCallback)
But argument order is mixed up at the caller, swapping dynamicOwnership
and privileged values. This corrects the argument order
https://bugzilla.redhat.com/show_bug.cgi?id=1266628
(cherry picked from commit 68572de8228e3971174a83c227fcb018d6f684c7)
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a38e776..fda9cd9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -430,8 +430,8 @@ qemuSecurityInit(virQEMUDriverPtr driver)
cfg->allowDiskFormatProbing,
cfg->securityDefaultConfined,
cfg->securityRequireConfined,
- virQEMUDriverIsPrivileged(driver),
cfg->dynamicOwnership,
+ virQEMUDriverIsPrivileged(driver),
qemuSecurityChownCallback)))
goto error;
if (!stack) {

View File

@ -0,0 +1,45 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 22 Sep 2015 15:56:50 -0400
Subject: [PATCH] spec: Fix some warnings with latest rpmbuild
$ rpmbuild -ba libvirt.spec
warning: Macro expanded in comment on line 5: # If neither fedora nor rhel was defined, try to guess them from %{dist}
warning: Macro %enable_autotools defined but not used within scope
warning: Macro %client_only defined but not used within scope
...
(cherry picked from commit dae1250b24404f7f21e7bd8aeeb304565d175de4)
---
libvirt.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2acb01b..62dfecd 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -2,7 +2,7 @@
# This spec file assumes you are building for Fedora 13 or newer,
# or for RHEL 5 or newer. It may need some tweaks for other distros.
-# If neither fedora nor rhel was defined, try to guess them from %{dist}
+# If neither fedora nor rhel was defined, try to guess them from dist
%if !0%{?rhel} && !0%{?fedora}
%{expand:%(echo "%{?dist}" | \
sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')}
@@ -13,13 +13,13 @@
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
-%{!?enable_autotools:%define enable_autotools 0}
+%{!?enable_autotools:%global enable_autotools 0}
# A client only build will create a libvirt.so only containing
# the generic RPC driver, and test driver and no libvirtd
# Default to a full server + client build, but with the possibility
# of a command-line or ~/.rpmmacros override for client-only.
-%{!?client_only:%define client_only 0}
+%{!?client_only:%global client_only 0}
# Now turn off server build in certain cases

View File

@ -2,7 +2,7 @@
# This spec file assumes you are building for Fedora 13 or newer, # This spec file assumes you are building for Fedora 13 or newer,
# or for RHEL 5 or newer. It may need some tweaks for other distros. # or for RHEL 5 or newer. It may need some tweaks for other distros.
# If neither fedora nor rhel was defined, try to guess them from %{dist} # If neither fedora nor rhel was defined, try to guess them from dist
%if !0%{?rhel} && !0%{?fedora} %if !0%{?rhel} && !0%{?fedora}
%{expand:%(echo "%{?dist}" | \ %{expand:%(echo "%{?dist}" | \
sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')} sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')}
@ -13,13 +13,13 @@
# Default to skipping autoreconf. Distros can change just this one line # Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that # (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am. # touch configure.ac or Makefile.am.
%{!?enable_autotools:%define enable_autotools 0} %{!?enable_autotools:%global enable_autotools 0}
# A client only build will create a libvirt.so only containing # A client only build will create a libvirt.so only containing
# the generic RPC driver, and test driver and no libvirtd # the generic RPC driver, and test driver and no libvirtd
# Default to a full server + client build, but with the possibility # Default to a full server + client build, but with the possibility
# of a command-line or ~/.rpmmacros override for client-only. # of a command-line or ~/.rpmmacros override for client-only.
%{!?client_only:%define client_only 0} %{!?client_only:%global client_only 0}
# Now turn off server build in certain cases # Now turn off server build in certain cases
@ -378,7 +378,7 @@
Summary: Library providing a simple virtualization API Summary: Library providing a simple virtualization API
Name: libvirt Name: libvirt
Version: 1.2.18.1 Version: 1.2.18.1
Release: 1%{?dist}%{?extra_release} Release: 2%{?dist}%{?extra_release}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -389,6 +389,11 @@ URL: http://libvirt.org/
%endif %endif
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
# Fix qemu.conf dynamic_ownership=0 (bz #1266628)
Patch0001: 0001-qemu-Fix-dynamic_ownership-qemu.conf-setting.patch
# Fix some spec file warnings
Patch0002: 0002-spec-Fix-some-warnings-with-latest-rpmbuild.patch
%if %{with_libvirtd} %if %{with_libvirtd}
Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon = %{version}-%{release}
%if %{with_network} %if %{with_network}
@ -2330,6 +2335,10 @@ exit 0
%doc examples/systemtap %doc examples/systemtap
%changelog %changelog
* Tue Oct 06 2015 Cole Robinson <crobinso@redhat.com> - 1.2.18.1-2
- Fix qemu.conf dynamic_ownership=0 (bz #1266628)
- Fix some spec file warnings
* Mon Sep 21 2015 Cole Robinson <crobinso@redhat.com> - 1.2.18.1-1 * Mon Sep 21 2015 Cole Robinson <crobinso@redhat.com> - 1.2.18.1-1
- Rebased to version 1.2.18.1 - Rebased to version 1.2.18.1
- libvirt reports physical=0 for COW2 volumes on block storage (bz #1253754) - libvirt reports physical=0 for COW2 volumes on block storage (bz #1253754)