summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch48
-rw-r--r--meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch26
-rw-r--r--meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb (renamed from meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb)16
3 files changed, 38 insertions, 52 deletions
diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch
deleted file mode 100644
index cae2e76..0000000
--- a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 03cca78d24d716eec792f86f5b0bc69886fad981 Mon Sep 17 00:00:00 2001
2From: Patrick McCarty <patrick.mccarty@intel.com>
3Date: Fri, 18 Dec 2020 01:54:05 +0000
4Subject: [PATCH] configure.ac: fix compatibility with autoconf 2.70
5
6With autoconf 2.70, not quoting the second argument to one of the AS_IF
7macro expansions leads to generation of invalid shell code affecting the
8first nested ERROR_IF_NO_PROG expansion.
9
10The invalid shell code leads to an error resembling:
11
12 ./configure: line 18826: syntax error near unexpected token `newline'
13 ./configure: line 18826: ` '''
14
15Fix the issue by quoting the second argument to the affected AS_IF,
16similar to the quoting found elsewhere in configure.ac.
17
18Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
19
20Upstream-Status: Backport
21Signed-off-by: Armin Kuster <akuster808@gmail.com>
22
23---
24 configure.ac | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
26
27Index: tpm2-tss-3.0.3/configure.ac
28===================================================================
29--- tpm2-tss-3.0.3.orig/configure.ac
30+++ tpm2-tss-3.0.3/configure.ac
31@@ -279,7 +279,7 @@ AC_ARG_ENABLE([integration],
32 [build and execute integration tests])],,
33 [enable_integration=no])
34 AS_IF([test "x$enable_integration" = "xyes"],
35- AS_IF([test "$HOSTOS" = "Linux"],
36+ [AS_IF([test "$HOSTOS" = "Linux"],
37 [ERROR_IF_NO_PROG([ss])],
38 [ERROR_IF_NO_PROG([sockstat])])
39 ERROR_IF_NO_PROG([echo])
40@@ -328,7 +328,7 @@ AS_IF([test "x$enable_integration" = "xy
41 [AC_MSG_ERROR([No simulator executable found in PATH for testing TCTI.])])
42 AC_SUBST([INTEGRATION_TCTI], [$integration_tcti])
43 AC_SUBST([INTEGRATION_ARGS], [$integration_args])
44- AC_SUBST([ENABLE_INTEGRATION], [$enable_integration]))
45+ AC_SUBST([ENABLE_INTEGRATION], [$enable_integration])])
46 AM_CONDITIONAL([ENABLE_INTEGRATION],[test "x$enable_integration" = "xyes"])
47 #
48 # sanitizer compiler flags
diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch
new file mode 100644
index 0000000..b5579e1
--- /dev/null
+++ b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch
@@ -0,0 +1,26 @@
1revert configure: add checks for all tools used by make install
2
3Not appropriate for cross build env.
4
5Upstream-Status: OE [inappropriate]
6Signed-off-by: Armin Kuster <akuster808@gmail.com>
7
8Index: tpm2-tss-3.1.0/configure.ac
9===================================================================
10--- tpm2-tss-3.1.0.orig/configure.ac
11+++ tpm2-tss-3.1.0/configure.ac
12@@ -471,14 +471,6 @@ AM_CONDITIONAL(SYSD_SYSUSERS, test "x$sy
13 AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes)
14 AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes")
15 # Check all tools used by make install
16-AS_IF([test "$HOSTOS" = "Linux"],
17- [ERROR_IF_NO_PROG([groupadd])
18- ERROR_IF_NO_PROG([useradd])
19- ERROR_IF_NO_PROG([id])
20- ERROR_IF_NO_PROG([chown])
21- ERROR_IF_NO_PROG([chmod])
22- ERROR_IF_NO_PROG([mkdir])
23- ERROR_IF_NO_PROG([setfacl])])
24
25 AC_SUBST([PATH])
26
diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb
index 1a36a5b..e0f2d09 100644
--- a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb
@@ -7,9 +7,10 @@ SECTION = "tpm"
7DEPENDS = "autoconf-archive-native libgcrypt openssl" 7DEPENDS = "autoconf-archive-native libgcrypt openssl"
8 8
9SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ 9SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \
10 file://0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch \ 10 file://fixup_hosttools.patch \
11 " 11 "
12SRC_URI[sha256sum] = "78392be7309baf47f51b122f566ac915fd4d1760ea78571cba2e1484f9b5be17" 12
13SRC_URI[sha256sum] = "8900a6603f74310b749b65f23c3461cde6e2a23a5f61058b21004c25f9cf19e8"
13 14
14inherit autotools pkgconfig systemd extrausers 15inherit autotools pkgconfig systemd extrausers
15 16
@@ -18,14 +19,19 @@ PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, "
18PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c " 19PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c "
19 20
20EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/" 21EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/"
22EXTRA_OECONF += "--runstatedir=/run"
21EXTRA_OECONF:remove = " --disable-static" 23EXTRA_OECONF:remove = " --disable-static"
22 24
23
24EXTRA_USERS_PARAMS = "\ 25EXTRA_USERS_PARAMS = "\
25 useradd -p '' tss; \ 26 useradd -p '' tss; \
26 groupadd tss; \ 27 groupadd tss; \
27 " 28 "
28 29
30do_install:append() {
31 # Remove /run as it is created on startup
32 rm -rf ${D}/run
33}
34
29PROVIDES = "${PACKAGES}" 35PROVIDES = "${PACKAGES}"
30PACKAGES = " \ 36PACKAGES = " \
31 ${PN} \ 37 ${PN} \
@@ -75,6 +81,8 @@ FILES:libtss2-staticdev = "${libdir}/libtss*a"
75 81
76FILES:${PN} = "\ 82FILES:${PN} = "\
77 ${libdir}/udev \ 83 ${libdir}/udev \
84 /var/lib/tpm2-tss \
85 /var/run \
78 ${nonarch_base_libdir}/udev \ 86 ${nonarch_base_libdir}/udev \
79 ${sysconfdir}/tmpfiles.d \ 87 ${sysconfdir}/tmpfiles.d \
80 ${sysconfdir}/tpm2-tss \ 88 ${sysconfdir}/tpm2-tss \