diff options
author | richard <richard> | 2020-06-16 12:59:13 +0200 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2020-06-27 19:01:35 +0800 |
commit | 3590e302dff91366b0b89660b31ab8f18ff5b0c4 (patch) | |
tree | 494be8a4c3f90c3fb10f26dcb6816a301ec1a9fc | |
parent | c39b30e99f1a1ea4a22313dd6f7b0337d632a31b (diff) | |
download | meta-secure-core-3590e302dff91366b0b89660b31ab8f18ff5b0c4.tar.gz |
update tpm2-tools_3.2.1 -> tpm2-tools_4.1.1.bb, tpm2-abrmd_2.0.3 -> tpm2-abrmd_2.3.0, tpm2-tss_2.2.3.bb -> tpm2-tss_2.3.2.bb
17 files changed, 83 insertions, 516 deletions
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0002-luks-setup.sh-Updated-TPM-Tools.patch b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0002-luks-setup.sh-Updated-TPM-Tools.patch new file mode 100755 index 0000000..29a73f0 --- /dev/null +++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0002-luks-setup.sh-Updated-TPM-Tools.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- a/scripts/luks-setup.sh 2020-02-17 15:23:50.214278216 +0100 | ||
2 | +++ b/scripts/luks-setup.sh 2020-02-17 15:22:41.054281439 +0100 | ||
3 | @@ -402,7 +402,7 @@ | ||
4 | detect_tpm | ||
5 | if [ $? -eq 0 ]; then | ||
6 | if [ $OPT_EVICT_ALL -eq 1 ]; then | ||
7 | - cmd="tpm2_takeownership --clear" | ||
8 | + cmd="tpm2_clear" | ||
9 | [ -n "$OPT_OLD_LOCKOUT_AUTH" ] && cmd="${cmd} --oldLockPasswd $OPT_OLD_LOCKOUT_AUTH" | ||
10 | [ -n "$OPT_LOCKOUT_AUTH" ] && cmd="${cmd} --LockPasswd $OPT_LOCKOUT_AUTH" | ||
11 | eval "$cmd" | ||
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb index e36e2f2..d8025c3 100644 --- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb +++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | |||
@@ -23,6 +23,7 @@ SRC_URI = "\ | |||
23 | git://github.com/jiazhang0/cryptfs-tpm2.git \ | 23 | git://github.com/jiazhang0/cryptfs-tpm2.git \ |
24 | file://0001-luks-setup.sh-Add-support-for-qemu-with-the-swtpm.patch \ | 24 | file://0001-luks-setup.sh-Add-support-for-qemu-with-the-swtpm.patch \ |
25 | file://0001-encrypt_secret.py-switch-to-python3.patch \ | 25 | file://0001-encrypt_secret.py-switch-to-python3.patch \ |
26 | file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ | ||
26 | " | 27 | " |
27 | SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" | 28 | SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" |
28 | 29 | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch b/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch deleted file mode 100644 index 65a09b4..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/files/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | From 3cacba40114f26650c681b067ff0495f4a0dd186 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonas Witschel <diabonas@gmx.de> | ||
3 | Date: Fri, 25 Jan 2019 16:52:21 +0100 | ||
4 | Subject: [PATCH] build: update for ax_code_coverage.m4 version 2019.01.06 | ||
5 | |||
6 | @CODE_COVERAGE_RULES@ doesn't exist any more and needs to be replaced. | ||
7 | Also includes a compatibility wrapper for older versions of the file. | ||
8 | |||
9 | There is a bug in the new version of ax_code_coverage.m4 | ||
10 | (cf. https://github.com/autoconf-archive/autoconf-archive/pull/182): | ||
11 | AM_DISTCHECK_CONFIGURE_FLAGS is recursively defined, which causes | ||
12 | "make distcheck" to fail in combination with --enable-code-coverage. | ||
13 | This is fixed by overwriting the faulty definition. | ||
14 | |||
15 | Upstream-Status: Backport [https://github.com/tpm2-software/tpm2-abrmd/commit/3cacba40114f26650c681b067ff0495f4a0dd186] | ||
16 | |||
17 | Signed-off-by: Jonas Witschel <diabonas@gmx.de> | ||
18 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
19 | --- | ||
20 | Makefile.am | 15 +++++++++++++++ | ||
21 | configure.ac | 5 +++++ | ||
22 | 2 files changed, 17 insertions(+) | ||
23 | |||
24 | diff --git a/Makefile.am b/Makefile.am | ||
25 | index 68c5359..eaeca94 100644 | ||
26 | --- a/Makefile.am | ||
27 | +++ b/Makefile.am | ||
28 | @@ -166,7 +166,22 @@ dbusservicedir = $(datadir)/dbus-1/system-services | ||
29 | dbusservice_DATA = dist/com.intel.tss2.Tabrmd.service | ||
30 | endif # HAVE_SYSTEMD | ||
31 | |||
32 | +# ax_code_coverage | ||
33 | +if AUTOCONF_CODE_COVERAGE_2019_01_06 | ||
34 | +include $(top_srcdir)/aminclude_static.am | ||
35 | +clean-local: code-coverage-clean | ||
36 | +distclean-local: code-coverage-dist-clean | ||
37 | + | ||
38 | +# workaround for a bug in Autoconf Archive 2019.01.06 | ||
39 | +# (https://github.com/autoconf-archive/autoconf-archive/pull/182) | ||
40 | +if CODE_COVERAGE_ENABLED | ||
41 | +AM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage | ||
42 | +endif # CODE_COVERAGE_ENABLED | ||
43 | + | ||
44 | +else # AUTOCONF_CODE_COVERAGE_2019_01_06 | ||
45 | @CODE_COVERAGE_RULES@ | ||
46 | +endif # AUTOCONF_CODE_COVERAGE_2019_01_06 | ||
47 | + | ||
48 | @VALGRIND_CHECK_RULES@ | ||
49 | VALGRIND_G_DEBUG = fatal-criticals,gc-friendly | ||
50 | VALGRIND_memcheck_FLAGS = --leak-check=full --show-leak-kinds=definite,indirect --track-origins=yes --error-exitcode=1 | ||
51 | diff --git a/configure.ac b/configure.ac | ||
52 | index 504db32..6f35fb5 100644 | ||
53 | --- a/configure.ac | ||
54 | +++ b/configure.ac | ||
55 | @@ -45,6 +45,11 @@ AS_IF([test ! -x "$(which $GDBUS_CODEGEN)"], | ||
56 | [AC_MSG_ERROR([*** gdbus-codegen is required to build tpm2-abrmd])]) | ||
57 | |||
58 | AX_CODE_COVERAGE | ||
59 | +m4_ifdef([_AX_CODE_COVERAGE_RULES], | ||
60 | + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])], | ||
61 | + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])]) | ||
62 | +AX_ADD_AM_MACRO_STATIC([]) | ||
63 | + | ||
64 | # disable helgrind and drd, they hate GAsyncQueue | ||
65 | AX_VALGRIND_DFLT([sgcheck], [off]) | ||
66 | AX_VALGRIND_DFLT([helgrind], [off]) | ||
67 | -- | ||
68 | 2.7.4 | ||
69 | |||
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/files/tpm2-abrmd.default b/meta-tpm2/recipes-tpm/tpm2-abrmd/files/tpm2-abrmd.default index 08dd111..b4b3c20 100644 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/files/tpm2-abrmd.default +++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/files/tpm2-abrmd.default | |||
@@ -1 +1 @@ | |||
DAEMON_OPTS="--tcti=device --logger=syslog --max-connections=20 --max-transients=20" | DAEMON_OPTS="--tcti=device --logger=syslog --max-connections=20 --max-transients=20 --flush-all" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb deleted file mode 100644 index ab07063..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.0.3.bb +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | SRC_URI += " \ | ||
4 | https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ | ||
5 | file://0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch \ | ||
6 | file://tpm2-abrmd.default \ | ||
7 | " | ||
8 | SRC_URI[md5sum] = "a71faf008de2e444265b0d1d889cab2e" | ||
9 | SRC_URI[sha256sum] = "ff0ed283b0300cd784d6bf2b042e167020f8443602974e53b924e9fd98a4b515" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.3.0.bb index 1cf5379..991364a 100644 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd.inc +++ b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_2.3.0.bb | |||
@@ -1,27 +1,32 @@ | |||
1 | SUMMARY = "TPM2 Access Broker & Resource Manager" | 1 | SUMMARY = "TPM2 Access Broker & Resource Manager" |
2 | DESCRIPTION = "This is a system daemon implementing the TPM2 Access Broker (AB) \ | 2 | DESCRIPTION = "This is a system daemon implementing the TPM2 access \ |
3 | and Resource Manager (RM) specification from the TCG (Trusted Computing Group). \ | 3 | broker (TAB) & Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) \ |
4 | The daemon (tpm2-abrmd) is implemented using Glib and the GObject system." | 4 | is implemented using Glib and the GObject system. In this documentation and \ |
5 | HOMEPAGE = "https://github.com/tpm2-software/tpm2-abrmd" | 5 | in the code we use `tpm2-abrmd` and `tabrmd` interchangeably. \ |
6 | " | ||
6 | SECTION = "security/tpm" | 7 | SECTION = "security/tpm" |
8 | |||
7 | LICENSE = "BSD-2-Clause" | 9 | LICENSE = "BSD-2-Clause" |
8 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" | 10 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
9 | 11 | ||
10 | DEPENDS += " \ | 12 | DEPENDS = "autoconf-archive dbus glib-2.0 tpm2-tss glib-2.0-native \ |
11 | autoconf-archive-native dbus glib-2.0 glib-2.0-native \ | 13 | libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim" |
12 | tpm2-tss libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim \ | ||
13 | " | ||
14 | 14 | ||
15 | SRC_URI = "\ | 15 | SRC_URI = "\ |
16 | git://github.com/tpm2-software/tpm2-abrmd.git \ | ||
16 | file://tpm2-abrmd-init.sh \ | 17 | file://tpm2-abrmd-init.sh \ |
17 | file://tpm2-abrmd.default \ | 18 | file://tpm2-abrmd.default \ |
18 | " | 19 | " |
19 | 20 | ||
21 | SRCREV = "ac82192df1158cb58eac02777cf15c965b02cfbc" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
20 | inherit autotools pkgconfig systemd update-rc.d useradd | 25 | inherit autotools pkgconfig systemd update-rc.d useradd |
21 | 26 | ||
22 | SYSTEMD_PACKAGES += "${PN}" | 27 | SYSTEMD_PACKAGES += "${PN}" |
23 | SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" | 28 | SYSTEMD_SERVICE_${PN} = "tpm2-abrmd.service" |
24 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | 29 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" |
25 | 30 | ||
26 | INITSCRIPT_NAME = "${PN}" | 31 | INITSCRIPT_NAME = "${PN}" |
27 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." | 32 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." |
@@ -30,10 +35,8 @@ USERADD_PACKAGES = "${PN}" | |||
30 | GROUPADD_PARAM_${PN} = "tss" | 35 | GROUPADD_PARAM_${PN} = "tss" |
31 | USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" | 36 | USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" |
32 | 37 | ||
33 | EXTRA_OECONF += "\ | 38 | PACKAGECONFIG ?="${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd', '', d)}" |
34 | --with-systemdsystemunitdir=${systemd_system_unitdir} \ | 39 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --with-systemdsystemunitdir=no" |
35 | --with-systemdpresetdir=${systemd_unitdir}/system-preset \ | ||
36 | " | ||
37 | 40 | ||
38 | do_install_append() { | 41 | do_install_append() { |
39 | install -d "${D}${sysconfdir}/init.d" | 42 | install -d "${D}${sysconfdir}/init.d" |
@@ -43,9 +46,9 @@ do_install_append() { | |||
43 | install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd" | 46 | install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd" |
44 | } | 47 | } |
45 | 48 | ||
46 | FILES_${PN} += "\ | 49 | FILES_${PN} += "${libdir}/systemd/system-preset \ |
47 | ${systemd_unitdir}/system-preset \ | 50 | ${datadir}/dbus-1" |
48 | ${datadir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service \ | ||
49 | " | ||
50 | 51 | ||
51 | RDEPENDS_${PN} += "tpm2-tss" | 52 | RDEPENDS_${PN} += "tpm2-tss" |
53 | |||
54 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb b/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb deleted file mode 100644 index 1b115fb..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-abrmd/tpm2-abrmd_git.bb +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | DEFAULT_PREFERENCE = "-1" | ||
4 | |||
5 | PVBASE := "${PV}" | ||
6 | PV = "${PVBASE}.${SRCPV}" | ||
7 | |||
8 | SRC_URI += " \ | ||
9 | git://github.com/01org/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN} \ | ||
10 | " | ||
11 | |||
12 | def version_git(d): | ||
13 | version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) | ||
14 | if version is not None and "git" in version: | ||
15 | return d.getVar("AUTOREV") | ||
16 | else: | ||
17 | return "cceb6c12ebb335aacb49207ee13d2f2fc833580a" | ||
18 | SRCREV ?= '${@version_git(d)}' | ||
19 | |||
20 | S = "${WORKDIR}/${BPN}" | ||
21 | |||
22 | do_configure_prepend () { | ||
23 | # execute the bootstrap script | ||
24 | currentdir="$(pwd)" | ||
25 | cd "${S}" | ||
26 | AUTORECONF=true ./bootstrap | ||
27 | cd "${currentdir}" | ||
28 | } | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-test-fix-yaml.load-warning.patch b/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-test-fix-yaml.load-warning.patch deleted file mode 100644 index 1d9e256..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tools/files/0001-test-fix-yaml.load-warning.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 0de180698bc992420fa8670d1ecce24008a4e3b9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 10 Mar 2020 11:18:51 +0800 | ||
4 | Subject: [PATCH] test: fix yaml.load warning | ||
5 | |||
6 | The yaml.load(f) is deprecated since pyyaml 5.1. | ||
7 | Use yaml.load(f, Loader=yaml.BaseLoader) instead of it. | ||
8 | See https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation | ||
9 | |||
10 | Fixes warning: | ||
11 | YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, | ||
12 | as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/tpm2-software/tpm2-tools/pull/1944] | ||
15 | |||
16 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
17 | --- | ||
18 | test/system/test_tpm2_activecredential.sh | 2 +- | ||
19 | test/system/test_tpm2_create.sh | 2 +- | ||
20 | test/system/test_tpm2_createprimary.sh | 2 +- | ||
21 | test/system/test_tpm2_nv.sh | 2 +- | ||
22 | test/system/test_tpm2_pcrevent.sh | 2 +- | ||
23 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
24 | |||
25 | diff --git a/test/system/test_tpm2_activecredential.sh b/test/system/test_tpm2_activecredential.sh | ||
26 | index d8cadf5..3c9cf6e 100755 | ||
27 | --- a/test/system/test_tpm2_activecredential.sh | ||
28 | +++ b/test/system/test_tpm2_activecredential.sh | ||
29 | @@ -61,7 +61,7 @@ from __future__ import print_function | ||
30 | import yaml | ||
31 | |||
32 | with open('ak.out', 'r') as f: | ||
33 | - doc = yaml.load(f) | ||
34 | + doc = yaml.load(f, Loader=yaml.BaseLoader) | ||
35 | print(doc['loaded-key']['name']) | ||
36 | pyscript` | ||
37 | |||
38 | diff --git a/test/system/test_tpm2_create.sh b/test/system/test_tpm2_create.sh | ||
39 | index d0bf031..ff192ca 100755 | ||
40 | --- a/test/system/test_tpm2_create.sh | ||
41 | +++ b/test/system/test_tpm2_create.sh | ||
42 | @@ -59,7 +59,7 @@ import yaml | ||
43 | |||
44 | with open("$2") as f: | ||
45 | try: | ||
46 | - y = yaml.load(f) | ||
47 | + y = yaml.load(f, Loader=yaml.BaseLoader) | ||
48 | found = "$1" in y | ||
49 | if (not found): | ||
50 | sys.stderr.write('Could not find index 0x%X\n' % ("$1")) | ||
51 | diff --git a/test/system/test_tpm2_createprimary.sh b/test/system/test_tpm2_createprimary.sh | ||
52 | index 83bdad4..cc4dce0 100755 | ||
53 | --- a/test/system/test_tpm2_createprimary.sh | ||
54 | +++ b/test/system/test_tpm2_createprimary.sh | ||
55 | @@ -73,7 +73,7 @@ import yaml | ||
56 | |||
57 | with open("$2") as f: | ||
58 | try: | ||
59 | - y = yaml.load(f) | ||
60 | + y = yaml.load(f, Loader=yaml.BaseLoader) | ||
61 | found = "$1" in y | ||
62 | if (not found): | ||
63 | sys.stderr.write('Could not find index 0x%X\n' % ("$1")) | ||
64 | diff --git a/test/system/test_tpm2_nv.sh b/test/system/test_tpm2_nv.sh | ||
65 | index 2db6522..756d7ea 100755 | ||
66 | --- a/test/system/test_tpm2_nv.sh | ||
67 | +++ b/test/system/test_tpm2_nv.sh | ||
68 | @@ -69,7 +69,7 @@ import yaml | ||
69 | |||
70 | with open("$2") as f: | ||
71 | try: | ||
72 | - y = yaml.load(f) | ||
73 | + y = yaml.load(f, Loader=yaml.BaseLoader) | ||
74 | found = $1 in y | ||
75 | if (not found): | ||
76 | sys.stderr.write('Could not find index 0x%X\n' % ($1)) | ||
77 | diff --git a/test/system/test_tpm2_pcrevent.sh b/test/system/test_tpm2_pcrevent.sh | ||
78 | index 30ec932..74f640b 100755 | ||
79 | --- a/test/system/test_tpm2_pcrevent.sh | ||
80 | +++ b/test/system/test_tpm2_pcrevent.sh | ||
81 | @@ -59,7 +59,7 @@ import yaml | ||
82 | with open("$1", 'r') as stream: | ||
83 | |||
84 | try: | ||
85 | - y = yaml.load(stream) | ||
86 | + y = yaml.load(stream, Loader=yaml.BaseLoader) | ||
87 | alg = y["$2"] | ||
88 | value = alg[$3] | ||
89 | print(value) | ||
90 | -- | ||
91 | 2.7.4 | ||
92 | |||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/files/0002-test-only-support-python3.patch b/meta-tpm2/recipes-tpm/tpm2-tools/files/0002-test-only-support-python3.patch deleted file mode 100644 index d2f2cd2..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tools/files/0002-test-only-support-python3.patch +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | From 519e70785b56a10a6c326730cda90354ed48d2cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Wed, 11 Mar 2020 16:31:01 +0800 | ||
4 | Subject: [PATCH] test: only support python3 | ||
5 | |||
6 | The python2 is EOL and in some distributions (e.g. CentOS 8/RHEL 8), | ||
7 | there is no python symbolic link by default which will cause an error | ||
8 | when running the test scripts: | ||
9 | $ ./test_tpm2_activecredential.sh: line 66: python: command not found | ||
10 | |||
11 | See: https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/ | ||
12 | So drop python2 support and only keep python3. | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/tpm2-software/tpm2-tools/pull/1952] | ||
15 | |||
16 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
17 | --- | ||
18 | configure.ac | 19 ++++++++++--------- | ||
19 | test/system/test_tpm2_activecredential.sh | 3 +-- | ||
20 | test/system/test_tpm2_create.sh | 4 +--- | ||
21 | test/system/test_tpm2_createprimary.sh | 4 +--- | ||
22 | test/system/test_tpm2_nv.sh | 4 +--- | ||
23 | test/system/test_tpm2_pcrevent.sh | 4 +--- | ||
24 | 6 files changed, 15 insertions(+), 23 deletions(-) | ||
25 | |||
26 | diff --git a/configure.ac b/configure.ac | ||
27 | index 0bfd5196..129d37c6 100644 | ||
28 | --- a/configure.ac | ||
29 | +++ b/configure.ac | ||
30 | @@ -121,24 +121,25 @@ AS_IF( | ||
31 | [], | ||
32 | [AC_MSG_WARN([Required executable bash not found, system tests require a bash shell!])]) | ||
33 | |||
34 | -AC_CHECK_PROG([PYTHON],[python],[yes]) | ||
35 | +AC_CHECK_PROG([PYTHON3],[python3],[yes]) | ||
36 | AS_IF( | ||
37 | - [test "x${PYTHON}" = x"yes"], | ||
38 | + [test "x${PYTHON3}" = x"yes"], | ||
39 | [], | ||
40 | - [AC_MSG_WARN([Required executable python not found, some system tests will fail!])]) | ||
41 | + [AC_MSG_WARN([Required executable python3 not found, some system tests will fail!])]) | ||
42 | |||
43 | -dnl macro that checks for specific modules in python | ||
44 | -AC_DEFUN([AC_PYTHON_MODULE], | ||
45 | -[AC_MSG_CHECKING([for module $1 in python]) | ||
46 | - echo "import $1" | python - | ||
47 | +dnl macro that checks for specific modules in python3 | ||
48 | +AC_DEFUN([AC_PYTHON3_MODULE], | ||
49 | +[AC_MSG_CHECKING([for module $1 in python3]) | ||
50 | + echo "import $1" | python3 - | ||
51 | if test $? -ne 0 ; then | ||
52 | AC_MSG_RESULT([not found]) | ||
53 | AC_MSG_WARN([System tests require pyyaml, some tests will fail!]) | ||
54 | + else | ||
55 | + AC_MSG_RESULT(found) | ||
56 | fi | ||
57 | -AC_MSG_RESULT(found) | ||
58 | ]) | ||
59 | |||
60 | -AC_PYTHON_MODULE([yaml]) | ||
61 | +AC_PYTHON3_MODULE([yaml]) | ||
62 | |||
63 | AC_SUBST([EXTRA_CFLAGS]) | ||
64 | AC_SUBST([EXTRA_LDFLAGS]) | ||
65 | diff --git a/test/system/test_tpm2_activecredential.sh b/test/system/test_tpm2_activecredential.sh | ||
66 | index d8cadf53..f69576d1 100755 | ||
67 | --- a/test/system/test_tpm2_activecredential.sh | ||
68 | +++ b/test/system/test_tpm2_activecredential.sh | ||
69 | @@ -56,8 +56,7 @@ tpm2_getpubek -Q -H 0x81010009 -g rsa -f ek.pub | ||
70 | tpm2_getpubak -E 0x81010009 -k 0x8101000a -g rsa -D sha256 -s rsassa -f ak.pub -n ak.name > ak.out | ||
71 | |||
72 | # Capture the yaml output and verify that its the same as the name output | ||
73 | -loaded_key_name_yaml=`python << pyscript | ||
74 | -from __future__ import print_function | ||
75 | +loaded_key_name_yaml=`python3 << pyscript | ||
76 | import yaml | ||
77 | |||
78 | with open('ak.out', 'r') as f: | ||
79 | diff --git a/test/system/test_tpm2_create.sh b/test/system/test_tpm2_create.sh | ||
80 | index d0bf0317..f31d6486 100755 | ||
81 | --- a/test/system/test_tpm2_create.sh | ||
82 | +++ b/test/system/test_tpm2_create.sh | ||
83 | @@ -51,9 +51,7 @@ trap cleanup EXIT | ||
84 | |||
85 | function yaml_get() { | ||
86 | |||
87 | -python << pyscript | ||
88 | -from __future__ import print_function | ||
89 | - | ||
90 | +python3 << pyscript | ||
91 | import sys | ||
92 | import yaml | ||
93 | |||
94 | diff --git a/test/system/test_tpm2_createprimary.sh b/test/system/test_tpm2_createprimary.sh | ||
95 | index 83bdad44..a2590f68 100755 | ||
96 | --- a/test/system/test_tpm2_createprimary.sh | ||
97 | +++ b/test/system/test_tpm2_createprimary.sh | ||
98 | @@ -65,9 +65,7 @@ done | ||
99 | |||
100 | function yaml_get() { | ||
101 | |||
102 | -python << pyscript | ||
103 | -from __future__ import print_function | ||
104 | - | ||
105 | +python3 << pyscript | ||
106 | import sys | ||
107 | import yaml | ||
108 | |||
109 | diff --git a/test/system/test_tpm2_nv.sh b/test/system/test_tpm2_nv.sh | ||
110 | index 2db6522a..5f72f264 100755 | ||
111 | --- a/test/system/test_tpm2_nv.sh | ||
112 | +++ b/test/system/test_tpm2_nv.sh | ||
113 | @@ -61,9 +61,7 @@ trap onerror ERR | ||
114 | |||
115 | function yaml_get() { | ||
116 | |||
117 | -python << pyscript | ||
118 | -from __future__ import print_function | ||
119 | - | ||
120 | +python3 << pyscript | ||
121 | import sys | ||
122 | import yaml | ||
123 | |||
124 | diff --git a/test/system/test_tpm2_pcrevent.sh b/test/system/test_tpm2_pcrevent.sh | ||
125 | index 30ec9320..f382387d 100755 | ||
126 | --- a/test/system/test_tpm2_pcrevent.sh | ||
127 | +++ b/test/system/test_tpm2_pcrevent.sh | ||
128 | @@ -50,9 +50,7 @@ trap cleanup EXIT | ||
129 | |||
130 | function yaml_get() { | ||
131 | |||
132 | -python << pyscript | ||
133 | -from __future__ import print_function | ||
134 | - | ||
135 | +python3 << pyscript | ||
136 | import sys | ||
137 | import yaml | ||
138 | |||
139 | -- | ||
140 | 2.17.1 | ||
141 | |||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools.inc b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools.inc deleted file mode 100644 index cea48f8..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools.inc +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | SUMMARY = "Tools for TPM2" | ||
2 | DESCRIPTION = "This project builds a set of command-line tools for \ | ||
3 | interacting with a TPM (Trusted Platform Module) 2." | ||
4 | HOMEPAGE = "https://github.com/tpm2-software/tpm2-tools" | ||
5 | SECTION = "security/tpm" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=91b7c548d73ea16537799e8060cea819" | ||
8 | |||
9 | DEPENDS = " \ | ||
10 | tpm2-abrmd openssl curl autoconf-archive-native \ | ||
11 | tpm2-tss libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim \ | ||
12 | " | ||
13 | |||
14 | inherit autotools pkgconfig | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_3.2.1.bb b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_3.2.1.bb deleted file mode 100644 index e2284d7..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_3.2.1.bb +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | SRC_URI = "\ | ||
4 | https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ | ||
5 | file://0001-test-fix-yaml.load-warning.patch \ | ||
6 | file://0002-test-only-support-python3.patch \ | ||
7 | " | ||
8 | SRC_URI[md5sum] = "17f22e9b47682f4601eb55324282ad6e" | ||
9 | SRC_URI[sha256sum] = "568ff32f99e0835db5d8cea2dce781b6cd6c1034026514240995dae5d9e728b0" | ||
10 | |||
11 | S = "${WORKDIR}/${BPN}-${PV}" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.1.bb b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.1.bb new file mode 100644 index 0000000..e90dcfe --- /dev/null +++ b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_4.1.1.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "Tools for TPM2." | ||
2 | DESCRIPTION = "tpm2-tools" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0eb1216e46938bd723098d93a23c3bcc" | ||
5 | SECTION = "tpm" | ||
6 | |||
7 | DEPENDS = "tpm2-abrmd tpm2-tss openssl curl autoconf-archive" | ||
8 | |||
9 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz" | ||
10 | |||
11 | SRC_URI[md5sum] = "701ae9e8c8cbdd37d89c8ad774f55395" | ||
12 | SRC_URI[sha256sum] = "40b9263d8b949bd2bc03a3cd60fa242e27116727467f9bbdd0b5f2539a25a7b1" | ||
13 | SRC_URI[sha1sum] = "d097d321237983435f05c974533ad90e6f20acef" | ||
14 | SRC_URI[sha384sum] = "396547f400e4f5626d7741d77ec543f312d94e6697899f4c36260d15fab3f4f971ad2c0487e6eaa2d60256f3cf68f85f" | ||
15 | SRC_URI[sha512sum] = "25952cf947f0acd16b1a8dbd3ac8573bce85ff970a7e24c290c4f9cd29418e77a3e48ac82c932fbd250887a9303ab301ff92db594c2fffaba47b873382444d26" | ||
16 | |||
17 | inherit autotools pkgconfig bash-completion | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb b/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb deleted file mode 100644 index c607b29..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tools/tpm2-tools_git.bb +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | DEFAULT_PREFERENCE = "-1" | ||
4 | |||
5 | PVBASE := "${PV}" | ||
6 | PV = "${PVBASE}.${SRCPV}" | ||
7 | |||
8 | SRC_URI = "git://github.com/tpm2-software/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}" | ||
9 | |||
10 | def version_git(d): | ||
11 | version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) | ||
12 | if version is not None and "git" in version: | ||
13 | return d.getVar("AUTOREV") | ||
14 | else: | ||
15 | return "e105149f07c9b944f69599ab67cd8b018ad880d2" | ||
16 | SRCREV ?= '${@version_git(d)}' | ||
17 | |||
18 | S = "${WORKDIR}/${BPN}" | ||
19 | |||
20 | do_configure_prepend () { | ||
21 | # execute the bootstrap script | ||
22 | currentdir=$(pwd) | ||
23 | cd ${S} | ||
24 | AUTORECONF=true ./bootstrap | ||
25 | cd ${currentdir} | ||
26 | } | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch deleted file mode 100644 index c8b1ddb..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss/0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 91d71fb0b7316dedc18ab003954b2358008d8cde Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonas Witschel <diabonas@gmx.de> | ||
3 | Date: Mon, 7 Jan 2019 22:15:06 +0100 | ||
4 | Subject: [PATCH] build: update for ax_code_coverage.m4 version 2019.01.06 | ||
5 | |||
6 | @CODE_COVERAGE_RULES@ doesn't exist any more and needs to be replaced. | ||
7 | Also includes a compatibility switch for older versions of the file. | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/tpm2-software/tpm2-tss/commit/648fa841fa2f2bb6f8fdda02c36ac0abb45f5329] | ||
10 | |||
11 | Signed-off-by: Jonas Witschel <diabonas@gmx.de> | ||
12 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
13 | --- | ||
14 | Makefile.am | 6 ++++++ | ||
15 | configure.ac | 3 +++ | ||
16 | 2 files changed, 9 insertions(+) | ||
17 | |||
18 | diff --git a/Makefile.am b/Makefile.am | ||
19 | index d78d23f..7815c4b 100644 | ||
20 | --- a/Makefile.am | ||
21 | +++ b/Makefile.am | ||
22 | @@ -19,7 +19,13 @@ noinst_PROGRAMS = | ||
23 | |||
24 | ### Add ax_* rules ### | ||
25 | # ax_code_coverage | ||
26 | +if AUTOCONF_CODE_COVERAGE_2019_01_06 | ||
27 | +include $(top_srcdir)/aminclude_static.am | ||
28 | +clean-local: code-coverage-clean | ||
29 | +dist-clean-local: code-coverage-dist-clean | ||
30 | +else | ||
31 | @CODE_COVERAGE_RULES@ | ||
32 | +endif | ||
33 | |||
34 | # ax_doxygen | ||
35 | @DX_RULES@ | ||
36 | diff --git a/configure.ac b/configure.ac | ||
37 | index c8aa314..40883a8 100644 | ||
38 | --- a/configure.ac | ||
39 | +++ b/configure.ac | ||
40 | @@ -312,6 +312,9 @@ AS_IF([test "x$enable_doxygen_doc" != xn | ||
41 | [ERROR_IF_NO_PROG([doxygen])]) | ||
42 | |||
43 | AX_CODE_COVERAGE | ||
44 | +m4_ifdef([_AX_CODE_COVERAGE_RULES], | ||
45 | + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])], | ||
46 | + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])]) | ||
47 | |||
48 | AC_OUTPUT | ||
49 | |||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_2.2.3.bb b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_2.2.3.bb deleted file mode 100644 index 9edc305..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_2.2.3.bb +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" | ||
4 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ | ||
5 | file://0001-build-update-for-ax_code_coverage.m4-version-2019.01.patch \ | ||
6 | " | ||
7 | |||
8 | SRC_URI[md5sum] = "593873bb023a0f8bcb93d12bc6640918" | ||
9 | SRC_URI[sha256sum] = "1369aee648b33128b9ee8e3ad87f5fc6dc37c2077b9f134223ea04f4809a99c3" | ||
10 | |||
11 | S = "${WORKDIR}/${BPN}-${PV}" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss.inc b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_2.3.2.bb index 602cf6a..135efed 100644 --- a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss.inc +++ b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_2.3.2.bb | |||
@@ -1,26 +1,39 @@ | |||
1 | SUMMARY = "The TCG TPM2 Software Stack" | 1 | SUMMARY = "Software stack for TPM2." |
2 | DESCRIPTION = "The TCG (Trusted Computing Group) Software Stack (TSS) \ | 2 | DESCRIPTION = "OSS implementation of the TCG TPM2 Software Stack (TSS2) " |
3 | provides a standard API for accessing the functions of the TPM. \ | ||
4 | Application developers can use this software to develop interoperable \ | ||
5 | client applications." | ||
6 | HOMEPAGE = "https://github.com/tpm2-software/tpm2-tss" | ||
7 | SECTION = "security/tpm" | ||
8 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
9 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=0b1d631c4218b72f6b05cb58613606f4" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
5 | SECTION = "tpm" | ||
10 | 6 | ||
11 | DEPENDS = "autoconf-archive-native libgcrypt" | 7 | DEPENDS = "autoconf-archive-native libgcrypt openssl" |
12 | 8 | ||
13 | PROVIDES = "${PACKAGES}" | 9 | SRCREV = "a99e733ba66c359502689a9c42fd5e02ed1dd7d6" |
14 | 10 | ||
15 | inherit autotools pkgconfig | 11 | SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz" |
12 | SRC_URI[md5sum] = "fb7e6d371959a65dc6d129af81739742" | ||
13 | SRC_URI[sha256sum] = "82929a0611f39246e09202702a61b54c980ab694626c1f5823520ddf75024fa6" | ||
14 | SRC_URI[sha1sum] = "c24ce8b20a8686ada775239389292f6d78020668" | ||
15 | SRC_URI[sha384sum] = "a0c023c024efb6c9906df1e143d692f44433de332b616dc0584c9b4cd4fb0ad544308f291892e91c5a52ef1a4b2abf7f" | ||
16 | SRC_URI[sha512sum] = "7b679b54f3478c3adee5b6c3135cbe491ffd9f4712991f465edbd6c7d2831e5f1537038ec36f288e9545c719d5d167b61116c924cf5d816220615d0b58a1d436" | ||
16 | 17 | ||
17 | EXTRA_OECONF += " \ | 18 | inherit autotools pkgconfig systemd extrausers |
18 | --with-udevrulesdir=${sysconfdir}/udev/rules.d \ | 19 | |
19 | --with-crypto=gcrypt \ | 20 | PACKAGECONFIG ??= "" |
20 | --disable-doxygen-doc \ | 21 | PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, " |
21 | " | 22 | |
23 | EXTRA_OECONF += "--enable-static --with-udevrulesdir=${base_prefix}/lib/udev/rules.d/" | ||
24 | EXTRA_OECONF_remove = " --disable-static" | ||
22 | 25 | ||
26 | |||
27 | EXTRA_USERS_PARAMS = "\ | ||
28 | useradd -p '' tss; \ | ||
29 | groupadd tss; \ | ||
30 | " | ||
31 | |||
32 | PROVIDES = "${PACKAGES}" | ||
23 | PACKAGES = " \ | 33 | PACKAGES = " \ |
34 | ${PN} \ | ||
35 | ${PN}-dbg \ | ||
36 | ${PN}-doc \ | ||
24 | libtss2-mu \ | 37 | libtss2-mu \ |
25 | libtss2-mu-dev \ | 38 | libtss2-mu-dev \ |
26 | libtss2-mu-staticdev \ | 39 | libtss2-mu-staticdev \ |
@@ -33,9 +46,6 @@ PACKAGES = " \ | |||
33 | libtss2 \ | 46 | libtss2 \ |
34 | libtss2-dev \ | 47 | libtss2-dev \ |
35 | libtss2-staticdev \ | 48 | libtss2-staticdev \ |
36 | ${PN} \ | ||
37 | ${PN}-doc \ | ||
38 | ${PN}-dbg \ | ||
39 | " | 49 | " |
40 | 50 | ||
41 | FILES_libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*" | 51 | FILES_libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*" |
@@ -65,3 +75,7 @@ FILES_libtss2-dev = " \ | |||
65 | ${libdir}/pkgconfig \ | 75 | ${libdir}/pkgconfig \ |
66 | ${libdir}/libtss2*so" | 76 | ${libdir}/libtss2*so" |
67 | FILES_libtss2-staticdev = "${libdir}/libtss*a" | 77 | FILES_libtss2-staticdev = "${libdir}/libtss*a" |
78 | |||
79 | FILES_${PN} = "${libdir}/udev ${base_prefix}/lib/udev" | ||
80 | |||
81 | RDEPENDS_libtss2 = "libgcrypt" | ||
diff --git a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb b/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb deleted file mode 100644 index 50a6749..0000000 --- a/meta-tpm2/recipes-tpm/tpm2-tss/tpm2-tss_git.bb +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | include ${BPN}.inc | ||
2 | |||
3 | DEFAULT_PREFERENCE = "-1" | ||
4 | |||
5 | PVBASE := "${PV}" | ||
6 | PV = "${PVBASE}.${SRCPV}" | ||
7 | |||
8 | SRC_URI = "git://github.com/tpm2-software/${BPN}.git;protocol=git;branch=master;name=${BPN};destsuffix=${BPN}" | ||
9 | |||
10 | def version_git(d): | ||
11 | version = d.getVar("PREFERRED_VERSION_%s" % d.getVar('PN')) | ||
12 | if version is not None and "git" in version: | ||
13 | return d.getVar("AUTOREV") | ||
14 | else: | ||
15 | return "35ab16e1d328f709d6146221a371b7341b84b670" | ||
16 | SRCREV ?= '${@version_git(d)}' | ||
17 | |||
18 | S = "${WORKDIR}/${BPN}" | ||
19 | |||
20 | do_configure_prepend () { | ||
21 | # Execute the bootstrap script, to generate src_vars.mk. | ||
22 | # The actual autotools bootstrapping is done by the normal | ||
23 | # do_configure, which does a better job with it (for example, | ||
24 | # it finds m4 macros also in the native sysroot). | ||
25 | currentdir="$(pwd)" | ||
26 | cd "${S}" | ||
27 | AUTORECONF=true ./bootstrap | ||
28 | cd "${currentdir}" | ||
29 | } | ||