summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-17 11:49:12 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-19 18:46:04 +0200
commit4c8640ea7c198a4db54b7c9434921a7e192f6fa3 (patch)
tree3f3af2106b6f0aa1a8d756b18a03ffc5e99983c5 /patches
parentaa29d0ca873f4defbf6fa542a28ae021db1840e8 (diff)
downloadptxdist-4c8640ea7c198a4db54b7c9434921a7e192f6fa3.tar.gz
ptxdist-4c8640ea7c198a4db54b7c9434921a7e192f6fa3.tar.xz
ima-evm-utils: use xattr.h from glibc
attr/xattr.h was removed from attr in the latest version. sys/xattr.h from glibc provides a everything needed here. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/ima-evm-utils-1.1/0009-evmctl-add-support-for-offline-image-preparation.patch2
-rw-r--r--patches/ima-evm-utils-1.1/0013-evmctl-use-correct-include-for-xattr.h.patch80
-rw-r--r--patches/ima-evm-utils-1.1/series3
3 files changed, 83 insertions, 2 deletions
diff --git a/patches/ima-evm-utils-1.1/0009-evmctl-add-support-for-offline-image-preparation.patch b/patches/ima-evm-utils-1.1/0009-evmctl-add-support-for-offline-image-preparation.patch
index 696528f75..6d9b40fc5 100644
--- a/patches/ima-evm-utils-1.1/0009-evmctl-add-support-for-offline-image-preparation.patch
+++ b/patches/ima-evm-utils-1.1/0009-evmctl-add-support-for-offline-image-preparation.patch
@@ -229,7 +229,7 @@ index 4c093a038b72..866f74b39b41 100644
#include <dirent.h>
#include <string.h>
#include <stdio.h>
-+#include <attr/xattr.h>
++#include <sys/xattr.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
diff --git a/patches/ima-evm-utils-1.1/0013-evmctl-use-correct-include-for-xattr.h.patch b/patches/ima-evm-utils-1.1/0013-evmctl-use-correct-include-for-xattr.h.patch
new file mode 100644
index 000000000..3157c711a
--- /dev/null
+++ b/patches/ima-evm-utils-1.1/0013-evmctl-use-correct-include-for-xattr.h.patch
@@ -0,0 +1,80 @@
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Mon, 17 Oct 2016 12:45:32 +0100
+Subject: [PATCH] evmctl: use correct include for xattr.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The xattr API/ABI is provided by both the c-library, as well as by the
+libattr package. The c-library's header file is sys/xattr.h, whereas
+libattr's header file can be found in attr/xattr.h.
+
+Given none of the code here *links* against the libattr.so shared library, it
+is wrong to *compile* against libattr's API (header file).
+
+Doing so avoids confusion as to which xattr.h is used as the least problem,
+and potential ABI differences as the worst problem due the mismatching header
+file used.
+
+So make sure we compile and link against the same thing, the c-library in
+both cases.
+
+Signed-off-by: André Draszik <git@andred.net>
+Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
+---
+ configure.ac | 2 +-
+ packaging/ima-evm-utils.spec | 1 -
+ packaging/ima-evm-utils.spec.in | 1 -
+ src/evmctl.c | 2 +-
+ 4 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6822f39cff69..06d061bc94ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,7 @@ AC_SUBST(OPENSSL_LIBS)
+ AC_CHECK_HEADER(unistd.h)
+ AC_CHECK_HEADERS(openssl/conf.h)
+
+-AC_CHECK_HEADERS(attr/xattr.h, , [AC_MSG_ERROR([attr/xattr.h header not found. You need the libattr development package.])])
++AC_CHECK_HEADERS(sys/xattr.h, , [AC_MSG_ERROR([sys/xattr.h header not found. You need the c-library development package.])])
+ AC_CHECK_HEADERS(keyutils.h, , [AC_MSG_ERROR([keyutils.h header not found. You need the libkeyutils development package.])])
+
+ #debug support - yes for a while
+diff --git a/packaging/ima-evm-utils.spec b/packaging/ima-evm-utils.spec
+index a11a27a18815..63388d2b444b 100644
+--- a/packaging/ima-evm-utils.spec
++++ b/packaging/ima-evm-utils.spec
+@@ -11,7 +11,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+ BuildRequires: autoconf
+ BuildRequires: automake
+ BuildRequires: openssl-devel
+-BuildRequires: libattr-devel
+ BuildRequires: keyutils-libs-devel
+
+ %description
+diff --git a/packaging/ima-evm-utils.spec.in b/packaging/ima-evm-utils.spec.in
+index 7ca6c6fb3b0d..65c32f9e6445 100644
+--- a/packaging/ima-evm-utils.spec.in
++++ b/packaging/ima-evm-utils.spec.in
+@@ -11,7 +11,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+ BuildRequires: autoconf
+ BuildRequires: automake
+ BuildRequires: openssl-devel
+-BuildRequires: libattr-devel
+ BuildRequires: keyutils-libs-devel
+
+ %description
+diff --git a/src/evmctl.c b/src/evmctl.c
+index 4422c0e84d4a..02eb84d4c341 100644
+--- a/src/evmctl.c
++++ b/src/evmctl.c
+@@ -49,7 +49,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <dirent.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <linux/xattr.h>
+ #include <getopt.h>
+ #include <keyutils.h>
diff --git a/patches/ima-evm-utils-1.1/series b/patches/ima-evm-utils-1.1/series
index 784fc0147..6fb042465 100644
--- a/patches/ima-evm-utils-1.1/series
+++ b/patches/ima-evm-utils-1.1/series
@@ -12,4 +12,5 @@
0010-evmctl-Do-not-account-.-and-.-for-directory-hash-gen.patch
0011-HACK-don-t-generate-man-page.patch
0012-Fix-warning-for-non-debug-use-case.patch
-# 25e6f60853e6b27e45f386bbca0730ab - git-ptx-patches magic
+0013-evmctl-use-correct-include-for-xattr.h.patch
+# 5032e96fb6da7cb77f053c2b5a6edc44 - git-ptx-patches magic