aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch')
-rw-r--r--recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch b/recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch
new file mode 100644
index 0000000..78fb85a
--- /dev/null
+++ b/recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch
@@ -0,0 +1,36 @@
+From 048808fc3d88e1f9b7daed87f582ef35cf1dce22 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Tue, 8 Nov 2016 18:32:00 +0100
+Subject: [PATCH 1/3] delta.c: fix xattr test after patching
+
+At the moment, swupd_create_pack fails when some files have xattrs and
+get patched because the xattrs of the test file do not match the
+original, unpatched file.
+
+That's because xattrs_copy() was applied to the wrong target file.
+
+Fixes: swupd-server/#35
+
+Upstream-Status: Submitted [https://github.com/clearlinux/swupd-server/pull/37]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ src/delta.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/delta.c b/src/delta.c
+index 3ddb13a..67e7df7 100644
+--- a/src/delta.c
++++ b/src/delta.c
+@@ -98,7 +98,7 @@ void __create_delta(struct file *file, int from_version)
+ ret = 0;
+ goto out;
+ }
+- xattrs_copy(original, newfile);
++ xattrs_copy(original, testnewfile);
+
+ /* does xattrs have been correctly copied?*/
+ if (xattrs_compare(original, testnewfile) != 0) {
+--
+2.1.4
+