From d1e894976442c78577f52fe7b169812d00289120 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 12 Feb 2021 15:35:20 -0600 Subject: poky: subtree update:796be0593a..9294bc4bb4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes our temporary libpam revert until OpenBMC can get in support for the new libraries. See openbmc/openbmc#3750 for more information. Abdellatif El Khlifi (4): kernel-fitimage: adding support for Initramfs bundle and u-boot script kernel: skip installing fitImage when using Initramfs bundles oeqa/selftest/imagefeatures: adding fitImage initramfs bundle testcase ref-manual/ref-classes: update kernel-fitimage with Initramfs bundle and boot script Adrian Herrera (2): scripts: oe-run-native, fix *-native directories common-licenses: add BSD-3-Clause-Clear license Alan Perry (2): binutils: add libopcodes package for perf iproute2: Add subpackage for rdma command Alejandro Hernandez Samaniego (2): newlib: Upgrade 3.3.0 -> 4.1.0 newlib: Update licence Alex Stewart (1): opkg: upgrade to version 0.4.4 Alexander Kanavin (89): selftest/reproducible: enable world reproducibility test selftest/reproducible: add an exclusion list for items that are not yet reproducible kea: upgrade 1.7.10 -> 1.8.1 valgrind: exclude bar_bad/bar_bad_xml from ptests bzip2: run ptests without valgrind lttng-tools: disable more failing ptests glib-2.0: add a patch to increase a test timeout acpica: upgrade 20201113 -> 20201217 bind: upgrade 9.16.9 -> 9.16.10 diffoscope: upgrade 161 -> 163 dnf: upgrade 4.4.0 -> 4.5.2 enchant2: upgrade 2.2.13 -> 2.2.14 epiphany: upgrade 3.38.1 -> 3.38.2 ethtool: upgrade 5.9 -> 5.10 gtk+3: upgrade 3.24.23 -> 3.24.24 init-system-helpers: upgrade 1.58 -> 1.60 kbd: upgrade 2.3.0 -> 2.4.0 kea: upgrade 1.8.1 -> 1.8.2 libmodulemd: upgrade 2.9.4 -> 2.11.1 libpcre2: upgrade 10.35 -> 10.36 libtirpc: upgrade 1.2.6 -> 1.3.1 libusb1: upgrade 1.0.23 -> 1.0.24 libva: upgrade 2.9.0 -> 2.10.0 libx11: upgrade 1.6.12 -> 1.7.0 lighttpd: upgrade 1.4.56 -> 1.4.57 ninja: upgrade 1.10.1 -> 1.10.2 puzzles: upgrade to latest revision python3-hypothesis: upgrade 5.41.5 -> 5.43.3 python3-py: upgrade 1.9.0 -> 1.10.0 python3-setuptools-scm: upgrade 4.1.2 -> 5.0.1 sqlite3: upgrade 3.33.0 -> 3.34.0 stress-ng: upgrade 0.11.24 -> 0.12.00 sudo: upgrade 1.9.3p1 -> 1.9.4p1 sysvinit: upgrade 2.97 -> 2.98 vala: upgrade 0.50.1 -> 0.50.2 vulkan-headers: upgrade 1.2.154.0 -> 1.2.162.0 webkitgtk: upgrade 2.30.2 -> 2.30.4 xprop: upgrade 1.2.4 -> 1.2.5 xserver-xorg: upgrade 1.20.9 -> 1.20.10 glib-2.0: update 2.66.2 -> 2.66.4 rpm: update 4.16.0 -> 4.16.1.2 piglit: update to latest revision sbc: update 1.4 -> 1.5 libdnf: update 0.55.0 -> 0.55.2 libva-utils: update 2.9.1 -> 2.10.0 python3-importlib-metadata: update 3.1.1 -> 3.3.0 python3: update 3.9.0 -> 3.9.1 vulkan-loader: upgrade 1.2.154.1 -> 1.2.162.0 vulkan-tools: upgrade 1.2.154.0 -> 1.2.162.0 systemd-bootchart: update 233 -> 234 zstd: add recipe from meta-oe zstd: update 1.4.5 -> 1.4.8 devtool: gitsm:// should be handled same as git:// in upgrades ovmf: upgrade 202008 -> 202011 libksba: update 1.4.0 -> 1.5.0 libjitterentropy: update 2.2.0 -> 3.0.0 icu: update 68.1 -> 68.2 gnutls: update 3.6.15 -> 3.7.0 gnupg: update 2.2.23 -> 2.2.26 boost: update 1.74.0 -> 1.75.0 kexec-tools: update 2.0.20 -> 2.0.21 vulkan-samples: update to latest revision libpam: update 1.3.1 -> 1.5.1 strace: update 5.9 -> 5.10 python3-pytest: update 6.1.2 -> 6.2.1 mtools: update 4.0.25 -> 4.0.26 gnu-config: update to latest revision cmake: update 3.18.4 -> 3.19.2 ccache: upgrade 3.7.11 -> 4.1 ccache.bbclass: use ccache from host distribution gawk: add missing ptest dependency util-linux: upgrade 2.36 -> 2.36.1 ell: upgrade 0.33 -> 0.35 net-tools: correct version check oeqa/ptest: print a warning if ptests failed bash: update 5.0 -> 5.1 runtime_test.py: correct output check for bash 5.1 distcc: update 3.3.3 -> 3.3.5 gptfdisk: update 1.0.5 -> 1.0.6 python3-setuptools: update 51.0.0 -> 52.0.0 ruby: update 2.7.2 -> 3.0.0 vulkan-samples: update to latest revision dpkg: update 1.20.5 -> 1.20.7.1 libhandy: upgrade 1.0.2 -> 1.0.3 tar: update 1.32 -> 1.33 at: correct upstream version check shaderc: correct version check spirv-tools: correct version check u-boot: upgrade 2020.10 -> 2021.01 Alistair Francis (1): opensbi: Bump from 0.8 to 0.9 Anatol Belski (1): iproute2: Make it easier to manipulate SUBDIRS list from bbappend Andreas Müller (1): openssl: re-enable whirlpool Andrey Mozzhuhin (1): toolchain-shar-extract.sh: Handle special characters in script path Anton Kachalov (1): rootfs: add option to allow delayed postinsts on read-only rootfs Anuj Mittal (45): mesa: add more details to elf-tls patch mesa: remove patch disabling asm linux-yocto: update genericx86 to v5.4.87 enchant2: upgrade 2.2.14 -> 2.2.15 gstreamer1.0: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-plugins-base: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-plugins-good: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-plugins-bad: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-libav: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-omx: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-rtsp-server: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-python: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-vaapi: upgrade 1.18.2 -> 1.18.3 gst-examples: upgrade 1.18.2 -> 1.18.3 gst-devtools: upgrade 1.18.2 -> 1.18.3 gstreamer1.0-plugins-ugly: upgrade 1.18.2 -> 1.18.3 libepoxy: upgrade 1.5.4 -> 1.5.5 libproxy: upgrade 0.4.15 -> 0.4.17 stress-ng: upgrade 0.12.00 -> 0.12.01 vulkan-tools: upgrade 1.2.162.0 -> 1.2.162.1 harfbuzz: upgrade 2.7.2 -> 2.7.4 mpg123: upgrade 1.26.3 -> 1.26.4 piglit: upgrade to latest revision vala: upgrade 0.50.2 -> 0.50.3 gcr: upgrade 3.38.0 -> 3.38.1 python3-pygments: upgrade 2.7.3 -> 2.7.4 logrotate: upgrade 3.17.0 -> 3.18.0 lzip: upgrade 1.21 -> 1.22 python3-mako: upgrade 1.1.3 -> 1.1.4 wget: upgrade 1.20.3 -> 1.21.1 lighttpd: upgrade 1.4.57 -> 1.4.58 python3-importlib-metadata: upgrade 3.3.0 -> 3.4.0 python3-git: upgrade 3.1.11 -> 3.1.12 acpica: upgrade 20201217 -> 20210105 diffstat: upgrade 1.63 -> 1.64 python3-dbusmock: upgrade 0.19 -> 0.22.0 python3-hypothesis: upgrade 5.43.3 -> 6.0.2 python3-numpy: upgrade 1.19.4 -> 1.19.5 resolvconf: upgrade 1.83 -> 1.87 sudo: upgrade 1.9.4p1 -> 1.9.5p1 git: upgrade 2.29.2 -> 2.30.0 meson: upgrade 0.56.0 -> 0.56.2 rt-tests/hwlatdetect: upgrade 1.9 -> 1.10 gstreamer1.0: fix failing ptest python3: fix CVE-2021-3177 Awais Belal (1): kernel.bbclass: fix deployment for initramfs images Bruce Ashfield (38): linux-yocto-rt/5.4: update to -rt44 linux-yocto/5.4: update to v5.4.80 lttng-modules: fix build against v5.10+ kern-tools: non-gcc config support and option re-classification linux-yocto/cfg: qemuppc: set CONFIG_SCSI to '=y' linux-yocto/5.4: update to v5.4.82 linux-yocto/cfg: qemuarm64-gfx.cfg: add CONFIG_INPUT_UINPUT linux-yocto/5.4: update to v5.4.83 linux-yocto/5.8/cfg: fix -tiny warnings linux-yocto/5.4/cfg: fix -tiny warnings systemtap: fix on target build for 4.4 and 5.10+ linux-yocto/5.4/cfg: fix FIRMWARE_LOADER warnings kernel-devsrc: fix 32bit ARM devsrc builds linux-yocto/5.4: update to v5.4.85 linux-yocto-dev: bump to v5.11-rc libc-headers: update to v5.10 machine/qemuarm*: add vmalloc kernel parameter linux-yocto: introduce v5.10 reference kernel recipes linux-yocto/5.10: update to v5.10.2 conf/machine: bump qemu preferred versions to 5.10 poky/poky-tiny: set preferred kernel to 5.10 yocto-bsp: explicitly set preferred version for reference boards poky-alt: don't use conditional assignment for preferred kernel version linux-yocto/5.10: update to v5.10.4 linux-yocto/5.10: update to v5.10.5 linux-yocto/5.4: update to v5.4.87 linux-yocto/5.10/cfg: x86 and beaglebone config fixes linux-yocto: remove 5.8 recipes yocto-bsp: drop 5.8 bbappend linux-yocto/5.10: update to v5.10.8 linux-yocto/5.4: update to v5.4.90 linux-yocto-rt/5.10: fix 5.10-rt build breakage linux-yocto-rt/5.4: fix 5.4-stable caused build breakage linux-yocto/5.10: update to v5.10.10 linux-yocto/5.10: update to v5.10.12 linux-yocto/5.4: update to v5.4.94 linux-yocto/5.10: binutils 2.36 fixes yocto-bsp: linux-yocto: update to v5.10.12 Changhyeok Bae (1): python3-importlib-metadata: Add toml dependency Changqing Li (4): libexif: fix CVE-2020-0198; CVE-2020-0452 libpam: support usrmerge libpam: remove unused code qemu: fix do_compile error Chee Yang Lee (1): initrdscripts: init-install-efi.sh install extra files for ESP Chen Qi (1): systemd: change /bin/nologin to /sbin/nologin Chris Laplante (2): contrib/git-hooks: add a sendemail-validate example hook that adds FROM: lines to outgoing patch emails systemd.bbclass: improve error message when a service unit specified in SYSTEMD_SERVICE is not found Christophe Priouzeau (1): bitbake: fetch2/wget: Update user-agent Christopher Larson (2): grub-efi-cfg: exclude OVERRIDES from build_efi_cfg vardeps uboot-extlinux-config: exclude OVERRIDES from do_create_extlinux_config vardeps Deepak Rawat (1): openssl: add support for mingw64 as target Denys Dmytriyenko (2): maintainers: update own email address wayland: upgrade 1.18.0 -> 1.19.0 Diego Sueiro (4): wic: Introduce empty plugin to create unformatted empty partitions modutils-initscripts: Use depmod -a when modules.dep is empty staging: Introduce /sysroot-only to SYSROOT_DIRS dev-manual: Add usage of /sysroot-only in SYSROOT_DIRS Dmitry Baryshkov (4): perl: fix installation failure because of shell issue linux-firmware: upgrade 20201118 -> 20201218 linux-firmware: package firmware for Lontium lt9611uxc bridge mesa,mesa-gl: upgrade to 20.3.2 Dorinda (8): sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHS sanity.bbclass: sanity check for if bitbake is present in PATH sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap elfutils: split libdebuginfod into its own package elfutils: add PACKAGECONFIG for debuginfod elfutils: add support for ipk sanity.bbclass: Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap oe-pkgdata-util: Check if environment script is initialized Easwar Hariharan (1): classes/kernel-fitimage: make fitimage_emit_section_config more readable Elvis Stansvik (1): ref-manual: terms: Fix poky tarball root folder Hongxu Jia (1): deb: do not insert feed uris if apt not installed Jack Mitchell (1): distutils3: allow setup.py to be run from a different directory to ${S} Joey Degges (4): bitbake: tests/fetch: Organize usehead tests by net requirements bitbake: tests/fetch: Document behavior of test_gitfetch_usehead bitbake: tests/fetch: Test usehead with a non-default name bitbake: fetch/git: Fix usehead for non-default names Jonathan Richardson (1): core-image-tiny-initramfs: Add compatiblity for aarch64 Jose Quaresma (22): gstreamer1.0: upgrade 1.18.1 -> 1.18.2 gstreamer1.0-plugins-bad: v4l2codecs fix typo gstreamer1.0-plugins-bad: add support for aom plugin gstreamer1.0-plugins-bad: add support for x265 plugin gstreamer1.0-plugins-bad: sctp plugin uses the internal usrsctp static lib gstreamer1.0-plugins-bad: remove unsupported plugins comment gstreamer1.0-plugins-bad: netsim plugin don't have external deps gstreamer1.0-plugins-bad: transcode plugin external deps is always present gstreamer1.0: use the correct meson option for the capabilities shaderc: upgrade 2020.3 -> 2020.4 spirv-tools: upgrade 2020.5 -> 2020.6 common-licenses: Add GPL-3.0-with-bison-exception glslang: upgrade 8.13.3743 -> 11.1.0 glslang: enable shared libs glslang: disable precompiled header shaderc: avoid reproducible issues shaderc: fix the build with glslang 11.1.0 spirv-headers: Add receipe spirv-tools: cleanup shaderc: add spirv-headers as dependencie spirv-tools: fix reproducible selftest/reproducible: remove spirv-tools-dev from exclusion list Joshua Watt (4): diffoscope: upgrade 163 -> 164 ref-manual: Clarify recommended operator for PROVIDES bash: Disable bracketed input by default bitbake: logging: Make bitbake logger compatible with python logger Kai Kang (1): adwaita-icon-theme: add version 3.34.3 back Kamel Bouhara (2): npm.bbclass: make shrinkwrap file optional recipetool: create: only add npmsw url if required Kevin Hao (2): Revert "yocto-bsp: explicitly set preferred version for reference boards" meta-yocto-bsp: Bump the kernel to v5.10 Khairul Rohaizzat Jamaluddin (4): openssl: Update 1.1.1h -> 1.1.1i go: Update 1.15.5 -> 1.15.6 curl: Update 7.73.0 -> 7.74.0 ffmpeg: Fix CVE-2020-35964, CVE-2020-35965 Khem Raj (37): musl: Update to latest master systemd: Fix reallocarray check go.bbclass: Use external linker for native packages qemuriscv: check serial consoles w.r.t. /proc/consoles busybox-inittab: Implement SYSVINIT_ENABLED_GETTYS and USE_VT initscripts: use quotes for shell variable comparision busybox: Install /etc/default/rcS when used as init system busybox: Run mdev as daemon rcS: Define identifier for init system used initscripts: Use initctl on sysvinit only busybox: Sync rcS.default with sysvinit ltp: Fix ltp-pan crash on 32bit arches using 64bit time_t pulseaudio: Fix build with clang for non-x86 target util-linux: Build fixes for 32bit arches with 64bit time_t libpam: Drop musl patches ccache: Build fixes for clang and riscv32 shadow: Remove lastlog pam plugin on musl system rxvt-unicode: Disable lastlog on musl systems openssh: Disable lastlog on musl dropbear: Disable lastlog and wtmp on musl ccache: Fix build on aarch64/clang openssl: Enable rc4/rc2/bf/md4 algorithms openssl: Enable psk for qtbase libyaml: Enable static lib on native/nativesdk musl/glibc: Document assembly file directive fix musl: Update to 1.2.2 release binutils: Upgrade to 2.36 release binutils: Package libdep linker plugins binutils: Disable parallel install for target/nativesdk binutils musl: Drop adding .file directive in asm files glibc: Drop adding .file directive in asm files glibc: Upgrade to 2.33 glibc: Enable cet glibc: Require full ISA support for x86-64 level marker security_flags.inc: Use -O with -D_FORTIFY_SOURCE systemd: Fix build on musl autoconf: Fix typo for prefuncs Lee Chee Yang (8): gdk-pixbuf: fix CVE-2020-29385 wic/direct/kparser: ensure fsuuid for vfat and msdos align with format p11-kit: upgrade 0.23.21 -> 0.23.22 cve-check: replace Looseversion with custom version class cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioning openssl: set CVE_VERSION_SUFFIX wic/selftest: test_permissions also test bitbake image wic: debug mode to keep tmp directory Leon Anavi (1): common-tasks.rst: Fix GNU_HASH in hello.bb Li Wang (2): qemu: CVE-2020-25723 qemu: CVE-2020-28916 Luca Boccassi (7): classes/kernel-fitimage: add ability to sign individual images systemd: update 246 -> 247 systemd: add package config for systemd-oomd systemd: ship new systemd-dissect in -extra-utils systemd: set -Dmode=release as recommended by NEWS systemd: add RRECOMMENDS for weak dependencies, if enabled systemd: update to v247.3 Mans Rullgard (1): boost: drop arm-intrinsics.patch Marek Vasut (2): meta: toolchain-shar-relocate.sh: Do not use $target_sdk_dir as regex meta: toolchain-shar-relocate.sh: Filter out post-relocate-setup script Mark Jonas (1): parted: Make readline dependency optional Martin Jansa (3): license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to PSEUDO_IGNORE_PATHS busybox.inc: install rcS, rcK and rcS.default only with busybox in VIRTUAL-RUNTIME_init_manager image_types.bbclass: tar: use posix format instead of gnu Matt Hoosier (1): bitbake: fetch/git: download LFS content too during do_fetch Maxime Roussin-Bélanger (1): meta: add missing descriptions in some support recipes Michael Halstead (4): releases: conf: add link to 3.2.1, update to include 3.2.1 releases: conf: add link to 3.1.5, update to include 3.2.1 & 3.1.5 uninative: Upgrade to 2.10 yocto-uninative.inc: version 2.11 updates glibc to 2.33 Michael Ho (2): rootfs_ipk: allow do_populate_sdk in parallel to do_rootfs license_image.bbclass: fix missing recipeinfo on self Mike Looijmans (1): license_image.bbclass: Don't attempt to symlink to the same file Mikko Rapeli (1): zip: whitelist CVE-2018-13410 and CVE-2018-13684 Milan Shah (2): oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters bitbake: utils: add docstrings to functions Mingli Yu (4): kbd: fix transaction conflict systemd: resolve executable path if it is relative libpam: add ptest support qemu: make ptest rework Nathan Rossi (8): gcc: Add patch to resolve i*86 tune configuration overrides qemu.inc: Add seccomp PACKAGECONFIG option ncurses: Prevent LDFLAGS being emitted in .pc files which: add nativesdk to BBCLASSEXTEND sed: add nativesdk to BBCLASSEXTEND grep: add nativesdk to BBCLASSEXTEND coreutils: enable xattrs by default for nativesdk gcc: Backport patch to resolve i*86 tune configuration overrides Naveen Saini (1): gstreamer1.0-plugins-bad: fix msdk pkgconfig build failure Oleksandr Kravchuk (4): python3-smmap: update to 4.0.0 python3-numpy: update to 0.20.0 inetutils: update to 2.0 ell: update to 0.37 Oleksiy Obitotskyy (2): flex: Fix --noline option behavior dtc: improve reproducibility Oleksiy Obitotskyy yIEf0zt.mo (1): toolchain-shar-relocate.sh: Fix handling files with colons Ovidiu Panait (5): timezone: upgrade to 2020e timezone: upgrade to 2020f variables: Add documentation for KERNEL_DTC_FLAGS kernel-devicetree: Introduce KERNEL_DTC_FLAGS to pass dtc flags timezone: upgrade to 2021a Paul Barker (22): bitbake.conf: Prevent pyc file generation in pseudo context documentation: Simplify oe_wiki and oe_home links documentation: Simplify layerindex and layer links documentation: Simplify remaining yocto_home links profile-manual: Simplify yocto_bugs link ref-manual: Simplify oe_lists link documentation: Use https links where possible selftest: Add argument to keep build dir wic: Add workdir argument wic: Allow exec_native_cmd to run HOSTTOOLS wic: Ensure internal workdir is not reused image_types_wic: Move wic working directory wic: Update pseudo db when excluding content from rootfs wic: Copy rootfs dir if fstab needs updating wic: Optimise fstab modification for ext2/3/4 and msdos partitions bitbake: bitbake-hashclient: Remove obsolete call to client.connect bitbake: hashserv: client: Fix handling of null responses bitbake: hashserv: Support read-only server bitbake: hashserv: Support upstream command line argument bitbake: hashserv: Add short forms of remaining command line arguments bitbake: hashserv: server: Support searching upstream for outhash bitbake: hashserv: Add get-outhash message Paul Eggleton (11): classes/kernel-fitimage: add variable for description classes/kernel-fitimage: allow substituting mkimage command classes/kernel-fitimage: add ability to add additional signing options oe-selftest: move FIT image tests to their own module oe-selftest: fitimage: Test for FIT_DESC oe-selftest: fitimage: add test for signing FIT images classes: minor corrections to kernel-fitimage section variables: clarify KERNEL_ALT_IMAGETYPE reference variables: explicitly state that UBOOT_MKIMAGE_DTCOPTS is optional variables: Add documentation for new kernel-fitimage vars ref-manual: use consistent capitalisation of U-Boot Paul Gortmaker (1): systemd: dont spew hidepid mount errors for kernels < v5.8 Peter Bergin (1): buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable Peter Kjellerstedt (7): lib/oe/path: Add canonicalize() bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHS wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS glibc: Make adjtime() for 32 bit support being called with delta == NULL bitbake: cache: Make CoreRecipeInfo include rprovides_pkg for skipped recipes bitbake: cooker: Include all packages a recipe provides in SkippedPackage.rprovides apr-util: Only specify --with-dbm=gdbm if gdbm support is enabled Quentin Schulz (1): docs: fix missing & and ; surrounding references from poky.yaml Randy Li (2): meson: Add sysroot property to nativesdk-meson meson: Don't turn string into a list in nativesdk Richard Purdie (69): pseudo: Drop patches merged into upstream branch bitbake: data_smart: Ensure hash reflects vardepvalue flags correctly linuxloader: Avoid confusing string concat errors systemd: Ensure uid/gid ranges are set deterministically grub: Fix build reproducibility issue u-boot-tools: Fix reproducibility issue grub: Add second fix for determinism issue oeqa/commands: Ensure sync can be found regardless of PATH cups: Mark CVE-2009-0032 as a non-issue cups: Mark CVE-2008-1033 as a non-issue groff: Fix reproducibility issue man-db: Avoid reproducibility failures after fixing groff-native meta-selftest/staticids: Add ids for other recipes selftest/reproducible: Add useradd-staticids to reproducible builds tests grub: Further reproducibility fix man-db: Fix reproducibility issue bitbake.conf: Add mkfifo to HOSTTOOLS bitbake.conf: Add /run/ to PSEUDO_IGNORE_PATHS ppp: Update 2.4.8 -> 2.4.9 ppp: Fix reproducibility issue sanity: Bump min python version to 3.6 pseudo: Add lchmod wrapper qemu: Upgrade 5.1.0->5.2.0 qemu: Drop vm reservation changes to resolve build issues qemu: Fix mingw builds qemu: Add some user space mmap tweaks to address musl 32 bit build issues ppp: Fix patch typo pseudo: Update for arm host and memleak fixes/cleanup vulkan-samples: Fix reproducibility issue vulkan-samples: Disable PCH for reproducibility lttng-modules: Upgrade 2.12.3->2.12.4 lttng-modules: Drop gcc7 related patch bash: Set HEREDOC_PIPESIZE deterministically bash: Add makefile race workaround build-appliance-image: Update to master head revision bitbake: fetch2/perforce: Fix localfile to include ud.module ncurses: Don't put terminfo into the sysroot python3: Avoid installing test data into recipe-sysroot staging: Clean up files installed into the sysroot gobject-introspection: Fix variable override order nativesdk-buildtools-perl-dummy: Add missing entries for nativesdk-automake package_rpm: Clean up unset runtime package variable handling bitbake.conf/python: Drop setting RDEPENDS/RPROVIDES default native: Stop clearing PACKAGES meta: Clean up various class-native* RDEPENDS overrides gtk-doc: Disable dependencies in native case pseudo: Update to include passwd and file renaming fixes at: Upgrade 3.1.23 -> 3.2.1 msmtp: Fix to work with autoconf 2.70 ruby: Fix to work with autoconf 2.70 lrzsz: Fix to work with autoconf 2.70 Revert "sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap" image_types: Ensure tar archives are reproducible qemu.inc: Should depend on qemu-system-native, not qemu-native python3-setuptools: Add back accidentally dropped RDEPENDS opkg: Fix build reproducibility issue Revert "msmtp: Fix to work with autoconf 2.70" grub: Backport fix to work with new binutils package: Ensure do_packagedata is cleaned correctly openssh: Backport a fix to fix with glibc 2.33 on some platforms pseudo: Update to work with glibc 2.33 bitbake: bitbake-worker: Try and avoid potential short write events issues apr: Fix to work with autoconf 2.70 bitbake: cooker: Ensure reparsing is handled correctly bitbake: bblayers/action: When adding layers, catch BBHandledException bitbake: bitbake: Bump release to 1.49.1 sanity.conf: Increase minimum bitbake version due to logging function change Fix up bitbake logging compatibility opkg: Fix patch glitches Robert Rosengren (1): mpg123: Add support for FPU-less targets Robert Yang (10): buildtools-tarball.bb: Fix PATH for environment setup script ncurses: Make ncurses-tools depend on ncurses-terminfo-base minicom: RDEPENDS on ncurses-terminfo-base archiver.bbclass: Fix --runall=deploy_archives for images ccache: Extend to nativesdk ccache.bbclass: Set CCACHE_TEMPDIR Revert "ccache.bbclass: use ccache from host distribution" ccache.bbclass: Use ccache-native and disable ccache for native recipes apt: Fix do_compile error when enable ccache oeqa/selftest: binutils-cross-x86_64 -> libgcc-initial Ross Burton (28): wic-image-minimal: only depend on syslinux on x86 targets syslinux: rewrite recipe so only target code is x86-specific wic-tools: don't build syslinux-native for targets without syslinux image-uefi.conf: add EFI arch variable systemd-boot: build the EFI stub systemd-boot: allow building for Arm targets wic-tools: add grub-efi and systemd-boot on arm64 lib/oe/qa: handle the 'no specific instruction set' ELF e_machine value local.conf: add aarch64 to the SDKMACHINE example values kernel: set COMPATIBLE_HOST to *-linux bitbake.conf: default SDKMACHINE to the build host architecture diffstat: point the license checksum at the license ruby: remove tcl DEPENDS base: use URI instead of decodeurl when detecting unpack dependencies lib/oe/package_manager: ensure repodata is wiped core-image-sato-sdk-ptest: these images need ptest ovmf-shell-image: image is only buildable on x86-64 bitbake: fetch2: handle empty elements in _param_str_split bitbake: tests/fetch: add test for empty query parameters Revert "lrzsz: Fix to work with autoconf 2.70" unfs3: fix build with new autoconf gnu-config: update to latest commit autoconf: merge .bb and .inc files autotools: don't warn about obsolete usage autoconf: upgrade to 2.71 autotools: disable gtkdocize for now autotools: remove intltoolize logic autotools: no need to depend on gnu-config Sakib Sajal (2): buildstats.bbclass: add functionality to collect build system stats linux-yocto*: add features/gpio/mockup.scc to KERNEL_FEATURES Scott Branden (1): kmod: update 27 -> 28 Scott Murray (3): grub: fix "CVE:" line in one of the patches patch: fix CVE-2019-20633 glibc: CVE-2019-25013 Shachar Menashe (1): openssl: drop support for deprecated algorithms Sinan Kaya (8): gcsections: add more suppressions for SDK builds sudo: split sudo binary into its own package iproute2: split ip to individual package procps: split ps and sysctl into individual packages net-tools: split mii-tool into its own package runqemu: Add support for VHD/VHDX rootfs meta/classes: Add supprot for WIC<>VHD/VHDX conversion appliance: Add VHD/VHDX generation Steve Sakoman (2): oeqa/selftest/cases/devtool.py: fix typo in ignore_patterns call glibc: update to latest release/2.32/master branch Tanu Kaskinen (6): maintainers.inc: remove myself from maintainers pulseaudio: Remove OE_LT_RPATH_ALLOW pulseaudio: disable EsounD support pulseaudio: disable GConf support pulseaudio: switch build system from Autotools to Meson pulseaudio: fix client.conf location Teoh Jay Shen (4): oeqa/terminal : improve the test case oeqa/suspend : add test for suspend state oeqa/ethernet_ip_connman : add test for network connections oeqa/usb_hid.py : add test to check the usb/human interface device status after suspend state Thomas Perrot (1): go.bbclass: don't stage test data with sources of dependencies Tim Orling (6): python3-hypothesis: upgrade 5.41.4 -> 5.41.5 python3-importlib-metadata: upgrade 3.1.0 -> 3.1.1 python3-pygments: upgrade v2.7.2 -> v2.7.3 python3-setuptools: upgrade 50.3.2 -> 51.0.0 python3-setuptools-scm: add python3-toml dep python3-packaging: upgrade 20.4 -> 20.8 Tomasz Dziendzielski (18): populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is disabled lib/oe/utils: Return empty string in parallel_make devtool: Fix source extraction for gcc shared source externalsrc: Fix parsing error with devtool non-git sources devtool: Fix file:// fetcher symlink directory structure selftest/devtool: Add modify_localfiles_only test checking symlink path meta: Fix native inheritance order in recipes insane: Add test for native/nativesdk inherit order lib/oe/package_manager: Do not pass stderr to package manager as an argument externalsrc: Detect code changes in submodules insane: Add missing INSANE_SKIP mechanism for native-last QA check insane: native-last: Only print classes inherited after native/nativesdk lib/oe/patch.py: Don't return command stderr from runcmd function python3: Use addtask statement instead of task dependencies lib/oe/patch.py: Ignore scissors line on applying patch sstatesig: Add descriptive error message to getpwuid/getgrgid "uid/gid not found" KeyError bitbake: lib/bb: Don't treat mc recipe (Midnight Commander) as a multiconfig target bitbake: BBHandler: Don't classify shell functions that names start with "python*" as python function Trevor Woerner (7): mesa.inc: switch true/enabled false/disabled mesa: update 20.2.4 -> 20.3.1 insane.bbclass: allow fifos selftest-chown: add test for fifos PSPLASH_FIFO_DIR: refactor psplash: fix working on first boot (sysvinit) psplash (sysvinit): add textual updates Vinícius Ossanes Aquino (1): cmake: Upgrade 3.19.2 -> 3.19.3 Vivien Didelot (4): README.hardware: prettify headline README.hardware: fix the dd command meta-yocto-bsp: use provided variables meta-yocto-bsp: use mmcblk0 for root partition Vyacheslav Yurkov (1): npm.bbclass: use python3 for npm config Wang Mingyu (33): libaio: upgrade 0.3.111 -> 0.3.112 readline: upgrade 8.0 -> 8.1 man-pages: upgrade 5.09 ->5.10 mobile-broadband-provider-info: upgrade 20190618 ->20201225 shared-mime-info: upgrade 2.0 -> 2.1 tiff: upgrade 4.1.0 -> 4.2.0 tcl: upgrade 8.6.10 -> 8.6.11 sysstat: upgrade 12.4.1 -> 12.4.2 nettle: upgrade 3.6 ->3.7 binutils: upgrade 2.35 -> 2.35.1 ed: upgrade 1.16 -> 1.17 ell: upgrade 0.35 -> 0.36 findutils: upgrade 4.7.0 -> 4.8.0 iproute2: upgrade 5.9.0 -> 5.10.0 gnupg: upgrade 2.2.26 -> 2.2.27 libpcap: upgrade 1.9.1 -> 1.10.0 libmodulemd: upgrade 2.11.1 -> 2.11.2 pulseaudio: upgrade 14.0 -> 14.2 btrfs-tools: upgrade 5.9 -> 5.10 gpgme: upgrade 1.15.0 -> 1.15.1 iptables: upgrade 1.8.6 -> 1.8.7 socat: upgrade 1.7.3.4 ->1.7.4.1 libcap: upgrade 2.46 -> 2.47 libjitterentropy: upgrade 3.0.0 -> 3.0.1 libsolv: upgrade 0.7.16 -> 0.7.17 ltp: upgrade 20200930 -> 20210121 stress-ng: upgrade 0.12.01 -> 0.12.02 util-macros: upgrade 1.19.2 -> 1.19.3 gtk-doc: upgrade 1.33.1 -> 1.33.2 e2fsprogs: upgrade 1.45.6 -> 1.45.7 bind: upgrade 9.16.10 -> 9.16.11 libdrm: upgrade 2.4.103 -> 2.4.104 parted: upgrade 3.3 -> 3.4 Yann Dirson (1): libsdl2: upgrade to 2.0.14 Yi Fan Yu (6): binutils: Fix CVE-2020-35448 oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_event strace: increase ptest timeout duration 120->240s sudo: upgrade 1.9.5p1 -> 1.9.5p2 glibc: fix CVE-2020-27618 glib-2.0: add workaround to fix codegen.py.test failing Yi Zhao (7): dhcpcd: upgrade 9.3.2 -> 9.3.4 dhcpcd: fix SECCOMP for i386 inetutils: add dnsdomainname to ALTERNATIVE libcap: update 2.45 -> 2.46 libcap-ng: upgrade 0.8.1 -> 0.8.2 dhcpcd: upgrade 9.3.4 -> 9.4.0 rng-tools: upgrade 6.10 -> 6.11 Yoann Congal (2): documentation: Fix a Concpets -> Concepts typo documentation: Prevent building documentation with an outdated version of sphinx Zhixiong Chi (1): glibc: CVE-2020-29562 and CVE-2020-29573 akuster (4): openssl: Enable srp algorithm cve-check.bbclass: add layer to cve log cve-check: add include/exclude layers documentation.conf: add both CVE_CHECK_LAYER_* hongxu (2): apt: add nativesdk support dpkg: add nativesdk support saloni (2): libgcrypt: Whitelisted CVEs libcroco: Added CVE zangrc (3): bash: Rename patch name systemtap: upgrade 4.3 -> 4.4 msmtp: upgrade 1.8.13 -> 1.8.14 zhengruoqin (11): cantarell-fonts: upgrade 0.201 -> 0.301 gdbm: upgrade 1.18.1 -> 1.19 libarchive: upgrade 3.4.3 -> 3.5.1 libevdev: upgrade 1.10.0 -> 1.10.1 libgpg-error: upgrade 1.39 -> 1.41 libmodulemd: upgrade 2.11.2 -> 2.12.0 bison: upgrade 3.7.4 -> 3.7.5 ca-certificates: upgrade 20200601 -> 20210119 mc: upgrade 4.8.25 -> 4.8.26 sqlite3: upgrade 3.34.0 -> 3.34.1 python3-packaging: upgrade 20.8 -> 20.9 Revert "libpam: update 1.3.1 -> 1.5.1" This reverts commit b0384720a46fb25c4ad180e3f256ffdeb53dc8a6. OpenBMC is not ready for the removal of pam_cracklib and pam_tally2. Until code is ready to move to new libs in libpam_1.5, carry a revert in OpenBMC to stay at libpam_1.3. openbmc/openbmc#3750 tracks this work Signed-off-by: Andrew Geissler Change-Id: I69357e370d7cf5c5d6dfedde11b88a4f797f7e95 --- poky/meta/classes/archiver.bbclass | 1 + poky/meta/classes/autotools.bbclass | 14 +- poky/meta/classes/base.bbclass | 30 +-- poky/meta/classes/buildhistory.bbclass | 2 +- poky/meta/classes/buildstats.bbclass | 40 +++- poky/meta/classes/ccache.bbclass | 6 +- poky/meta/classes/cve-check.bbclass | 35 ++- poky/meta/classes/distutils3.bbclass | 10 +- poky/meta/classes/externalsrc.bbclass | 16 +- poky/meta/classes/go.bbclass | 4 +- poky/meta/classes/grub-efi-cfg.bbclass | 1 + poky/meta/classes/gtk-doc.bbclass | 1 + poky/meta/classes/image-live.bbclass | 2 +- poky/meta/classes/image.bbclass | 2 +- poky/meta/classes/image_types.bbclass | 10 +- poky/meta/classes/image_types_wic.bbclass | 10 +- poky/meta/classes/insane.bbclass | 36 +++- poky/meta/classes/kernel-devicetree.bbclass | 7 + poky/meta/classes/kernel-fitimage.bbclass | 270 +++++++++++++++++++----- poky/meta/classes/kernel.bbclass | 20 +- poky/meta/classes/license.bbclass | 1 + poky/meta/classes/license_image.bbclass | 6 +- poky/meta/classes/linuxloader.bbclass | 6 +- poky/meta/classes/native.bbclass | 23 +- poky/meta/classes/npm.bbclass | 37 ++-- poky/meta/classes/package.bbclass | 7 + poky/meta/classes/package_ipk.bbclass | 1 + poky/meta/classes/package_rpm.bbclass | 40 ++-- poky/meta/classes/populate_sdk_base.bbclass | 2 +- poky/meta/classes/rootfs_ipk.bbclass | 4 +- poky/meta/classes/sanity.bbclass | 28 ++- poky/meta/classes/staging.bbclass | 5 + poky/meta/classes/systemd.bbclass | 3 +- poky/meta/classes/uboot-extlinux-config.bbclass | 1 + 34 files changed, 521 insertions(+), 160 deletions(-) (limited to 'poky/meta/classes') diff --git a/poky/meta/classes/archiver.bbclass b/poky/meta/classes/archiver.bbclass index 598298ef6..858507b34 100644 --- a/poky/meta/classes/archiver.bbclass +++ b/poky/meta/classes/archiver.bbclass @@ -590,6 +590,7 @@ addtask do_dumpdata addtask do_ar_recipe addtask do_deploy_archives do_build[recrdeptask] += "do_deploy_archives" +do_rootfs[recrdeptask] += "do_deploy_archives" do_populate_sdk[recrdeptask] += "do_deploy_archives" python () { diff --git a/poky/meta/classes/autotools.bbclass b/poky/meta/classes/autotools.bbclass index 2ceb790b5..9dc8ebdaa 100644 --- a/poky/meta/classes/autotools.bbclass +++ b/poky/meta/classes/autotools.bbclass @@ -17,7 +17,7 @@ def autotools_dep_prepend(d): and not d.getVar('INHIBIT_DEFAULT_DEPS'): deps += 'libtool-cross ' - return deps + 'gnu-config-native ' + return deps DEPENDS_prepend = "${@autotools_dep_prepend(d)} " @@ -30,7 +30,7 @@ inherit siteinfo export CONFIG_SITE acpaths ?= "default" -EXTRA_AUTORECONF = "--exclude=autopoint" +EXTRA_AUTORECONF = "--exclude=autopoint --exclude=gtkdocize" export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}" @@ -215,21 +215,13 @@ autotools_do_configure() { PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4" fi mkdir -p m4 - if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then - if ! echo "${DEPENDS}" | grep -q intltool-native; then - bbwarn "Missing DEPENDS on intltool-native" - fi - PRUNE_M4="$PRUNE_M4 intltool.m4" - bbnote Executing intltoolize --copy --force --automake - intltoolize --copy --force --automake - fi for i in $PRUNE_M4; do find ${S} -ignore_readdir_race -name $i -delete done bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths - ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." + ACLOCAL="$ACLOCAL" autoreconf -Wcross -Wno-obsolete --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." cd $olddir fi if [ -e ${CONFIGURE_SCRIPT} ]; then diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass index 78ae28bb0..d287065e0 100644 --- a/poky/meta/classes/base.bbclass +++ b/poky/meta/classes/base.bbclass @@ -596,62 +596,62 @@ python () { needsrcrev = False srcuri = d.getVar('SRC_URI') - for uri in srcuri.split(): - (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3] + for uri_string in srcuri.split(): + uri = bb.fetch.URI(uri_string) # HTTP/FTP use the wget fetcher - if scheme in ("http", "https", "ftp"): + if uri.scheme in ("http", "https", "ftp"): d.appendVarFlag('do_fetch', 'depends', ' wget-native:do_populate_sysroot') # Svn packages should DEPEND on subversion-native - if scheme == "svn": + if uri.scheme == "svn": needsrcrev = True d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot') # Git packages should DEPEND on git-native - elif scheme in ("git", "gitsm"): + elif uri.scheme in ("git", "gitsm"): needsrcrev = True d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot') # Mercurial packages should DEPEND on mercurial-native - elif scheme == "hg": + elif uri.scheme == "hg": needsrcrev = True d.appendVar("EXTRANATIVEPATH", ' python3-native ') d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot') # Perforce packages support SRCREV = "${AUTOREV}" - elif scheme == "p4": + elif uri.scheme == "p4": needsrcrev = True # OSC packages should DEPEND on osc-native - elif scheme == "osc": + elif uri.scheme == "osc": d.appendVarFlag('do_fetch', 'depends', ' osc-native:do_populate_sysroot') - elif scheme == "npm": + elif uri.scheme == "npm": d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot') # *.lz4 should DEPEND on lz4-native for unpacking - if path.endswith('.lz4'): + if uri.path.endswith('.lz4'): d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot') # *.lz should DEPEND on lzip-native for unpacking - elif path.endswith('.lz'): + elif uri.path.endswith('.lz'): d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot') # *.xz should DEPEND on xz-native for unpacking - elif path.endswith('.xz') or path.endswith('.txz'): + elif uri.path.endswith('.xz') or uri.path.endswith('.txz'): d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') # .zip should DEPEND on unzip-native for unpacking - elif path.endswith('.zip') or path.endswith('.jar'): + elif uri.path.endswith('.zip') or uri.path.endswith('.jar'): d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') # Some rpm files may be compressed internally using xz (for example, rpms from Fedora) - elif path.endswith('.rpm'): + elif uri.path.endswith('.rpm'): d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') # *.deb should DEPEND on xz-native for unpacking - elif path.endswith('.deb'): + elif uri.path.endswith('.deb'): d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') if needsrcrev: diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass index daae05614..117a44eaf 100644 --- a/poky/meta/classes/buildhistory.bbclass +++ b/poky/meta/classes/buildhistory.bbclass @@ -859,7 +859,7 @@ END } python buildhistory_eventhandler() { - if e.data.getVar('BUILDHISTORY_FEATURES').strip(): + if (e.data.getVar('BUILDHISTORY_FEATURES') or "").strip(): reset = e.data.getVar("BUILDHISTORY_RESET") olddir = e.data.getVar("BUILDHISTORY_OLD_DIR") if isinstance(e, bb.event.BuildStarted): diff --git a/poky/meta/classes/buildstats.bbclass b/poky/meta/classes/buildstats.bbclass index 6f8718723..a8ee6e69a 100644 --- a/poky/meta/classes/buildstats.bbclass +++ b/poky/meta/classes/buildstats.bbclass @@ -104,14 +104,46 @@ def write_task_data(status, logfile, e, d): f.write("Status: FAILED \n") f.write("Ended: %0.2f \n" % e.time) +def write_host_data(logfile, e, d): + import subprocess, os, datetime + cmds = d.getVar('BB_LOG_HOST_STAT_CMDS') + if cmds is None: + d.setVar("BB_LOG_HOST_STAT_ON_INTERVAL", "0") + d.setVar("BB_LOG_HOST_STAT_ON_FAILURE", "0") + bb.warn("buildstats: Collecting host data failed. Set BB_LOG_HOST_STAT_CMDS=\"command1 ; command2 ; ... \" in conf\/local.conf\n") + return + path = d.getVar("PATH") + opath = d.getVar("BB_ORIGENV", False).getVar("PATH") + ospath = os.environ['PATH'] + os.environ['PATH'] = path + ":" + opath + ":" + ospath + with open(logfile, "a") as f: + f.write("Event Time: %f\nDate: %s\n" % (e.time, datetime.datetime.now())) + for cmd in cmds.split(";"): + if len(cmd) == 0: + continue + try: + output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT, timeout=1).decode('utf-8') + except (subprocess.CalledProcessError, subprocess.TimeoutExpired, FileNotFoundError) as err: + output = "Error running command: %s\n%s\n" % (cmd, err) + f.write("%s\n%s\n" % (cmd, output)) + os.environ['PATH'] = ospath + python run_buildstats () { import bb.build import bb.event import time, subprocess, platform bn = d.getVar('BUILDNAME') - bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn) - taskdir = os.path.join(bsdir, d.getVar('PF')) + ######################################################################## + # bitbake fires HeartbeatEvent even before a build has been + # triggered, causing BUILDNAME to be None + ######################################################################## + if bn is not None: + bsdir = os.path.join(d.getVar('BUILDSTATS_BASE'), bn) + taskdir = os.path.join(bsdir, d.getVar('PF')) + if isinstance(e, bb.event.HeartbeatEvent) and bb.utils.to_boolean(d.getVar("BB_LOG_HOST_STAT_ON_INTERVAL")): + bb.utils.mkdirhier(bsdir) + write_host_data(os.path.join(bsdir, "host_stats"), e, d) if isinstance(e, bb.event.BuildStarted): ######################################################################## @@ -186,10 +218,12 @@ python run_buildstats () { build_status = os.path.join(bsdir, "build_stats") with open(build_status, "a") as f: f.write(d.expand("Failed at: ${PF} at task: %s \n" % e.task)) + if bb.utils.to_boolean(d.getVar("BB_LOG_HOST_STAT_ON_FAILURE")): + write_host_data(build_status, e, d) } addhandler run_buildstats -run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed" +run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.event.HeartbeatEvent bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed" python runqueue_stats () { import buildstats diff --git a/poky/meta/classes/ccache.bbclass b/poky/meta/classes/ccache.bbclass index b5457359c..4532894c5 100644 --- a/poky/meta/classes/ccache.bbclass +++ b/poky/meta/classes/ccache.bbclass @@ -33,6 +33,10 @@ export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf" export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}" +# Fixed errors: +# ccache: error: Failed to create directory /run/user/0/ccache-tmp: Permission denied +export CCACHE_TEMPDIR ?= "${CCACHE_DIR}/tmp" + # We need to stop ccache considering the current directory or the # debug-prefix-map target directory to be significant when calculating # its hash. Without this the cache would be invalidated every time @@ -45,7 +49,7 @@ python() { """ pn = d.getVar('PN') # quilt-native doesn't need ccache since no c files - if not (pn in ('ccache-native', 'quilt-native') or + if not (bb.data.inherits_class("native", d) or bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))): d.appendVar('DEPENDS', ' ccache-native') d.setVar('CCACHE', 'ccache ') diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass index d843e7c4a..112ee3379 100644 --- a/poky/meta/classes/cve-check.bbclass +++ b/poky/meta/classes/cve-check.bbclass @@ -53,6 +53,16 @@ CVE_CHECK_PN_WHITELIST ?= "" # CVE_CHECK_WHITELIST ?= "" +# Layers to be excluded +CVE_CHECK_LAYER_EXCLUDELIST ??= "" + +# Layers to be included +CVE_CHECK_LAYER_INCLUDELIST ??= "" + + +# set to "alphabetical" for version using single alphabetical character as increament release +CVE_VERSION_SUFFIX ??= "" + python cve_save_summary_handler () { import shutil import datetime @@ -206,10 +216,11 @@ def check_cves(d, patched_cves): """ Connect to the NVD database and find unpatched cves. """ - from distutils.version import LooseVersion + from oe.cve_check import Version pn = d.getVar("PN") real_pv = d.getVar("PV") + suffix = d.getVar("CVE_VERSION_SUFFIX") cves_unpatched = [] # CVE_PRODUCT can contain more than one product (eg. curl/libcurl) @@ -263,8 +274,8 @@ def check_cves(d, patched_cves): else: if operator_start: try: - vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) - vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) + vulnerable_start = (operator_start == '>=' and Version(pv,suffix) >= Version(version_start,suffix)) + vulnerable_start |= (operator_start == '>' and Version(pv,suffix) > Version(version_start,suffix)) except: bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_start, version_start, cve)) @@ -274,8 +285,8 @@ def check_cves(d, patched_cves): if operator_end: try: - vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) - vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) + vulnerable_end = (operator_end == '<=' and Version(pv,suffix) <= Version(version_end,suffix) ) + vulnerable_end |= (operator_end == '<' and Version(pv,suffix) < Version(version_end,suffix) ) except: bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_end, version_end, cve)) @@ -330,7 +341,20 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): CVE manifest if enabled. """ + cve_file = d.getVar("CVE_CHECK_LOG") + fdir_name = d.getVar("FILE_DIRNAME") + layer = fdir_name.split("/")[-3] + + include_layers = d.getVar("CVE_CHECK_LAYER_INCLUDELIST").split() + exclude_layers = d.getVar("CVE_CHECK_LAYER_EXCLUDELIST").split() + + if exclude_layers and layer in exclude_layers: + return + + if include_layers and layer not in include_layers: + return + nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId=" write_string = "" unpatched_cves = [] @@ -340,6 +364,7 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): is_patched = cve in patched if is_patched and (d.getVar("CVE_CHECK_REPORT_PATCHED") != "1"): continue + write_string += "LAYER: %s\n" % layer write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) write_string += "CVE: %s\n" % cve diff --git a/poky/meta/classes/distutils3.bbclass b/poky/meta/classes/distutils3.bbclass index 7356b5245..a916a8000 100644 --- a/poky/meta/classes/distutils3.bbclass +++ b/poky/meta/classes/distutils3.bbclass @@ -12,28 +12,30 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ DISTUTILS_PYTHON = "python3" DISTUTILS_PYTHON_class-native = "nativepython3" +DISTUTILS_SETUP_PATH ?= "${S}" + distutils3_do_configure() { : } distutils3_do_compile() { - cd ${S} + cd ${DISTUTILS_SETUP_PATH} NO_FETCH_BUILD=1 \ STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed." } distutils3_do_compile[vardepsexclude] = "MACHINE" distutils3_do_install() { - cd ${S} + cd ${DISTUTILS_SETUP_PATH} install -d ${D}${PYTHON_SITEPACKAGES_DIR} STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ build --build-base=${B} install --skip-build ${DISTUTILS_INSTALL_ARGS} || \ bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed." diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass index dd0939578..64e94e330 100644 --- a/poky/meta/classes/externalsrc.bbclass +++ b/poky/meta/classes/externalsrc.bbclass @@ -190,6 +190,7 @@ def srctree_hash_files(d, srcdir=None): import shutil import subprocess import tempfile + import hashlib s_dir = srcdir or d.getVar('EXTERNALSRC') git_dir = None @@ -197,6 +198,10 @@ def srctree_hash_files(d, srcdir=None): try: git_dir = os.path.join(s_dir, subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip()) + top_git_dir = os.path.join(s_dir, subprocess.check_output(['git', '-C', d.getVar("TOPDIR"), 'rev-parse', '--git-dir'], + stderr=subprocess.DEVNULL).decode("utf-8").rstrip()) + if git_dir == top_git_dir: + git_dir = None except subprocess.CalledProcessError: pass @@ -210,7 +215,16 @@ def srctree_hash_files(d, srcdir=None): env = os.environ.copy() env['GIT_INDEX_FILE'] = tmp_index.name subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env) - sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8") + git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8") + submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8") + for line in submodule_helper.splitlines(): + module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1]) + proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + proc.communicate() + proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + stdout, _ = proc.communicate() + git_sha1 += stdout.decode("utf-8") + sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() with open(oe_hash_file, 'w') as fobj: fobj.write(sha1) ret = oe_hash_file + ':True' diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass index a9e31b50e..fa147892b 100644 --- a/poky/meta/classes/go.bbclass +++ b/poky/meta/classes/go.bbclass @@ -40,6 +40,7 @@ GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pk GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" GO_LINKMODE ?= "" GO_LINKMODE_class-nativesdk = "--linkmode=external" +GO_LINKMODE_class-native = "--linkmode=external" GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" @@ -115,7 +116,8 @@ go_do_install() { install -d ${D}${libdir}/go/src/${GO_IMPORT} tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \ tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf - - tar -C ${B} -cf - --exclude-vcs pkg | tar -C ${D}${libdir}/go --no-same-owner -xf - + tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \ + tar -C ${D}${libdir}/go --no-same-owner -xf - if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then install -d ${D}${bindir} diff --git a/poky/meta/classes/grub-efi-cfg.bbclass b/poky/meta/classes/grub-efi-cfg.bbclass index 3a2cdd698..ea21b3de3 100644 --- a/poky/meta/classes/grub-efi-cfg.bbclass +++ b/poky/meta/classes/grub-efi-cfg.bbclass @@ -120,3 +120,4 @@ python build_efi_cfg() { cfgfile.close() } +build_efi_cfg[vardepsexclude] += "OVERRIDES" diff --git a/poky/meta/classes/gtk-doc.bbclass b/poky/meta/classes/gtk-doc.bbclass index 7dd662bf8..ef99e63fa 100644 --- a/poky/meta/classes/gtk-doc.bbclass +++ b/poky/meta/classes/gtk-doc.bbclass @@ -7,6 +7,7 @@ # # It should be used in recipes to determine whether gtk-doc based documentation should be built, # so that qemu use can be avoided when necessary. +GTKDOC_ENABLED_class-native = "False" GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" diff --git a/poky/meta/classes/image-live.bbclass b/poky/meta/classes/image-live.bbclass index 9ea5ddc31..1b2183ead 100644 --- a/poky/meta/classes/image-live.bbclass +++ b/poky/meta/classes/image-live.bbclass @@ -234,7 +234,7 @@ build_hddimg() { bberror "${HDDDIR}/rootfs.img rootfs size is greather than or equal to 4GB," bberror "and this doesn't work on a FAT filesystem. You can either:" bberror "1) Reduce the size of rootfs.img, or," - bbfatal "2) Use wic, vmdk or vdi instead of hddimg\n" + bbfatal "2) Use wic, vmdk,vhd, vhdx or vdi instead of hddimg\n" fi fi diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass index 045f4494c..3239d5cf5 100644 --- a/poky/meta/classes/image.bbclass +++ b/poky/meta/classes/image.bbclass @@ -33,7 +33,7 @@ INHIBIT_DEFAULT_DEPS = "1" # IMAGE_FEATURES may contain any available package group IMAGE_FEATURES ?= "" IMAGE_FEATURES[type] = "list" -IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs stateless-rootfs empty-root-password allow-empty-password allow-root-login post-install-logging" +IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs read-only-rootfs-delayed-postinsts stateless-rootfs empty-root-password allow-empty-password allow-root-login post-install-logging" # Generate companion debugfs? IMAGE_GEN_DEBUGFS ?= "0" diff --git a/poky/meta/classes/image_types.bbclass b/poky/meta/classes/image_types.bbclass index 286009057..802869140 100644 --- a/poky/meta/classes/image_types.bbclass +++ b/poky/meta/classes/image_types.bbclass @@ -110,7 +110,7 @@ IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAM IMAGE_CMD_TAR ?= "tar" # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs -IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]" +IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --format=posix --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]" do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" IMAGE_CMD_cpio () { @@ -269,7 +269,7 @@ IMAGE_TYPES = " \ # CONVERSION_CMD/DEPENDS. COMPRESSIONTYPES ?= "" -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}" +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 ${COMPRESSIONTYPES}" CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" @@ -288,6 +288,8 @@ CONVERSION_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} CONVERSION_CMD_bmap = "bmaptool create ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap" CONVERSION_CMD_u-boot = "mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C none -n ${IMAGE_NAME} -d ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.u-boot" CONVERSION_CMD_vmdk = "qemu-img convert -O vmdk ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vmdk" +CONVERSION_CMD_vhdx = "qemu-img convert -O vhdx -o subformat=dynamic ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vhdx" +CONVERSION_CMD_vhd = "qemu-img convert -O vpc -o subformat=fixed ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vhd" CONVERSION_CMD_vdi = "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi" CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2" CONVERSION_CMD_base64 = "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64" @@ -306,6 +308,8 @@ CONVERSION_DEPENDS_vmdk = "qemu-system-native" CONVERSION_DEPENDS_vdi = "qemu-system-native" CONVERSION_DEPENDS_qcow2 = "qemu-system-native" CONVERSION_DEPENDS_base64 = "coreutils-native" +CONVERSION_DEPENDS_vhdx = "qemu-system-native" +CONVERSION_DEPENDS_vhd = "qemu-system-native" RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" RUNNABLE_MACHINE_PATTERNS ?= "qemu" @@ -313,7 +317,7 @@ RUNNABLE_MACHINE_PATTERNS ?= "qemu" DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" # The IMAGE_TYPES_MASKED variable will be used to mask out from the IMAGE_FSTYPES, -# images that will not be built at do_rootfs time: vmdk, vdi, qcow2, hddimg, iso, etc. +# images that will not be built at do_rootfs time: vmdk, vhd, vhdx, vdi, qcow2, hddimg, iso, etc. IMAGE_TYPES_MASKED ?= "" # bmap requires python3 to be in the PATH diff --git a/poky/meta/classes/image_types_wic.bbclass b/poky/meta/classes/image_types_wic.bbclass index 286e0f5d5..49be1da77 100644 --- a/poky/meta/classes/image_types_wic.bbclass +++ b/poky/meta/classes/image_types_wic.bbclass @@ -3,7 +3,7 @@ WICVARS ?= "\ BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_EFI_BOOT_FILES IMAGE_BOOT_FILES \ IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ - ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \ + ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS HOSTTOOLS_DIR \ KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \ ASSUME_PROVIDED PSEUDO_IGNORE_PATHS" @@ -29,11 +29,17 @@ WIC_CREATE_EXTRA_ARGS ?= "" IMAGE_CMD_wic () { out="${IMGDEPLOYDIR}/${IMAGE_NAME}" build_wic="${WORKDIR}/build-wic" + tmp_wic="${WORKDIR}/tmp-wic" wks="${WKS_FULL_PATH}" + if [ -e "$tmp_wic" ]; then + # Ensure we don't have any junk leftover from a previously interrupted + # do_image_wic execution + rm -rf "$tmp_wic" + fi if [ -z "$wks" ]; then bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." fi - BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" ${WIC_CREATE_EXTRA_ARGS} + BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS} mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" } IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass index cf2165c51..53230fc66 100644 --- a/poky/meta/classes/insane.bbclass +++ b/poky/meta/classes/insane.bbclass @@ -27,7 +27,7 @@ WARN_QA ?= " libdir xorg-driver-abi \ infodir build-deps src-uri-bad symlink-to-sysroot multilib \ invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ mime mime-xdg unlisted-pkg-lics unhandled-features-check \ - missing-update-alternatives \ + missing-update-alternatives native-last \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ @@ -87,7 +87,8 @@ def package_qa_add_message(messages, section, new_msg): QAPATHTEST[shebang-size] = "package_qa_check_shebang_size" def package_qa_check_shebang_size(path, name, d, elf, messages): - if os.path.islink(path) or elf: + import stat + if os.path.islink(path) or stat.S_ISFIFO(os.stat(path).st_mode) or elf: return try: @@ -1365,6 +1366,37 @@ python () { d.setVarFlag('do_package_qa', 'rdeptask', '') for i in issues: package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE"), i), d) + + if 'native-last' not in (d.getVar('INSANE_SKIP') or "").split(): + for native_class in ['native', 'nativesdk']: + if bb.data.inherits_class(native_class, d): + + inherited_classes = d.getVar('__inherit_cache', False) or [] + needle = os.path.join('classes', native_class) + + bbclassextend = (d.getVar('BBCLASSEXTEND') or '').split() + # BBCLASSEXTEND items are always added in the end + skip_classes = bbclassextend + if bb.data.inherits_class('native', d) or 'native' in bbclassextend: + # native also inherits nopackages and relocatable bbclasses + skip_classes.extend(['nopackages', 'relocatable']) + + broken_order = [] + for class_item in reversed(inherited_classes): + if needle not in class_item: + for extend_item in skip_classes: + if os.path.join('classes', '%s.bbclass' % extend_item) in class_item: + break + else: + pn = d.getVar('PN') + broken_order.append(os.path.basename(class_item)) + else: + break + if broken_order: + package_qa_handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. " + "Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d) + + qa_sane = d.getVar("QA_SANE") if not qa_sane: bb.fatal("Fatal QA errors found, failing task.") diff --git a/poky/meta/classes/kernel-devicetree.bbclass b/poky/meta/classes/kernel-devicetree.bbclass index 81dda8003..d4f886420 100644 --- a/poky/meta/classes/kernel-devicetree.bbclass +++ b/poky/meta/classes/kernel-devicetree.bbclass @@ -9,6 +9,9 @@ FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage- # Generate kernel+devicetree bundle KERNEL_DEVICETREE_BUNDLE ?= "0" +# dtc flags passed via DTC_FLAGS env variable +KERNEL_DTC_FLAGS ?= "" + normalize_dtb () { dtb="$1" if echo $dtb | grep -q '/dts/'; then @@ -50,6 +53,10 @@ do_configure_append() { } do_compile_append() { + if [ -n "${KERNEL_DTC_FLAGS}" ]; then + export DTC_FLAGS="${KERNEL_DTC_FLAGS}" + fi + for dtbf in ${KERNEL_DEVICETREE}; do dtb=`normalize_dtb "$dtbf"` oe_runmake $dtb CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass index bb2f3c4cc..87ed8bd89 100644 --- a/poky/meta/classes/kernel-fitimage.bbclass +++ b/poky/meta/classes/kernel-fitimage.bbclass @@ -1,5 +1,7 @@ inherit kernel-uboot kernel-artifact-names uboot-sign +KERNEL_IMAGETYPE_REPLACEMENT = "" + python __anonymous () { kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" if 'fitImage' in kerneltypes.split(): @@ -21,6 +23,8 @@ python __anonymous () { else: replacementtype = "zImage" + d.setVar("KERNEL_IMAGETYPE_REPLACEMENT", replacementtype) + # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal # to kernel.bbclass . We have to override it, since we pack zImage # (at least for now) into the fitImage . @@ -45,6 +49,8 @@ python __anonymous () { if d.getVar('UBOOT_SIGN_ENABLE') == "1" and d.getVar('UBOOT_DTB_BINARY'): uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn) + if d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1": + d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' %s:do_populate_sysroot' % uboot_pn) } # Options for the device tree compiler passed to mkimage '-D' feature: @@ -72,6 +78,19 @@ FIT_KEY_REQ_ARGS ?= "-batch -new" # Standard format for public key certificate FIT_KEY_SIGN_PKCS ?= "-x509" +# Description string +FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" + +# Sign individual images as well +FIT_SIGN_INDIVIDUAL ?= "0" + +# mkimage command +UBOOT_MKIMAGE ?= "uboot-mkimage" +UBOOT_MKIMAGE_SIGN ?= "${UBOOT_MKIMAGE}" + +# Arguments passed to mkimage for signing +UBOOT_MKIMAGE_SIGN_ARGS ?= "" + # # Emit the fitImage ITS header # @@ -81,7 +100,7 @@ fitimage_emit_fit_header() { /dts-v1/; / { - description = "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"; + description = "${FIT_DESC}"; #address-cells = <1>; EOF } @@ -132,6 +151,8 @@ EOF fitimage_emit_section_kernel() { kernel_csum="${FIT_HASH_ALG}" + kernel_sign_algo="${FIT_SIGN_ALG}" + kernel_sign_keyname="${UBOOT_SIGN_KEYNAME}" ENTRYPOINT="${UBOOT_ENTRYPOINT}" if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then @@ -154,6 +175,17 @@ fitimage_emit_section_kernel() { }; }; EOF + + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${kernel_sign_keyname}" ] ; then + sed -i '$ d' ${1} + cat << EOF >> ${1} + signature@1 { + algo = "${kernel_csum},${kernel_sign_algo}"; + key-name-hint = "${kernel_sign_keyname}"; + }; + }; +EOF + fi } # @@ -165,6 +197,8 @@ EOF fitimage_emit_section_dtb() { dtb_csum="${FIT_HASH_ALG}" + dtb_sign_algo="${FIT_SIGN_ALG}" + dtb_sign_keyname="${UBOOT_SIGN_KEYNAME}" dtb_loadline="" dtb_ext=${DTB##*.} @@ -188,6 +222,54 @@ fitimage_emit_section_dtb() { }; }; EOF + + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${dtb_sign_keyname}" ] ; then + sed -i '$ d' ${1} + cat << EOF >> ${1} + signature@1 { + algo = "${dtb_csum},${dtb_sign_algo}"; + key-name-hint = "${dtb_sign_keyname}"; + }; + }; +EOF + fi +} + +# +# Emit the fitImage ITS u-boot script section +# +# $1 ... .its filename +# $2 ... Image counter +# $3 ... Path to boot script image +fitimage_emit_section_boot_script() { + + bootscr_csum="${FIT_HASH_ALG}" + bootscr_sign_algo="${FIT_SIGN_ALG}" + bootscr_sign_keyname="${UBOOT_SIGN_KEYNAME}" + + cat << EOF >> ${1} + bootscr@${2} { + description = "U-boot script"; + data = /incbin/("${3}"); + type = "script"; + arch = "${UBOOT_ARCH}"; + compression = "none"; + hash@1 { + algo = "${bootscr_csum}"; + }; + }; +EOF + + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${bootscr_sign_keyname}" ] ; then + sed -i '$ d' ${1} + cat << EOF >> ${1} + signature@1 { + algo = "${bootscr_csum},${bootscr_sign_algo}"; + key-name-hint = "${bootscr_sign_keyname}"; + }; + }; +EOF + fi } # @@ -226,6 +308,8 @@ EOF fitimage_emit_section_ramdisk() { ramdisk_csum="${FIT_HASH_ALG}" + ramdisk_sign_algo="${FIT_SIGN_ALG}" + ramdisk_sign_keyname="${UBOOT_SIGN_KEYNAME}" ramdisk_loadline="" ramdisk_entryline="" @@ -251,6 +335,17 @@ fitimage_emit_section_ramdisk() { }; }; EOF + + if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${ramdisk_sign_keyname}" ] ; then + sed -i '$ d' ${1} + cat << EOF >> ${1} + signature@1 { + algo = "${ramdisk_csum},${ramdisk_sign_algo}"; + key-name-hint = "${ramdisk_sign_keyname}"; + }; + }; +EOF + fi } # @@ -260,8 +355,9 @@ EOF # $2 ... Linux kernel ID # $3 ... DTB image name # $4 ... ramdisk ID -# $5 ... config ID -# $6 ... default flag +# $5 ... u-boot script ID +# $6 ... config ID +# $7 ... default flag fitimage_emit_section_config() { conf_csum="${FIT_HASH_ALG}" @@ -270,6 +366,14 @@ fitimage_emit_section_config() { conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" fi + its_file="${1}" + kernel_id="${2}" + dtb_image="${3}" + ramdisk_id="${4}" + bootscr_id="${5}" + config_id="${6}" + default_flag="${7}" + # Test if we have any DTBs at all sep="" conf_desc="" @@ -277,57 +381,65 @@ fitimage_emit_section_config() { kernel_line="" fdt_line="" ramdisk_line="" + bootscr_line="" setup_line="" default_line="" # conf node name is selected based on dtb ID if it is present, # otherwise its selected based on kernel ID - if [ -n "${3}" ]; then - conf_node=$conf_node${3} + if [ -n "${dtb_image}" ]; then + conf_node=$conf_node${dtb_image} else - conf_node=$conf_node${2} + conf_node=$conf_node${kernel_id} fi - if [ -n "${2}" ]; then + if [ -n "${kernel_id}" ]; then conf_desc="Linux kernel" sep=", " - kernel_line="kernel = \"kernel@${2}\";" + kernel_line="kernel = \"kernel@${kernel_id}\";" fi - if [ -n "${3}" ]; then + if [ -n "${dtb_image}" ]; then conf_desc="${conf_desc}${sep}FDT blob" sep=", " - fdt_line="fdt = \"fdt@${3}\";" + fdt_line="fdt = \"fdt@${dtb_image}\";" fi - if [ -n "${4}" ]; then + if [ -n "${ramdisk_id}" ]; then conf_desc="${conf_desc}${sep}ramdisk" sep=", " - ramdisk_line="ramdisk = \"ramdisk@${4}\";" + ramdisk_line="ramdisk = \"ramdisk@${ramdisk_id}\";" fi - if [ -n "${5}" ]; then + if [ -n "${bootscr_id}" ]; then + conf_desc="${conf_desc}${sep}u-boot script" + sep=", " + bootscr_line="bootscr = \"bootscr@${bootscr_id}\";" + fi + + if [ -n "${config_id}" ]; then conf_desc="${conf_desc}${sep}setup" - setup_line="setup = \"setup@${5}\";" + setup_line="setup = \"setup@${config_id}\";" fi - if [ "${6}" = "1" ]; then + if [ "${default_flag}" = "1" ]; then # default node is selected based on dtb ID if it is present, # otherwise its selected based on kernel ID - if [ -n "${3}" ]; then - default_line="default = \"conf@${3}\";" + if [ -n "${dtb_image}" ]; then + default_line="default = \"conf@${dtb_image}\";" else - default_line="default = \"conf@${2}\";" + default_line="default = \"conf@${kernel_id}\";" fi fi - cat << EOF >> ${1} + cat << EOF >> ${its_file} ${default_line} $conf_node { - description = "${6} ${conf_desc}"; + description = "${default_flag} ${conf_desc}"; ${kernel_line} ${fdt_line} ${ramdisk_line} + ${bootscr_line} ${setup_line} hash@1 { algo = "${conf_csum}"; @@ -339,28 +451,33 @@ EOF sign_line="sign-images = " sep="" - if [ -n "${2}" ]; then + if [ -n "${kernel_id}" ]; then sign_line="${sign_line}${sep}\"kernel\"" sep=", " fi - if [ -n "${3}" ]; then + if [ -n "${dtb_image}" ]; then sign_line="${sign_line}${sep}\"fdt\"" sep=", " fi - if [ -n "${4}" ]; then + if [ -n "${ramdisk_id}" ]; then sign_line="${sign_line}${sep}\"ramdisk\"" sep=", " fi - if [ -n "${5}" ]; then + if [ -n "${bootscr_id}" ]; then + sign_line="${sign_line}${sep}\"bootscr\"" + sep=", " + fi + + if [ -n "${config_id}" ]; then sign_line="${sign_line}${sep}\"setup\"" fi sign_line="${sign_line};" - cat << EOF >> ${1} + cat << EOF >> ${its_file} signature@1 { algo = "${conf_csum},${conf_sign_algo}"; key-name-hint = "${conf_sign_keyname}"; @@ -369,7 +486,7 @@ EOF EOF fi - cat << EOF >> ${1} + cat << EOF >> ${its_file} }; EOF } @@ -386,6 +503,7 @@ fitimage_assemble() { DTBS="" ramdiskcount=${3} setupcount="" + bootscr_id="" rm -f ${1} arch/${ARCH}/boot/${2} fitimage_emit_fit_header ${1} @@ -396,7 +514,22 @@ fitimage_assemble() { fitimage_emit_section_maint ${1} imagestart uboot_prep_kimage - fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" + + if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + initramfs_bundle_path="arch/"${UBOOT_ARCH}"/boot/"${KERNEL_IMAGETYPE_REPLACEMENT}".initramfs" + if [ -e "${initramfs_bundle_path}" ]; then + + # + # Include the kernel/rootfs bundle. + # + + fitimage_emit_section_kernel ${1} "${kernelcount}" "${initramfs_bundle_path}" "${linux_comp}" + else + bbwarn "${initramfs_bundle_path} not found." + fi + else + fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" + fi # # Step 2: Prepare a DTB image section @@ -430,7 +563,21 @@ fitimage_assemble() { fi # - # Step 3: Prepare a setup section. (For x86) + # Step 3: Prepare a u-boot script section + # + + if [ -n "${UBOOT_ENV}" ] && [ -d "${STAGING_DIR_HOST}/boot" ]; then + if [ -e "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY}" ]; then + cp ${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} ${B} + bootscr_id="${UBOOT_ENV_BINARY}" + fitimage_emit_section_boot_script ${1} "${bootscr_id}" ${UBOOT_ENV_BINARY} + else + bbwarn "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} not found." + fi + fi + + # + # Step 4: Prepare a setup section. (For x86) # if [ -e arch/${ARCH}/boot/setup.bin ]; then setupcount=1 @@ -438,9 +585,9 @@ fitimage_assemble() { fi # - # Step 4: Prepare a ramdisk section. + # Step 5: Prepare a ramdisk section. # - if [ "x${ramdiskcount}" = "x1" ] ; then + if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then # Find and use the first initramfs image archive type we find for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" @@ -461,13 +608,15 @@ fitimage_assemble() { fi # - # Step 5: Prepare a configurations section + # Step 6: Prepare a configurations section # fitimage_emit_section_maint ${1} confstart # kernel-fitimage.bbclass currently only supports a single kernel (no less or # more) to be added to the FIT image along with 0 or more device trees and # 0 or 1 ramdisk. + # It is also possible to include an initramfs bundle (kernel and rootfs in one binary) + # When the initramfs bundle is used ramdisk is disabled. # If a device tree is to be part of the FIT image, then select # the default configuration to be used is based on the dtbcount. If there is # no dtb present than select the default configuation to be based on @@ -479,13 +628,13 @@ fitimage_assemble() { if [ "${dtb_ext}" = "dtbo" ]; then fitimage_emit_section_config ${1} "" "${DTB}" "" "" "`expr ${i} = ${dtbcount}`" else - fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" + fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "`expr ${i} = ${dtbcount}`" fi i=`expr ${i} + 1` done else defaultconfigcount=1 - fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${setupcount}" "${defaultconfigcount}" + fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "${defaultconfigcount}" fi fitimage_emit_section_maint ${1} sectend @@ -493,15 +642,15 @@ fitimage_assemble() { fitimage_emit_section_maint ${1} fitend # - # Step 6: Assemble the image + # Step 7: Assemble the image # - uboot-mkimage \ + ${UBOOT_MKIMAGE} \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ -f ${1} \ arch/${ARCH}/boot/${2} # - # Step 7: Sign the image and add public key to U-Boot dtb + # Step 8: Sign the image and add public key to U-Boot dtb # if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then add_key_to_u_boot="" @@ -511,11 +660,12 @@ fitimage_assemble() { cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B} add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}" fi - uboot-mkimage \ + ${UBOOT_MKIMAGE_SIGN} \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ -F -k "${UBOOT_SIGN_KEYDIR}" \ $add_key_to_u_boot \ - -r arch/${ARCH}/boot/${2} + -r arch/${ARCH}/boot/${2} \ + ${UBOOT_MKIMAGE_SIGN_ARGS} fi } @@ -532,7 +682,11 @@ do_assemble_fitimage_initramfs() { if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \ test -n "${INITRAMFS_IMAGE}" ; then cd ${B} - fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 + if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage "" + else + fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1 + fi fi } @@ -571,22 +725,27 @@ kernel_do_deploy[vardepsexclude] = "DATETIME" kernel_do_deploy_append() { # Update deploy directory if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then - echo "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" - ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - echo "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin - ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + echo "Copying fit-image.its source file..." + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" + ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" + + echo "Copying linux.bin file..." + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin + ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + fi if [ -n "${INITRAMFS_IMAGE}" ]; then echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" - echo "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin" - ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + echo "Copying fitImage-${INITRAMFS_IMAGE} file..." + install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin" + ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + fi fi if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then # UBOOT_DTB_IMAGE is a realfile, but we can't use @@ -596,3 +755,18 @@ kernel_do_deploy_append() { fi fi } + +# The function below performs the following in case of initramfs bundles: +# - Removes do_assemble_fitimage. FIT generation is done through +# do_assemble_fitimage_initramfs. do_assemble_fitimage is not needed +# and should not be part of the tasks to be executed. +# - Since do_generate_rsa_keys is inserted by default +# between do_compile and do_assemble_fitimage, this is +# not suitable in case of initramfs bundles. do_generate_rsa_keys +# should be between do_bundle_initramfs and do_assemble_fitimage_initramfs. +python () { + if d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1": + bb.build.deltask('do_assemble_fitimage', d) + bb.build.deltask('generate_rsa_keys', d) + bb.build.addtask('generate_rsa_keys', 'do_assemble_fitimage_initramfs', 'do_bundle_initramfs', d) +} \ No newline at end of file diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass index 1a444efab..8693ab86b 100644 --- a/poky/meta/classes/kernel.bbclass +++ b/poky/meta/classes/kernel.bbclass @@ -1,5 +1,7 @@ inherit linux-kernel-base kernel-module-split +COMPATIBLE_HOST = ".*-linux" + KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" @@ -413,9 +415,23 @@ kernel_do_install() { # install -d ${D}/${KERNEL_IMAGEDEST} install -d ${D}/boot + + # + # When including an initramfs bundle inside a FIT image, the fitImage is created after the install task + # by do_assemble_fitimage_initramfs. + # This happens after the generation of the initramfs bundle (done by do_bundle_initramfs). + # So, at the level of the install task we should not try to install the fitImage. fitImage is still not + # generated yet. + # After the generation of the fitImage, the deploy task copies the fitImage from the build directory to + # the deploy folder. + # + for imageType in ${KERNEL_IMAGETYPES} ; do - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION} + if [ $imageType != "fitImage" ] || [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ] ; then + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION} + fi done + install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} @@ -743,7 +759,7 @@ kernel_do_deploy() { fi if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then - for imageType in ${KERNEL_IMAGETYPES} ; do + for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do if [ "$imageType" = "fitImage" ] ; then continue fi diff --git a/poky/meta/classes/license.bbclass b/poky/meta/classes/license.bbclass index f90176d6c..dc9111834 100644 --- a/poky/meta/classes/license.bbclass +++ b/poky/meta/classes/license.bbclass @@ -31,6 +31,7 @@ python do_populate_lic() { f.write("%s: %s\n" % (key, info[key])) } +PSEUDO_IGNORE_PATHS .= ",${@','.join(((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' + (d.getVar('LICENSE_PATH') or '')).split())}" # it would be better to copy them in do_install_append, but find_license_filesa is python python perform_packagecopy_prepend () { enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d) diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass index 119c8dfc8..36ddd8480 100644 --- a/poky/meta/classes/license_image.bbclass +++ b/poky/meta/classes/license_image.bbclass @@ -210,7 +210,8 @@ def license_deployed_manifest(d): os.unlink(lic_manifest_symlink_dir) # create the image dir symlink - os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) + if lic_manifest_dir != lic_manifest_symlink_dir: + os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) def get_deployed_dependencies(d): """ @@ -220,9 +221,10 @@ def get_deployed_dependencies(d): deploy = {} # Get all the dependencies for the current task (rootfs). taskdata = d.getVar("BB_TASKDEPDATA", False) + pn = d.getVar("PN", True) depends = list(set([dep[0] for dep in list(taskdata.values()) - if not dep[0].endswith("-native")])) + if not dep[0].endswith("-native") and not dep[0] == pn])) # To verify what was deployed it checks the rootfs dependencies against # the SSTATE_MANIFESTS for "deploy" task. diff --git a/poky/meta/classes/linuxloader.bbclass b/poky/meta/classes/linuxloader.bbclass index 720e5dfad..b161c51a5 100644 --- a/poky/meta/classes/linuxloader.bbclass +++ b/poky/meta/classes/linuxloader.bbclass @@ -1,6 +1,6 @@ def get_musl_loader_arch(d): import re - ldso_arch = None + ldso_arch = "NotSupported" targetarch = d.getVar("TARGET_ARCH") if targetarch.startswith("microblaze"): @@ -32,7 +32,7 @@ def get_musl_loader(d): def get_glibc_loader(d): import re - dynamic_loader = None + dynamic_loader = "NotSupported" targetarch = d.getVar("TARGET_ARCH") if targetarch in ["powerpc", "microblaze"]: dynamic_loader = "${base_libdir}/ld.so.1" @@ -58,7 +58,7 @@ def get_linuxloader(d): overrides = d.getVar("OVERRIDES").split(":") if "libc-baremetal" in overrides: - return None + return "NotSupported" if "libc-musl" in overrides: dynamic_loader = get_musl_loader(d) diff --git a/poky/meta/classes/native.bbclass b/poky/meta/classes/native.bbclass index 08106e345..a0838e41b 100644 --- a/poky/meta/classes/native.bbclass +++ b/poky/meta/classes/native.bbclass @@ -5,20 +5,12 @@ inherit relocatable # no need for them to be a direct target of 'world' EXCLUDE_FROM_WORLD = "1" -PACKAGES = "" -PACKAGES_class-native = "" -PACKAGES_DYNAMIC = "" -PACKAGES_DYNAMIC_class-native = "" PACKAGE_ARCH = "${BUILD_ARCH}" # used by cmake class OECMAKE_RPATH = "${libdir}" OECMAKE_RPATH_class-native = "${libdir}" -# When this class has packaging enabled, setting -# RPROVIDES becomes unnecessary. -RPROVIDES = "${PN}" - TARGET_ARCH = "${BUILD_ARCH}" TARGET_OS = "${BUILD_OS}" TARGET_VENDOR = "${BUILD_VENDOR}" @@ -138,7 +130,7 @@ python native_virtclass_handler () { if "native" not in classextend: return - def map_dependencies(varname, d, suffix = ""): + def map_dependencies(varname, d, suffix = "", selfref=True): if suffix: varname = varname + "_" + suffix deps = d.getVar(varname) @@ -148,22 +140,25 @@ python native_virtclass_handler () { newdeps = [] for dep in deps: if dep == pn: - continue + if not selfref: + continue + newdeps.append(dep) elif "-cross-" in dep: newdeps.append(dep.replace("-cross", "-native")) elif not dep.endswith("-native"): - newdeps.append(dep + "-native") + newdeps.append(dep.replace("-native", "") + "-native") else: newdeps.append(dep) - d.setVar(varname, " ".join(newdeps)) + d.setVar(varname, " ".join(newdeps), parsing=True) - map_dependencies("DEPENDS", e.data) - for pkg in [e.data.getVar("PN"), "", "${PN}"]: + map_dependencies("DEPENDS", e.data, selfref=False) + for pkg in e.data.getVar("PACKAGES", False).split(): map_dependencies("RDEPENDS", e.data, pkg) map_dependencies("RRECOMMENDS", e.data, pkg) map_dependencies("RSUGGESTS", e.data, pkg) map_dependencies("RPROVIDES", e.data, pkg) map_dependencies("RREPLACES", e.data, pkg) + map_dependencies("PACKAGES", e.data) provides = e.data.getVar("PROVIDES") nprovides = [] diff --git a/poky/meta/classes/npm.bbclass b/poky/meta/classes/npm.bbclass index 068032a1e..79f55febc 100644 --- a/poky/meta/classes/npm.bbclass +++ b/poky/meta/classes/npm.bbclass @@ -17,6 +17,8 @@ # NPM_INSTALL_DEV: # Set to 1 to also install devDependencies. +inherit python3native + DEPENDS_prepend = "nodejs-native " RDEPENDS_${PN}_prepend = "nodejs " @@ -130,11 +132,17 @@ python npm_do_configure() { cached_manifest.pop("dependencies", None) cached_manifest.pop("devDependencies", None) - with open(orig_shrinkwrap_file, "r") as f: - orig_shrinkwrap = json.load(f) + has_shrinkwrap_file = True + + try: + with open(orig_shrinkwrap_file, "r") as f: + orig_shrinkwrap = json.load(f) + except IOError: + has_shrinkwrap_file = False - cached_shrinkwrap = copy.deepcopy(orig_shrinkwrap) - cached_shrinkwrap.pop("dependencies", None) + if has_shrinkwrap_file: + cached_shrinkwrap = copy.deepcopy(orig_shrinkwrap) + cached_shrinkwrap.pop("dependencies", None) # Manage the dependencies progress = OutOfProgressHandler(d, r"^(\d+)/(\d+)$") @@ -165,8 +173,10 @@ python npm_do_configure() { progress.write("%d/%d" % (progress_done, progress_total)) dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) - foreach_dependencies(orig_shrinkwrap, _count_dependency, dev) - foreach_dependencies(orig_shrinkwrap, _cache_dependency, dev) + + if has_shrinkwrap_file: + foreach_dependencies(orig_shrinkwrap, _count_dependency, dev) + foreach_dependencies(orig_shrinkwrap, _cache_dependency, dev) # Configure the main package with tempfile.TemporaryDirectory() as tmpdir: @@ -181,16 +191,19 @@ python npm_do_configure() { cached_manifest[depkey] = {} cached_manifest[depkey][name] = version - _update_manifest("dependencies") + if has_shrinkwrap_file: + _update_manifest("dependencies") if dev: - _update_manifest("devDependencies") + if has_shrinkwrap_file: + _update_manifest("devDependencies") with open(cached_manifest_file, "w") as f: json.dump(cached_manifest, f, indent=2) - with open(cached_shrinkwrap_file, "w") as f: - json.dump(cached_shrinkwrap, f, indent=2) + if has_shrinkwrap_file: + with open(cached_shrinkwrap_file, "w") as f: + json.dump(cached_shrinkwrap, f, indent=2) } python npm_do_compile() { @@ -237,9 +250,7 @@ python npm_do_compile() { sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) configs.append(("nodedir", nodedir)) - bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/")) - pythondir = os.path.join(bindir, "python-native", "python") - configs.append(("python", pythondir)) + configs.append(("python", d.getVar("PYTHON"))) # Add node-pre-gyp configuration args.append(("target_arch", d.getVar("NPM_ARCH"))) diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass index 247bdc7bb..417e22529 100644 --- a/poky/meta/classes/package.bbclass +++ b/poky/meta/classes/package.bbclass @@ -807,10 +807,16 @@ python package_do_split_locales() { python perform_packagecopy () { import subprocess + import shutil dest = d.getVar('D') dvar = d.getVar('PKGD') + # Remove ${D}/sysroot-only if present + sysroot_only = os.path.join(dest, 'sysroot-only') + if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only): + shutil.rmtree(sysroot_only) + # Start by package population by taking a copy of the installed # files to operate on # Preserve sparse files and hard links @@ -2446,6 +2452,7 @@ python do_packagedata () { bb.build.exec_func("packagedata_translate_pr_autoinc", d) } +do_packagedata[cleandirs] += "${WORKDIR}/pkgdata-pdata-input" # Translate the EXTENDPRAUTO and AUTOINC to the final values packagedata_translate_pr_autoinc() { diff --git a/poky/meta/classes/package_ipk.bbclass b/poky/meta/classes/package_ipk.bbclass index 79cb36c51..d31dba0c8 100644 --- a/poky/meta/classes/package_ipk.bbclass +++ b/poky/meta/classes/package_ipk.bbclass @@ -4,6 +4,7 @@ IMAGE_PKGTYPE ?= "ipk" IPKGCONF_TARGET = "${WORKDIR}/opkg.conf" IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" +IPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass index 53b4700cd..43a825ad4 100644 --- a/poky/meta/classes/package_rpm.bbclass +++ b/poky/meta/classes/package_rpm.bbclass @@ -300,13 +300,13 @@ python write_specfile () { srccustomtagschunk = get_package_additional_metadata("rpm", localdata) srcdepends = d.getVar('DEPENDS') - srcrdepends = [] - srcrrecommends = [] - srcrsuggests = [] - srcrprovides = [] - srcrreplaces = [] - srcrconflicts = [] - srcrobsoletes = [] + srcrdepends = "" + srcrrecommends = "" + srcrsuggests = "" + srcrprovides = "" + srcrreplaces = "" + srcrconflicts = "" + srcrobsoletes = "" srcrpreinst = [] srcrpostinst = [] @@ -365,13 +365,13 @@ python write_specfile () { # Map the dependencies into their final form mapping_rename_hook(localdata) - splitrdepends = localdata.getVar('RDEPENDS') - splitrrecommends = localdata.getVar('RRECOMMENDS') - splitrsuggests = localdata.getVar('RSUGGESTS') - splitrprovides = localdata.getVar('RPROVIDES') - splitrreplaces = localdata.getVar('RREPLACES') - splitrconflicts = localdata.getVar('RCONFLICTS') - splitrobsoletes = [] + splitrdepends = localdata.getVar('RDEPENDS') or "" + splitrrecommends = localdata.getVar('RRECOMMENDS') or "" + splitrsuggests = localdata.getVar('RSUGGESTS') or "" + splitrprovides = localdata.getVar('RPROVIDES') or "" + splitrreplaces = localdata.getVar('RREPLACES') or "" + splitrconflicts = localdata.getVar('RCONFLICTS') or "" + splitrobsoletes = "" splitrpreinst = localdata.getVar('pkg_preinst') splitrpostinst = localdata.getVar('pkg_postinst') @@ -439,9 +439,9 @@ python write_specfile () { spec_preamble_bottom.append(splitcustomtagschunk) # Replaces == Obsoletes && Provides - robsoletes = bb.utils.explode_dep_versions2(splitrobsoletes or "") - rprovides = bb.utils.explode_dep_versions2(splitrprovides or "") - rreplaces = bb.utils.explode_dep_versions2(splitrreplaces or "") + robsoletes = bb.utils.explode_dep_versions2(splitrobsoletes) + rprovides = bb.utils.explode_dep_versions2(splitrprovides) + rreplaces = bb.utils.explode_dep_versions2(splitrreplaces) for dep in rreplaces: if not dep in robsoletes: robsoletes[dep] = rreplaces[dep] @@ -533,9 +533,9 @@ python write_specfile () { tail_source(d) # Replaces == Obsoletes && Provides - robsoletes = bb.utils.explode_dep_versions2(srcrobsoletes or "") - rprovides = bb.utils.explode_dep_versions2(srcrprovides or "") - rreplaces = bb.utils.explode_dep_versions2(srcrreplaces or "") + robsoletes = bb.utils.explode_dep_versions2(srcrobsoletes) + rprovides = bb.utils.explode_dep_versions2(srcrprovides) + rreplaces = bb.utils.explode_dep_versions2(srcrreplaces) for dep in rreplaces: if not dep in robsoletes: robsoletes[dep] = rreplaces[dep] diff --git a/poky/meta/classes/populate_sdk_base.bbclass b/poky/meta/classes/populate_sdk_base.bbclass index 49b183326..4db0511db 100644 --- a/poky/meta/classes/populate_sdk_base.bbclass +++ b/poky/meta/classes/populate_sdk_base.bbclass @@ -263,7 +263,7 @@ fakeroot create_shar() { rm -f ${T}/pre_install_command ${T}/post_install_command - if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then + if [ "${SDK_RELOCATE_AFTER_INSTALL}" = "1" ] ; then cp ${TOOLCHAIN_SHAR_REL_TMPL} ${T}/post_install_command fi cat << "EOF" >> ${T}/pre_install_command diff --git a/poky/meta/classes/rootfs_ipk.bbclass b/poky/meta/classes/rootfs_ipk.bbclass index f1e021973..245c256a6 100644 --- a/poky/meta/classes/rootfs_ipk.bbclass +++ b/poky/meta/classes/rootfs_ipk.bbclass @@ -14,8 +14,8 @@ do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa" do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" -do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock" -do_populate_sdk_ext[lockfiles] += "${WORKDIR}/ipk.lock" +do_populate_sdk[lockfiles] += "${WORKDIR}/sdk-ipk.lock" +do_populate_sdk_ext[lockfiles] += "${WORKDIR}/sdk-ipk.lock" OPKG_PREPROCESS_COMMANDS = "" diff --git a/poky/meta/classes/sanity.bbclass b/poky/meta/classes/sanity.bbclass index 3262d08fb..485173ab4 100644 --- a/poky/meta/classes/sanity.bbclass +++ b/poky/meta/classes/sanity.bbclass @@ -703,6 +703,23 @@ def check_sanity_version_change(status, d): if (tmpdirmode & stat.S_ISUID): status.addresult("TMPDIR is setuid, please don't build in a setuid directory") + # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") + workdir = d.getVar('WORKDIR', expand=True) + for i in pseudoignorepaths: + if i and workdir.startswith(i): + status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") + + # Check if PSEUDO_IGNORE_PATHS and and paths under pseudo control overlap + pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") + pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}" + pseudocontroldir = d.expand(pseudo_control_dir).split(",") + for i in pseudoignorepaths: + for j in pseudocontroldir: + if i and j: + if j.startswith(i): + status.addresult("A path included in PSEUDO_IGNORE_PATHS " + str(i) + " and the path " + str(j) + " overlap and this will break pseudo permission and ownership tracking. Please set the path " + str(j) + " to a different directory which does not overlap with pseudo controlled directories. \n") + # Some third-party software apparently relies on chmod etc. being suid root (!!) import stat suid_check_bins = "chown chmod mknod".split() @@ -770,10 +787,10 @@ def check_sanity_everybuild(status, d): if 0 == os.getuid(): raise_sanity_error("Do not use Bitbake as root.", d) - # Check the Python version, we now have a minimum of Python 3.4 + # Check the Python version, we now have a minimum of Python 3.6 import sys - if sys.hexversion < 0x030500F0: - status.addresult('The system requires at least Python 3.5 to run. Please update your Python interpreter.\n') + if sys.hexversion < 0x030600F0: + status.addresult('The system requires at least Python 3.6 to run. Please update your Python interpreter.\n') # Check the bitbake version meets minimum requirements from distutils.version import LooseVersion @@ -787,6 +804,11 @@ def check_sanity_everybuild(status, d): if "." in paths or "./" in paths or "" in paths: status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n") + #Check if bitbake is present in PATH environment variable + bb_check = bb.utils.which(d.getVar('PATH'), 'bitbake') + if not bb_check: + bb.warn("bitbake binary is not found in PATH, did you source the script?") + # Check whether 'inherit' directive is found (used for a class to inherit) # in conf file it's supposed to be uppercase INHERIT inherit = d.getVar('inherit') diff --git a/poky/meta/classes/staging.bbclass b/poky/meta/classes/staging.bbclass index f0a619b35..bbe8cff9b 100644 --- a/poky/meta/classes/staging.bbclass +++ b/poky/meta/classes/staging.bbclass @@ -5,6 +5,7 @@ SYSROOT_DIRS = " \ ${base_libdir} \ ${nonarch_base_libdir} \ ${datadir} \ + /sysroot-only \ " # These directories are also staged in the sysroot when they contain files that @@ -27,11 +28,15 @@ SYSROOT_DIRS_BLACKLIST = " \ ${mandir} \ ${docdir} \ ${infodir} \ + ${datadir}/X11/locale \ ${datadir}/applications \ + ${datadir}/bash-completion \ ${datadir}/fonts \ ${datadir}/gtk-doc/html \ + ${datadir}/installed-tests \ ${datadir}/locale \ ${datadir}/pixmaps \ + ${datadir}/terminfo \ ${libdir}/${BPN}/ptest \ " diff --git a/poky/meta/classes/systemd.bbclass b/poky/meta/classes/systemd.bbclass index 9ec465c75..db5d10954 100644 --- a/poky/meta/classes/systemd.bbclass +++ b/poky/meta/classes/systemd.bbclass @@ -174,7 +174,8 @@ python systemd_populate_packages() { if path_found != '': systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) else: - bb.fatal("SYSTEMD_SERVICE_%s value %s does not exist" % (pkg_systemd, service)) + bb.fatal("Didn't find service unit '{0}', specified in SYSTEMD_SERVICE_{1}. {2}".format( + service, pkg_systemd, "Also looked for service unit '{0}'.".format(base) if base is not None else "")) def systemd_create_presets(pkg, action): presetf = oe.path.join(d.getVar("PKGD"), d.getVar("systemd_unitdir"), "system-preset/98-%s.preset" % pkg) diff --git a/poky/meta/classes/uboot-extlinux-config.bbclass b/poky/meta/classes/uboot-extlinux-config.bbclass index f4bf94be0..be285daa0 100644 --- a/poky/meta/classes/uboot-extlinux-config.bbclass +++ b/poky/meta/classes/uboot-extlinux-config.bbclass @@ -153,5 +153,6 @@ python do_create_extlinux_config() { } UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD" do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}" +do_create_extlinux_config[vardepsexclude] += "OVERRIDES" addtask create_extlinux_config before do_install do_deploy after do_compile -- cgit v1.2.3