diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2021-10-29 23:35:00 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2022-01-24 20:02:44 +0300 |
commit | eff27476badc5d48b544a07f9f4748a96506c8d7 (patch) | |
tree | bafd5e712e1ad4e4dc78056f73dbeb6a9ed6a618 /poky/meta/classes | |
parent | 2a947d6075e017a8b50989a0498455752acb0e5d (diff) | |
download | openbmc-eff27476badc5d48b544a07f9f4748a96506c8d7.tar.xz |
subtree updates
poky: 80f2b56ad8..d78650b980:
Ahmed Hossam (1):
go.bbclass: Allow adding parameters to go ldflags
Alejandro Hernandez Samaniego (1):
baremetal-image: Fix do_image dependencies
Alexander Kanavin (153):
meson: update 0.58.1 -> 0.59.1
libcap: update 2.51 -> 2.54
lua: add a recipe from meta-oe
lua: update 5.3.6 -> 5.4.3
rpm: update 4.16.1.3 -> 4.17.0
libdnf: fix the rpm sqlite-only target setup
libsolv: disable rpm bdb format support
perl: do not build berkeley db module by default
package_rpm: use zstd instead of xz
qemu: update 6.0.0 -> 6.1.0
runqemu: correct vga-virtio option to keep virgl enabled
gnupg: update 2.3.1 -> 2.3.2
pinentry: update 1.1.1 -> 1.2.0
spirv-tools: update 2021.2 -> 2021.3
glslang: update 11.5.0 -> 11.6.0
shaderc: update 2021.1 -> 2021.2
inetutils: update 2.1 -> 2.2
systemd: update 249.3 -> 249.4
lsof: update 4.91 -> 4.94.0
libpam: update 1.5.1 -> 1.5.2
rt-tests: update 2.1 -> 2.2
libgit2: update 1.1.1 -> 1.2.0
libssh2: update 1.9.0 -> 1.10.0
libhandy: update 1.2.3 -> 1.4.0
qemu: install qmp module without hardcoding the python version in oeqa scripts
lttng-tools: replace ad hoc ptest fixup with upstream fixes
rust: drop PV from include file names
rust: update 1.54.0 -> 1.55.0
librsvg: update 2.40.21 -> 2.52.0 (transition to rust!)
librsvg: do not enable nativesdk
librsvg: add backports to fix big endian targets (e.g. mips)
librsvg: use only the target architecture to determine availability of atomic primitives
librsvg: restore reproducibility
adwaita-icon-theme: update 3.34/38 -> 41.0
gstreamer1.0-plugins-bad: disable rsvg on x32
rust/cargo: exclude UNINATIVE_LOADER from task signature
rust-common.bbclass: rewrite toolchain wrappers in (native) python
rust: do not write ar into target json definitions
rust: generate target definitions from (arch, abi), not just arch
openssl: update 1.1.1l -> 3.0.0
cryptodev-tests: do not use -Werror with openssl 3
serf: add a openssl 3 compatibility fix
ruby: disable openssl extension
glib-2.0: update 2.68.4 -> 2.70.0
glib-networking: update 2.68.2 -> 2.70.0
bison: update 3.7.6 -> 3.8.1
libdnf: update 0.63.1 -> 0.64.0
libexif: update 0.6.22 -> 0.6.23
sudo: update 1.9.7p2 -> 1.9.8p1
wget: update 1.21.1 -> 1.21.2
coreutils: update 8.32 -> 9.0
itstool: update 2.0.6 -> 2.0.7
nghttp2: add recipe from meta-oe
libsoup: add a 3.x recipe
webkitgtk: trim down DEPENDS
epiphany: trim down DEPENDS
webkitgtk: update 2.32.3 -> 2.34.0
epiphany: update 40.3 -> 41.0
python3: update 3.9.7 -> 3.10.0
libjitterentropy: update 3.1.0 -> 3.3.0
kea: update 1.8.2 -> 2.0.0
ghostscript: update 9.54.0 -> 9.55.0
lighttpd: update 1.4.59 -> 1.4.60
bluez5: update 5.61 -> 5.62
ovmf: update 202105 -> 202108
systemd: update 249.4 -> 249.5
meson: update 0.59.1 -> 0.59.2
python3-pip: update 21.2.4 -> 21.3
valgrind: update 3.17.0 -> 3.18.1
librsvg: update 2.52.0 -> 2.52.2
libva: update 2.12.0 -> 2.13.0
liberation-fonts: update 2.1.4 -> 2.1.5
ca-certificates: update 20210119 -> 20211016
curl: update 7.78.0 -> 7.79.1
libgit2: update 1.2.0 -> 1.3.0
libxcrypt: upgrade 4.4.25 -> 4.4.26
bison: upgrade 3.8.1 -> 3.8.2
cmake: update 3.21.2 -> 3.21.3
git: upgrade 2.33.0 -> 2.33.1
tzdata: upgrade 2021a -> 2021d
ofono: upgrade 1.32 -> 1.33
openssh: upgrade 8.7p1 -> 8.8p1
sysvinit: upgrade 2.99 -> 3.00
btrfs-tools: upgrade 5.13.1 -> 5.14.2
ccache: upgrade 4.4 -> 4.4.2
createrepo-c: upgrade 0.17.5 -> 0.17.6
libcomps: upgrade 0.1.17 -> 0.1.18
libedit: upgrade 20210714-3.1 -> 20210910-3.1
librepo: upgrade 1.14.1 -> 1.14.2
python3-jinja2: upgrade 3.0.1 -> 3.0.2
python3-pygobject: upgrade 3.40.1 -> 3.42.0
python3-setuptools: upgrade 58.0.4 -> 58.2.0
vala: upgrade 0.52.5 -> 0.54.2
acpica: upgrade 20210730 -> 20210930
asciidoc: upgrade 9.1.0 -> 9.1.1
libarchive: upgrade 3.5.1 -> 3.5.2
msmtp: upgrade 1.8.15 -> 1.8.17
sudo: upgrade 1.9.8p1 -> 1.9.8p2
gobject-introspection: upgrade 1.68.0 -> 1.70.0
gsettings-desktop-schemas: upgrade 40.0 -> 41.0
json-glib: upgrade 1.6.4 -> 1.6.6
libdazzle: upgrade 3.40.0 -> 3.42.0
harfbuzz: upgrade 2.9.1 -> 3.0.0
pango: upgrade 1.48.9 -> 1.48.10
libinput: upgrade 1.19.0 -> 1.19.1
linux-firmware: upgrade 20210818 -> 20210919
wireless-regdb: upgrade 2021.07.14 -> 2021.08.28
mpg123: upgrade 1.28.2 -> 1.29.0
puzzles: upgrade to latest revision
libwpe: upgrade 1.10.1 -> 1.12.0
diffoscope: upgrade 182 -> 187
fribidi: upgrade 1.0.10 -> 1.0.11
iso-codes: upgrade 4.6.0 -> 4.7.0
libatomic-ops: upgrade 7.6.10 -> 7.6.12
libcap: upgrade 2.54 -> 2.59
libmd: upgrade 1.0.3 -> 1.0.4
libsoup-2.4: upgrade 2.72.0 -> 2.74.0
gnupg: update 2.3.2 -> 2.3.3
libssh2: skip one of the ptests until openssh 8.8 compatibility is fixed
systemd: disable seccomp on mips32
waffle: convert to git, website is down
u-boot: upgrade 2021.07 -> 2021.10
psplash: upgrade to latest revision
stress-ng: convert to git, website is down
json-c: correct upstream version check
createrepo-c: upgrade 0.17.6 -> 0.17.7
python3-numpy: upgrade 1.21.2 -> 1.21.3
python3-pip: upgrade 21.3 -> 21.3.1
python3-setuptools: upgrade 58.2.0 -> 58.3.0
msmtp: upgrade 1.8.17 -> 1.8.18
gi-docgen: upgrade 2021.7 -> 2021.8
piglit: upgrade to latest revision
libinput: upgrade 1.19.1 -> 1.19.2
mpg123: upgrade 1.29.0 -> 1.29.2
puzzles: upgrade to latest revision
webkitgtk: upgrade 2.34.0 -> 2.34.1
wpebackend-fdo: upgrade 1.10.0 -> 1.12.0
diffoscope: upgrade 187 -> 188
libcap: upgrade 2.59 -> 2.60
vte: upgrade 0.64.2 -> 0.66.0
ncurses: update 6.2 -> 6.3
tzdata: update 2021d -> 2021e
asciidoc: update 9.1.1 -> 10.0.0
waffle: update 1.6.1 -> 1.7.0
virgl: skip headless test on specific older distros and fail otherwise
gptfdisk: address ncurses 6.3 compatibility
powertop: address ncurses 6.3 compatibility
systemtap: address ncurses 6.3 compatibility
igt-gpu-tools: address meson 0.60 compatibility
python3-pygobject: do not supply unknown g-i options
gstreamer1.0-python: do not supply unknown g-i options
webkitgtk: drop unnecessary SSE disabling patch
cups: exclude beta/rc versions from version check
Alexandre Belloni (5):
inetutils: drop CVE-2021-40491 patch
oeqa/selftest/sstatetests: fix typo ware -> were
maintainers.inc: fix up rust-cross entry
libevent,btrfs-tools: fix Upstream-Status tag
ruby: fix Upstream-Status
Andreas Müller (1):
webkitgtk: add gperf-native to DEPENDS to fix build
Andrei Gherzan (1):
qemu: Define libnfs PACKAGECONFIG
Andrej Valek (3):
busybox: 1.34.0 -> 1.34.1
featimage: refactor style
kernel-fitimage: use correct kernel image
Andres Beltran (1):
buildhistory: Fix package output files for SDKs
Bruce Ashfield (15):
linux-yocto/5.14: scripts/gcc-plugins: consistently use HOSTCC
linux-yocto/5.14: update to v5.14.8
linux-yocto/5.14: bsp/qemuarm*-gfx: use virtio graphics
linux-yocto/5.10: update to v5.10.69
linux-yocto/5.10: update to v5.10.70
linux-yocto/5.14: update to v5.14.9
kernel-yocto: don't apply config metadata patches twice
linux-yocto/5.14: revert: scripts/gcc-plugins: consistently use HOSTCC
linux-yocto/5.10: update to v5.10.73
linux-yocto/5.14: update to v5.14.12
linux-yocto/5.14: update to v5.14.13
linux-yocto/5.10: update to v5.10.74
linux-yocto/5.14: common-pc: enable CONFIG_ATA_PIIX as built-in
linux-yocto/5.14: update to v5.14.14
linux-yocto/5.10: update to v5.10.75
Caner Altinbasak (2):
bitbake: npmsw: Avoid race condition with multiple npm fetchers
bitbake: fetch2: Do not attempt to verify donestamp if download is not complete
Changhyeok Bae (2):
iproute2: update to 5.14.0
ethtool: update to 5.14
Changqing Li (1):
lttng-ust: fix do_compile failure for arm32 with DEBUG_BUILD enabled
Daiane Angolini (2):
machine/qemuarm*: Fix UBOOT_MACHINE value
ref-manual: Update how to set a useradd password
Daniel McGregor (3):
bison: prevent checking for textstyle.
bitbake.conf: Add gpg-agent as a host tool
sstate: Allow validation of sstate singatures against list of keys
David Joyner (1):
rust: add support for big endian 64-bit PowerPC
Denys Dmytriyenko (2):
wayland-protocols: upgrade 1.21 -> 1.22
wayland-protocols: upgrade 1.22 -> 1.23
Fred Liu (1):
glibc: Drop libcidn package
Henry Kleynhans (1):
sstate: Switch to ZStandard compressor support
Hsia-Jun(Randy) Li (1):
meson: install native file in sdk
Ian Ray (1):
archiver: Configurable tarball compression
Jon Mason (10):
oeqa/manual: Fix no longer valid URLs
bitbake: bitbake:toaster:test: Update SSTATE URL
yocto-bsp/poky: replace http with https for URLs
bitbake: bitbake: replace http with https for URLs
documentation: update sources mirror URL
documentation: replace http with https for URLs
documentation: use YOCTO_DL_URL
dev-manual: remove errant /
runqemu: add DEPLOY_DIR_IMAGE replacement in QB_OPT_APPEND
bitbake: bitbake-user-manual: update sources mirror URL
Jose Quaresma (15):
gstreamer1.0: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-base: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-good: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-bad: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-ugly: 1.18.4 -> 1.18.5
gstreamer1.0-rtsp-server: 1.18.4 -> 1.18.5
gstreamer1.0-libav: 1.18.4 -> 1.18.5
gstreamer1.0-vaapi: 1.18.4 -> 1.18.5
gstreamer1.0-omx: 1.18.4 -> 1.18.5
gstreamer1.0-python: 1.18.4 -> 1.18.5
gst-devtools: 1.18.4 -> 1.18.5
gst-examples: 1.18.4 -> 1.18.5
patch.bbclass: when the patch fails show more info on the fatal error
sstate.bbclass: count the files on mirrors using the pre local files
sstate: fix touching files inside pseudo
Joshua Watt (4):
bitbake: async: Close sync client event loop
bitbake: hashserv: Add tests for diverging reports
bitbake: hashserv: Fix diverging report race condition
classes/populate_sdk_base: Add setscene tasks
Kai Kang (1):
sudo: update multilib patch for sudo.conf
Khem Raj (11):
pkgconfig: Update to latest
libseccomp: Upgrade to 2.5.2 and beyond
openssl: Drop riscv32 upstreamed patches
opensbi-payloads.inc: Use strings for fallback
mesa: Enable svga for x86 only
qemu: Add knob for enabling PMDK pmem support
opensbi-payloads: Add dependency on kernel if fdt is set
librsvg: Fix vendored libc to work on riscv and musl
librsvg: Bump to 2.52.0 -> 2.52.2
rust: Upgrade to 1.56.0
librsvg: Disable 64bit atomics in crossbeam for rv32
Kiran Surendran (1):
ffmpeg: fix CVE-2021-38114
Konrad Weihmann (1):
libical: fix append in DEPENDS
Lukasz Majewski (1):
glibc: Extract common code to build tests to glibc-tests.inc
Marek Vasut (1):
piglit: upgrade to latest revision
Martin Jansa (2):
webkitgtk: add PACKAGECONFIG for opengl-or-es
boost: allow searching for python310
Maximilian Blenk (1):
mount-copybind: add rootcontext mountoption for overlayfs
Michael Halstead (2):
scripts/autobuilder-worker-prereq-tests: jinja2 check
releases: update to include 3.4 honister
Michael Opdenacker (18):
manuals: font fixes
ref-manual: document DEBUG_PREFIX_MAP
manuals: replace "apt-get" by "apt"
Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources
conf.py: use PNG first in EPUB output
overview-manual: SVG diagram for the git workflow
docs: add "make all" to build old types of docs (html, epub, pdf) at once
manuals: introduce 'yocto_sstate' extlink
overview-manual: simplify expression
dev-manual: correct NO_GENERIC_LICENSE section title
dev-manual: warn about license compliance issues when static libraries are used
devpyshell: rename to pydevshell
ref-manual: document TOOLCHAIN_HOST_TASK_ESDK
manuals: rename "devpyshell" to "pydevshell"
ref-manual: document SOURCE_DATE_EPOCH
ref-manual: fix description of SOURCE_DATE_EPOCH
releases.rst: fix release number for 3.3.3
docs: poky.yaml: updates for 3.4
Mike Crowe (2):
lib/oe/qa,insane: Move extra error handling functions to library
insane,license,license_image: Allow treating license problems as errors
Mingli Yu (1):
packagedata.py: silence a DeprecationWarning
Oleh Matiusha (1):
findutils: add ptest
Oleksandr Kravchuk (15):
python3: update to 3.9.7
python3-git: update to 3.1.24
python3-dbusmock: update to 0.24.0
python3-setuptools: update to 58.0.4
python3-setuptools: minor cleanup
xf86-input-libinput: update to 1.2.0
libinput: update to 1.19.0
libxi: update to 1.8
xorgproto: update to 2021.5
xkeyboard-config: update to 2.34
libxkbcommon: update to 1.3.1
mirrors.bbclass: remove dead infozip mirrors
man-pages: update to 5.13
python3-smmap: update to 5.0.0
python3-pyparsing: update to 3.0.0
Pablo Saavedra Rodi?o (1):
mesa: upgrade 21.2.1 -> 21.2.4
Paul Barker (1):
bitbake: doc: bitbake-user-manual: Document BB_GIT_SHALLOW and friends
Paul Eggleton (7):
migration-3.4: tweak overrides change section
ref-manual: remove meta class
poky.yaml: add lz4 and zstd to essential host packages
migration-3.4: add additional migration info
migration: tweak introduction section
poky.yaml: fix lz4 package name for older Ubuntu versions
migration-3.4: add some extra packaging notes
Pavel Zhukov (1):
weston: wrapper for weston modules argument
Peter Hoyes (2):
u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr
u-boot: Fix syntax error in ${UBOOT_ENV}.scr compilation
Peter Kjellerstedt (2):
meson.bblcass: Remove empty egg-info directories before running meson
qemu.inc: Remove empty egg-info directories before running meson
Petr Vorel (1):
ltp: Update to 20210927
Pgowda (2):
Fix rust-native build issue when debug is enabled
rust-cross: Fix directory not deleted for race glibc vs. musl
Ralph Siemsen (1):
tar: filter CVEs using vendor name
Randy Li (1):
meson: move lang args to the right section
Richard Purdie (54):
sstatesig: Only apply group/other permissions to pseudo files
rpm: Deterministically set vendor macro entry
abi_version/sstate: Bump to fix rpm corruption issues
multilib: Avoid sysroot race issues when multilib enabled
bitbake: knotty/uihelper: Show setscene task progress in summary output
bitbake: bitbake-worker: Handle pseudo shutdown in Ctrl+C case
poky.conf: Update tested distros list with recent changes
bitbake: hashserv: Improve behaviour for better determinism/sstate reuse
poky.conf: Bump version for 3.4 honister release
build-appliance-image: Update to honister head revision
bitbake: bitbake: Bump to version 1.52.0
build-appliance-image: Update to honister head revision
layer.conf: Extend recipes not to install without explict dependencies
libxml2: Use python3targetconfig to fix reproducibility issue
libnewt: Use python3targetconfig to fix reproducibility issue
bootchart2: Don't compile python modules
linux-yocto-dev: Ensure DEPENDS matches recent 5.14 kernel changes
base/insane: Import oe.qa by default
base: Clean up unneeded len() calls
base: Use repr() for printing exceptions
bitbake.conf: Add BB_CURRENTTASK to BB_HASHEXCLUDE
reproducible_build: Drop obsolete sstate workaround
python: Update now reproducibile builds are the default
bitbake: bitbake-worker: Set BB_CURRENTTASK earlier
bitbake: compress: Allow to operate on file descriptor
bitbake: siggen: Change file format of siginfo files to use zstd compressed json
sstate: Fixes for eSDK generation after zstd switch
patch: Use repr() with exceptions instead of str()
reproducible_build: Drop now unneeded compiler warning
reproducible: Move class function code into library
reproducible: Move variable definitions to bitbake.conf
reproducible: Merge code into base.bbclass
kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variable
kernel: Rework kernel make flag to variable mappings
oeqa: Update cleanup code to wait for hashserv exit
poky: Reproducible builds are now the default
bitbake: tests/runqueue: Ensure hashserv exits before deleting files
bitbake: bitbake-worker: Add debug when unpickle fails
bitbake: siggen: Fix type conversion issues
bitbake: test/fetch: Update urls to match upstream branch name changes
libtool: Update patchset to match those submitted upstream
staging: Fix autoconf-native rebuild failure
patch: Fix exception reporting with repr()
bitbake: fetch2/perforce: Fix typo
bitbake: bitbake: Bump to post release verion 1.53.0
poky.conf: Post release version bump
gcc: Merge three related patches together
gcc: Drop sdt (dtrace) header patch
gcc: Drop broken/unneeded patch
bitbake: tests/runqueue: Drop python version test decorators
gcc: Update patches submitted/merged upstream
gcc: Drop testsuite failure fix patch
gcc: Add missing patch Upstream-Status
Ross Burton (21):
bitbake: tests/utils: mark a regex as a raw string
bitbake: tests/fetch: prefix the FetcherTest temporary directory
bitbake: fetch2: clarify the command-no-found error message
bitbake: fetch2/gitsm: remove the 'nugget' SRCREV caching
linux-yocto: add libmpc-native to DEPENDS
bitbake: fetch2: document checkstatus API
curl: fix CVE-2021-22945 through -22947
oe/license: implement ast.NodeVisitor.visit_Constant
license.bbclass: implement ast.NodeVisitor.visit_Constant
bitbake: codegen: implement ast.NodeVisitor.visit_Constant
testimage: fix unclosed testdata file
oe/utils: log exceptions in ThreadedWorker functions
sstate: don't silently handle all exceptions in sstate_checkhashes
gawk: replace AR patch with upstreamed patch
gawk: reduce strictness of the time test
strace: remove obsolete patch
strace: remove TOOLCHAIN assignment
oeqa/runtime: load modules using importlib
oeqa/runtime: search sys.path explicitly for modules
testimage: remove target_modules_path
strace: show test suite log on failure
Sakib Sajal (1):
go: upgrade 1.16.7 -> 1.16.8
Saul Wold (3):
spdx.py: Add annotation to relationship
create-spdx: add create_annotation function
create-spdx: cross recipes are native also
Stefan Herbrechtsmeier (17):
bitbake: fetch2: npm: Support npm archives with missing search directory mode
bitbake: fetch2: npm: Create config npmrc in environment instantiation
bitbake: fetch2: npmsw: Add support for local tarball and link sources
npm: Add support for EXTRA_OENPM arguments
recipetool: Move license md5sums into CSV files
recipetool: Skip common source files in guess_license
recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to []
recipetool: ignore empty license files
recipetool: Add logger info for missing license entries
recipetool: Add support for linenumbers to licenses.csv
recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM
recipetool: npm: Use README as license fallback
npm: Add variable NPM_NODEDIR with default value
npm: Use configs for npm environment and args for npm run command
recipetool: Rework crunch_license to recognize more variants
recipetool: Simplify common source files skip in guess_license
npm: Remove unnecessary configs argument from npm run command
Teoh Jay Shen (1):
oeqa/runtime/parselogs: modified drm error in common errors list
Thomas Perrot (1):
image_types: allow the creation of block devices on top of UBI volumes
Tim Orling (17):
ptest-runner: install -collect-system-data script
python3-hypothesis: upgrade 6.15.0 -> 6.23.2
python3-importlib-metadata: upgrade 4.6.4 -> 4.8.1
python3-more-itertools: upgrade 8.9.0 -> 8.10.0
python3-zipp: upgrade 3.5.0 -> 3.6.0
libconvert-asn1-perl: upgrade 0.31 -> 0.33
python3-pytest: upgrade 6.2.4 -> 6.2.5
at-spi2-core: upgrade 2.40.3 -> 2.42.0
python3-packaging: DEPENDS on python3-setuptools-native
python3-packaging: BBCLASSEXTEND nativesdk
python3-tomli: add recipe for 1.2.1
python3-setuptools-scm: upgrade 6.0.1 -> 6.3.2
python3-setuptools: _distutils/sysconfig fix
python3-pyyaml: upgrade 5.4.1 -> 6.0
python3-manifest: -pprint RDEPENDS on -profile
python3-hypothesis: upgrade 6.23.2 -> 6.24.0
python3-tomli: upgrade 1.2.1 -> 1.2.2
Tobias Kaufmann (1):
mount-copybind: add SELinux support
Yureka (1):
systemd: add missing include for musl
Zoltán Böszörményi (1):
libpam: Fix build with DISTRO_FEATURES usrmerge
hongxu (1):
libcap: fix nativesdk-libcap relocate failure
wangmy (20):
diffoscope: upgrade 181 -> 182
cmake: upgrade 3.21.1 -> 3.21.2
gzip: upgrade 1.10 -> 1.11
harfbuzz: upgrade 2.9.0 -> 2.9.1
vulkan-headers: upgrade 1.2.182 -> 1.2.191
vulkan-loader: upgrade 1.2.182 -> 1.2.191
vulkan-tools: upgrade 1.2.182 -> 1.2.191
help2man: upgrade 1.48.4 -> 1.48.5
python3-more-itertools: upgrade 8.8.0 -> 8.9.0
acpid: upgrade 2.0.32 -> 2.0.33
bind: upgrade 9.16.20 -> 9.16.21
createrepo-c: upgrade 0.17.4 -> 0.17.5
dnf: upgrade 4.8.0 -> 4.9.0
ell: upgrade 0.43 -> 0.44
libical: upgrade 3.0.10 -> 3.0.11
dhcpcd: upgrade 9.4.0 -> 9.4.1
dnf: upgrade 4.9.0 -> 4.10.0
file: upgrade 5.40 -> 5.41
libdnf: upgrade 0.64.0 -> 0.65.0
lttng-tools: upgrade 2.13.0 -> 2.13.1
zhengruoqin (2):
libsolv: upgrade 0.7.19 -> 0.7.20
python3-pycryptodome: upgrade 3.10.1 -> 3.11.0
meta-security: a85fbe980e..e81c15f851:
Armin Kuster (1):
python3-fail2ban: fix build failure and cleanup
Kai Kang (1):
sssd: re-package to fix QA issues
Kristian Klausen (1):
swtpm: update to 0.6.1
Liwei Song (1):
recipes-security/chipsec: platform security assessment framework
meta-openembedded: 23dc4f060f..2f6797d8d6:
Alexander Kanavin (23):
python3-yappi: add python 3.10 fix
python3-gmpy2: update 2.0.8 -> 2.1.0rc1
python3-m2crypto: address build failure with openssl 3.x
lua: remove recipe as it is now in oe-core
nghttp2: remove recipe as it is now in oe-core
kronosnet: update 1.20 -> 1.22
polkit: update 0.116 -> 0.119
openflow: disable openssl PACKAGECONFIG
openipmi: add a python 3.10 compatibility patch
strongswan: disable openssl PACKAGECONFIG
pkcs11-helper: backport a openssl 3.x patch
nodejs: use -fpermissive
nodejs: add a python 3.10 compatibility patch
php: disable openssl PACKAGECONFIG
libsigrokdecode: add a python 3.10 compatibility patch
freerdp: backport openssl 3.x patches
opensc: do not use -Werror
cfengine: blacklist due to openssl 3.x incompatibility
netplan: do not use -Werror
boinc-client: blacklist due to openssl 3.x incompatibility
ldns: blacklist due to openssl 3.x incompatibility
surf: add a webkit 2.34 compatibility patch
mozjs: update 60.9.0 -> 91.1.0
Alexander Thoma (1):
keyutils: fix install path
Armin Kuster (1):
Apache: Several CVE fixes
Chen Qi (1):
ntfs-3g-ntfsprogs: upgrade to 2021.8.22
Gianfranco (2):
vboxguestdrivers: upgrade 6.1.26 -> 6.1.28
vboxguestdrivers: Fix build failure due to the last update.
Ivan Maidanski (1):
bdwgc: upgrade 8.0.4 -> 8.0.6
Jeremy Kerr (1):
mctp: Add MCTP control utilities
Joshua Watt (2):
colord-native: Inherit pkgconfig
mutter: Move gsettings to a separate package
Justin Bronder (2):
python3-mccabe: fix LICENSE and RDEPENDS
python3-pyflakes: fix LICENSE, HOMEPAGE and RDEPENDS
Khem Raj (44):
packagegroup-meta-oe: Add lv-drivers and lvgl
python3-pystache: Remove need for python2x
python3-behave: Switch to using github src_uri
python3-simpleeval: Remove use_2to3
python3-parse-type: Do not ask for 2to3
python3-anyjson: Do not enable 2to3
python3-pybluez: Do not set 2to3
packagegroup-meta-networking: Remove nghttp2
packagegroup-meta-oe: Remove lua
gjs: Inherit pkgconfig
luaposix: Use lua 5.4
devilspie2: Switch to using github repo
devilspie2: Add missing dependency on libxinerama
kronosnet: Correct path to poll.h
luaposix: Upgrade to 35.1
xfce.bbclass: Mark string as raw in a regexp
nodejs: add -fpermissive BUILD_CXXFLAGS
pcimem: Add riscv64 into COMPATIBLE_HOST
luaposix: Depend on libxcrypt-native
libcrypt-openssl-rsa-perl: Upgrade to 0.32
xrdp: Upgrade to 0.9.17
yelp,yelp-xsl,yelp-tools: Upgrade to 41 release
mozjs: Disable JIT on mips
libcrypt-openssl-rsa-perl: Fix build with openssl3+
nodejs: Upgrade to 14.18.1
librest: Use master with libsoup3 support
gnome-online-accounts: Upgrade to 3.43.1
iwd: Fix build with musl
xrdp: Exclude from builds
xorgxrdp: Add to exclusion list for now
bluepy: Set PV and correct syntax for RDEPENDS
python3-kivy: Use new override syntax in RDEPENDS
bluepy: Fix permissions on tarball
nodejs: Upgrade to 16.11.1
mozjs: Fix build on mips/musl
mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
luaposix: Use virtual/crypt instread of hardcoding libxcrypt
packagegroup-meta-oe: Add libjs-jquery-globalize and libjs-jquery-cookie
mozjs: Add riscv32 support
driverctl: Rename to have PV in recipe name
tbb: Link with libatomic when using clang compiler on rv32
gimp: Disable vector icons on mips/rv32 using clang
mozjs: Update to 91.2.0
mozjs: Fix build for 32bit systems disabling JIT
Kurt Kiefer (2):
mozjs: move large static library into staticdev package
gyp: fix for compatibility with Python 3.10
Leon Anavi (6):
python3-aiohue: Upgrade 2.6.1 -> 2.6.3
python3-paho-mqtt: Upgrade 1.5.1 -> 1.6.1
python3-thrift: Upgrade 0.13.0 -> 0.15.0
python3-prompt-toolkit: Upgrade 3.0.19 -> 3.0.21
python3-traitlets: Upgrade 5.1.0 -> 5.1.1
python3-prettytable: Upgrade 2.1.0 -> 2.2.1
LiweiSong (1):
Revert "chipsec: platform security assessment framework"
Marco Cavallini (1):
bluepy_git.bb: Added recipe for BluePy Python interface to Bluetooth LE on Linux (v2)
Marek Vasut (3):
apitrace: Upgrade to latest version
apitrace: Conditionally enable X11 support
yavta: Upgrade to latest version and drop downstream patch
Martin Jansa (4):
protobuf: import a patch from meta-webosose to fix building protobuf-c with gold linker
grpc: revert GRPCPP_ABSEIL_SYNC change from 1.40.0 to fix undefined references to absl::lts_20210324::Mutex::~Mutex()
luaposix: depend on target libxcrypt instead of native
lv-lib-png: add wayland to REQUIRED_DISTRO_FEATURES
Matthias Klein (1):
gpsd: Install also the generated parts of the Python library
Matthias Schiffer (1):
byacc: switch to official HTTPS mirror
Mingli Yu (1):
opencv: remove setup_vars_opencv4.sh
Oleksandr Kravchuk (72):
iwd: update to 1.18
nano: update to 5.9
ostree: update to 2021.5
pegtl: update to 3.2.1
pmdk: update to 1.11.1
protobuf-c: update to 1.4.0
thingsboard-gateway: update to 2.8
libbpf: fix PV
libcdio-paranoia: update to 10.2+2.0.1
ttf-abyssinica: update to 2.100
ttf-dejavu: add UPSTREAM_CHECK_URI
ttf-vlgothic: update to 20200720
networkmanager: update to 1.32.12
nng: update to 1.4.0
opensaf: update to 5.21.09
python3-absl: update 0.14.1
python3-alembic: update to 1.7.4
python3-astroid: update to 2.8.2
python3-cantools: update to 36.4.0
python3-certifi: update to 2021.10.8
python3-cffi: update to 1.15.0
python3-colorlog: update to 6.5.0
python3-coverage: update to 6.0.2
python3-cryptography-vectors: update to 35.0.0
python3-dateparser: update to 1.1.0
python3-elementpath: update to 2.3.2
python3-eventlet: update to 0.32.0
python3-google-api-core: update to 2.1.1
python3-google-api-python-client: update to 2.26.1
python3-google-auth: update to 2.3.0
python3-grpcio-tools: update to 1.41.0
python3-grpcio: update to 1.41.0
python3-h2: update to 4.1.0
python3-haversine: update to 2.5.1
python3-httplib2: update to 0.20.1
python3-idna: update to 3.3
python3-iso3166: update to 2.0.2
python3-joblib: update to 1.1.0
python3-jsonrpcserver: update to 5.0.3
python3-paramiko: update to 2.8.0
python3-portion: update to 2.2.0
python3-protobuf: update to 3.18.1
python3-pulsectl: update to 21.10.4
python3-pycodestyle: update to 2.8.0
python3-pyephem: update to 4.1
python3-pyflakes: update to 2.4.0
python3-pyjwt: update to 2.2.0
python3-pykickstart: update to 3.34
python3-pyopenssl: update to 21.0.0
python3-pyperf: update to 2.3.0
python3-pytest-timeout: update 2.0.1
python3-pytz: update to 2021.3
python3-regex: update to 2021.10.8
python3-sentry-sdk: update to 1.4.3
python3-sympy: udpate to 1.9
python3-twitter: update to 4.1.0
python3-uritemplate: update to 4.1.1
python3-websockets: update to 10.0
python3-wrapt: update to 1.13.2
python3-xlsxwriter: update to 3.0.1
python3-xmlschema: update to 1.8.0
python3-yarl: update to 1.7.0
python3-typeguard: update to 2.13.0
python3-pyatspi: update to 2.38.1
python3-h5py: update to 3.5.0
python3-pybind11-json: update to 0.2.11
python3-pychromecast: update to 9.3.1
python3-tzlocal: update to 4.0.1
python3-zeroconf: update to 0.36.9
leptonica: update to 1.82.0
redis-plus-plus: update to 1.3.2
hiredis: update to 1.0.2
Peter Bergin (3):
pipewire: remove manpages class
pipewire: also handle pipewire-media-session in systemd class
pipewire: rework PACKAGECONFIG for systemd service files
Philippe Coval (5):
lvgl: Add recipe for Lightweight Graphics Library
lv-drivers: Add recipe for lvgl lib
lv-lib-png: Add recipe for LVGL for handling PNG format
lvgl: Add lv_lib_png to packagegroup
lvgl: Lint recipe
Roland Hieber (1):
rapidjson: override hard-coded lib install dir
Shiping Ji (1):
Add recipe for driverctl
Tim Orling (6):
unicode-ucd: upgrade 12.1.0 -> 14.0.0
gnome-screenshot: add recipe for 40.0
libgweather: upgrade 3.36.2 -> 40.0
colord: inherit pkgconfig
gfbgraph: patch to build with latest rest
gnome-calendar: upgrade 3.38.1 -> 41.0
Trevor Gamblin (3):
python3-posix-ipc: Add recipe for version 1.0.5
python3-pyinotify: Add fcntl, logging to RDEPENDS
python3-cvxopt: upgrade 1.2.6 -> 1.2.7
Vyacheslav Yurkov (3):
grpc: fix cross-compilation of grpc applications
grpc: fix cross-compilation of grpc applications
grpc: upgrade 1.38.1 -> 1.41.0
Wang Mingyu (1):
poppler: upgrade 21.09.0 -> 21.10.0
Yi Zhao (3):
samba: upgrade 4.14.7 -> 4.14.8
audit: upgrade 3.0.5 -> 3.0.6
strongswan: upgrade 5.9.3 -> 5.9.4
Zoltán Böszörményi (1):
python3-jsmin: Upgrade to version 3.0.0
wangmy (11):
openvpn: upgrade 2.5.3 -> 2.5.4
redis: upgrade 6.2.5 -> 6.2.6
span-lite: upgrade 0.10.1 -> 0.10.3
bdwgc: upgrade 8.0.6 -> 8.2.0
icewm: upgrade 2.7.0 -> 2.8.0
ifenslave: upgrade 2.12 -> 2.13
asio: upgrade 1.18.1.bb -> 1.20.0
libgusb: upgrade 0.3.7 -> 0.3.8
libxmlb: upgrade 0.3.2 -> 0.3.3
xdebug: upgrade 2.9.5 -> 3.1.1
cryptsetup: upgrade 2.3.6 -> 2.4.1
zangrc (25):
python3-ipython: upgrade 7.27.0 -> 7.28.0
python3-jdatetime: upgrade 3.6.2 -> 3.6.4
python3-multidict: upgrade 5.1.0 -> 5.2.0
python3-openpyxl: upgrade 3.0.8 -> 3.0.9
python3-pyscaffold: upgrade 4.0.2 -> 4.1
python3-transitions: upgrade 0.8.9 -> 0.8.10
networkmanager-openvpn: upgrade 1.8.14 -> 1.8.16
ser2net: upgrade 4.3.3 -> 4.3.4
python3-humanize: upgrade 3.11.0 -> 3.12.0
python3-nmap: upgrade 1.5.0 -> 1.5.1
libjs-jquery-cookie: Add recipe
libjs-jquery-globalize: Add recipe
python3-cachetools: upgrade 4.2.2 -> 4.2.4
python3-cbor2: upgrade 5.4.1 -> 5.4.2
python3-click: upgrade 8.0.1 -> 8.0.3
python3-configargparse : upgrade 1.5.2 -> 1.5.3
python3-flask: upgrade 2.0.1 -> 2.0.2
python3-pyscaffold: upgrade 4.1 -> 4.1.1
python3-werkzeug: upgrade 2.0.1 -> 2.0.2
python3-absl: upgrade 0.14.1 -> 0.15.0
python3-pandas: upgrade 1.3.3 -> 1.3.4
python3-pulsectl: upgrade 21.10.4 -> 21.10.5
python3-pyjwt: upgrade 2.2.0 -> 2.3.0
python3-pytest-asyncio: upgrade 0.15.1 -> 0.16.0
python3-robotframework: upgrade 4.1.1 -> 4.1.2
zhengruoqin (15):
python3-ujson: upgrade 4.1.0 -> 4.2.0
python3-urllib3: upgrade 1.26.6 -> 1.26.7
python3-watchdog: upgrade 2.1.5 -> 2.1.6
gensio: upgrade 2.2.9 -> 2.3.1
nlohmann-json: upgrade 3.10.2 -> 3.10.4
libencode-perl: upgrade 3.12 -> 3.16
python3-socketio: upgrade 5.4.0 -> 5.4.1
python3-sqlalchemy: upgrade 1.4.23 -> 1.4.26
python3-stevedore: upgrade 3.4.0 -> 3.5.0
autofs: upgrade 5.1.7 -> 5.1.8
links: upgrade 2.22 -> 2.25
atftp: upgrade 0.7.4 -> 0.7.5
python3-gmqtt: upgrade 0.6.10 -> 0.6.11
python3-google-api-python-client: upgrade 2.26.1 -> 2.27.0
python3-greenlet: upgrade 1.1.1 -> 1.1.2
meta-raspberrypi: 9eb4879cf4..90b3ac6fb3:
Zygmunt Krynicki (1):
rpi-config: warn on config.txt lines exceeding 80 bytes
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9e75d5bd606a913fbe69e6735c9ecafc436441ba
Diffstat (limited to 'poky/meta/classes')
41 files changed, 501 insertions, 616 deletions
diff --git a/poky/meta/classes/archiver.bbclass b/poky/meta/classes/archiver.bbclass index dd31dc0cd8..411d459ed0 100644 --- a/poky/meta/classes/archiver.bbclass +++ b/poky/meta/classes/archiver.bbclass @@ -51,6 +51,7 @@ ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches" ARCHIVER_MODE[dumpdata] ?= "0" ARCHIVER_MODE[recipe] ?= "0" ARCHIVER_MODE[mirror] ?= "split" +ARCHIVER_MODE[compression] ?= "gz" DEPLOY_DIR_SRC ?= "${DEPLOY_DIR}/sources" ARCHIVER_TOPDIR ?= "${WORKDIR}/archiver-sources" @@ -409,15 +410,16 @@ def create_tarball(d, srcdir, suffix, ar_outdir): # that we archive the actual directory and not just the link. srcdir = os.path.realpath(srcdir) + compression_method = d.getVarFlag('ARCHIVER_MODE', 'compression') bb.utils.mkdirhier(ar_outdir) if suffix: - filename = '%s-%s.tar.gz' % (d.getVar('PF'), suffix) + filename = '%s-%s.tar.%s' % (d.getVar('PF'), suffix, compression_method) else: - filename = '%s.tar.gz' % d.getVar('PF') + filename = '%s.tar.%s' % (d.getVar('PF'), compression_method) tarname = os.path.join(ar_outdir, filename) bb.note('Creating %s' % tarname) - tar = tarfile.open(tarname, 'w:gz') + tar = tarfile.open(tarname, 'w:%s' % compression_method) tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths) tar.close() diff --git a/poky/meta/classes/baremetal-image.bbclass b/poky/meta/classes/baremetal-image.bbclass index 089c445522..81f5e5e93d 100644 --- a/poky/meta/classes/baremetal-image.bbclass +++ b/poky/meta/classes/baremetal-image.bbclass @@ -105,13 +105,17 @@ inherit qemuboot python(){ # do_addto_recipe_sysroot doesnt exist for all recipes, but we need it to have # /usr/bin on recipe-sysroot (qemu) populated + # The do_addto_recipe_sysroot dependency is coming from EXTRA_IMAGDEPENDS now, + # we just need to add the logic to add its dependency to do_image. def extraimage_getdepends(task): deps = "" for dep in (d.getVar('EXTRA_IMAGEDEPENDS') or "").split(): # Make sure we only add it for qemu if 'qemu' in dep: - deps += " %s:%s" % (dep, task) + if ":" in dep: + deps += " %s " % (dep) + else: + deps += " %s:%s" % (dep, task) return deps - d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_addto_recipe_sysroot')) - d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_sysroot')) + d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_sysroot')) } diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass index 340ebe7d78..a65fcc6c1d 100644 --- a/poky/meta/classes/base.bbclass +++ b/poky/meta/classes/base.bbclass @@ -12,7 +12,7 @@ inherit logging OE_EXTRA_IMPORTS ?= "" -OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license ${OE_EXTRA_IMPORTS}" +OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible ${OE_EXTRA_IMPORTS}" OE_IMPORTS[type] = "list" PACKAGECONFIG_CONFARGS ??= "" @@ -153,14 +153,14 @@ do_fetch[vardeps] += "SRCREV" python base_do_fetch() { src_uri = (d.getVar('SRC_URI') or "").split() - if len(src_uri) == 0: + if not src_uri: return try: fetcher = bb.fetch2.Fetch(src_uri, d) fetcher.download() except bb.fetch2.BBFetchException as e: - bb.fatal(str(e)) + bb.fatal("Bitbake Fetcher Error: " + repr(e)) } addtask unpack after do_fetch @@ -170,16 +170,54 @@ do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != o python base_do_unpack() { src_uri = (d.getVar('SRC_URI') or "").split() - if len(src_uri) == 0: + if not src_uri: return try: fetcher = bb.fetch2.Fetch(src_uri, d) fetcher.unpack(d.getVar('WORKDIR')) except bb.fetch2.BBFetchException as e: - bb.fatal(str(e)) + bb.fatal("Bitbake Fetcher Error: " + repr(e)) +} + +SSTATETASKS += "do_deploy_source_date_epoch" + +do_deploy_source_date_epoch () { + mkdir -p ${SDE_DEPLOYDIR} + if [ -e ${SDE_FILE} ]; then + echo "Deploying SDE from ${SDE_FILE} -> ${SDE_DEPLOYDIR}." + cp -p ${SDE_FILE} ${SDE_DEPLOYDIR}/__source_date_epoch.txt + else + echo "${SDE_FILE} not found!" + fi } +python do_deploy_source_date_epoch_setscene () { + sstate_setscene(d) + bb.utils.mkdirhier(d.getVar('SDE_DIR')) + sde_file = os.path.join(d.getVar('SDE_DEPLOYDIR'), '__source_date_epoch.txt') + if os.path.exists(sde_file): + target = d.getVar('SDE_FILE') + bb.debug(1, "Moving setscene SDE file %s -> %s" % (sde_file, target)) + bb.utils.rename(sde_file, target) + else: + bb.debug(1, "%s not found!" % sde_file) +} + +do_deploy_source_date_epoch[dirs] = "${SDE_DEPLOYDIR}" +do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DEPLOYDIR}" +addtask do_deploy_source_date_epoch_setscene +addtask do_deploy_source_date_epoch before do_configure after do_patch + +python create_source_date_epoch_stamp() { + source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S')) + oe.reproducible.epochfile_write(source_date_epoch, d.getVar('SDE_FILE'), d) +} +do_unpack[postfuncs] += "create_source_date_epoch_stamp" + +def get_source_date_epoch_value(d): + return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d) + def get_layers_branch_rev(d): layers = (d.getVar("BBLAYERS") or "").split() layers_branch_rev = ["%-20s = \"%s:%s\"" % (os.path.basename(i), \ @@ -693,7 +731,7 @@ python () { if os.path.basename(p) == machine and os.path.isdir(p): paths.append(p) - if len(paths) != 0: + if paths: for s in srcuri.split(): if not s.startswith("file://"): continue @@ -726,7 +764,7 @@ do_cleansstate[nostamp] = "1" python do_cleanall() { src_uri = (d.getVar('SRC_URI') or "").split() - if len(src_uri) == 0: + if not src_uri: return try: diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass index a613306270..62d0d781a1 100644 --- a/poky/meta/classes/buildhistory.bbclass +++ b/poky/meta/classes/buildhistory.bbclass @@ -287,7 +287,7 @@ python buildhistory_emit_pkghistory() { r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) if r < 0: msg = "Package version for package %s went backwards which would break package feeds (from %s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr) - package_qa_handle_error("version-going-backwards", msg, d) + oe.qa.handle_error("version-going-backwards", msg, d) pkginfo = PackageInfo(pkg) # Apparently the version can be different on a per-package basis (see Python) @@ -321,6 +321,7 @@ python buildhistory_emit_pkghistory() { # Create files-in-<package-name>.txt files containing a list of files of each recipe's package bb.build.exec_func("buildhistory_list_pkg_files", d) + oe.qa.exit_if_errors(d) } python buildhistory_emit_outputsigs() { @@ -442,11 +443,16 @@ def buildhistory_list_installed(d, rootfs_type="image"): else: pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target") + if rootfs_type == "sdk_host": + pkgdata_dir = d.getVar('PKGDATA_DIR_SDK') + else: + pkgdata_dir = d.getVar('PKGDATA_DIR') + for output_type, output_file in process_list: output_file_full = os.path.join(d.getVar('WORKDIR'), output_file) with open(output_file_full, 'w') as output: - output.write(format_pkg_list(pkgs, output_type, d.getVar('PKGDATA_DIR'))) + output.write(format_pkg_list(pkgs, output_type, pkgdata_dir)) python buildhistory_list_installed_image() { buildhistory_list_installed(d) @@ -496,13 +502,19 @@ buildhistory_get_installed() { echo "}" >> $1/depends.dot rm $1/depends.tmp + # Set correct pkgdatadir + pkgdatadir=${PKGDATA_DIR} + if [ "$2" == "sdk" ] && [ "$3" == "host" ]; then + pkgdatadir="${PKGDATA_DIR_SDK}" + fi + # Produce installed package sizes list - oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" -n -f $pkgcache > $1/installed-package-sizes.tmp + oe-pkgdata-util -p $pkgdatadir read-value "PKGSIZE" -n -f $pkgcache > $1/installed-package-sizes.tmp cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB\t" $1}' | sort -n -r > $1/installed-package-sizes.txt rm $1/installed-package-sizes.tmp # Produce package info: runtime_name, buildtime_name, recipe, version, size - oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PACKAGE,PN,PV,PKGSIZE" -n -f $pkgcache > $1/installed-package-info.tmp + oe-pkgdata-util -p $pkgdatadir read-value "PACKAGE,PN,PV,PKGSIZE" -n -f $pkgcache > $1/installed-package-info.tmp cat $1/installed-package-info.tmp | sort -n -r -k 5 > $1/installed-package-info.txt rm $1/installed-package-info.tmp @@ -542,7 +554,7 @@ buildhistory_get_sdk_installed() { return fi - buildhistory_get_installed ${BUILDHISTORY_DIR_SDK}/$1 sdk + buildhistory_get_installed ${BUILDHISTORY_DIR_SDK}/$1 sdk $1 } buildhistory_get_sdk_installed_host() { @@ -773,7 +785,7 @@ def buildhistory_get_imagevars(d): def buildhistory_get_sdkvars(d): if d.getVar('BB_WORKERCONTEXT') != '1': return "" - sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE" + sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES TOOLCHAIN_HOST_TASK TOOLCHAIN_TARGET_TASK BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE" if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext': # Extensible SDK uses some additional variables sdkvars += " SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST SDK_UPDATE_URL SDK_EXT_TYPE SDK_RECRDEP_TASKS SDK_INCLUDE_PKGDATA SDK_INCLUDE_TOOLCHAIN" diff --git a/poky/meta/classes/create-spdx.bbclass b/poky/meta/classes/create-spdx.bbclass index 739b46e9b3..c35dbe1184 100644 --- a/poky/meta/classes/create-spdx.bbclass +++ b/poky/meta/classes/create-spdx.bbclass @@ -35,6 +35,17 @@ def get_doc_namespace(d, doc): namespace_uuid = uuid.uuid5(uuid.NAMESPACE_DNS, d.getVar("SPDX_UUID_NAMESPACE")) return "%s/%s-%s" % (d.getVar("SPDX_NAMESPACE_PREFIX"), doc.name, str(uuid.uuid5(namespace_uuid, doc.name))) +def create_annotation(d, comment): + from datetime import datetime, timezone + + creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + annotation = oe.spdx.SPDXAnnotation() + annotation.annotationDate = creation_time + annotation.annotationType = "OTHER" + annotation.annotator = "Tool: %s - %s" % (d.getVar("SPDX_TOOL_NAME"), d.getVar("SPDX_TOOL_VERSION")) + annotation.comment = comment + return annotation + def recipe_spdx_is_native(d, recipe): return any(a.annotationType == "OTHER" and a.annotator == "Tool: %s - %s" % (d.getVar("SPDX_TOOL_NAME"), d.getVar("SPDX_TOOL_VERSION")) and @@ -411,13 +422,8 @@ python do_create_spdx() { recipe.name = d.getVar("PN") recipe.versionInfo = d.getVar("PV") recipe.SPDXID = oe.sbom.get_recipe_spdxid(d) - if bb.data.inherits_class("native", d): - annotation = oe.spdx.SPDXAnnotation() - annotation.annotationDate = creation_time - annotation.annotationType = "OTHER" - annotation.annotator = "Tool: %s - %s" % (d.getVar("SPDX_TOOL_NAME"), d.getVar("SPDX_TOOL_VERSION")) - annotation.comment = "isNative" - recipe.annotations.append(annotation) + if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d): + recipe.annotations.append(create_annotation(d, "isNative")) for s in d.getVar('SRC_URI').split(): if not s.startswith("file://"): @@ -608,7 +614,7 @@ python do_create_runtime_spdx() { deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX")) spdx_deploy = Path(d.getVar("SPDXRUNTIMEDEPLOY")) - is_native = bb.data.inherits_class("native", d) + is_native = bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d) creation_time = datetime.now(tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") diff --git a/poky/meta/classes/cross-canadian.bbclass b/poky/meta/classes/cross-canadian.bbclass index ffbc2167e3..ac82e86356 100644 --- a/poky/meta/classes/cross-canadian.bbclass +++ b/poky/meta/classes/cross-canadian.bbclass @@ -169,7 +169,7 @@ USE_NLS = "${SDKUSE_NLS}" # and not any particular tune that is enabled. TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" -PKGDATA_DIR = "${TMPDIR}/pkgdata/${SDK_SYS}" +PKGDATA_DIR = "${PKGDATA_DIR_SDK}" # If MLPREFIX is set by multilib code, shlibs # points to the wrong place so force it SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2" diff --git a/poky/meta/classes/devshell.bbclass b/poky/meta/classes/devshell.bbclass index 76dd0b42ee..62dc958d9a 100644 --- a/poky/meta/classes/devshell.bbclass +++ b/poky/meta/classes/devshell.bbclass @@ -34,7 +34,7 @@ python () { d.delVarFlag("do_devshell", "fakeroot") } -def devpyshell(d): +def pydevshell(d): import code import select @@ -140,17 +140,17 @@ def devpyshell(d): os.kill(child, signal.SIGTERM) break -python do_devpyshell() { +python do_pydevshell() { import signal try: - devpyshell(d) + pydevshell(d) except SystemExit: # Stop the SIGTERM above causing an error exit code return finally: return } -addtask devpyshell after do_patch +addtask pydevshell after do_patch -do_devpyshell[nostamp] = "1" +do_pydevshell[nostamp] = "1" diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass index ad93b2d2ab..abfe24bace 100644 --- a/poky/meta/classes/externalsrc.bbclass +++ b/poky/meta/classes/externalsrc.bbclass @@ -109,8 +109,8 @@ python () { if local_srcuri and task in fetch_tasks: continue bb.build.deltask(task, d) - if bb.data.inherits_class('reproducible_build', d) and task == 'do_unpack': - # The reproducible_build's create_source_date_epoch_stamp function must + if task == 'do_unpack': + # The reproducible build create_source_date_epoch_stamp function must # be run after the source is available and before the # do_deploy_source_date_epoch task. In the normal case, it's attached # to do_unpack as a postfuncs, but since we removed do_unpack (above) diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass index 0dd0c5f1d2..aa54b4a08c 100644 --- a/poky/meta/classes/go.bbclass +++ b/poky/meta/classes/go.bbclass @@ -41,7 +41,8 @@ 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}'"' +GO_EXTRA_LDFLAGS ?= "" +GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" diff --git a/poky/meta/classes/image-artifact-names.bbclass b/poky/meta/classes/image-artifact-names.bbclass index 67f04e8165..f5769e520f 100644 --- a/poky/meta/classes/image-artifact-names.bbclass +++ b/poky/meta/classes/image-artifact-names.bbclass @@ -15,7 +15,7 @@ IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" IMAGE_NAME_SUFFIX ??= ".rootfs" python () { - if bb.data.inherits_class('reproducible_build', d) and bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}": + if bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}": import datetime d.setVar("IMAGE_VERSION_SUFFIX", "-" + datetime.datetime.fromtimestamp(int(d.getVar("SOURCE_DATE_EPOCH")), datetime.timezone.utc).strftime('%Y%m%d%H%M%S')) d.setVarFlag("IMAGE_VERSION_SUFFIX", "vardepvalue", "") diff --git a/poky/meta/classes/image-prelink.bbclass b/poky/meta/classes/image-prelink.bbclass index 0da094a551..8158eeaf4c 100644 --- a/poky/meta/classes/image-prelink.bbclass +++ b/poky/meta/classes/image-prelink.bbclass @@ -46,17 +46,12 @@ prelink_image () { dynamic_loader=${@get_linuxloader(d)} # prelink! - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then - bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..." - if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then - export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct ` - else - export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS - fi - ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader + if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then + export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct ` else - ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader + export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS fi + ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader # Remove the prelink.conf if we had to add it. if [ "$dummy_prelink_conf" = "true" ]; then diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass index c2f3232027..2fa69a40d1 100644 --- a/poky/meta/classes/image.bbclass +++ b/poky/meta/classes/image.bbclass @@ -651,17 +651,15 @@ ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge' POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}" reproducible_final_image_task () { - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then + if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then + REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct 2>/dev/null` || true if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then - REPRODUCIBLE_TIMESTAMP_ROOTFS=`git -C "${COREBASE}" log -1 --pretty=%ct 2>/dev/null` || true - if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then - REPRODUCIBLE_TIMESTAMP_ROOTFS=`stat -c%Y ${@bb.utils.which(d.getVar("BBPATH"), "conf/bitbake.conf")}` - fi + REPRODUCIBLE_TIMESTAMP_ROOTFS=`stat -c%Y ${@bb.utils.which(d.getVar("BBPATH"), "conf/bitbake.conf")}` fi - # Set mtime of all files to a reproducible value - bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS" - find ${IMAGE_ROOTFS} -print0 | xargs -0 touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS fi + # Set mtime of all files to a reproducible value + bbnote "reproducible_final_image_task: mtime set to $REPRODUCIBLE_TIMESTAMP_ROOTFS" + find ${IMAGE_ROOTFS} -print0 | xargs -0 touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS } systemd_preset_all () { diff --git a/poky/meta/classes/image_types.bbclass b/poky/meta/classes/image_types.bbclass index 32d4cd4c76..f643ed3ce7 100644 --- a/poky/meta/classes/image_types.bbclass +++ b/poky/meta/classes/image_types.bbclass @@ -139,16 +139,18 @@ IMAGE_CMD:cpio () { } UBI_VOLNAME ?= "${MACHINE}-rootfs" +UBI_VOLTYPE ?= "dynamic" +UBI_IMGTYPE ?= "ubifs" multiubi_mkfs() { local mkubifs_args="$1" local ubinize_args="$2" - + # Added prompt error message for ubi and ubifs image creation. if [ -z "$mkubifs_args" ] || [ -z "$ubinize_args" ]; then bbfatal "MKUBIFS_ARGS and UBINIZE_ARGS have to be set, see http://www.linux-mtd.infradead.org/faq/ubifs.html for details" fi - + if [ -z "$3" ]; then local vname="" else @@ -157,9 +159,9 @@ multiubi_mkfs() { echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg - echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg + echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.${UBI_IMGTYPE} >> ubinize${vname}-${IMAGE_NAME}.cfg echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg - echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg + echo vol_type=${UBI_VOLTYPE} >> ubinize${vname}-${IMAGE_NAME}.cfg echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg if [ -n "$vname" ]; then @@ -198,7 +200,7 @@ IMAGE_CMD:multiubi () { IMAGE_CMD:ubi () { multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}" } -IMAGE_TYPEDEP:ubi = "ubifs" +IMAGE_TYPEDEP:ubi = "${UBI_IMGTYPE}" IMAGE_CMD:ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}" @@ -329,7 +331,7 @@ CONVERSION_DEPENDS_gzsync = "zsync-curl-native" RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" RUNNABLE_MACHINE_PATTERNS ?= "qemu" -DEPLOYABLE_IMAGE_TYPES ?= "hddimg iso" +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, vhd, vhdx, vdi, qcow2, hddimg, iso, etc. diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass index f2d2ca3689..1e2f1b768a 100644 --- a/poky/meta/classes/insane.bbclass +++ b/poky/meta/classes/insane.bbclass @@ -18,8 +18,6 @@ # files under exec_prefix # -Check if the package name is upper case -QA_SANE = "True" - # Elect whether a given type of error is a warning or error, they may # have been set by other files. WARN_QA ?= " libdir xorg-driver-abi \ @@ -28,6 +26,8 @@ WARN_QA ?= " libdir xorg-driver-abi \ invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ mime mime-xdg unlisted-pkg-lics unhandled-features-check \ missing-update-alternatives native-last missing-ptest \ + license-exists license-no-generic license-syntax license-format \ + license-incompatible license-file-missing \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ @@ -59,32 +59,6 @@ def package_qa_clean_path(path, d, pkg=None): path = path.replace(os.path.join(d.getVar("PKGDEST"), pkg), "/") return path.replace(d.getVar("TMPDIR"), "/").replace("//", "/") -def package_qa_write_error(type, error, d): - logfile = d.getVar('QA_LOGFILE') - if logfile: - p = d.getVar('P') - with open(logfile, "a+") as f: - f.write("%s: %s [%s]\n" % (p, error, type)) - -def package_qa_handle_error(error_class, error_msg, d): - if error_class in (d.getVar("ERROR_QA") or "").split(): - package_qa_write_error(error_class, error_msg, d) - bb.error("QA Issue: %s [%s]" % (error_msg, error_class)) - d.setVar("QA_SANE", False) - return False - elif error_class in (d.getVar("WARN_QA") or "").split(): - package_qa_write_error(error_class, error_msg, d) - bb.warn("QA Issue: %s [%s]" % (error_msg, error_class)) - else: - bb.note("QA Issue: %s [%s]" % (error_msg, error_class)) - return True - -def package_qa_add_message(messages, section, new_msg): - if section not in messages: - messages[section] = new_msg - else: - messages[section] = messages[section] + "\n" + new_msg - QAPATHTEST[shebang-size] = "package_qa_check_shebang_size" def package_qa_check_shebang_size(path, name, d, elf, messages): import stat @@ -106,7 +80,7 @@ def package_qa_check_shebang_size(path, name, d, elf, messages): return if len(stanza) > 129: - package_qa_add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d))) + oe.qa.add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d))) return QAPATHTEST[libexec] = "package_qa_check_libexec" @@ -118,7 +92,7 @@ def package_qa_check_libexec(path,name, d, elf, messages): return True if 'libexec' in path.split(os.path.sep): - package_qa_add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)) + oe.qa.add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)) return False return True @@ -146,7 +120,7 @@ def package_qa_check_rpath(file,name, d, elf, messages): rpath = m.group(1) for dir in bad_dirs: if dir in rpath: - package_qa_add_message(messages, "rpaths", "package %s contains bad RPATH %s in file %s" % (name, rpath, file)) + oe.qa.add_message(messages, "rpaths", "package %s contains bad RPATH %s in file %s" % (name, rpath, file)) QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths" def package_qa_check_useless_rpaths(file, name, d, elf, messages): @@ -176,7 +150,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): # The dynamic linker searches both these places anyway. There is no point in # looking there again. - package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d, name), rpath)) + oe.qa.add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d, name), rpath)) QAPATHTEST[dev-so] = "package_qa_check_dev" def package_qa_check_dev(path, name, d, elf, messages): @@ -185,7 +159,7 @@ def package_qa_check_dev(path, name, d, elf, messages): """ if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path): - package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package %s contains symlink .so '%s'" % \ + oe.qa.add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package %s contains symlink .so '%s'" % \ (name, package_qa_clean_path(path, d, name))) QAPATHTEST[dev-elf] = "package_qa_check_dev_elf" @@ -196,7 +170,7 @@ def package_qa_check_dev_elf(path, name, d, elf, messages): install link-time .so files that are linker scripts. """ if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf: - package_qa_add_message(messages, "dev-elf", "-dev package %s contains non-symlink .so '%s'" % \ + oe.qa.add_message(messages, "dev-elf", "-dev package %s contains non-symlink .so '%s'" % \ (name, package_qa_clean_path(path, d, name))) QAPATHTEST[staticdev] = "package_qa_check_staticdev" @@ -209,7 +183,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages): """ if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: - package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ + oe.qa.add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ (name, package_qa_clean_path(path,d, name))) QAPATHTEST[mime] = "package_qa_check_mime" @@ -220,7 +194,7 @@ def package_qa_check_mime(path, name, d, elf, messages): """ if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d): - package_qa_add_message(messages, "mime", "package contains mime types but does not inherit mime: %s path '%s'" % \ + oe.qa.add_message(messages, "mime", "package contains mime types but does not inherit mime: %s path '%s'" % \ (name, package_qa_clean_path(path,d))) QAPATHTEST[mime-xdg] = "package_qa_check_mime_xdg" @@ -247,9 +221,9 @@ def package_qa_check_mime_xdg(path, name, d, elf, messages): if name == d.getVar('PN'): pkgname = '${PN}' wstr += "If yes: add \'inhert mime-xdg\' and \'MIME_XDG_PACKAGES += \"%s\"\' / if no add \'INSANE_SKIP:%s += \"mime-xdg\"\' to recipe." % (pkgname, pkgname) - package_qa_add_message(messages, "mime-xdg", wstr) + oe.qa.add_message(messages, "mime-xdg", wstr) if mime_type_found: - package_qa_add_message(messages, "mime-xdg", "package contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s path '%s'" % \ + oe.qa.add_message(messages, "mime-xdg", "package contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s path '%s'" % \ (name, package_qa_clean_path(path,d))) def package_qa_check_libdir(d): @@ -313,7 +287,7 @@ def package_qa_check_libdir(d): pass if messages: - package_qa_handle_error("libdir", "\n".join(messages), d) + oe.qa.handle_error("libdir", "\n".join(messages), d) QAPATHTEST[debug-files] = "package_qa_check_dbg" def package_qa_check_dbg(path, name, d, elf, messages): @@ -323,7 +297,7 @@ def package_qa_check_dbg(path, name, d, elf, messages): if not "-dbg" in name and not "-ptest" in name: if '.debug' in path.split(os.path.sep): - package_qa_add_message(messages, "debug-files", "non debug package contains .debug directory: %s path %s" % \ + oe.qa.add_message(messages, "debug-files", "non debug package contains .debug directory: %s path %s" % \ (name, package_qa_clean_path(path,d))) QAPATHTEST[arch] = "package_qa_check_arch" @@ -343,7 +317,7 @@ def package_qa_check_arch(path,name,d, elf, messages): if target_arch == "allarch": pn = d.getVar('PN') - package_qa_add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries") + oe.qa.add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries") return # FIXME: Cross package confuse this check, so just skip them @@ -366,13 +340,13 @@ def package_qa_check_arch(path,name,d, elf, messages): target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE'))) is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF") if not ((machine == elf.machine()) or is_32 or is_bpf): - package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \ + oe.qa.add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \ (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path, d, name))) elif not ((bits == elf.abiSize()) or is_32 or is_bpf): - package_qa_add_message(messages, "arch", "Bit size did not match (%d, expected %d) in %s" % \ + oe.qa.add_message(messages, "arch", "Bit size did not match (%d, expected %d) in %s" % \ (elf.abiSize(), bits, package_qa_clean_path(path, d, name))) elif not ((littleendian == elf.isLittleEndian()) or is_bpf): - package_qa_add_message(messages, "arch", "Endiannes did not match (%d, expected %d) in %s" % \ + oe.qa.add_message(messages, "arch", "Endiannes did not match (%d, expected %d) in %s" % \ (elf.isLittleEndian(), littleendian, package_qa_clean_path(path,d, name))) QAPATHTEST[desktop] = "package_qa_check_desktop" @@ -385,7 +359,7 @@ def package_qa_check_desktop(path, name, d, elf, messages): output = os.popen("%s %s" % (desktop_file_validate, path)) # This only produces output on errors for l in output: - package_qa_add_message(messages, "desktop", "Desktop file issue: " + l.strip()) + oe.qa.add_message(messages, "desktop", "Desktop file issue: " + l.strip()) QAPATHTEST[textrel] = "package_qa_textrel" def package_qa_textrel(path, name, d, elf, messages): @@ -411,7 +385,7 @@ def package_qa_textrel(path, name, d, elf, messages): if not sane: path = package_qa_clean_path(path, d, name) - package_qa_add_message(messages, "textrel", "%s: ELF binary %s has relocations in .text" % (name, path)) + oe.qa.add_message(messages, "textrel", "%s: ELF binary %s has relocations in .text" % (name, path)) QAPATHTEST[ldflags] = "package_qa_hash_style" def package_qa_hash_style(path, name, d, elf, messages): @@ -446,7 +420,7 @@ def package_qa_hash_style(path, name, d, elf, messages): sane = True if has_syms and not sane: path = package_qa_clean_path(path, d, name) - package_qa_add_message(messages, "ldflags", "File %s in package %s doesn't have GNU_HASH (didn't pass LDFLAGS?)" % (path, name)) + oe.qa.add_message(messages, "ldflags", "File %s in package %s doesn't have GNU_HASH (didn't pass LDFLAGS?)" % (path, name)) QAPATHTEST[buildpaths] = "package_qa_check_buildpaths" @@ -467,7 +441,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages): file_content = f.read() if tmpdir in file_content: trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "") - package_qa_add_message(messages, "buildpaths", "File %s in package %s contains reference to TMPDIR" % (trimmed, name)) + oe.qa.add_message(messages, "buildpaths", "File %s in package %s contains reference to TMPDIR" % (trimmed, name)) QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi" @@ -486,7 +460,7 @@ def package_qa_check_xorg_driver_abi(path, name, d, elf, messages): for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + name) or ""): if rdep.startswith("%sxorg-abi-" % mlprefix): return - package_qa_add_message(messages, "xorg-driver-abi", "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path))) + oe.qa.add_message(messages, "xorg-driver-abi", "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path))) QAPATHTEST[infodir] = "package_qa_check_infodir" def package_qa_check_infodir(path, name, d, elf, messages): @@ -496,7 +470,7 @@ def package_qa_check_infodir(path, name, d, elf, messages): infodir = d.expand("${infodir}/dir") if infodir in path: - package_qa_add_message(messages, "infodir", "The /usr/share/info/dir file is not meant to be shipped in a particular package.") + oe.qa.add_message(messages, "infodir", "The /usr/share/info/dir file is not meant to be shipped in a particular package.") QAPATHTEST[symlink-to-sysroot] = "package_qa_check_symlink_to_sysroot" def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages): @@ -509,7 +483,7 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages): tmpdir = d.getVar('TMPDIR') if target.startswith(tmpdir): trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "") - package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name)) + oe.qa.add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name)) # Check license variables do_populate_lic[postfuncs] += "populate_lic_qa_checksum" @@ -517,7 +491,6 @@ python populate_lic_qa_checksum() { """ Check for changes in the license files. """ - sane = True lic_files = d.getVar('LIC_FILES_CHKSUM') or '' lic = d.getVar('LICENSE') @@ -527,7 +500,7 @@ python populate_lic_qa_checksum() { return if not lic_files and d.getVar('SRC_URI'): - sane &= package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) + oe.qa.handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) srcdir = d.getVar('S') corebase_licensefile = d.getVar('COREBASE') + "/LICENSE" @@ -535,11 +508,11 @@ python populate_lic_qa_checksum() { try: (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) except bb.fetch.MalformedUrl: - sane &= package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d) + oe.qa.handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d) continue srclicfile = os.path.join(srcdir, path) if not os.path.isfile(srclicfile): - sane &= package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d) + oe.qa.handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d) continue if (srclicfile == corebase_licensefile): @@ -607,10 +580,9 @@ python populate_lic_qa_checksum() { else: msg = pn + ": LIC_FILES_CHKSUM is not specified for " + url msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum - sane &= package_qa_handle_error("license-checksum", msg, d) + oe.qa.handle_error("license-checksum", msg, d) - if not sane: - bb.fatal("Fatal QA errors found, failing task.") + oe.qa.exit_if_errors(d) } def qa_check_staged(path,d): @@ -622,7 +594,6 @@ def qa_check_staged(path,d): responsible for the errors easily even if we look at every .pc and .la file. """ - sane = True tmpdir = d.getVar('TMPDIR') workdir = os.path.join(tmpdir, "work") recipesysroot = d.getVar("RECIPE_SYSROOT") @@ -655,16 +626,14 @@ def qa_check_staged(path,d): file_content = file_content.replace(recipesysroot, "") if workdir in file_content: error_msg = "%s failed sanity test (workdir) in path %s" % (file,root) - sane &= package_qa_handle_error("la", error_msg, d) + oe.qa.handle_error("la", error_msg, d) elif file.endswith(".pc") and not skip_pkgconfig: with open(path) as f: file_content = f.read() file_content = file_content.replace(recipesysroot, "") if pkgconfigcheck in file_content: error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root) - sane &= package_qa_handle_error("pkgconfig", error_msg, d) - - return sane + oe.qa.handle_error("pkgconfig", error_msg, d) # Run all package-wide warnfuncs and errorfuncs def package_qa_package(warnfuncs, errorfuncs, package, d): @@ -677,9 +646,9 @@ def package_qa_package(warnfuncs, errorfuncs, package, d): func(package, d, errors) for w in warnings: - package_qa_handle_error(w, warnings[w], d) + oe.qa.handle_error(w, warnings[w], d) for e in errors: - package_qa_handle_error(e, errors[e], d) + oe.qa.handle_error(e, errors[e], d) return len(errors) == 0 @@ -694,16 +663,14 @@ def package_qa_recipe(warnfuncs, errorfuncs, pn, d): func(pn, d, errors) for w in warnings: - package_qa_handle_error(w, warnings[w], d) + oe.qa.handle_error(w, warnings[w], d) for e in errors: - package_qa_handle_error(e, errors[e], d) + oe.qa.handle_error(e, errors[e], d) return len(errors) == 0 # Walk over all files in a directory and call func def package_qa_walk(warnfuncs, errorfuncs, package, d): - import oe.qa - #if this will throw an exception, then fix the dict above target_os = d.getVar('TARGET_OS') target_arch = d.getVar('TARGET_ARCH') @@ -724,9 +691,9 @@ def package_qa_walk(warnfuncs, errorfuncs, package, d): func(path, package, d, elf, errors) for w in warnings: - package_qa_handle_error(w, warnings[w], d) + oe.qa.handle_error(w, warnings[w], d) for e in errors: - package_qa_handle_error(e, errors[e], d) + oe.qa.handle_error(e, errors[e], d) def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): # Don't do this check for kernel/module recipes, there aren't too many debug/development @@ -746,10 +713,10 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): for rdepend in rdepends: if "-dbg" in rdepend and "debug-deps" not in skip: error_msg = "%s rdepends on %s" % (pkg,rdepend) - package_qa_handle_error("debug-deps", error_msg, d) + oe.qa.handle_error("debug-deps", error_msg, d) if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip: error_msg = "%s rdepends on %s" % (pkg, rdepend) - package_qa_handle_error("dev-deps", error_msg, d) + oe.qa.handle_error("dev-deps", error_msg, d) if rdepend not in packages: rdep_data = oe.packagedata.read_subpkgdata(rdepend, d) if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: @@ -770,7 +737,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): error_msg = "%s rdepends on %s, but it isn't a build dependency, missing %s in DEPENDS or PACKAGECONFIG?" % (pkg, rdepend, rdep_data['PN']) else: error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend) - package_qa_handle_error("build-deps", error_msg, d) + oe.qa.handle_error("build-deps", error_msg, d) if "file-rdeps" not in skip: ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)']) @@ -823,7 +790,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): for key in filerdepends: error_msg = "%s contained in package %s requires %s, but no providers found in RDEPENDS:%s?" % \ (filerdepends[key].replace(":%s" % pkg, "").replace("@underscore@", "_"), pkg, key, pkg) - package_qa_handle_error("file-rdeps", error_msg, d) + oe.qa.handle_error("file-rdeps", error_msg, d) package_qa_check_rdepends[vardepsexclude] = "OVERRIDES" def package_qa_check_deps(pkg, pkgdest, d): @@ -840,7 +807,7 @@ def package_qa_check_deps(pkg, pkgdest, d): for v in rvar[dep]: if v and not v.startswith(('< ', '= ', '> ', '<= ', '>=')): error_msg = "%s:%s is invalid: %s (%s) only comparisons <, =, >, <=, and >= are allowed" % (var, pkg, dep, v) - package_qa_handle_error("dep-cmp", error_msg, d) + oe.qa.handle_error("dep-cmp", error_msg, d) check_valid_deps('RDEPENDS') check_valid_deps('RRECOMMENDS') @@ -851,13 +818,14 @@ def package_qa_check_deps(pkg, pkgdest, d): QAPKGTEST[usrmerge] = "package_qa_check_usrmerge" def package_qa_check_usrmerge(pkg, d, messages): + pkgdest = d.getVar('PKGDEST') pkg_dir = pkgdest + os.sep + pkg + os.sep merged_dirs = ['bin', 'sbin', 'lib'] + d.getVar('MULTILIB_VARIANTS').split() for f in merged_dirs: if os.path.exists(pkg_dir + f) and not os.path.islink(pkg_dir + f): msg = "%s package is not obeying usrmerge distro feature. /%s should be relocated to /usr." % (pkg, f) - package_qa_add_message(messages, "usrmerge", msg) + oe.qa.add_message(messages, "usrmerge", msg) return False return True @@ -876,7 +844,7 @@ def package_qa_check_perllocalpod(pkg, d, messages): if matches: matches = [package_qa_clean_path(path, d, pkg) for path in matches] msg = "%s contains perllocal.pod (%s), should not be installed" % (pkg, " ".join(matches)) - package_qa_add_message(messages, "perllocalpod", msg) + oe.qa.add_message(messages, "perllocalpod", msg) QAPKGTEST[expanded-d] = "package_qa_check_expanded_d" def package_qa_check_expanded_d(package, d, messages): @@ -891,10 +859,10 @@ def package_qa_check_expanded_d(package, d, messages): bbvar = d.getVar(var + ":" + package) or "" if expanded_d in bbvar: if var == 'FILES': - package_qa_add_message(messages, "expanded-d", "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % package) + oe.qa.add_message(messages, "expanded-d", "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % package) sane = False else: - package_qa_add_message(messages, "expanded-d", "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, package)) + oe.qa.add_message(messages, "expanded-d", "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, package)) sane = False return sane @@ -912,7 +880,7 @@ def package_qa_check_unlisted_pkg_lics(package, d, messages): if not unlisted: return True - package_qa_add_message(messages, "unlisted-pkg-lics", + oe.qa.add_message(messages, "unlisted-pkg-lics", "LICENSE:%s includes licenses (%s) that are not " "listed in LICENSE" % (package, ' '.join(unlisted))) return False @@ -927,7 +895,7 @@ def package_qa_check_encoding(keys, encode, d): except UnicodeDecodeError as e: error_msg = "%s has non %s characters" % (key,enc) sane = False - package_qa_handle_error("invalid-chars", error_msg, d) + oe.qa.handle_error("invalid-chars", error_msg, d) return sane for key in keys: @@ -960,12 +928,12 @@ def package_qa_check_host_user(path, name, d, elf, messages): else: check_uid = int(d.getVar('HOST_USER_UID')) if stat.st_uid == check_uid: - package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_uid)) + oe.qa.add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_uid)) return False check_gid = int(d.getVar('HOST_USER_GID')) if stat.st_gid == check_gid: - package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_gid)) + oe.qa.add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_gid)) return False return True @@ -974,11 +942,11 @@ def package_qa_check_src_uri(pn, d, messages): import re if "${PN}" in d.getVar("SRC_URI", False): - package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d) + oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses PN not BPN" % pn, d) for url in d.getVar("SRC_URI").split(): if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url): - package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d) + oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d) QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check" def package_qa_check_unhandled_features_check(pn, d, messages): @@ -989,7 +957,7 @@ def package_qa_check_unhandled_features_check(pn, d, messages): if d.getVar(var) is not None or d.overridedata.get(var) is not None: var_set = True if var_set: - package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d) + oe.qa.handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d) QARECIPETEST[missing-update-alternatives] = "package_qa_check_missing_update_alternatives" def package_qa_check_missing_update_alternatives(pn, d, messages): @@ -997,7 +965,7 @@ def package_qa_check_missing_update_alternatives(pn, d, messages): # without inheriting update-alternatives class for pkg in (d.getVar('PACKAGES') or '').split(): if d.getVar('ALTERNATIVE:%s' % pkg) and not bb.data.inherits_class('update-alternatives', d): - package_qa_handle_error("missing-update-alternatives", "%s: recipe defines ALTERNATIVE:%s but doesn't inherit update-alternatives. This might fail during do_rootfs later!" % (pn, pkg), d) + oe.qa.handle_error("missing-update-alternatives", "%s: recipe defines ALTERNATIVE:%s but doesn't inherit update-alternatives. This might fail during do_rootfs later!" % (pn, pkg), d) # The PACKAGE FUNC to scan each package python do_package_qa () { @@ -1073,7 +1041,7 @@ python do_package_qa () { bb.note("Checking Package: %s" % package) # Check package name if not pkgname_pattern.match(package): - package_qa_handle_error("pkgname", + oe.qa.handle_error("pkgname", "%s doesn't match the [a-z0-9.+-]+ regex" % package, d) warn_checks, error_checks = parse_test_matrix("QAPATHTEST") @@ -1091,10 +1059,7 @@ python do_package_qa () { if 'libdir' in d.getVar("ALL_QA").split(): package_qa_check_libdir(d) - qa_sane = d.getVar("QA_SANE") - if not qa_sane: - bb.fatal("QA run found fatal errors. Please consider fixing them.") - bb.note("DONE with PACKAGE QA") + oe.qa.exit_if_errors(d) } # binutils is used for most checks, so need to set as dependency @@ -1121,8 +1086,8 @@ addtask do_package_qa_setscene python do_qa_staging() { bb.note("QA checking staging") - if not qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d): - bb.fatal("QA staging was broken by the package built above") + qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d) + oe.qa.exit_with_message_if_errors("QA staging was broken by the package built above", d) } python do_qa_patch() { @@ -1170,7 +1135,7 @@ python do_qa_patch() { elif 'patch-fuzz' in d.getVar('WARN_QA'): bb.warn(msg) msg = "Patch log indicates that patches do not apply cleanly." - package_qa_handle_error("patch-fuzz", msg, d) + oe.qa.handle_error("patch-fuzz", msg, d) } python do_qa_configure() { @@ -1198,7 +1163,7 @@ python do_qa_configure() { if subprocess.call(statement, shell=True) == 0: error_msg = """This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this.""" - package_qa_handle_error("configure-unsafe", error_msg, d) + oe.qa.handle_error("configure-unsafe", error_msg, d) if "configure.ac" in files: configs.append(os.path.join(root,"configure.ac")) @@ -1228,7 +1193,7 @@ Rerun configure task after fixing this.""" gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config if subprocess.call(gnu, shell=True) == 0: error_msg = "AM_GNU_GETTEXT used but no inherit gettext" - package_qa_handle_error("configure-gettext", error_msg, d) + oe.qa.handle_error("configure-gettext", error_msg, d) ########################################################################### # Check unrecognised configure options (with a white list) @@ -1251,7 +1216,7 @@ Rerun configure task after fixing this.""" if options: pn = d.getVar('PN') error_msg = pn + ": configure was passed unrecognised options: " + " ".join(options) - package_qa_handle_error("unknown-configure-option", error_msg, d) + oe.qa.handle_error("unknown-configure-option", error_msg, d) except subprocess.CalledProcessError: pass @@ -1263,11 +1228,9 @@ Rerun configure task after fixing this.""" if pconfig not in pkgconfigflags: pn = d.getVar('PN') error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig) - package_qa_handle_error("invalid-packageconfig", error_msg, d) + oe.qa.handle_error("invalid-packageconfig", error_msg, d) - qa_sane = d.getVar("QA_SANE") - if not qa_sane: - bb.fatal("Fatal QA errors found, failing task.") + oe.qa.exit_if_errors(d) } python do_qa_unpack() { @@ -1320,15 +1283,15 @@ python () { pn = d.getVar('PN') if pn in overrides: msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn) - package_qa_handle_error("pn-overrides", msg, d) + oe.qa.handle_error("pn-overrides", msg, d) prog = re.compile(r'[A-Z]') if prog.search(pn): - package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d) + oe.qa.handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d) # Some people mistakenly use DEPENDS:${PN} instead of DEPENDS and wonder # why it doesn't work. if (d.getVar(d.expand('DEPENDS:${PN}'))): - package_qa_handle_error("pkgvarcheck", "recipe uses DEPENDS:${PN}, should use DEPENDS", d) + oe.qa.handle_error("pkgvarcheck", "recipe uses DEPENDS:${PN}, should use DEPENDS", d) issues = [] if (d.getVar('PACKAGES') or "").split(): @@ -1345,7 +1308,7 @@ python () { else: 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) + oe.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']: @@ -1373,11 +1336,8 @@ python () { 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. " + oe.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.") + oe.qa.exit_if_errors(d) } diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass index 38e05153e3..8718ce7e16 100644 --- a/poky/meta/classes/kernel-fitimage.bbclass +++ b/poky/meta/classes/kernel-fitimage.bbclass @@ -73,7 +73,7 @@ FIT_SIGN_INDIVIDUAL ?= "0" # # $1 ... .its filename fitimage_emit_fit_header() { - cat << EOF >> ${1} + cat << EOF >> $1 /dts-v1/; / { @@ -94,24 +94,24 @@ EOF fitimage_emit_section_maint() { case $2 in imagestart) - cat << EOF >> ${1} + cat << EOF >> $1 images { EOF ;; confstart) - cat << EOF >> ${1} + cat << EOF >> $1 configurations { EOF ;; sectend) - cat << EOF >> ${1} + cat << EOF >> $1 }; EOF ;; fitend) - cat << EOF >> ${1} + cat << EOF >> $1 }; EOF ;; @@ -137,28 +137,28 @@ fitimage_emit_section_kernel() { awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'` fi - cat << EOF >> ${1} - kernel-${2} { + cat << EOF >> $1 + kernel-$2 { description = "Linux kernel"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "kernel"; arch = "${UBOOT_ARCH}"; os = "linux"; - compression = "${4}"; + compression = "$4"; load = <${UBOOT_LOADADDRESS}>; - entry = <${ENTRYPOINT}>; + entry = <$ENTRYPOINT>; hash-1 { - algo = "${kernel_csum}"; + algo = "$kernel_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${kernel_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + 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}"; + algo = "$kernel_csum,$kernel_sign_algo"; + key-name-hint = "$kernel_sign_keyname"; }; }; EOF @@ -186,26 +186,26 @@ fitimage_emit_section_dtb() { elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;" fi - cat << EOF >> ${1} - fdt-${2} { + cat << EOF >> $1 + fdt-$2 { description = "Flattened Device Tree blob"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "flat_dt"; arch = "${UBOOT_ARCH}"; compression = "none"; - ${dtb_loadline} + $dtb_loadline hash-1 { - algo = "${dtb_csum}"; + algo = "$dtb_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${dtb_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + 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}"; + algo = "$dtb_csum,$dtb_sign_algo"; + key-name-hint = "$dtb_sign_keyname"; }; }; EOF @@ -220,29 +220,29 @@ EOF # $3 ... Path to boot script image fitimage_emit_section_boot_script() { - bootscr_csum="${FIT_HASH_ALG}" + bootscr_csum="${FIT_HASH_ALG}" bootscr_sign_algo="${FIT_SIGN_ALG}" bootscr_sign_keyname="${UBOOT_SIGN_IMG_KEYNAME}" - cat << EOF >> ${1} - bootscr-${2} { + cat << EOF >> $1 + bootscr-$2 { description = "U-boot script"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "script"; arch = "${UBOOT_ARCH}"; compression = "none"; hash-1 { - algo = "${bootscr_csum}"; + 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} + 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}"; + algo = "$bootscr_csum,$bootscr_sign_algo"; + key-name-hint = "$bootscr_sign_keyname"; }; }; EOF @@ -259,10 +259,10 @@ fitimage_emit_section_setup() { setup_csum="${FIT_HASH_ALG}" - cat << EOF >> ${1} - setup-${2} { + cat << EOF >> $1 + setup-$2 { description = "Linux setup.bin"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "x86_setup"; arch = "${UBOOT_ARCH}"; os = "linux"; @@ -270,7 +270,7 @@ fitimage_emit_section_setup() { load = <0x00090000>; entry = <0x00090000>; hash-1 { - algo = "${setup_csum}"; + algo = "$setup_csum"; }; }; EOF @@ -297,28 +297,28 @@ fitimage_emit_section_ramdisk() { ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" fi - cat << EOF >> ${1} - ramdisk-${2} { + cat << EOF >> $1 + ramdisk-$2 { description = "${INITRAMFS_IMAGE}"; - data = /incbin/("${3}"); + data = /incbin/("$3"); type = "ramdisk"; arch = "${UBOOT_ARCH}"; os = "linux"; compression = "none"; - ${ramdisk_loadline} - ${ramdisk_entryline} + $ramdisk_loadline + $ramdisk_entryline hash-1 { - algo = "${ramdisk_csum}"; + algo = "$ramdisk_csum"; }; }; EOF - if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${ramdisk_sign_keyname}" ] ; then - sed -i '$ d' ${1} - cat << EOF >> ${1} + 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}"; + algo = "$ramdisk_csum,$ramdisk_sign_algo"; + key-name-hint = "$ramdisk_sign_keyname"; }; }; EOF @@ -343,13 +343,13 @@ 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}" + 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="" @@ -364,106 +364,106 @@ fitimage_emit_section_config() { # conf node name is selected based on dtb ID if it is present, # otherwise its selected based on kernel ID - if [ -n "${dtb_image}" ]; then - conf_node=$conf_node${dtb_image} + if [ -n "$dtb_image" ]; then + conf_node=$conf_node$dtb_image else - conf_node=$conf_node${kernel_id} + conf_node=$conf_node$kernel_id fi - if [ -n "${kernel_id}" ]; then + if [ -n "$kernel_id" ]; then conf_desc="Linux kernel" sep=", " - kernel_line="kernel = \"kernel-${kernel_id}\";" + kernel_line="kernel = \"kernel-$kernel_id\";" fi - if [ -n "${dtb_image}" ]; then - conf_desc="${conf_desc}${sep}FDT blob" + if [ -n "$dtb_image" ]; then + conf_desc="$conf_desc${sep}FDT blob" sep=", " - fdt_line="fdt = \"fdt-${dtb_image}\";" + fdt_line="fdt = \"fdt-$dtb_image\";" fi - if [ -n "${ramdisk_id}" ]; then - conf_desc="${conf_desc}${sep}ramdisk" + if [ -n "$ramdisk_id" ]; then + conf_desc="$conf_desc${sep}ramdisk" sep=", " - ramdisk_line="ramdisk = \"ramdisk-${ramdisk_id}\";" + ramdisk_line="ramdisk = \"ramdisk-$ramdisk_id\";" fi - if [ -n "${bootscr_id}" ]; then - conf_desc="${conf_desc}${sep}u-boot script" + if [ -n "$bootscr_id" ]; then + conf_desc="$conf_desc${sep}u-boot script" sep=", " - bootscr_line="bootscr = \"bootscr-${bootscr_id}\";" + bootscr_line="bootscr = \"bootscr-$bootscr_id\";" fi - if [ -n "${config_id}" ]; then - conf_desc="${conf_desc}${sep}setup" - setup_line="setup = \"setup-${config_id}\";" + if [ -n "$config_id" ]; then + conf_desc="$conf_desc${sep}setup" + setup_line="setup = \"setup-$config_id\";" fi - if [ "${default_flag}" = "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 "${dtb_image}" ]; then - default_line="default = \"conf-${dtb_image}\";" + if [ -n "$dtb_image" ]; then + default_line="default = \"conf-$dtb_image\";" else - default_line="default = \"conf-${kernel_id}\";" + default_line="default = \"conf-$kernel_id\";" fi fi - cat << EOF >> ${its_file} - ${default_line} + cat << EOF >> $its_file + $default_line $conf_node { - description = "${default_flag} ${conf_desc}"; - ${kernel_line} - ${fdt_line} - ${ramdisk_line} - ${bootscr_line} - ${setup_line} + description = "$default_flag $conf_desc"; + $kernel_line + $fdt_line + $ramdisk_line + $bootscr_line + $setup_line hash-1 { - algo = "${conf_csum}"; + algo = "$conf_csum"; }; EOF - if [ ! -z "${conf_sign_keyname}" ] ; then + if [ -n "$conf_sign_keyname" ] ; then sign_line="sign-images = " sep="" - if [ -n "${kernel_id}" ]; then - sign_line="${sign_line}${sep}\"kernel\"" + if [ -n "$kernel_id" ]; then + sign_line="$sign_line${sep}\"kernel\"" sep=", " fi - if [ -n "${dtb_image}" ]; then - sign_line="${sign_line}${sep}\"fdt\"" + if [ -n "$dtb_image" ]; then + sign_line="$sign_line${sep}\"fdt\"" sep=", " fi - if [ -n "${ramdisk_id}" ]; then - sign_line="${sign_line}${sep}\"ramdisk\"" + if [ -n "$ramdisk_id" ]; then + sign_line="$sign_line${sep}\"ramdisk\"" sep=", " fi - if [ -n "${bootscr_id}" ]; then - sign_line="${sign_line}${sep}\"bootscr\"" + if [ -n "$bootscr_id" ]; then + sign_line="$sign_line${sep}\"bootscr\"" sep=", " fi - if [ -n "${config_id}" ]; then - sign_line="${sign_line}${sep}\"setup\"" + if [ -n "$config_id" ]; then + sign_line="$sign_line${sep}\"setup\"" fi - sign_line="${sign_line};" + sign_line="$sign_line;" - cat << EOF >> ${its_file} + cat << EOF >> $its_file signature-1 { - algo = "${conf_csum},${conf_sign_algo}"; - key-name-hint = "${conf_sign_keyname}"; - ${sign_line} + algo = "$conf_csum,$conf_sign_algo"; + key-name-hint = "$conf_sign_keyname"; + $sign_line }; EOF fi - cat << EOF >> ${its_file} + cat << EOF >> $its_file }; EOF } @@ -478,39 +478,24 @@ fitimage_assemble() { kernelcount=1 dtbcount="" DTBS="" - ramdiskcount=${3} + ramdiskcount=$3 setupcount="" bootscr_id="" - rm -f ${1} arch/${ARCH}/boot/${2} + rm -f $1 arch/${ARCH}/boot/$2 - if [ ! -z "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then + if [ -n "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then bbfatal "Keys used to sign images and configuration nodes must be different." fi - fitimage_emit_fit_header ${1} + fitimage_emit_fit_header $1 # # Step 1: Prepare a kernel image section. # - fitimage_emit_section_maint ${1} imagestart + fitimage_emit_section_maint $1 imagestart uboot_prep_kimage - - 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 + fitimage_emit_section_kernel $1 $kernelcount linux.bin "$linux_comp" # # Step 2: Prepare a DTB image section @@ -519,9 +504,9 @@ fitimage_assemble() { if [ -n "${KERNEL_DEVICETREE}" ]; then dtbcount=1 for DTB in ${KERNEL_DEVICETREE}; do - if echo ${DTB} | grep -q '/dts/'; then - bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." - DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` + if echo $DTB | grep -q '/dts/'; then + bbwarn "$DTB contains the full path to the the dts file, but only the dtb name should be used." + DTB=`basename $DTB | sed 's,\.dts$,.dtb,g'` fi # Skip ${DTB} if it's also provided in ${EXTERNAL_KERNEL_DEVICETREE} @@ -529,23 +514,23 @@ fitimage_assemble() { continue fi - DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" - if [ ! -e "${DTB_PATH}" ]; then - DTB_PATH="arch/${ARCH}/boot/${DTB}" + DTB_PATH="arch/${ARCH}/boot/dts/$DTB" + if [ ! -e "$DTB_PATH" ]; then + DTB_PATH="arch/${ARCH}/boot/$DTB" fi - DTB=$(echo "${DTB}" | tr '/' '_') - DTBS="${DTBS} ${DTB}" - fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH} + DTB=$(echo "$DTB" | tr '/' '_') + DTBS="$DTBS $DTB" + fitimage_emit_section_dtb $1 $DTB $DTB_PATH done fi if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then dtbcount=1 for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do - DTB=$(echo "${DTB}" | tr '/' '_') - DTBS="${DTBS} ${DTB}" - fitimage_emit_section_dtb ${1} ${DTB} "${EXTERNAL_KERNEL_DEVICETREE}/${DTB}" + DTB=$(echo "$DTB" | tr '/' '_') + DTBS="$DTBS $DTB" + fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB" done fi @@ -557,7 +542,7 @@ fitimage_assemble() { 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} + fitimage_emit_section_boot_script $1 "$bootscr_id" ${UBOOT_ENV_BINARY} else bbwarn "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} not found." fi @@ -568,7 +553,7 @@ fitimage_assemble() { # if [ -e arch/${ARCH}/boot/setup.bin ]; then setupcount=1 - fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin + fitimage_emit_section_setup $1 $setupcount arch/${ARCH}/boot/setup.bin fi # @@ -577,27 +562,30 @@ fitimage_assemble() { 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.zst cpio.gz ext2.gz cpio; do - initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" - echo "Using $initramfs_path" - if [ -e "${initramfs_path}" ]; then - fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" + initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" + echo -n "Searching for $initramfs_path..." + if [ -e "$initramfs_path" ]; then + echo "found" + fitimage_emit_section_ramdisk $1 "$ramdiskcount" "$initramfs_path" break + else + echo "not found" fi done fi - fitimage_emit_section_maint ${1} sectend + fitimage_emit_section_maint $1 sectend # Force the first Kernel and DTB in the default config kernelcount=1 - if [ -n "${dtbcount}" ]; then + if [ -n "$dtbcount" ]; then dtbcount=1 fi # # Step 6: Prepare a configurations section # - fitimage_emit_section_maint ${1} confstart + 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 @@ -608,33 +596,33 @@ fitimage_assemble() { # 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 # the kernelcount. - if [ -n "${DTBS}" ]; then + if [ -n "$DTBS" ]; then i=1 for DTB in ${DTBS}; do dtb_ext=${DTB##*.} - if [ "${dtb_ext}" = "dtbo" ]; then - fitimage_emit_section_config ${1} "" "${DTB}" "" "${bootscr_id}" "" "`expr ${i} = ${dtbcount}`" + if [ "$dtb_ext" = "dtbo" ]; then + fitimage_emit_section_config $1 "" "$DTB" "" "$bootscr_id" "" "`expr $i = $dtbcount`" else - fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "`expr ${i} = ${dtbcount}`" + fitimage_emit_section_config $1 $kernelcount "$DTB" "$ramdiskcount" "$bootscr_id" "$setupcount" "`expr $i = $dtbcount`" fi - i=`expr ${i} + 1` + i=`expr $i + 1` done else defaultconfigcount=1 - fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "${defaultconfigcount}" + fitimage_emit_section_config $1 $kernelcount "" "$ramdiskcount" "$bootscr_id" "$setupcount" $defaultconfigcount fi - fitimage_emit_section_maint ${1} sectend + fitimage_emit_section_maint $1 sectend - fitimage_emit_section_maint ${1} fitend + fitimage_emit_section_maint $1 fitend # # Step 7: Assemble the image # ${UBOOT_MKIMAGE} \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ - -f ${1} \ - arch/${ARCH}/boot/${2} + -f $1 \ + arch/${ARCH}/boot/$2 # # Step 8: Sign the image and add public key to U-Boot dtb @@ -651,7 +639,7 @@ fitimage_assemble() { ${@'-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 } @@ -659,7 +647,7 @@ fitimage_assemble() { do_assemble_fitimage() { if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then cd ${B} - fitimage_assemble fit-image.its fitImage + fitimage_assemble fit-image.its fitImage "" fi } diff --git a/poky/meta/classes/kernel-yocto.bbclass b/poky/meta/classes/kernel-yocto.bbclass index 549dfd97a4..1d5a8cdf29 100644 --- a/poky/meta/classes/kernel-yocto.bbclass +++ b/poky/meta/classes/kernel-yocto.bbclass @@ -36,7 +36,10 @@ def find_patches(d,subdir): if subdir == patchdir: patch_list.append(local) else: - patch_list.append(local) + # skip the patch if a patchdir was supplied, it won't be handled + # properly + if not patchdir: + patch_list.append(local) return patch_list diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass index 4acec1877e..7b3c6bee96 100644 --- a/poky/meta/classes/kernel.bbclass +++ b/poky/meta/classes/kernel.bbclass @@ -226,8 +226,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" # Some Linux kernel configurations need additional parameters on the command line KERNEL_EXTRA_ARGS ?= "" -EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" -EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}"" +EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" +EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"" KERNEL_ALT_IMAGETYPE ??= "" @@ -322,9 +322,11 @@ python do_devshell:prepend () { addtask bundle_initramfs after do_install before do_deploy +KERNEL_DEBUG_TIMESTAMPS ??= "0" + kernel_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then + if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not # be set.... if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then @@ -364,7 +366,7 @@ kernel_do_compile() { do_compile_kernelmodules() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then + if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not # be set.... if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then diff --git a/poky/meta/classes/license.bbclass b/poky/meta/classes/license.bbclass index 45d912741d..d5480d87e2 100644 --- a/poky/meta/classes/license.bbclass +++ b/poky/meta/classes/license.bbclass @@ -29,6 +29,7 @@ python do_populate_lic() { with open(os.path.join(destdir, "recipeinfo"), "w") as f: for key in sorted(info.keys()): f.write("%s: %s\n" % (key, info[key])) + oe.qa.exit_if_errors(d) } PSEUDO_IGNORE_PATHS .= ",${@','.join(((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' + (d.getVar('LICENSE_PATH') or '') + ' ' + d.getVar('COREBASE') + '/meta/COPYING').split())}" @@ -145,6 +146,10 @@ def find_license_files(d): find_license(node.s.replace("+", "").replace("*", "")) self.generic_visit(node) + def visit_Constant(self, node): + find_license(node.value.replace("+", "").replace("*", "")) + self.generic_visit(node) + def find_license(license_type): try: bb.utils.mkdirhier(gen_lic_dest) @@ -178,7 +183,8 @@ def find_license_files(d): # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense # and should not be allowed, warn the user in this case. if d.getVarFlag('NO_GENERIC_LICENSE', license_type): - bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type)) + oe.qa.handle_error("license-no-generic", + "%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type), d) elif non_generic_lic and non_generic_lic in lic_chksums: # if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source @@ -190,7 +196,8 @@ def find_license_files(d): # Add explicity avoid of CLOSED license because this isn't generic if license_type != 'CLOSED': # And here is where we warn people that their licenses are lousy - bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type)) + oe.qa.handle_error("license-exists", + "%s: No generic license file exists for: %s in any provider" % (pn, license_type), d) pass if not generic_directory: @@ -215,7 +222,8 @@ def find_license_files(d): except oe.license.InvalidLicense as exc: bb.fatal('%s: %s' % (d.getVar('PF'), exc)) except SyntaxError: - bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF'))) + oe.qa.handle_error("license-syntax", + "%s: Failed to parse it's LICENSE field." % (d.getVar('PF')), d) # Add files from LIC_FILES_CHKSUM to list of license files lic_chksum_paths = defaultdict(OrderedDict) for path, data in sorted(lic_chksums.items()): @@ -406,14 +414,16 @@ def check_license_format(d): for pos, element in enumerate(elements): if license_pattern.match(element): if pos > 0 and license_pattern.match(elements[pos - 1]): - bb.warn('%s: LICENSE value "%s" has an invalid format - license names ' \ + oe.qa.handle_error('license-format', + '%s: LICENSE value "%s" has an invalid format - license names ' \ 'must be separated by the following characters to indicate ' \ 'the license selection: %s' % - (pn, licenses, license_operator_chars)) + (pn, licenses, license_operator_chars), d) elif not license_operator.match(element): - bb.warn('%s: LICENSE value "%s" has an invalid separator "%s" that is not ' \ + oe.qa.handle_error('license-format', + '%s: LICENSE value "%s" has an invalid separator "%s" that is not ' \ 'in the valid list of separators (%s)' % - (pn, licenses, element, license_operator_chars)) + (pn, licenses, element, license_operator_chars), d) SSTATETASKS += "do_populate_lic" do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass index 5490d121f1..bf70bee99b 100644 --- a/poky/meta/classes/license_image.bbclass +++ b/poky/meta/classes/license_image.bbclass @@ -75,7 +75,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): pkg_dic[pkg]["LICENSES"] = re.sub(r' *', ' ', pkg_dic[pkg]["LICENSES"]) pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split() if pkg in whitelist: - bb.warn("Including %s with an incompatible license %s into the image, because it has been whitelisted." %(pkg, pkg_dic[pkg]["LICENSE"])) + oe.qa.handle_error('license-incompatible', "Including %s with an incompatible license %s into the image, because it has been whitelisted." %(pkg, pkg_dic[pkg]["LICENSE"]), d) if not "IMAGE_MANIFEST" in pkg_dic[pkg]: # Rootfs manifest @@ -105,10 +105,10 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): continue if not os.path.exists(lic_file): - bb.warn("The license listed %s was not in the "\ - "licenses collected for recipe %s" - % (lic, pkg_dic[pkg]["PN"])) - + oe.qa.handle_error('license-file-missing', + "The license listed %s was not in the "\ + "licenses collected for recipe %s" + % (lic, pkg_dic[pkg]["PN"]), d) # Two options here: # - Just copy the manifest # - Copy the manifest and the license directories @@ -274,6 +274,7 @@ do_rootfs[recrdeptask] += "do_populate_lic" python do_populate_lic_deploy() { license_deployed_manifest(d) + oe.qa.exit_if_errors(d) } addtask populate_lic_deploy before do_build after do_image_complete diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass index e124d18144..da58cb4bec 100644 --- a/poky/meta/classes/meson.bbclass +++ b/poky/meta/classes/meson.bbclass @@ -103,6 +103,16 @@ meson_do_configure() { # https://github.com/mesonbuild/meson/commit/ef9aeb188ea2bc7353e59916c18901cde90fa2b3 unset LD + # sstate.bbclass no longer removes empty directories to avoid a race (see + # commit 4f94d929 "sstate/staging: Handle directory creation race issue"). + # Unfortunately Python apparently treats an empty egg-info directory as if + # the version it previously contained still exists and fails if a newer + # version is required, which Meson does. To avoid this, make sure there are + # no empty egg-info directories from previous versions left behind. Ignore + # all errors from rmdir since the egg-info may be a file rather than a + # directory. + rmdir ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/*.egg-info 2>/dev/null || : + # Work around "Meson fails if /tmp is mounted with noexec #2972" mkdir -p "${B}/meson-private/tmp" export TMPDIR="${B}/meson-private/tmp" diff --git a/poky/meta/classes/mirrors.bbclass b/poky/meta/classes/mirrors.bbclass index ba325a658b..1afce92147 100644 --- a/poky/meta/classes/mirrors.bbclass +++ b/poky/meta/classes/mirrors.bbclass @@ -29,7 +29,6 @@ ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n \ ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n \ ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \ ftp://ftp.gnutls.org/gcrypt/gnutls ${GNUPG_MIRROR}/gnutls \n \ -http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n \ http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n \ http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/ \n \ ${APACHE_MIRROR} http://www.us.apache.org/dist \n \ diff --git a/poky/meta/classes/multilib.bbclass b/poky/meta/classes/multilib.bbclass index b210c49c0c..73ad2ab7b3 100644 --- a/poky/meta/classes/multilib.bbclass +++ b/poky/meta/classes/multilib.bbclass @@ -210,7 +210,7 @@ python do_package_qa_multilib() { if len(candidates) > 0: msg = "%s package %s - suspicious values '%s' in %s" \ % (d.getVar('PN'), pkg, ' '.join(candidates), var) - package_qa_handle_error("multilib", msg, d) + oe.qa.handle_error("multilib", msg, d) ml = d.getVar('MLPREFIX') if not ml: @@ -228,4 +228,5 @@ python do_package_qa_multilib() { check_mlprefix(pkg, 'RSUGGESTS', ml) check_mlprefix(pkg, 'RREPLACES', ml) check_mlprefix(pkg, 'RCONFLICTS', ml) + oe.qa.exit_if_errors(d) } diff --git a/poky/meta/classes/nativesdk.bbclass b/poky/meta/classes/nativesdk.bbclass index c66de8c787..14e210562f 100644 --- a/poky/meta/classes/nativesdk.bbclass +++ b/poky/meta/classes/nativesdk.bbclass @@ -31,7 +31,7 @@ PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}" DEPENDS:append = " chrpath-replacement-native" EXTRANATIVEPATH += "chrpath-native" -PKGDATA_DIR = "${TMPDIR}/pkgdata/${SDK_SYS}" +PKGDATA_DIR = "${PKGDATA_DIR_SDK}" HOST_ARCH = "${SDK_ARCH}" HOST_VENDOR = "${SDK_VENDOR}" diff --git a/poky/meta/classes/npm.bbclass b/poky/meta/classes/npm.bbclass index 91a2321116..ba50fcac20 100644 --- a/poky/meta/classes/npm.bbclass +++ b/poky/meta/classes/npm.bbclass @@ -22,8 +22,12 @@ inherit python3native DEPENDS:prepend = "nodejs-native " RDEPENDS:${PN}:append:class-target = " nodejs" +EXTRA_OENPM = "" + NPM_INSTALL_DEV ?= "0" +NPM_NODEDIR ?= "${RECIPE_SYSROOT_NATIVE}${prefix_native}" + def npm_target_arch_map(target_arch): """Maps arch names to npm arch names""" import re @@ -57,8 +61,8 @@ def npm_pack(env, srcdir, workdir): """Run 'npm pack' on a specified directory""" import shlex cmd = "npm pack %s" % shlex.quote(srcdir) - configs = [("ignore-scripts", "true")] - tarball = env.run(cmd, configs=configs, workdir=workdir).strip("\n") + args = [("ignore-scripts", "true")] + tarball = env.run(cmd, args=args, workdir=workdir).strip("\n") return os.path.join(workdir, tarball) python npm_do_configure() { @@ -224,15 +228,11 @@ python npm_do_compile() { bb.utils.remove(d.getVar("NPM_BUILD"), recurse=True) - env = NpmEnvironment(d, configs=npm_global_configs(d)) - - dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) - with tempfile.TemporaryDirectory() as tmpdir: args = [] - configs = [] + configs = npm_global_configs(d) - if dev: + if bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False): configs.append(("also", "development")) else: configs.append(("only", "production")) @@ -247,20 +247,19 @@ python npm_do_compile() { # Add node-gyp configuration configs.append(("arch", d.getVar("NPM_ARCH"))) configs.append(("release", "true")) - nodedir = d.getVar("NPM_NODEDIR") - if not nodedir: - sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") - nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) - configs.append(("nodedir", nodedir)) + configs.append(("nodedir", d.getVar("NPM_NODEDIR"))) configs.append(("python", d.getVar("PYTHON"))) + env = NpmEnvironment(d, configs) + # Add node-pre-gyp configuration args.append(("target_arch", d.getVar("NPM_ARCH"))) args.append(("build-from-source", "true")) # Pack and install the main package tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) - env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs) + cmd = "npm install %s %s" % (shlex.quote(tarball), d.getVar("EXTRA_OENPM")) + env.run(cmd, args=args) } npm_do_install() { diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass index 985dfacd09..92eba98892 100644 --- a/poky/meta/classes/package.bbclass +++ b/poky/meta/classes/package.bbclass @@ -41,8 +41,6 @@ inherit packagedata inherit chrpath inherit package_pkgdata - -# Need the package_qa_handle_error() in insane.bbclass inherit insane PKGD = "${WORKDIR}/package" @@ -865,7 +863,7 @@ python fixup_perms () { self._setdir(lsplit[0], lsplit[1], lsplit[2], lsplit[3], lsplit[4], lsplit[5], lsplit[6], lsplit[7]) else: msg = "Fixup Perms: invalid config line %s" % line - package_qa_handle_error("perm-config", msg, d) + oe.qa.handle_error("perm-config", msg, d) self.path = None self.link = None @@ -1005,7 +1003,7 @@ python fixup_perms () { continue if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"): msg = "Fixup perms: %s invalid line: %s" % (conf, line) - package_qa_handle_error("perm-line", msg, d) + oe.qa.handle_error("perm-line", msg, d) continue entry = fs_perms_entry(d.expand(line)) if entry and entry.path: @@ -1042,7 +1040,7 @@ python fixup_perms () { ptarget = os.path.join(os.path.dirname(dir), link) if os.path.exists(target): msg = "Fixup Perms: Unable to correct directory link, target already exists: %s -> %s" % (dir, ptarget) - package_qa_handle_error("perm-link", msg, d) + oe.qa.handle_error("perm-link", msg, d) continue # Create path to move directory to, move it, and then setup the symlink @@ -1202,7 +1200,7 @@ python split_and_strip_files () { bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn)) else: msg = "File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn) - package_qa_handle_error("already-stripped", msg, d) + oe.qa.handle_error("already-stripped", msg, d) continue # At this point we have an unstripped elf file. We need to: @@ -1362,7 +1360,7 @@ python populate_packages () { for i, pkg in enumerate(packages): if pkg in package_dict: msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg - package_qa_handle_error("packages-list", msg, d) + oe.qa.handle_error("packages-list", msg, d) # Ensure the source package gets the chance to pick up the source files # before the debug package by ordering it first in PACKAGES. Whether it # actually picks up any source files is controlled by @@ -1399,7 +1397,7 @@ python populate_packages () { filesvar = d.getVar('FILES:%s' % pkg) or "" if "//" in filesvar: msg = "FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg - package_qa_handle_error("files-invalid", msg, d) + oe.qa.handle_error("files-invalid", msg, d) filesvar.replace("//", "/") origfiles = filesvar.split() @@ -1468,7 +1466,7 @@ python populate_packages () { licenses = d.getVar('LICENSE_EXCLUSION-' + pkg) if licenses: msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, licenses) - package_qa_handle_error("incompatible-license", msg, d) + oe.qa.handle_error("incompatible-license", msg, d) else: package_list.append(pkg) d.setVar('PACKAGES', ' '.join(package_list)) @@ -1492,7 +1490,7 @@ python populate_packages () { msg = msg + "\n " + f msg = msg + "\nPlease set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.\n" msg = msg + "%s: %d installed and not shipped files." % (pn, len(unshipped)) - package_qa_handle_error("installed-vs-shipped", msg, d) + oe.qa.handle_error("installed-vs-shipped", msg, d) } populate_packages[dirs] = "${D}" @@ -1838,7 +1836,7 @@ python package_do_shlibs() { ver = d.getVar('PKGV') if not ver: msg = "PKGV not defined" - package_qa_handle_error("pkgv-undefined", msg, d) + oe.qa.handle_error("pkgv-undefined", msg, d) return pkgdest = d.getVar('PKGDEST') @@ -2402,7 +2400,7 @@ python do_package () { if not workdir or not outdir or not dest or not dvar or not pn: msg = "WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package" - package_qa_handle_error("var-undefined", msg, d) + oe.qa.handle_error("var-undefined", msg, d) return bb.build.exec_func("package_convert_pr_autoinc", d) @@ -2455,9 +2453,7 @@ python do_package () { for f in (d.getVar('PACKAGEFUNCS') or '').split(): bb.build.exec_func(f, d) - qa_sane = d.getVar("QA_SANE") - if not qa_sane: - bb.fatal("Fatal QA errors found, failing task.") + oe.qa.exit_if_errors(d) } do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}" diff --git a/poky/meta/classes/package_deb.bbclass b/poky/meta/classes/package_deb.bbclass index 65dbe6c392..1ae6393d37 100644 --- a/poky/meta/classes/package_deb.bbclass +++ b/poky/meta/classes/package_deb.bbclass @@ -315,8 +315,7 @@ python do_package_write_deb () { do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}" do_package_write_deb[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}" -EPOCHTASK ??= "" -addtask package_write_deb after do_packagedata do_package ${EPOCHTASK} before do_build +addtask package_write_deb after do_packagedata do_package do_deploy_source_date_epoch before do_build PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" diff --git a/poky/meta/classes/package_ipk.bbclass b/poky/meta/classes/package_ipk.bbclass index 776fe8ed23..902b7f94c8 100644 --- a/poky/meta/classes/package_ipk.bbclass +++ b/poky/meta/classes/package_ipk.bbclass @@ -274,8 +274,7 @@ python do_package_write_ipk () { do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}" do_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}" -EPOCHTASK ??= "" -addtask package_write_ipk after do_packagedata do_package ${EPOCHTASK} before do_build +addtask package_write_ipk after do_packagedata do_package do_deploy_source_date_epoch before do_build PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass index 1c62d8283b..b0754421a3 100644 --- a/poky/meta/classes/package_rpm.bbclass +++ b/poky/meta/classes/package_rpm.bbclass @@ -684,8 +684,8 @@ python do_package_rpm () { cmd = cmd + " --define '_use_internal_dependency_generator 0'" cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'" cmd = cmd + " --define '_build_id_links none'" - cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS")) - cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS")) + cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS")) + cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS")) cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" cmd = cmd + " --define '_buildhost reproducible'" @@ -748,8 +748,7 @@ python do_package_write_rpm () { do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}" do_package_write_rpm[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}" -EPOCHTASK ??= "" -addtask package_write_rpm after do_packagedata do_package ${EPOCHTASK} before do_build +addtask package_write_rpm after do_packagedata do_package do_deploy_source_date_epoch before do_build PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot" diff --git a/poky/meta/classes/patch.bbclass b/poky/meta/classes/patch.bbclass index 388773a237..8de7025491 100644 --- a/poky/meta/classes/patch.bbclass +++ b/poky/meta/classes/patch.bbclass @@ -131,6 +131,9 @@ python patch_do_patch() { patchdir = parm["patchdir"] if not os.path.isabs(patchdir): patchdir = os.path.join(s, patchdir) + if not os.path.isdir(patchdir): + bb.fatal("Target directory '%s' not found, patchdir '%s' is incorrect in patch file '%s'" % + (patchdir, parm["patchdir"], parm['patchname'])) else: patchdir = s @@ -147,12 +150,12 @@ python patch_do_patch() { patchset.Import({"file":local, "strippath": parm['striplevel']}, True) except Exception as exc: bb.utils.remove(process_tmpdir, True) - bb.fatal(str(exc)) + bb.fatal("Importing patch '%s' with striplevel '%s'\n%s" % (parm['patchname'], parm['striplevel'], repr(exc).replace("\\n", "\n"))) try: resolver.Resolve() except bb.BBHandledException as e: bb.utils.remove(process_tmpdir, True) - bb.fatal(str(e)) + bb.fatal("Applying patch '%s' on target directory '%s'\n%s" % (parm['patchname'], patchdir, repr(e).replace("\\n", "\n"))) bb.utils.remove(process_tmpdir, True) del os.environ['TMPDIR'] diff --git a/poky/meta/classes/populate_sdk_base.bbclass b/poky/meta/classes/populate_sdk_base.bbclass index 49e166e697..fafdd96749 100644 --- a/poky/meta/classes/populate_sdk_base.bbclass +++ b/poky/meta/classes/populate_sdk_base.bbclass @@ -179,6 +179,10 @@ do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}" do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}" do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}" do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}" +python do_populate_sdk_setscene () { + sstate_setscene(d) +} +addtask do_populate_sdk_setscene PSEUDO_IGNORE_PATHS .= ",${SDKDEPLOYDIR},${WORKDIR}/oe-sdk-repo,${WORKDIR}/sstate-build-populate_sdk" diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass index 35679208bc..9187f53f13 100644 --- a/poky/meta/classes/populate_sdk_ext.bbclass +++ b/poky/meta/classes/populate_sdk_ext.bbclass @@ -550,7 +550,7 @@ python copy_buildsystem () { # We don't need sstate do_package files for root, dirs, files in os.walk(sstate_out): for name in files: - if name.endswith("_package.tgz"): + if name.endswith("_package.tar.zst"): f = os.path.join(root, name) os.remove(f) diff --git a/poky/meta/classes/ptest.bbclass b/poky/meta/classes/ptest.bbclass index 77614ae860..1ec23c0923 100644 --- a/poky/meta/classes/ptest.bbclass +++ b/poky/meta/classes/ptest.bbclass @@ -129,4 +129,4 @@ def package_qa_check_missing_ptest(pn, d, messages): enabled_ptests = " ".join([d.getVar('PTESTS_FAST'), d.getVar('PTESTS_SLOW'), d.getVar('PTESTS_PROBLEMS')]).split() if (pn + "-ptest").replace(d.getVar('MLPREFIX'), '') not in enabled_ptests: - package_qa_handle_error("missing-ptest", "supports ptests but is not included in oe-core's ptest-packagelists.inc", d) + oe.qa.handle_error("missing-ptest", "supports ptests but is not included in oe-core's ptest-packagelists.inc", d) diff --git a/poky/meta/classes/python3-dir.bbclass b/poky/meta/classes/python3-dir.bbclass index f51f971fc5..ff03e584d4 100644 --- a/poky/meta/classes/python3-dir.bbclass +++ b/poky/meta/classes/python3-dir.bbclass @@ -1,4 +1,4 @@ -PYTHON_BASEVERSION = "3.9" +PYTHON_BASEVERSION = "3.10" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/poky/meta/classes/reproducible_build.bbclass b/poky/meta/classes/reproducible_build.bbclass deleted file mode 100644 index 7571c116c8..0000000000 --- a/poky/meta/classes/reproducible_build.bbclass +++ /dev/null @@ -1,147 +0,0 @@ -# reproducible_build.bbclass -# -# Sets the default SOURCE_DATE_EPOCH in each component's build environment. -# The format is number of seconds since the system epoch. -# -# Upstream components (generally) respect this environment variable, -# using it in place of the "current" date and time. -# See https://reproducible-builds.org/specs/source-date-epoch/ -# -# The default value of SOURCE_DATE_EPOCH comes from the function -# get_source_date_epoch_value which reads from the SDE_FILE, or if the file -# is not available (or set to 0) will use the fallback of -# SOURCE_DATE_EPOCH_FALLBACK. -# -# The SDE_FILE is normally constructed from the function -# create_source_date_epoch_stamp which is typically added as a postfuncs to -# the do_unpack task. If a recipe does NOT have do_unpack, it should be added -# to a task that runs after the source is available and before the -# do_deploy_source_date_epoch task is executed. -# -# If a recipe wishes to override the default behavior it should set it's own -# SOURCE_DATE_EPOCH or override the do_deploy_source_date_epoch_stamp task -# with recipe-specific functionality to write the appropriate -# SOURCE_DATE_EPOCH into the SDE_FILE. -# -# SOURCE_DATE_EPOCH is intended to be a reproducible value. This value should -# be reproducible for anyone who builds the same revision from the same -# sources. -# -# There are 4 ways the create_source_date_epoch_stamp function determines what -# becomes SOURCE_DATE_EPOCH: -# -# 1. Use the value from __source_date_epoch.txt file if this file exists. -# This file was most likely created in the previous build by one of the -# following methods 2,3,4. -# Alternatively, it can be provided by a recipe via SRC_URI. -# -# If the file does not exist: -# -# 2. If there is a git checkout, use the last git commit timestamp. -# Git does not preserve file timestamps on checkout. -# -# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ... -# This works for well-kept repositories distributed via tarball. -# -# 4. Use the modification time of the youngest file in the source tree, if -# there is one. -# This will be the newest file from the distribution tarball, if any. -# -# 5. Fall back to a fixed timestamp (SOURCE_DATE_EPOCH_FALLBACK). -# -# Once the value is determined, it is stored in the recipe's SDE_FILE. - -BUILD_REPRODUCIBLE_BINARIES ??= '1' -inherit reproducible_build_simple - -SDE_DIR = "${WORKDIR}/source-date-epoch" -SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt" -SDE_DEPLOYDIR = "${WORKDIR}/deploy-source-date-epoch" - -# Enable compiler warning when the __TIME__, __DATE__ and __TIMESTAMP__ macros are used. -TARGET_CC_ARCH:append:class-target = " -Wdate-time" - -# A SOURCE_DATE_EPOCH of '0' might be misinterpreted as no SDE -export SOURCE_DATE_EPOCH_FALLBACK ??= "1302044400" - -SSTATETASKS += "do_deploy_source_date_epoch" - -do_deploy_source_date_epoch () { - mkdir -p ${SDE_DEPLOYDIR} - if [ -e ${SDE_FILE} ]; then - echo "Deploying SDE from ${SDE_FILE} -> ${SDE_DEPLOYDIR}." - cp -p ${SDE_FILE} ${SDE_DEPLOYDIR}/__source_date_epoch.txt - else - echo "${SDE_FILE} not found!" - fi -} - -python do_deploy_source_date_epoch_setscene () { - sstate_setscene(d) - bb.utils.mkdirhier(d.getVar('SDE_DIR')) - sde_file = os.path.join(d.getVar('SDE_DEPLOYDIR'), '__source_date_epoch.txt') - if os.path.exists(sde_file): - target = d.getVar('SDE_FILE') - bb.debug(1, "Moving setscene SDE file %s -> %s" % (sde_file, target)) - bb.utils.rename(sde_file, target) - else: - bb.debug(1, "%s not found!" % sde_file) -} - -do_deploy_source_date_epoch[dirs] = "${SDE_DEPLOYDIR}" -do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DEPLOYDIR}" -addtask do_deploy_source_date_epoch_setscene -addtask do_deploy_source_date_epoch before do_configure after do_patch - -python create_source_date_epoch_stamp() { - import oe.reproducible - - epochfile = d.getVar('SDE_FILE') - tmp_file = "%s.new" % epochfile - - source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S')) - - bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch) - bb.utils.mkdirhier(d.getVar('SDE_DIR')) - with open(tmp_file, 'w') as f: - f.write(str(source_date_epoch)) - - os.rename(tmp_file, epochfile) -} - -EPOCHTASK = "do_deploy_source_date_epoch" - -# Generate the stamp after do_unpack runs -do_unpack[postfuncs] += "create_source_date_epoch_stamp" - -def get_source_date_epoch_value(d): - epochfile = d.getVar('SDE_FILE') - cached, efile = d.getVar('__CACHED_SOURCE_DATE_EPOCH') or (None, None) - if cached and efile == epochfile: - return cached - - if cached and epochfile != efile: - bb.debug(1, "Epoch file changed from %s to %s" % (efile, epochfile)) - - source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) - try: - with open(epochfile, 'r') as f: - s = f.read() - try: - source_date_epoch = int(s) - # workaround for old sstate with SDE_FILE content being 0 - use SOURCE_DATE_EPOCH_FALLBACK - if source_date_epoch == 0 : - source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) - bb.warn("SOURCE_DATE_EPOCH value from sstate '%s' is deprecated/invalid. Reverting to SOURCE_DATE_EPOCH_FALLBACK '%s'" % (s, source_date_epoch)) - except ValueError: - bb.warn("SOURCE_DATE_EPOCH value '%s' is invalid. Reverting to SOURCE_DATE_EPOCH_FALLBACK" % s) - source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) - bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch) - except FileNotFoundError: - bb.debug(1, "Cannot find %s. SOURCE_DATE_EPOCH will default to %d" % (epochfile, source_date_epoch)) - - d.setVar('__CACHED_SOURCE_DATE_EPOCH', (str(source_date_epoch), epochfile)) - return str(source_date_epoch) - -export SOURCE_DATE_EPOCH ?= "${@get_source_date_epoch_value(d)}" -BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH" diff --git a/poky/meta/classes/reproducible_build_simple.bbclass b/poky/meta/classes/reproducible_build_simple.bbclass deleted file mode 100644 index 393372993d..0000000000 --- a/poky/meta/classes/reproducible_build_simple.bbclass +++ /dev/null @@ -1,9 +0,0 @@ -# Setup default environment for reproducible builds. - -BUILD_REPRODUCIBLE_BINARIES = "1" - -export PYTHONHASHSEED = "0" -export PERL_HASH_SEED = "0" -export SOURCE_DATE_EPOCH ??= "1520598896" - -REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896" diff --git a/poky/meta/classes/rust-common.bbclass b/poky/meta/classes/rust-common.bbclass index f7f9cbbb2e..98d65970e8 100644 --- a/poky/meta/classes/rust-common.bbclass +++ b/poky/meta/classes/rust-common.bbclass @@ -1,3 +1,5 @@ +inherit python3native + # Common variables used by all Rust builds export rustlibdir = "${libdir}/rust" FILES:${PN} += "${rustlibdir}/*.so" @@ -133,8 +135,12 @@ create_wrapper () { shift cat <<- EOF > "${file}" - #!/bin/sh - exec $@ "\$@" + #!/usr/bin/env python3 + import os, sys + orig_binary = "$@" + binary = orig_binary.split()[0] + args = orig_binary.split() + sys.argv[1:] + os.execvp(binary, args) EOF chmod +x "${file}" } @@ -169,11 +175,6 @@ do_rust_create_wrappers () { # Yocto Target / Rust Target archiver create_wrapper "${RUST_TARGET_AR}" "${WRAPPER_TARGET_AR}" - # Need to filter out LD_LIBRARY_PATH from the linker without using shell - mv ${RUST_BUILD_CCLD} ${RUST_BUILD_CCLD}.real - ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_BUILD_CCLD} - mv ${RUST_TARGET_CCLD} ${RUST_TARGET_CCLD}.real - ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_TARGET_CCLD} } addtask rust_create_wrappers before do_configure after do_patch do_prepare_recipe_sysroot diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass index 7f4b1f6804..6e4eb09f8e 100644 --- a/poky/meta/classes/sstate.bbclass +++ b/poky/meta/classes/sstate.bbclass @@ -1,4 +1,6 @@ -SSTATE_VERSION = "5" +SSTATE_VERSION = "7" + +SSTATE_ZSTD_CLEVEL ??= "8" SSTATE_MANIFESTS ?= "${TMPDIR}/sstate-control" SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-${PN}" @@ -6,12 +8,12 @@ SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-${PN}" def generate_sstatefn(spec, hash, taskname, siginfo, d): if taskname is None: return "" - extension = ".tgz" + extension = ".tar.zst" # 8 chars reserved for siginfo limit = 254 - 8 if siginfo: limit = 254 - extension = ".tgz.siginfo" + extension = ".tar.zst.siginfo" if not hash: hash = "INVALID" fn = spec + hash + "_" + taskname + extension @@ -37,7 +39,7 @@ SSTATE_PKGNAME = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PK SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}" SSTATE_EXTRAPATH = "" SSTATE_EXTRAPATHWILDCARD = "" -SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/*/${SSTATE_PKGSPEC}*_${SSTATE_PATH_CURRTASK}.tgz*" +SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/*/${SSTATE_PKGSPEC}*_${SSTATE_PATH_CURRTASK}.tar.zst*" # explicitly make PV to depend on evaluated value of PV variable PV[vardepvalue] = "${PV}" @@ -114,6 +116,9 @@ SSTATE_SIG_KEY ?= "" SSTATE_SIG_PASSPHRASE ?= "" # Whether to verify the GnUPG signatures when extracting sstate archives SSTATE_VERIFY_SIG ?= "0" +# List of signatures to consider valid. +SSTATE_VALID_SIGS ??= "" +SSTATE_VALID_SIGS[vardepvalue] = "" SSTATE_HASHEQUIV_METHOD ?= "oe.sstatesig.OEOuthashBasic" SSTATE_HASHEQUIV_METHOD[doc] = "The fully-qualified function used to calculate \ @@ -370,7 +375,7 @@ def sstate_installpkg(ss, d): bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg) return False signer = get_signer(d, 'local') - if not signer.verify(sstatepkg + '.sig'): + if not signer.verify(sstatepkg + '.sig', d.getVar("SSTATE_VALID_SIGS")): bb.warn("Cannot verify signature on sstate package %s, skipping acceleration..." % sstatepkg) return False @@ -825,30 +830,31 @@ sstate_task_postfunc[dirs] = "${WORKDIR}" sstate_create_package () { # Exit early if it already exists if [ -e ${SSTATE_PKG} ]; then - [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG} + touch ${SSTATE_PKG} 2>/dev/null || true return fi mkdir --mode=0775 -p `dirname ${SSTATE_PKG}` TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX` - # Use pigz if available - OPT="-czS" - if [ -x "$(command -v pigz)" ]; then - OPT="-I pigz -cS" + OPT="-cS" + ZSTD="zstd -${SSTATE_ZSTD_CLEVEL} -T${ZSTD_THREADS}" + # Use pzstd if available + if [ -x "$(command -v pzstd)" ]; then + ZSTD="pzstd -${SSTATE_ZSTD_CLEVEL} -p ${ZSTD_THREADS}" fi # Need to handle empty directories if [ "$(ls -A)" ]; then set +e - tar $OPT -f $TFILE * + tar -I "$ZSTD" $OPT -f $TFILE * ret=$? if [ $ret -ne 0 ] && [ $ret -ne 1 ]; then exit 1 fi set -e else - tar $OPT --file=$TFILE --files-from=/dev/null + tar -I "$ZSTD" $OPT --file=$TFILE --files-from=/dev/null fi chmod 0664 $TFILE # Skip if it was already created by some other process @@ -859,7 +865,7 @@ sstate_create_package () { else rm $TFILE fi - [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG} + touch ${SSTATE_PKG} 2>/dev/null || true } python sstate_sign_package () { @@ -887,7 +893,13 @@ python sstate_report_unihash() { # Will be run from within SSTATE_INSTDIR. # sstate_unpack_package () { - tar -xvzf ${SSTATE_PKG} + ZSTD="zstd -T${ZSTD_THREADS}" + # Use pzstd if available + if [ -x "$(command -v pzstd)" ]; then + ZSTD="pzstd -p ${ZSTD_THREADS}" + fi + + tar -I "$ZSTD" -xvf ${SSTATE_PKG} # update .siginfo atime on local/NFS mirror [ -O ${SSTATE_PKG}.siginfo ] && [ -w ${SSTATE_PKG}.siginfo ] && [ -h ${SSTATE_PKG}.siginfo ] && touch -a ${SSTATE_PKG}.siginfo # Use "! -w ||" to return true for read only files @@ -900,8 +912,6 @@ BB_HASHCHECK_FUNCTION = "sstate_checkhashes" def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): found = set() - foundLocal = set() - foundNet = set() missed = set() def gethash(task): @@ -932,14 +942,13 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) if os.path.exists(sstatefile): - bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) found.add(tid) - foundLocal.add(tid) - continue + bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) else: missed.add(tid) bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile) + foundLocal = len(found) mirrors = d.getVar("SSTATE_MIRRORS") if mirrors: # Copy the data object and override DL_DIR and SRC_URI @@ -980,13 +989,13 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, fetcher.checkstatus() bb.debug(2, "SState: Successful fetch test for %s" % srcuri) found.add(tid) - foundNet.add(tid) if tid in missed: missed.remove(tid) - except: + except bb.fetch2.FetchError as e: missed.add(tid) - bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) - pass + bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, e)) + except Exception as e: + bb.error("SState: cannot test %s: %s" % (srcuri, e)) if len(tasklist) >= min_tasks: bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d) @@ -1041,7 +1050,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, match = 0 if total: match = len(found) / total * 100 - bb.plain("Sstate summary: Wanted %d Local %d Network %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(foundLocal), len(foundNet),len(missed), currentcount, match, complete)) + bb.plain("Sstate summary: Wanted %d Local %d Mirrors %d Missed %d Current %d (%d%% match, %d%% complete)" % + (total, foundLocal, len(found)-foundLocal, len(missed), currentcount, match, complete)) if hasattr(bb.parse.siggen, "checkhashes"): bb.parse.siggen.checkhashes(sq_data, missed, found, d) diff --git a/poky/meta/classes/staging.bbclass b/poky/meta/classes/staging.bbclass index 65a6cd5120..25f77c7735 100644 --- a/poky/meta/classes/staging.bbclass +++ b/poky/meta/classes/staging.bbclass @@ -620,7 +620,7 @@ python staging_taskhandler() { for task in bbtasks: deps = d.getVarFlag(task, "depends") if task == "do_configure" or (deps and "populate_sysroot" in deps): - d.appendVarFlag(task, "prefuncs", " extend_recipe_sysroot") + d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ") } staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess" addhandler staging_taskhandler diff --git a/poky/meta/classes/testimage.bbclass b/poky/meta/classes/testimage.bbclass index a76e773853..9980b3f626 100644 --- a/poky/meta/classes/testimage.bbclass +++ b/poky/meta/classes/testimage.bbclass @@ -235,9 +235,10 @@ def testimage_main(d): tdname = "%s.testdata.json" % image_name try: - td = json.load(open(tdname, "r")) - except (FileNotFoundError) as err: - bb.fatal('File %s Not Found. Have you built the image with INHERIT+="testimage" in the conf/local.conf?' % tdname) + with open(tdname, "r") as f: + td = json.load(f) + except FileNotFoundError as err: + bb.fatal('File %s not found (%s).\nHave you built the image with INHERIT += "testimage" in the conf/local.conf?' % (tdname, err)) # Some variables need to be updates (mostly paths) with the # ones of the current environment because some tests require them. @@ -316,10 +317,6 @@ def testimage_main(d): if d.getVar("TESTIMAGE_BOOT_PATTERNS"): target_kwargs['boot_patterns'] = get_testimage_boot_patterns(d) - # TODO: Currently BBPATH is needed for custom loading of targets. - # It would be better to find these modules using instrospection. - target_kwargs['target_modules_path'] = d.getVar('BBPATH') - # hardware controlled targets might need further access target_kwargs['powercontrol_cmd'] = d.getVar("TEST_POWERCONTROL_CMD") or None target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" diff --git a/poky/meta/classes/uboot-config.bbclass b/poky/meta/classes/uboot-config.bbclass index 07a303d0a0..b9ad35821a 100644 --- a/poky/meta/classes/uboot-config.bbclass +++ b/poky/meta/classes/uboot-config.bbclass @@ -53,6 +53,8 @@ SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}" # include it in the SRC_URI and set the UBOOT_ENV parameter. UBOOT_ENV_SUFFIX ?= "txt" UBOOT_ENV ?= "" +UBOOT_ENV_SRC_SUFFIX ?= "cmd" +UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}" UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" diff --git a/poky/meta/classes/uboot-sign.bbclass b/poky/meta/classes/uboot-sign.bbclass index fdf153248c..bae8cada0a 100644 --- a/poky/meta/classes/uboot-sign.bbclass +++ b/poky/meta/classes/uboot-sign.bbclass @@ -162,8 +162,8 @@ concat_dtb() { mkdir -p ${DEPLOYDIR} if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do - CONFIG_B_PATH="${config}" - cd ${B}/${config} + CONFIG_B_PATH="$config" + cd ${B}/$config concat_dtb_helper done else @@ -179,8 +179,8 @@ concat_spl_dtb() { mkdir -p ${DEPLOYDIR} if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do - CONFIG_B_PATH="${config}" - cd ${B}/${config} + CONFIG_B_PATH="$config" + cd ${B}/$config concat_spl_dtb_helper done else @@ -231,7 +231,7 @@ do_install:append() { if [ "${PN}" = "${UBOOT_PN}" ]; then if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do - cd ${B}/${config} + cd ${B}/$config if [ "${UBOOT_SIGN_ENABLE}" = "1" -o "${UBOOT_FITIMAGE_ENABLE}" = "1" ] && \ [ -n "${UBOOT_DTB_BINARY}" ]; then install_helper @@ -286,19 +286,19 @@ addtask uboot_generate_rsa_keys before do_uboot_assemble_fitimage after do_compi # Create a ITS file for the U-boot FIT, for use when # we want to sign it so that the SPL can verify it uboot_fitimage_assemble() { - uboot_its="${1}" - uboot_nodtb_bin="${2}" - uboot_dtb="${3}" - uboot_bin="${4}" - spl_dtb="${5}" + uboot_its="$1" + uboot_nodtb_bin="$2" + uboot_dtb="$3" + uboot_bin="$4" + spl_dtb="$5" uboot_csum="${UBOOT_FIT_HASH_ALG}" uboot_sign_algo="${UBOOT_FIT_SIGN_ALG}" uboot_sign_keyname="${SPL_SIGN_KEYNAME}" - rm -f ${uboot_its} ${uboot_bin} + rm -f $uboot_its $uboot_bin # First we create the ITS script - cat << EOF >> ${uboot_its} + cat << EOF >> $uboot_its /dts-v1/; / { @@ -308,7 +308,7 @@ uboot_fitimage_assemble() { images { uboot { description = "U-Boot image"; - data = /incbin/("${uboot_nodtb_bin}"); + data = /incbin/("$uboot_nodtb_bin"); type = "standalone"; os = "u-boot"; arch = "${UBOOT_ARCH}"; @@ -318,34 +318,34 @@ uboot_fitimage_assemble() { EOF if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then - cat << EOF >> ${uboot_its} + cat << EOF >> $uboot_its signature { - algo = "${uboot_csum},${uboot_sign_algo}"; - key-name-hint = "${uboot_sign_keyname}"; + algo = "$uboot_csum,$uboot_sign_algo"; + key-name-hint = "$uboot_sign_keyname"; }; EOF fi - cat << EOF >> ${uboot_its} + cat << EOF >> $uboot_its }; fdt { description = "U-Boot FDT"; - data = /incbin/("${uboot_dtb}"); + data = /incbin/("$uboot_dtb"); type = "flat_dt"; arch = "${UBOOT_ARCH}"; compression = "none"; EOF if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then - cat << EOF >> ${uboot_its} + cat << EOF >> $uboot_its signature { - algo = "${uboot_csum},${uboot_sign_algo}"; - key-name-hint = "${uboot_sign_keyname}"; + algo = "$uboot_csum,$uboot_sign_algo"; + key-name-hint = "$uboot_sign_keyname"; }; EOF fi - cat << EOF >> ${uboot_its} + cat << EOF >> $uboot_its }; }; @@ -365,8 +365,8 @@ EOF # ${UBOOT_MKIMAGE} \ ${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \ - -f ${uboot_its} \ - ${uboot_bin} + -f $uboot_its \ + $uboot_bin if [ "${SPL_SIGN_ENABLE}" = "1" ] ; then # @@ -375,8 +375,8 @@ EOF ${UBOOT_MKIMAGE_SIGN} \ ${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \ -F -k "${SPL_SIGN_KEYDIR}" \ - -K "${spl_dtb}" \ - -r ${uboot_bin} \ + -K "$spl_dtb" \ + -r $uboot_bin \ ${SPL_MKIMAGE_SIGN_ARGS} fi @@ -408,8 +408,8 @@ do_uboot_assemble_fitimage() { kernel_uboot_fitimage_name=`basename ${STAGING_DATADIR}/u-boot-fitImage-*` kernel_uboot_its_name=`basename ${STAGING_DATADIR}/u-boot-its-*` cd ${B} - uboot_fitimage_assemble ${kernel_uboot_its_name} ${UBOOT_NODTB_BINARY} \ - ${UBOOT_DTB_BINARY} ${kernel_uboot_fitimage_name} \ + uboot_fitimage_assemble $kernel_uboot_its_name ${UBOOT_NODTB_BINARY} \ + ${UBOOT_DTB_BINARY} $kernel_uboot_fitimage_name \ ${SPL_DTB_BINARY} fi } |