- more fixes for copying entire /etc/lvm directory (bnc#795503)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=187
This commit is contained in:
Olaf Hering 2013-01-18 13:29:34 +00:00 committed by Git OBS Bridge
parent c83e40539e
commit 453ca336fc
3 changed files with 14 additions and 4 deletions

View File

@ -1,18 +1,21 @@
From 8e911927825bcb326359d21ff38f0563a7346a10 Mon Sep 17 00:00:00 2001
From 9fd41abd40c3ffc10985e862dc34c868360a1b22 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Wed, 2 Jan 2013 15:27:39 +0100
Date: Wed, 2 Jan 2013 16:13:06 +0100
Subject: [PATCH] daemon: copy entire lvm directory
cp will fail if /etc/lvm is an empty directory. Copy the entire
directory and adjust environment variable.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
RWMJ:
- Fixed a couple of whitespace issues.
---
daemon/lvm-filter.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c
index 52d6b3d..204e238 100644
index 52d6b3d..fddf816 100644
--- a/daemon/lvm-filter.c
+++ b/daemon/lvm-filter.c
@@ -47,7 +47,7 @@ void
@ -40,7 +43,7 @@ index 52d6b3d..204e238 100644
/* Set environment variable so we use the copy. */
- setenv ("LVM_SYSTEM_DIR", lvm_system_dir, 1);
+ snprintf(env, sizeof(env), "%s/lvm", lvm_system_dir);
+ snprintf (env, sizeof env, "%s/lvm", lvm_system_dir);
+ setenv ("LVM_SYSTEM_DIR", env, 1);
/* Set a handler to remove the temporary directory at exit. */

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jan 18 14:28:46 CET 2013 - ohering@suse.de
- more fixes for copying entire /etc/lvm directory (bnc#795503)
-------------------------------------------------------------------
Wed Jan 16 16:40:46 CET 2013 - ohering@suse.de

View File

@ -128,6 +128,7 @@ Group: System/Filesystems
Version: 1.20.1
Release: 0
Patch795503: 0001-daemon-copy-entire-lvm-directory.patch
Patch7955032: 0001-daemon-lvm-Fix-various-paths-relative-to-new-lvm_sys.patch
Patch1: 0001-ruby-Enable-C-compiler-warnings.patch
Patch5: libguestfs-1.13.14-ruby.patch
Patch1000: 1000-force-virtio_blk-in-old-guest-kernel.patch
@ -411,6 +412,7 @@ virtual machines.
: _ignore_exclusive_arch '%{?_ignore_exclusive_arch}'
%setup -q -a 789653
%patch795503 -p1
%patch7955032 -p1
%patch1 -p1
%patch5 -p1
%patch1000 -p1