summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2020-06-17sign_rpm.bbclass: ignore thread countDan McGregor
From: Daniel McGregor <daniel.mcgregor@vecima.com> Similar to sign_ipk, ignore the number of threads used for signing RPMs. Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-15relocatable.bbclass: Avoid an exception if an empty pkgconfig dir existPeter Kjellerstedt
Rewrite relocatable_native_pcfiles() so that it can handle that any of the checked pkgconfig directories are empty without causing an exception. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-12insane: Check for feature check variables not being usedJacob Kroon
Add a package QA check for wether any of the variables used by features_check.bbclass is set while not inheriting the class itself. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-12features_check: Warn if not usedJacob Kroon
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-05archiver: Capture git submodules in mirror archiverPaul Barker
Using the new Fetch.expanded_urldata() function we can get URL data for all git submodules. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04features_check: Factorize code for checking featuresJacob Kroon
The DISTRO/MACHINE/COMBINED features should be treated identically, so convert the expanded code to a loop. This fixes some of the COMBINED error messages which were previously referring to MACHINE features. There should be no functional changes. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04classes/buildhistory: capture package configJan Luebbe
As the PACKAGECONFIG variable has a large influence on the resulting package sizes and dependencies, it's useful to capture it in the recipe-level buildhistory. This makes it straightforward to analyze the impact of PACKAGECONFIG changes on the resulting image size. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04buildstats.bbclass: Do not recalculate build start timeJunling Zheng
The build start time is recorded in __timedata_build, which we should use rather than recalculating it. Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04buildstats.bbclass: Remove useless variablesJunling Zheng
Remove useless variables bn and bsdir in write_task_data(). Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04cve-check: include epoch in product version outputRalph Siemsen
In the generated cve.log files, include the epoch in the product version. This better matches how versions are displayed elsewhere, in particular the bb.warn("Found unpatched CVE...") that appears on the terminal when CVEs are found. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-30sstate.bbclass: When siginfo or sig files are missing, stop fetcher errorsMark Hatle
Prior to fetching, the system checks if the sstate file is present either locally or on the mirror. If it is, then it goes to the fetch stage. Up to three files can be fetched, sstate, sstate.siginfo and sstate.sig (if signature validation is enabled). The previous pstaging_fetch function would iterate over these, and if a download error occurred would spew forth a great amount of fetcher failure messages as well as stop fetching the next item in the set. This was resolved by adding a fetcher.checkstatus() call prior to the download. If the file isn't present, then the exception will be triggered, and no fetcher failure messages will reach the user. The exception handler is then modified to be a pass so that it will loop and pull the rest of the files that that are requested. Additionally, a check for the existance of the .sig file was added to the sstate_installpkg to avoid an error trying to load the .sig if it wasn't downloaded. Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-27multilib/recipes: Use new RecipePostKeyExpansion eventRichard Purdie
There are issues with multilib due to the ordering of events where some functions see the remapped multilib dependencies and some do not. A significant problem is that the multilib class needs to make some changes before key expansion and some afterwards but by using existing event handlers, some code sees things in a partially translated state, leading to bugs. This patch changes things to use a new event handler from bitbake which makes the ordering of the changes explcit. The challenge in doing this is that it breaks some existing anonymous python and dyanmic assignments. In some cases these used to be translated and no longer are, meaning MLPREFIX has to be added. In some cases these are now translated and the MLPREFIX can be removed. This change does now make it very clear when MLPREFIX is required and when it is not, its just the migration path which is harder. The patch changes the small number of cases where fixes are needed. In particular, where a variable like RDEPENDS is conditionally extended (e.g. with an override), MLPREFIX is now required. This patch also reverts: base: Revert 'base.bbclass: considering multilib when setting LICENSE_EXCLUSION' This reverts 6597130256a1609c3e05ec5891aceaf549c37985 as the changes to multilib datastore handling mean its no longer necessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-26go.bbclass: Add `-trimpath` to default build flagsOtavio Salvador
The `-trimpath` option is important for reproducible builds so full build paths and module paths are not embedded. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-26go-mod.bbclass: Add class for `go mod` supportOtavio Salvador
When using Go Modules, the the current working directory MUST be at or below the location of the 'go.mod' file when the go tool is used, and there is no way to tell it to look elsewhere. It will automatically look upwards for the file, but not downwards. To support this use case, we provide the `GO_WORKDIR` variable, which defaults to `GO_IMPORT` but allows for easy override. [YOCTO #13883] Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package_rpm.bbclass: add PACKAGE_ADD_METADATA_RPM to sstate variablesMichael Ho
Refactor the addition of vardeps for this package class to use RPMEXTRAVARS and pass the items through gen_packagevar so package name specific overrides are accounted for. This matches the style used in package_ipk.bbclass. Since do_package_write_rpm does not have any "extra vars" that affect the rpm packaging yet, this commit has to add the variable. This refactoring is needed to add PACKAGE_ADD_METADATA_RPM to RPMEXTRAVARS so it affects the sstate hash of do_package_write_rpm. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package_deb.bbclass: add PACKAGE_ADD_METADATA_DEB to sstate variablesMichael Ho
Refactor the addition of vardeps for this package class to use DEBEXTRAVARS and pass the items through gen_packagevar so package name specific overrides are accounted for. This matches the style used in package_ipk.bbclass. Additionally add PACKAGE_ADD_METADATA_DEB to the DEBEXTRAVARS list so the packaging is redone if the variable changes value. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package_ipk.bbclass: add PACKAGE_ADD_METADATA_IPK to sstate variablesMichael Ho
Add PACKAGE_ADD_METADATA_IPK to IPKEXTRAVARS so it affects the sstate hash of do_package_write_ipk. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package.bbclass: add PACKAGE_ADD_METADATA to sstate variablesMichael Ho
The PACKAGE_ADD_METADATA can be used to define additional metadata for packages. Changes to this variable should affect the packaging sstate hash so packages are re-generated when this variable changes. This variable is added to both PKGDATA_VARS and PACKAGEVARS. It is needed in PACKAGEVARS to ensure changes invoke do_package to re-run. It is needed in PKGDATA_VARS to ensure changes are written into the pkgdata so that the hash equiv reports a change and does not skip over the package_write tasks. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package_rpm.bbclass: respect package overrides for the main packageMichael Ho
Apply ${PN} to OVERRIDES when determining the base package spec variables. Without this, there is a mismatch in behaviour where overrides for the base package have no effect while overrides for subpackages do. The subpackages should not be affected by this override as they apply their own package overrides and will by default fetch the base variables and apply them in the spec file. This makes the behaviour for package overrides match the implementation in package_deb.bbclass and package_ipk.bbclass. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-24archiver.bbclass: Fix duplicated SRC_URIs for do_ar_originalRobert Yang
The argument urls of bb.fetch2.Fetch(urls, d) are duplicated to SRC_URI, which caused errors like: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV_FORMAT variable must be set when multiple SCMs are used. The SCMs are: git://github.com/docker/notary.git;destsuffix=git/src/github.com/docker/notary git://github.com/docker/notary.git The first one is from original SRC_URI, the second one is from the variable 'urls', so cleanup SRC_URI before call bb.fetch2.Fetch() can fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-24sanity.bbclass: Detect and fail if 'inherit' is used in conf fileGregor Zatko
'inherit' directive may not be used in conf files as it's supposed to be used for the inheritance of classes. Correct form in conf file is INHERIT. This commit adds: - a sanity check to find whether the wrong case exists - fail the build if so - tell user about the difference in directives [YOCTO #5426] Signed-off-by: Gregor Zatko <gzatko@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-24cve-check: Run it after do_fetchKhem Raj
Certain recipes e.g. bash readline ( from meta-gplv2 ) download patches instead of having them in metadata, this could fail cve_check ERROR: readline-5.2-r9 do_cve_check: File Not found: qemuarm/build/../downloads/readline52-001 This patch ensures that download is done before running CVE scan, even though these will be external patches and may not contain CVE tags as it expects, but it will fix the run failures as seen above Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-22linux-modules.tgz: fix file permissions to rootLi Wang
the files of linux-modules should be same permissions with rootfs.tar.bz2, because it is a part of rootfs when used to install. Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-21base/insane: Check pkgs lics are subset of recipe lics only onceQuentin Schulz
Move logic checking that all packages licenses are only a subset of recipe licenses from base.bbclass to the insane.bbclass so that it's evaluated only once, during do_package_qa. As explained in the linked bugzilla entry, if a package license is not part of the recipe license, the warning message gets shown an unreasonable amount of time because it's evaluated every time a recipe is parsed. [YOCTO #10130] This also makes it possible to silence this error with INSANE_SKIP. Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-19classes/image_types_wic: Reorder do_flush_pseudodbRicardo Ribalda
When IMAGE_FSTYPES contains more types than wic, it can happen than the pseudo database is not flushed properly. This can be solved by changing the order of when do_flush_pseudodb is launched. Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13898 Fixes: dde90a5dd2b2 ("wic: Fix multi images .wks with bitbake") Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-18archiver.bbclass: Make do_deploy_archives a recursive dependencyPaul Barker
To ensure that archives are captured for all dependencies of a typical bitbake build we add do_deploy_archives to the list of recursive dependencies of do_build. Without this, archives may be missed for recipes such as gcc-source which do not create packages or populate a sysroot. do_deploy_archives is also added to the recursive dependencies of do_populate_sdk so that all sources required for an SDK can be captured. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-18image_types: declare support for wic.zstDiego
Declare images in wic.zst format as supported, as bmaptool now supports zstd: https://github.com/intel/bmap-tools/commit/1b8437d58447d3796dc11fd0f2c62bec5746e5d6 Given the very fast decompression speed of zstd over, for example, gzip, writing images with bmaptool can provide big write speed improvements when decompression speed is the limiting factor (especially with very sparse images). Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-15kernel/reproducibility: kernel modules need SOURCE_DATE_EPOCH exportBruce Ashfield
If CONFIG_IKHEADERS is set to =m, then reproducibility issues creep into the modules build, since the variables we are setting for the main kernel build are not present. Since the source code must be available for a possibly git query on the timestamp, there didn't seem to be an easy way to move the environment variable setting to a common routine. As such, we duplicate the block of code that exports the required variables for reproducible builds. There is a maintenance risk to this, but any issues should be easy enough to catch. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-14classes/kernel: Generate reproducible kernel module tarballJoshua Watt
If reproducible binaries are requested, generate the kernel modules tarball in a reproducible way. Namely, sort the tarball contents, clamp the mtime to the source date epoch, compress the archive with a consistent compression level (9), and don't include the name and timestamp in the compressed file. [YOCTO #12719] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-14populate_sdk_base.bbclass: fix warning: name not matchedwenlin.kang@windriver.com
When do populate_sdk with SDK_ARCHIVE_TYPE = "zip", have below warning in log file, this patch fixes it. zip warning: name not matched: sysroots/core2-64-poky-linux/etc/tmpfiles.d/etc.conf zip warning: name not matched: sysroots/core2-64-poky-linux/etc/tmpfiles.d/home.conf zip warning: name not matched: sysroots/core2-64-poky-linux/etc/resolv-conf.systemd zip warning: name not matched: sysroots/core2-64-poky-linux/etc/mtab zip warning: name not matched: sysroots/core2-64-poky-linux/etc/resolv.conf zip warning: name not matched: sysroots/core2-64-poky-linux/var/lock zip warning: name not matched: sysroots/core2-64-poky-linux/usr/lib/environment.d/99-environment.conf zip warning: name not matched: sysroots/core2-64-poky-linux/sbin/klogd zip warning: name not matched: sysroots/core2-64-poky-linux/sbin/syslogd zip warning: name not matched: sysroots/x86_64-pokysdk-linux/usr/bin/chfn zip warning: name not matched: sysroots/x86_64-pokysdk-linux/usr/bin/chsh zip warning: name not matched: sysroots/x86_64-pokysdk-linux/usr/bin/passwd zip warning: name not matched: sysroots/x86_64-pokysdk-linux/usr/bin/chpasswd zip warning: name not matched: sysroots/x86_64-pokysdk-linux/sbin/vipw zip warning: name not matched: sysroots/x86_64-pokysdk-linux/sbin/vigr zip warning: name not matched: sysroots/x86_64-pokysdk-linux/sbin/nologin Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12meson.bbclass: Close the log file after readingAnton Eliasson
This fixes warnings like: WARNING: package-name-0.0.1-r0 do_configure: <string>:164: ResourceWarning: unclosed file <_io.TextIOWrapper name='/source_directory/build/tmp/work/arch/package-name/0.0.1-r0/package-name-0.0.1//meson-logs/meson-log.txt' mode='r' encoding='UTF-8'> Signed-off-by: Anton Eliasson <anton.eliasson@axis.com> Reviewed-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Anton Eliasson <anton.eliasson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12pypi.bbclass: use new pypi UPSTREAM_CHECK_URITim Orling
Upstream https://pypi.python.org/pypi/${PYPI_PACKAGE}/ redirects to https://pypi.org/project/${PYPI_PACKAGE}/ Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-12pypi.bbclass: mind package suffix on version checkKonrad Weihmann
Some pypi packages do have suffixes like dev, or a0 or b1. When doing a version check on these, the version will get falsely identified as major release versions. Add a terminating slash to rule out those false positives Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-09sstate.bbclass: Do not fail if files cannot be touchedPeter Kjellerstedt
It may be that a file is not allowed to be touched, e.g., if it is a symbolic link into a global sstate cache served over NFS. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-07insane: Promote warnings into errorsRichard Purdie
There are several warnings the build can emit which show real problems in the way recipes are being built. Some distros like poky and the Yocto Project autobuilder have been fixing the issues these show for some time. OE-Core has therefore been clean of these errors and warnings for some time. Promote warnings into errors to match the defaults in poky to encourage people to fix these real issue and reduce confusion when people switch distros or customise. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-05utils: Drop is_machine_specific()/machine_paths()Richard Purdie
There appear to be no users of these in OE-Core and their functionality is questionable at best too. Probably safest to remove them entirely at this point. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-05utils: Drop FILESPATHPKG usageRichard Purdie
Nothing in OE-Core uses this and its been deprecated for some time. Remove the last reference to it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-02abi_version/staging: Bump versions to force rebuild after sstate corruptionRichard Purdie
A "broken" buildtools-extended-tarball has been released into the wild where it is optimising binaries for the host processsor. This is fine in local usage but in a non-homogeneous cluster like our autobuilder, this results in SIGILL on other machines when the sstate is shared amongst them and is painful to debug. The buildtools tarball has been fixed but we need to invalidate the hash equivalence and sstate data. This change does that. Adding to OE-Core rather than autobuilder local changes as its good to illustrate how to do this and the issue is potentially wider than just Yocto Project infrastructure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-02sanity: Require gcc 6 or laterRichard Purdie
New versions of rpm have issues with the libgomp support in gcc 5.x so raise the minimum to 6 or later. This mainly affects Ubuntu 16.04. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-29image/packagegroup: Remove PACKAGE_GROUP_*, long since deprecatedRichard Purdie
This was deprecated in 2014 so we can safely remove the old code now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-29populate_sdk_base: create_sdk_files: Use _nativesdk variants for libdir and ↵Ovidiu Panait
base_libdir Use the _nativesdk variants for libdir and base_libdir to fix the resulting ld.so.conf paths in the SDK for systems with libdir=/lib64. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-29populate_sdk_base: Add ld.so.conf for nativesdk-binutilsOvidiu Panait
Extend the functionality provided by commit [1] to the SDK as well. This way we can make sure that nativesdk-binutils finds SDK libraries first rather than host ones. This is useful for example when trying to build the linux kernel using nativesdk-gcc. This scenario currently fails because it tries to link to host libraries rather than SDK host ones: make x86_64_defconfig make bzImage ... error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel Makefile:1101: recipe for target 'prepare-objtool' failed make: *** [prepare-objtool] Error 1 .... /../../../../x86_64-wrlinuxsdk-linux/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_vfork@GLIBC_PRIVATE' ... [1] 15049c610b [buildtools-tarball: Add an ld.so.conf for nativesdk-binutils] Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26wic: Fix multi images .wks with bitbakeRicardo Ribalda Delgado
In order to support .wks files with multiple images inside bitbake we need to explicitly set the pseudo database in use. Eg: If we try this .mks: part / --source rootfs --ondisk sda --fstype=ext4 part /export --source rootfs --rootfs=core-image-minimal-mtdutils --fstype=ext4 The username for all the files under /export will be set to the runner of bitbake (usually UID 1000). Before we run wic, we need to make sure that the pseudo database will be flushed, and contains all the data needed. Cc: Paul Barker <pbarker@konsulko.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26staging: Fix overlapping file failuresRichard Purdie
If there are different providers of a file and they are swiched when the recipe isn't machine specific, we can get tracebacks due to the overlapping files. The issue is that the previous provider isn't uninstalled since the system can't tell whether some later task needs them. By tracking which tasks we depend upon, the code can now choose to uninstall more things since a later task can reinstall if/as needed. The code here was to protect against code with two different tasks running in parallel which is still protected agaisnt. [YOCTO #13702] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26package: get_package_mapping: avoid dependency mapping if renamed package ↵Yann Dirson
provides original name Packages with a runtime dependency on a target package whose name is changed by the PKG_* mechanism must rebuild when that mapping changes, but we have no way of tracking this today, so eg. packagegroup-machine-base ends up with a relationship on a versioned kernel-image, and does not get rebuilt when that version changes, leading to unsatisfiable dependency and reproducibility issue. OTOH there is no reason for the dependency to get rewritten if the renamed package already has a RPROVIDES on the non-rewritten package name, and if the dependency relationship is an unversionned one. This is what this patch prevents. Note that this may not cover all cases of rewritten package names. Notably I had to let the rewrite be done in the case of versionned dependencies, as package managers usually can follow "Provides" in such case; this includes many dependencies against shared-lib packages renamed to their soname, and those at least are OK, since the dependent recipe should explicitly depend on the target recipe. Signed-off-by: Yann Dirson <yann@blade-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-26package.bbclass: inject "minidebuginfo" into packaged binariesDan Callaghan
"Mini debuginfo" is a special section in ELF executables containing minimal compressed debuginfo for non-exported symbols: https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html It lets debugging tools produce better stack traces, including local function names, without incurring the space overhead of full debuginfo. The feature was originally developed for Fedora: https://fedoraproject.org/wiki/Features/MiniDebugInfo but nowadays it is widely supported in the ecosystem, including in gdb and elfutils (and therefore also in tools which use elfutils, such as systemd-coredump). This patch adds an optional extra step in package.bbclass to inject minidebuginfo while stripping and splitting out debuginfo. It can be enabled by setting PACKAGE_MINIDEBUGINFO=1. In my testing, this increases the size of resulting binaries by roughly 5%. The code for producing and re-injecting the minidebuginfo is my own Python implementation but corresponds directly to the shell implementation that RPM uses for doing the same: https://github.com/rpm-software-management/rpm/blob/rpm-4.15.1-release/scripts/find-debuginfo.sh#L261 Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-25testimage: add an overall timeout settingAlexander Kanavin
This is useful when tests misbehave and get stuck, or when a significant increase in testing time is undesirable and needs to be caught automatically. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-25testimage.bbclass: correctly process SIGTERMAlexander Kanavin
Python's unittest will not propagate exceptions upside of itself, but rather will just catch and print them. The working way to make it stop is to send a SIGINT (e.g. simulate a ctrl-c press), which will make it exit with a KeyboardInterrupt exception. This also makes pressing ctrl-c twice from bitbake work again (previously hanging instances of bitbake and qemu were left around, and bitbake would no longer start until they were killed manually). Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24testimage: enable ovmf supportKonrad Weihmann
Add support for running wic images with EFI as testimage. Introduces a variable called QEMU_USE_OVMF for configuration. Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24insane.bbclass: Add test for shebang line lengthDomarys Correa
Shebang lines longer than 128 characters can give an error depending on the operating system. This implements a test that signals an error when locating a faulty shebang. YOCTO: #11053 Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>