[yocto] [meta-security][PATCH 01/10] tpm: move to a sub layer

Armin Kuster akuster808 at gmail.com
Tue May 9 07:46:52 PDT 2017


Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-tpm/README                                             |  0
 meta-tpm/conf/layer.conf                                    | 13 +++++++++++++
 meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend     |  5 +++++
 .../libtpm/files/Convert-another-vdprintf-to-dprintf.patch  |  0
 .../libtpm/files/Use-format-s-for-call-to-dprintf.patch     |  0
 .../recipes-tpm}/libtpm/files/fix_signed_issue.patch        |  0
 {recipes-tpm => meta-tpm/recipes-tpm}/libtpm/libtpm_1.0.bb  |  0
 .../recipes-tpm}/swtpm/files/fix_fcntl_h.patch              |  0
 .../recipes-tpm}/swtpm/files/fix_lib_search_path.patch      |  0
 .../recipes-tpm}/swtpm/files/fix_signed_issue.patch         |  0
 .../recipes-tpm}/swtpm/files/ioctl_h.patch                  |  0
 .../recipes-tpm}/swtpm/swtpm-wrappers-native.bb             |  0
 {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/swtpm_1.0.bb    |  0
 .../recipes-tpm}/tpm-tools/files/tpm-tools-extendpcr.patch  |  0
 .../recipes-tpm}/tpm-tools/tpm-tools_git.bb                 |  0
 .../recipes-tpm}/tpm2.0-tools/tpm2.0-tools_git.bb           |  0
 .../recipes-tpm}/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4        |  0
 .../tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch     |  0
 .../recipes-tpm}/tpm2.0-tss/tpm2.0-tss_git.bb               |  0
 .../recipes-tpm}/tpm2simulator/tpm2simulator-native_116.bb  |  0
 ...-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch |  0
 .../recipes-tpm}/trousers/files/tcsd.service                |  0
 .../recipes-tpm}/trousers/files/trousers-udev.rules         |  0
 .../recipes-tpm}/trousers/files/trousers.init.sh            |  0
 .../recipes-tpm}/trousers/trousers_git.bb                   |  0
 recipes-kernel/linux/linux-yocto_4.10.bbappend              |  3 ---
 26 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 meta-tpm/README
 create mode 100644 meta-tpm/conf/layer.conf
 create mode 100644 meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend
 rename {recipes-tpm => meta-tpm/recipes-tpm}/libtpm/files/Convert-another-vdprintf-to-dprintf.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/libtpm/files/Use-format-s-for-call-to-dprintf.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/libtpm/files/fix_signed_issue.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/libtpm/libtpm_1.0.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/files/fix_fcntl_h.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/files/fix_lib_search_path.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/files/fix_signed_issue.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/files/ioctl_h.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/swtpm-wrappers-native.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/swtpm/swtpm_1.0.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm-tools/files/tpm-tools-extendpcr.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm-tools/tpm-tools_git.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm2.0-tools/tpm2.0-tools_git.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4 (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm2.0-tss/tpm2.0-tss_git.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/tpm2simulator/tpm2simulator-native_116.bb (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/trousers/files/get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/trousers/files/tcsd.service (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/trousers/files/trousers-udev.rules (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/trousers/files/trousers.init.sh (100%)
 rename {recipes-tpm => meta-tpm/recipes-tpm}/trousers/trousers_git.bb (100%)

diff --git a/meta-tpm/README b/meta-tpm/README
new file mode 100644
index 0000000..e69de29
diff --git a/meta-tpm/conf/layer.conf b/meta-tpm/conf/layer.conf
new file mode 100644
index 0000000..5085db5
--- /dev/null
+++ b/meta-tpm/conf/layer.conf
@@ -0,0 +1,13 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend ${LAYERDIR}/classes/*.bbclass"
+
+BBFILE_COLLECTIONS += "tpm-layer"
+BBFILE_PATTERN_tpm-layer = "^${LAYERDIR}/"
+BBFILE_PRIORITY_tpm-layer = "6"
+
+LAYERDEPENDS_tpm-layer = " \
+    core \
+"
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend b/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend
new file mode 100644
index 0000000..e6b3c65
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend
@@ -0,0 +1,5 @@
+#
+# TPM kernel support
+
+KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'tpm', ' features/tpm/tpm.scc', '', d)}"
+
diff --git a/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch b/meta-tpm/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch
similarity index 100%
rename from recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch
rename to meta-tpm/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch
diff --git a/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch b/meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch
similarity index 100%
rename from recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch
rename to meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch
diff --git a/recipes-tpm/libtpm/files/fix_signed_issue.patch b/meta-tpm/recipes-tpm/libtpm/files/fix_signed_issue.patch
similarity index 100%
rename from recipes-tpm/libtpm/files/fix_signed_issue.patch
rename to meta-tpm/recipes-tpm/libtpm/files/fix_signed_issue.patch
diff --git a/recipes-tpm/libtpm/libtpm_1.0.bb b/meta-tpm/recipes-tpm/libtpm/libtpm_1.0.bb
similarity index 100%
rename from recipes-tpm/libtpm/libtpm_1.0.bb
rename to meta-tpm/recipes-tpm/libtpm/libtpm_1.0.bb
diff --git a/recipes-tpm/swtpm/files/fix_fcntl_h.patch b/meta-tpm/recipes-tpm/swtpm/files/fix_fcntl_h.patch
similarity index 100%
rename from recipes-tpm/swtpm/files/fix_fcntl_h.patch
rename to meta-tpm/recipes-tpm/swtpm/files/fix_fcntl_h.patch
diff --git a/recipes-tpm/swtpm/files/fix_lib_search_path.patch b/meta-tpm/recipes-tpm/swtpm/files/fix_lib_search_path.patch
similarity index 100%
rename from recipes-tpm/swtpm/files/fix_lib_search_path.patch
rename to meta-tpm/recipes-tpm/swtpm/files/fix_lib_search_path.patch
diff --git a/recipes-tpm/swtpm/files/fix_signed_issue.patch b/meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch
similarity index 100%
rename from recipes-tpm/swtpm/files/fix_signed_issue.patch
rename to meta-tpm/recipes-tpm/swtpm/files/fix_signed_issue.patch
diff --git a/recipes-tpm/swtpm/files/ioctl_h.patch b/meta-tpm/recipes-tpm/swtpm/files/ioctl_h.patch
similarity index 100%
rename from recipes-tpm/swtpm/files/ioctl_h.patch
rename to meta-tpm/recipes-tpm/swtpm/files/ioctl_h.patch
diff --git a/recipes-tpm/swtpm/swtpm-wrappers-native.bb b/meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb
similarity index 100%
rename from recipes-tpm/swtpm/swtpm-wrappers-native.bb
rename to meta-tpm/recipes-tpm/swtpm/swtpm-wrappers-native.bb
diff --git a/recipes-tpm/swtpm/swtpm_1.0.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_1.0.bb
similarity index 100%
rename from recipes-tpm/swtpm/swtpm_1.0.bb
rename to meta-tpm/recipes-tpm/swtpm/swtpm_1.0.bb
diff --git a/recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch b/meta-tpm/recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch
similarity index 100%
rename from recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch
rename to meta-tpm/recipes-tpm/tpm-tools/files/tpm-tools-extendpcr.patch
diff --git a/recipes-tpm/tpm-tools/tpm-tools_git.bb b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb
similarity index 100%
rename from recipes-tpm/tpm-tools/tpm-tools_git.bb
rename to meta-tpm/recipes-tpm/tpm-tools/tpm-tools_git.bb
diff --git a/recipes-tpm/tpm2.0-tools/tpm2.0-tools_git.bb b/meta-tpm/recipes-tpm/tpm2.0-tools/tpm2.0-tools_git.bb
similarity index 100%
rename from recipes-tpm/tpm2.0-tools/tpm2.0-tools_git.bb
rename to meta-tpm/recipes-tpm/tpm2.0-tools/tpm2.0-tools_git.bb
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4 b/meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4
similarity index 100%
rename from recipes-tpm/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4
rename to meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss/ax_pthread.m4
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch b/meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch
similarity index 100%
rename from recipes-tpm/tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch
rename to meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss/fix_musl_select_include.patch
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb b/meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
similarity index 100%
rename from recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
rename to meta-tpm/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
diff --git a/recipes-tpm/tpm2simulator/tpm2simulator-native_116.bb b/meta-tpm/recipes-tpm/tpm2simulator/tpm2simulator-native_116.bb
similarity index 100%
rename from recipes-tpm/tpm2simulator/tpm2simulator-native_116.bb
rename to meta-tpm/recipes-tpm/tpm2simulator/tpm2simulator-native_116.bb
diff --git a/recipes-tpm/trousers/files/get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch b/meta-tpm/recipes-tpm/trousers/files/get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch
similarity index 100%
rename from recipes-tpm/trousers/files/get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch
rename to meta-tpm/recipes-tpm/trousers/files/get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch
diff --git a/recipes-tpm/trousers/files/tcsd.service b/meta-tpm/recipes-tpm/trousers/files/tcsd.service
similarity index 100%
rename from recipes-tpm/trousers/files/tcsd.service
rename to meta-tpm/recipes-tpm/trousers/files/tcsd.service
diff --git a/recipes-tpm/trousers/files/trousers-udev.rules b/meta-tpm/recipes-tpm/trousers/files/trousers-udev.rules
similarity index 100%
rename from recipes-tpm/trousers/files/trousers-udev.rules
rename to meta-tpm/recipes-tpm/trousers/files/trousers-udev.rules
diff --git a/recipes-tpm/trousers/files/trousers.init.sh b/meta-tpm/recipes-tpm/trousers/files/trousers.init.sh
similarity index 100%
rename from recipes-tpm/trousers/files/trousers.init.sh
rename to meta-tpm/recipes-tpm/trousers/files/trousers.init.sh
diff --git a/recipes-tpm/trousers/trousers_git.bb b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
similarity index 100%
rename from recipes-tpm/trousers/trousers_git.bb
rename to meta-tpm/recipes-tpm/trousers/trousers_git.bb
diff --git a/recipes-kernel/linux/linux-yocto_4.10.bbappend b/recipes-kernel/linux/linux-yocto_4.10.bbappend
index 35a32b6..0e610d4 100644
--- a/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ b/recipes-kernel/linux/linux-yocto_4.10.bbappend
@@ -1,8 +1,5 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.10:"
 
-# TPM kernel support
-KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'tpm', ' features/tpm/tpm.scc', '', d)}"
-
 SRC_URI += "\
         ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', ' file://apparmor.cfg', '', d)} \
 "
-- 
2.7.4




More information about the yocto mailing list