aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/swupd-client/swupd-client/0001-fix-enable-xattr.patch
blob: b3539df0a43147a165aa0821af3834496223306e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From a8c7a7a93e19b328a1a6e8114f21b2bff9ad4f69 Mon Sep 17 00:00:00 2001
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Thu, 17 Nov 2016 18:00:46 +0100
Subject: [PATCH] fix --enable-xattr

Commit fc0f570d added a check that prevents using --enable-xattr
together with --enable-bsdtar, perhaps because it was assumed that this
wouldn't work because there is no special tar option as in the GNU tar
case.

But that combination works fine for (and is needed by) Ostro OS with
IMA and Smack xattrs, so the check needs to be removed.

Besides that, enabling xattrs also had no effect because xattrs.c
never got to see the SWUPD_WITH_XATTRS define due to not including
config.h.

Upstream-Status: Backported [https://github.com/clearlinux/swupd-client/commit/a2b80dc6958b78885ec395f22d34996e71a5f58a]

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 configure.ac | 5 +----
 src/xattrs.c | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5cbc450..2166fd0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,10 +135,7 @@ AC_ARG_ENABLE(
 	AS_HELP_STRING([--enable-xattr],[Use extended file attributes (unused by default)])
 )
 AS_IF([test "x$enable_xattr" = "xyes"],
-	    [AC_DEFINE(SWUPD_WITH_XATTRS,1,[Use extended file attributes])
-	    AS_IF(test "x$enable_bsdtar" = "xyes",
-	    echo "Options --enable-bsdtar and --enable-xattr are incompatible" >&2
-	    AS_EXIT(1))],
+	    [AC_DEFINE(SWUPD_WITH_XATTRS,1,[Use extended file attributes])],
 	    [XATTR=no]
 )
 TARSELINUX="yes"
diff --git a/src/xattrs.c b/src/xattrs.c
index 36d4241..bbca237 100644
--- a/src/xattrs.c
+++ b/src/xattrs.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <sys/xattr.h>
 
+#include "config.h"
 #include "swupd.h"
 #include "xattrs.h"
 
-- 
2.1.4