aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch')
-rw-r--r--recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch64
1 files changed, 0 insertions, 64 deletions
diff --git a/recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch b/recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch
deleted file mode 100644
index 0c74b5d..0000000
--- a/recipes-core/swupd-server/swupd-server/fullfiles.c-work-around-pseudo-bug.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 724f10e4946708160bd8b47cc539cefa2d0cce54 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <patrick.ohly@intel.com>
-Date: Wed, 30 Mar 2016 13:14:42 +0200
-Subject: [PATCH] fullfiles.c: work around pseudo bug
-
-Hard-linking the actual file looses the xattrs due to a pseudo bug.
-We work around that here by explicitly copying the xattrs.
-
-Upstream-Status: Inappropriate [workaround]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-Rebased-by: Igor Stoppa <igor.stoppa@intel.com>
----
- src/fullfiles.c | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
-
-Index: git/src/fullfiles.c
-===================================================================
---- git.orig/src/fullfiles.c
-+++ git/src/fullfiles.c
-@@ -32,6 +32,7 @@
- #include <string.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#include <sys/xattr.h>
- #include <unistd.h>
-
- #include "swupd.h"
-@@ -142,6 +143,35 @@ static void create_fullfile(struct file
- }
- }
-
-+ /* step 1a: work around pseudo bug https://bugzilla.yoctoproject.org/show_bug.cgi?id=9317:
-+ pseudo fails to share xattrs between files sharing the same inode. We have to copy
-+ all xattrs explicitly. */
-+ {
-+ /* Intentionally simplistic code with static buffer sizes.
-+ Pseudo bug fix is scheduled for the near future. */
-+ char list[1024];
-+ char *name;
-+ ssize_t listsize;
-+ listsize = llistxattr(origin, list, sizeof(list));
-+ if (listsize < 0) {
-+ fprintf(stderr, "Copying xattrs: llistxattr(%s): %s\n", origin, strerror(errno));
-+ assert(0);
-+ }
-+ for (name = list; name < list + listsize; name += strlen(name) + 1) {
-+ char value[2048];
-+ ssize_t valuesize;
-+ valuesize = lgetxattr(origin, name, value, sizeof(value));
-+ if (valuesize < 0) {
-+ fprintf(stderr, "Copying xattrs: lgetxattr(%s): %s\n", origin, strerror(errno));
-+ assert(0);
-+ }
-+ if (lsetxattr(tempfile, name, value, valuesize, 0)) {
-+ fprintf(stderr, "Copying xattrs: lsetxattr(%s, %s): %s\n", tempfile, name, strerror(errno));
-+ assert(0);
-+ }
-+ }
-+ }
-+
- /* step 2a: tar it with each compression type */
- // lzma
- string_or_die(&tarcommand, TAR_COMMAND " --directory=%s " TAR_PERM_ATTR_ARGS " -Jcf %s/%i/files/%s.tar.xz %s",