From f77e53d6278108e53a9fde153cc91b1754a949da Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Fri, 28 Jul 2017 10:09:02 +0800 Subject: meta-secure-core: code style fixup Signed-off-by: Lans Zhang --- README | 2 +- .../recipes-bsp/grub/grub-efi_2.02.bbappend | 2 +- .../recipes-devtools/libsign/libsign_git.bb | 8 ++-- .../linux/linux-yocto-encrypted-storage.inc | 2 +- .../ima-evm-utils/ima-evm-utils_git.bb | 18 ++++---- .../recipes-support/keyutils/keyutils_1.5.9.bb | 48 --------------------- .../recipes-support/keyutils/keyutils_git.bb | 49 ++++++++++++++++++++++ meta-signing-key/classes/user-key-store.bbclass | 2 +- 8 files changed, 67 insertions(+), 64 deletions(-) delete mode 100644 meta-integrity/recipes-support/keyutils/keyutils_1.5.9.bb create mode 100644 meta-integrity/recipes-support/keyutils/keyutils_git.bb diff --git a/README b/README index dec8245..e4402f8 100644 --- a/README +++ b/README @@ -45,7 +45,7 @@ yocto build tree, you can add it to the build system by adding the location of the meta-secure-core layer to bblayers.conf, along with any other layers needed. e.g.: - BBLAYERS ?= " \ + BBLAYERS ?= "\ /path/to/yocto/meta \ /path/to/yocto/meta-poky \ /path/to/yocto/meta-yocto-bsp \ diff --git a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend index 5a56857..da02b5c 100644 --- a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend +++ b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend @@ -131,7 +131,7 @@ do_deploy_class-target() { FILES_${PN} += "/boot/efi" -CONFFILES_${PN} += " \ +CONFFILES_${PN} += "\ ${EFI_BOOT_PATH}/grub.cfg \ ${EFI_BOOT_PATH}/grubenv \ ${EFI_BOOT_PATH}/boot-menu.inc \ diff --git a/meta-efi-secure-boot/recipes-devtools/libsign/libsign_git.bb b/meta-efi-secure-boot/recipes-devtools/libsign/libsign_git.bb index 369d533..72f9d7a 100644 --- a/meta-efi-secure-boot/recipes-devtools/libsign/libsign_git.bb +++ b/meta-efi-secure-boot/recipes-devtools/libsign/libsign_git.bb @@ -1,5 +1,5 @@ SUMMARY = "A generic signing tool framework" -DESCRIPTION = " \ +DESCRIPTION = "\ This project targets to provide a generic signing framework. This framework \ separates the signing request and signing process and correspondingly forms \ the so-called signlet and signaturelet. \ @@ -18,7 +18,7 @@ DEPENDS += "openssl" PV = "0.3.2+git${SRCPV}" -SRC_URI = " \ +SRC_URI = "\ git://github.com/jiazhang0/libsign.git \ " SRCREV = "0e8005f1c546ef25d834084f5cd85d386cf7cd1d" @@ -27,7 +27,7 @@ PARALLEL_MAKE = "" S = "${WORKDIR}/git" -EXTRA_OEMAKE = " \ +EXTRA_OEMAKE = "\ CC="${CC}" \ bindir="${STAGING_BINDIR}" \ libdir="${STAGING_LIBDIR}" \ @@ -43,7 +43,7 @@ do_install() { oe_runmake install DESTDIR="${D}" } -FILES_${PN} += " \ +FILES_${PN} += "\ ${libdir}/signaturelet \ " diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc index 198c972..faa613f 100644 --- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc +++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" -SRC_URI += " \ +SRC_URI += "\ ${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', \ 'file://dmcrypt.scc file://dmcrypt.cfg', '', d)} \ " diff --git a/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb index 16c315a..8ef322d 100644 --- a/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb +++ b/meta-integrity/recipes-support/ima-evm-utils/ima-evm-utils_git.bb @@ -1,19 +1,19 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = " \ - git://git.code.sf.net/p/linux-ima/ima-evm-utils \ - file://0001-Don-t-build-man-pages.patch \ - file://0001-Install-evmctl-to-sbindir-rather-than-bindir.patch \ +DEPENDS += "openssl attr keyutils" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "\ + git://git.code.sf.net/p/linux-ima/ima-evm-utils \ + file://0001-Don-t-build-man-pages.patch \ + file://0001-Install-evmctl-to-sbindir-rather-than-bindir.patch \ " SRCREV = "3e2a67bdb0673581a97506262e62db098efef6d7" -PV = "1.0+git${SRCPV}" S = "${WORKDIR}/git" -DEPENDS += "openssl attr keyutils" -RDEPENDS_${PN}_class-target += "libcrypto libattr keyutils" - inherit pkgconfig autotools # Specify any options you want to pass to the configure script using EXTRA_OECONF: @@ -21,4 +21,6 @@ EXTRA_OECONF = "" FILES_${PN}-dev += "${includedir}" +RDEPENDS_${PN}_class-target += "libcrypto libattr keyutils" + BBCLASSEXTEND = "native nativesdk" diff --git a/meta-integrity/recipes-support/keyutils/keyutils_1.5.9.bb b/meta-integrity/recipes-support/keyutils/keyutils_1.5.9.bb deleted file mode 100644 index 1c33f2b..0000000 --- a/meta-integrity/recipes-support/keyutils/keyutils_1.5.9.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Linux Key Management Utilities" -DESCRIPTION = "Keyutils is a set of utilities for managing the key retention \ -facility in the kernel, which can be used by filesystems, block devices and \ -more to gain and retain the authorization and encryption keys required to \ -perform secure operations." -SECTION = "base" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45" - -PR = "r1" - -SRCREV = "9209a0c8fd63afc59f644e078b40cec531409c30" - -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git;protocol=git \ - file://keyutils_fix_library_install.patch \ - file://keyutils-fix-the-cflags-for-all-of-targets.patch \ - " -SRC_URI_append_arm = " file://keyutils-remove-m32-m64.patch" -SRC_URI_append_aarch64 = " file://keyutils-remove-m32-m64.patch" -SRC_URI_append_mips = " file://keyutils-remove-m32-m64.patch" -SRC_URI_append_mips64 = " file://keyutils-remove-m32-m64.patch" -SRC_URI_append_x86 = " file://keyutils_fix_x86_cflags.patch" -SRC_URI_append_x86-64 = " file://keyutils_fix_x86-64_cflags.patch" -SRC_URI_append_powerpc = "file://keyutils-remove-m32-m64.patch" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep - -INSTALL_FLAGS = " \ - LIBDIR=${libdir} \ - USRLIBDIR=${libdir} \ - BINDIR=${bindir} \ - SBINDIR=${sbindir} \ - ETCDIR=${sysconfdir} \ - SHAREDIR=${datadir} \ - MANDIR=${mandir} \ - INCLUDEDIR=${includedir} \ - DESTDIR=${D} \ -" - -do_install() { - cd ${S} && oe_runmake ${INSTALL_FLAGS} install -} - -FILES_${PN} += "${datadir}/request-key-debug.sh" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-integrity/recipes-support/keyutils/keyutils_git.bb b/meta-integrity/recipes-support/keyutils/keyutils_git.bb new file mode 100644 index 0000000..e88e75b --- /dev/null +++ b/meta-integrity/recipes-support/keyutils/keyutils_git.bb @@ -0,0 +1,49 @@ +SUMMARY = "Linux Key Management Utilities" +DESCRIPTION = "Keyutils is a set of utilities for managing the key retention \ +facility in the kernel, which can be used by filesystems, block devices and \ +more to gain and retain the authorization and encryption keys required to \ +perform secure operations." +SECTION = "base" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45" + +PV = "1.5.9+git${SRCPV}" + +SRC_URI = "\ + git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git \ + file://keyutils_fix_library_install.patch \ + file://keyutils-fix-the-cflags-for-all-of-targets.patch \ +" +SRC_URI_append_arm = " file://keyutils-remove-m32-m64.patch" +SRC_URI_append_aarch64 = " file://keyutils-remove-m32-m64.patch" +SRC_URI_append_mips = " file://keyutils-remove-m32-m64.patch" +SRC_URI_append_mips64 = " file://keyutils-remove-m32-m64.patch" +SRC_URI_append_x86 = " file://keyutils_fix_x86_cflags.patch" +SRC_URI_append_x86-64 = " file://keyutils_fix_x86-64_cflags.patch" +SRC_URI_append_powerpc = "file://keyutils-remove-m32-m64.patch" +SRCREV = "9209a0c8fd63afc59f644e078b40cec531409c30" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +INSTALL_FLAGS = "\ + LIBDIR=${libdir} \ + USRLIBDIR=${libdir} \ + BINDIR=${bindir} \ + SBINDIR=${sbindir} \ + ETCDIR=${sysconfdir} \ + SHAREDIR=${datadir} \ + MANDIR=${mandir} \ + INCLUDEDIR=${includedir} \ + DESTDIR=${D} \ +" + +do_install() { + cd ${S} && oe_runmake ${INSTALL_FLAGS} install +} + +FILES_${PN} += "${datadir}/request-key-debug.sh" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-signing-key/classes/user-key-store.bbclass b/meta-signing-key/classes/user-key-store.bbclass index 6e3af96..57610ac 100644 --- a/meta-signing-key/classes/user-key-store.bbclass +++ b/meta-signing-key/classes/user-key-store.bbclass @@ -1,4 +1,4 @@ -DEPENDS_append_class-target += " \ +DEPENDS_append_class-target += "\ sbsigntool-native \ libsign-native \ openssl-native \ -- cgit v1.2.3-54-g00ecf