CI: use apt-get instead of apt wrapper
PATCH 1/9 CI: use apt-get instead of apt wrapper
When used in a non-interactive context, apt prints a warning:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Use apt-get directly to avoid putting warnings in the logs.
--- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
@@ -25,7 +25,7 @@ stages: - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR # Must do this here, as it's the only way to make sure the toolchain is installed on the same builder - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR - - sudo apt update && sudo apt install --yes telnet python3-subunit + - sudo apt-get update && sudo apt-get install --yes telnet python3-subunit # Generalised fragment to do a Kas build .build:
Signature · 1 line
2.34.1
PATCH 2/9 CI: ignore buildpaths QA check in clang builds
If clang builds assembler code the debug symbols contain unmapped build paths which trigger the buildpaths QA check. This bug has been filed with upstream:
https://github.com/llvm/llvm-project/issues/56609
Until it is fixed, exclude buildpaths from clang builds so that CI can pass.
--- ci/clang.yml | 3 +++ 1 file changed, 3 insertions(+)
ci/clang.yml +3 -0
@@ -8,3 +8,6 @@ repos: local_conf_header: clang: | TOOLCHAIN = "clang" + # Clang causes more binaries to have buildpaths in the debug symbols + # https://github.com/llvm/llvm-project/issues/56609 + WARN_QA:remove = "buildpaths"
Signature · 1 line
2.34.1
PATCH 3/9 arm/edk2-firmware: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed in edk2-firmware, skip this check.
--- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -1
@@ -114,7 +114,9 @@ do_install() { FILES:${PN} = "/firmware" SYSROOT_DIRS += "/firmware" # Skip QA check for relocations in .text of elf binaries -INSANE_SKIP:${PN} = "textrel" +INSANE_SKIP:${PN} += "textrel" +# Build paths are currently embedded +INSANE_SKIP:${PN} += "buildpaths" do_deploy() { # Copy the images to deploy directory
Signature · 1 line
2.34.1
PATCH 4/9 arm/hafnium: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed, skip this check.
--- meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb +2 -0
@@ -59,6 +59,8 @@ FILES:${PN}-dbg = "/firmware/*.elf" SYSROOT_DIRS += "/firmware" INSANE_SKIP:${PN} = "ldflags" INSANE_SKIP:${PN}-dbg = "ldflags" +# Build paths are currently embedded +INSANE_SKIP:${PN}-dbg += "buildpaths" do_deploy() { cp -rf ${D}/firmware/* ${DEPLOYDIR}/
Signature · 1 line
2.34.1
PATCH 5/9 arm/linux-arm64-ack: fix buildpaths in the OID registry
In reply to Ross BurtonBackport two patches from upstream to ensure the build doesn't contain build paths.
--- ..._registry-fix-reproducibility-issues.patch | 46 +++++++++++++++ ...-conmakehash-improve-reproducibility.patch | 56 +++++++++++++++++++ .../linux/linux-arm64-ack_5.10.bb | 2 + 3 files changed, 104 insertions(+) create mode 100644 meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-lib-build_OID_registry-fix-reproducibility-issues.patch create mode 100644 meta-arm/recipes-kernel/linux/linux-arm64-ack/0002-vt-conmakehash-improve-reproducibility.patch
meta-arm/recipes-kernel/linux/linux-arm64-ack/0001-lib-build_OID_registry-fix-reproducibility-issues.patch new file +46 -0
@@ -0,0 +1,46 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +From af8dffeef974b488fd0f12723080a72b1b5f5822 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <[email protected]> +Date: Sun, 10 Jul 2022 22:56:53 -0400 +Subject: [PATCH 1/2] lib/build_OID_registry: fix reproducibility issues + +The script build_OID_registry captures the full path of itself +in the generated data. This causes reproduciblity issues as the +path is captured and packaged. + +We use the basename of the script instead, and that allows us +to be reprodicible, with slightly less information captured in +the output data (but the generating script can still easily +be found). + +Signed-off-by: Bruce Ashfield <[email protected]> +--- + lib/build_OID_registry | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/build_OID_registry b/lib/build_OID_registry +index d7fc32ea8ac2..f6de0a7f7457 100755 +--- a/lib/build_OID_registry ++++ b/lib/build_OID_registry +@@ -8,6 +8,7 @@ + # + + use strict; ++use File::Basename; + + my @names = (); + my @oids = (); +@@ -35,7 +36,7 @@ close IN_FILE || die; + # + open C_FILE, ">$ARGV[1]" or die; + print C_FILE "/*\n"; +-print C_FILE " * Automatically generated by ", $0, ". Do not edit\n"; ++print C_FILE " * Automatically generated by ", basename $0, ". Do not edit\n"; + print C_FILE " */\n"; + + # +-- +2.34.1 +
meta-arm/recipes-kernel/linux/linux-arm64-ack/0002-vt-conmakehash-improve-reproducibility.patch new file +56 -0
56 lines not on this page · raw message
meta-arm/recipes-kernel/linux/linux-arm64-ack_5.10.bb +2 -0
@@ -6,6 +6,8 @@ require linux-arm64-ack.inc SRC_URI = " \ git://android.googlesource.com/kernel/common.git;protocol=https;branch=android12-5.10-lts \ + file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \ + file://0002-vt-conmakehash-improve-reproducibility.patch \ " # tag: ASB-2021-09-05_12-5.10
Signature · 1 line
2.34.1
PATCH 6/9 arm/optee: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed, skip this check.
--- meta-arm/recipes-security/optee/optee-os-tadevkit_3.17.0.bb | 3 +++ meta-arm/recipes-security/optee/optee-os.inc | 3 ++- meta-arm/recipes-security/optee/optee-spdevkit_git.bb | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-)
meta-arm/recipes-security/optee/optee-os-tadevkit_3.17.0.bb +3 -0
@@ -20,3 +20,6 @@ do_deploy() { } FILES:${PN} = "${includedir}/optee/" + +# Build paths are currently embedded +INSANE_SKIP:${PN}-dev += "buildpaths"
meta-arm/recipes-security/optee/optee-os.inc +2 -1
@@ -63,7 +63,8 @@ FILES:${PN} = "${nonarch_base_libdir}/firmware/" # note: "textrel" is not triggered on all archs INSANE_SKIP:${PN} = "textrel" +# Build paths are currently embedded +INSANE_SKIP:${PN} += "buildpaths" INSANE_SKIP:${PN}-dev = "staticdev" - INHIBIT_PACKAGE_STRIP = "1"
meta-arm/recipes-security/optee/optee-spdevkit_git.bb +2 -0
@@ -301,3 +301,5 @@ COMPATIBLE_HOST = "aarch64.*-linux" # optee-spdevkit static library is part of optee-os image. No need to package this library in a staticdev package INSANE_SKIP:${PN}-dev = "staticdev" +# Build paths are currently embedded +INSANE_SKIP:${PN}-dev += "buildpaths"
Signature · 1 line
2.34.1
PATCH 7/9 arm/trusted-firmware-a: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed, skip this check.
--- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +4 -1
@@ -231,7 +231,10 @@ SYSROOT_DIRS += "/firmware" FILES:${PN}-dbg = "/firmware/*.elf" # Skip QA check for relocations in .text of elf binaries -INSANE_SKIP:${PN}-dbg = "textrel" +INSANE_SKIP:${PN}-dbg += "textrel" +# Build paths are currently embedded +INSANE_SKIP:${PN} += "buildpaths" +INSANE_SKIP:${PN}-dbg += "buildpaths" do_deploy() { cp -rf ${D}/firmware/* ${DEPLOYDIR}/
Signature · 1 line
2.34.1
PATCH 8/9 arm/trusted-firmware-m: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed, skip this check.
--- .../recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb +3 -0
@@ -137,3 +137,6 @@ addtask deploy after do_install do_deploy() { cp -rf ${D}/firmware/* ${DEPLOYDIR}/ } + +# Build paths are currently embedded +INSANE_SKIP:${PN} += "buildpaths"
Signature · 1 line
2.34.1
PATCH 9/9 arm/trusted-services: ignore buildpath warnings
In reply to Ross BurtonLatest oe-core has enabled the buildpaths QA check, which warns if the build paths are present inside binaries. This is because build paths in deployed binaries is both information leakage and non-reproducible.
Until this is fixed, skip this check.
--- .../recipes-security/trusted-services/ts-corstone1000.inc | 2 +- .../trusted-services/secure-partitions_git.bb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
meta-arm-bsp/recipes-security/trusted-services/ts-corstone1000.inc +1 -1
@@ -121,6 +121,6 @@ do_install:append() { } FILES:${PN}-dev = "${includedir}/deployments/psa-api-test/" -INSANE_SKIP:${PN}-psa-api-tests += "rpaths dev-so" +INSANE_SKIP:${PN}-psa-api-tests += "rpaths dev-so buildpaths" PACKAGES += "${PN}-psa-api-tests" FILES:${PN}-psa-api-tests = "${libdir} ${bindir}"
meta-arm/recipes-security/trusted-services/secure-partitions_git.bb +4 -0
@@ -68,3 +68,7 @@ do_deploy() { addtask deploy after do_install FILES:${PN} = "/firmware/sp/opteesp*" + +# Build paths are currently embedded +INSANE_SKIP:${PN} += "buildpaths" +INSANE_SKIP:${PN}-dbg += "buildpaths"
Signature · 1 line
2.34.1
Jon Mason
AppliedQuoted 5 lines · Ross Burton
When used in a non-interactive context, apt prints a warning:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Use apt-get directly to avoid putting warnings in the logs.
Applied, thanks!
[1/9] CI: use apt-get instead of apt wrapper
commit: 7d4ede329817288b2fc866fdd466e60e79e628b6
[2/9] CI: ignore buildpaths QA check in clang builds
commit: 53795134de85b243a5e1bb8b74e05b51ee04058d
[3/9] arm/edk2-firmware: ignore buildpath warnings
commit: 411519915cb2cfde80cb29ad0624be6d92789713
[4/9] arm/hafnium: ignore buildpath warnings
commit: 04aeb9e548b1e0c9ea1c0b9fc79abb4967191618
[5/9] arm/linux-arm64-ack: fix buildpaths in the OID registry
commit: 503d45e41aadf01ed2613b57e54a0040d25590e2
[6/9] arm/optee: ignore buildpath warnings
commit: 6c7399be0c4cbbda98319d90d3505d0ba9a587c5
[7/9] arm/trusted-firmware-a: ignore buildpath warnings
commit: ee0a824a875347e64be554c1578f11e6c2175cc4
[8/9] arm/trusted-firmware-m: ignore buildpath warnings
commit: eac17923931934a46dc10cb9b887437eb0b6f9f6
[9/9] arm/trusted-services: ignore buildpath warnings
commit: d9d1399b37160a77176cb27982e234adac6cf099Best regards,
Signature · 1 line
Jon Mason <[email protected]>