From 7c83acd8618225324953d152714cc81d141b0c12 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Wed, 5 Jul 2017 10:52:10 +0800 Subject: Clean up RDEPENDS Signed-off-by: Lans Zhang --- .../packagegroup-encrypted-storage-initramfs.bb | 6 +-- .../packagegroup-encrypted-storage.bb | 9 ++-- .../packagegroup-encrypted-storage.inc | 23 ++------- .../recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | 57 ++++++++++++++++++++-- .../initrdscripts/initrdscripts-ima.bb | 1 - 5 files changed, 64 insertions(+), 32 deletions(-) diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb index 88e8f7f..91c16fd 100644 --- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb +++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb @@ -1,8 +1,8 @@ -include packagegroup-encrypted-storage.inc - DESCRIPTION = "The packages used for encrypted storage in initramfs." -RDEPENDS_${PN} += " \ +require packagegroup-encrypted-storage.inc + +RDEPENDS_${PN} += "\ cryptfs-tpm2-initramfs \ packagegroup-tpm2-initramfs \ " diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb index 225eb6a..46ed2a8 100644 --- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb +++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb @@ -1,13 +1,12 @@ -include packagegroup-encrypted-storage.inc - DESCRIPTION = "The packages used for encrypted storage." +require packagegroup-encrypted-storage.inc + # Install the minimal stuffs only for the linux rootfs. # The common packages shared between initramfs and rootfs # are listed in the .inc. -# @util-linux: fdisk -# @parted: parted -RDEPENDS_${PN} += " \ + +RDEPENDS_${PN} += "\ util-linux-fdisk \ parted \ packagegroup-tpm2 \ diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc index ab4b778..ba041d3 100644 --- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc +++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc @@ -1,25 +1,8 @@ LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "\ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ +" ALLOW_EMPTY_${PN} = "1" S = "${WORKDIR}" - -# Install the minimal stuffs for the common uses between initramfs -# and linux rootfs. -# @util-linux: mount, umount -# @cryptsetup: cryptsetup -# @cryptfs-tpm: tpm_gen_dmcrypt_key, tpm_unwrap_dmcrypt_key -# @kmod: modprobe -# @coreutils: cat, mkdir, mknod, cp, rm -# @trousers: tcsd -RDEPENDS_${PN} = " \ - util-linux-mount \ - util-linux-umount \ - cryptsetup \ - kmod \ - coreutils \ - cryptfs-tpm2 \ - procps \ -" 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 cdbaddd..0f8a422 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 @@ -19,7 +19,7 @@ PV = "0.6.0+git${SRCPV}" SRC_URI = "\ git://github.com/WindRiver-OpenSourceLabs/cryptfs-tpm2.git \ " -SRCREV = "55ffac41a08c49c0d202bd82bd8afe27d5b0f2ba" +SRCREV = "4f6a7a34cb7b0c0afd6c5f96c3de5b677a256cc5" S = "${WORKDIR}/git" @@ -41,8 +41,8 @@ PARALLEL_MAKE = "" do_install() { oe_runmake install DESTDIR="${D}" - if [ x"${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', '1', '0', d)}" = x"1" ]; then - install -m 0500 ${S}/script/init.cryptfs ${D} + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', '1', '0', d)}" = "1" ]; then + install -m 0500 "${S}/scripts/init.cryptfs" "${D}" fi } @@ -54,8 +54,59 @@ FILES_${PN}-initramfs = "\ /init.cryptfs \ " +# Install the minimal stuffs only, and don't care how the external +# environment is configured. + +# For luks-setup.sh +# @bash: bash +# @coreutils: echo, printf, cat, rm +# @grep: grep +# @procps: pkill, pgrep +# @cryptsetup: cryptsetup +# @tpm2.0-tools: tpm2_* +# @tpm2-abrmd: optional RDEPENDS_${PN} += "\ libtss2 \ libtctidevice \ libtctisocket \ + bash \ + coreutils \ + grep \ + procps \ + cryptsetup \ +" + +RDEPENDS_${PN} = "\ + tpm2.0-tools \ +" + +# For init.cryptfs +# @bash: bash +# @coreutils: echo, printf, cat, sleep, mkdir, seq, rm, rmdir, mknod, cut +# @grep: grep +# @gawk: awk +# @sed: sed +# @kmod: depmod, modprobe +# @cryptsetup: cryptsetup +# @cryptfs-tpm2: cryptfs-tpm2 +# @net-tools: ifconfig +# @util-linux: mount, umount, blkid +RDEPENDS_${PN}-initramfs = "\ + bash \ + coreutils \ + grep \ + gawk \ + sed \ + kmod \ + cryptsetup \ + cryptfs-tpm2 \ + net-tools \ + util-linux-mount \ + util-linux-umount \ + util-linux-blkid \ +" + +RRECOMMENDS_${PN}-initramfs = "\ + kernel-module-tpm-crb \ + kernel-module-tpm-tis \ " diff --git a/meta-integrity/recipes-core/initrdscripts/initrdscripts-ima.bb b/meta-integrity/recipes-core/initrdscripts/initrdscripts-ima.bb index 8e40392..737d8b7 100644 --- a/meta-integrity/recipes-core/initrdscripts/initrdscripts-ima.bb +++ b/meta-integrity/recipes-core/initrdscripts/initrdscripts-ima.bb @@ -23,7 +23,6 @@ FILES_${PN} += "\ # Install the minimal stuffs only, and don't care how the external # environment is configured. -# @bash: sh # @coreutils: echo, printf # @grep: grep # @gawk: awk -- cgit v1.2.3-54-g00ecf