aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-core/swupd-server/swupd-server/0001-delta.c-fix-xattr-test-after-patching.patch36
-rw-r--r--recipes-core/swupd-server/swupd-server_git.bb1
2 files changed, 37 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
+
diff --git a/recipes-core/swupd-server/swupd-server_git.bb b/recipes-core/swupd-server/swupd-server_git.bb
index a433cac..63932c4 100644
--- a/recipes-core/swupd-server/swupd-server_git.bb
+++ b/recipes-core/swupd-server/swupd-server_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/clearlinux/swupd-server.git;protocol=https \
file://0001-swupd-create-update-alternative-input-layout.patch \
file://0002-add-logging-to-stdout.patch \
file://swupd_create_fullfiles-avoid-segfault-when-nothing-c.patch \
+ file://0001-delta.c-fix-xattr-test-after-patching.patch \
"
SRCREV = "ddca171dad32229ceeff8b8527a179610b88ce55"