aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2018-03-20package-index: index also subdirectories when using rpmAlexander Kanavin
Previously only the top-level index was created, which did not work if PACKAGE_FEED_ARCHS whitelisting (or explicitly listing architectures in dnf repo files by hand) was in use: https://lists.yoctoproject.org/pipermail/yocto/2018-March/040327.html https://bugzilla.yoctoproject.org/show_bug.cgi?id=12419 [YOCTO #12419] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-20patch.py: Use git format-patch with --no-signature --no-numbered paramsMartin Jansa
* --no-signature saves unnecessary .patch modifications when executed on host with different git version * --no-numbered saves unnecessary .patch modifications when number of the applied patches is changed (the number is still in the filename so the order how they should be applied is still preserved) * both options exist for very long time, I've tested them with git 1.9.1 from Ubuntu 14.04 and I'm quite sure they were available even in much older releases, so there shouldn't be any issue on relatively new sanity tested distros Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-20package_manager: format pydoc comments properlyRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-16buildperf: measure the size of core-image-sato rootfsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12lib/oe/patch.py: add a warning if patch context was ignoredAlexander Kanavin
Ignoring patch context increases the chances of patches being applied incorrectly. Depending on what code is being patched, this can go completely unnoticed and create subtle bugs, sometimes with security implications. Please see here for a specific example: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450 On the other hand, we cannot simply force all patch context to match exactly: doing this would break a lot of recipes suddenly, across all layers. So let's try a softer approach: issue a warning, and gently update patches over a longer span of time. When most of the warnings are eliminated, we can start enforcing a strict patch application policy. I do understand that this patch creates a lot of warnings all of a sudden, however I believe the problem does need to be addressed. All of oe-core recipes have their context already fixed. Sample warning: WARNING: vulkan-1.0.61.1-r0 do_patch: Some of the context lines in patches were ignored. This can lead to incorrectly applied patches. The context lines in the patches can be updated with devtool: devtool modify <recipe> devtool finish --force-patch-refresh <recipe> <layer_path> Then the updated patches and the source tree (in devtool's workspace) should be reviewed to make sure the patches apply in the correct place and don't introduce duplicate lines (which can, and does happen when some of the context is ignored). Details: Applying patch demos-Don-t-build-tri-or-cube.patch patching file demos/CMakeLists.txt Hunk #1 succeeded at 63 (offset 2 lines). Hunk #2 succeeded at 76 with fuzz 1 (offset 2 lines). [YOCTO #10450] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12oe-selftest: add a test for failing package post-installation scriptletsAlexander Kanavin
The test runs a scriptlet that has an intentionally failing command in the middle and checks for two things: 1) that bitbake does warn the user about the failure 2) that scriptlet execution stops at that point. The test is run for all three package types: rpm, deb, ipk. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-12meta/lib/oe/package_manager.py: warn about failing scriptlets for all ↵Alexander Kanavin
package types Previously this was done only for rpm packages; now also ipk/deb scriptlet failures are reported. In the future this will become a hard error, but it can't yet happen due to the legacy 'exit 1' way of deferring scriptlet execution to first boot which needs a deprecation period. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-11meta/lib/oe/patch.py: do not leave .orig files if a patch isn't perfectly ↵Alexander Kanavin
matching Particularly, this was causing 'devtool modify' to erroneously add those .orig files into commits. This was getting in the way, if the goal was to amend/update those existing patches. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-08package_manager.py: Explicit complementary failNiko Mauno
When running bitbake -c populate_sdk <image_name>, it is expected that packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting SDK. Underlying mechanism issues a package manager install call for set of complementary packages. However the mechanism doesn't seem to inform the user all too obviously in case the package manager command behind install_complementary() method fails -- and since it is combined with attempt_only=True option, user might end up wondering why several *-dev, *-dbg packages are missing from resulting SDK. Improve associated install() method behaviour in affected OpkgPM and DpkgPM classes so that a problematic state of affairs becomes directly obvious for bitbake user, resulting in shell output like: WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages. Command '...' returned 1: Collected errors: * Solver encountered 1 problem(s): * Problem 1/1: * - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but none of the providers can be installed * * Solution 1: * - allow deinstallation of someotherpkg-1.1-r1.x86 * - do not ask to install a package providing somepkg-dev * Solution 2: * - do not ask to install a package providing somepkg-dev Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-08buildhistory: remove duplicate renamesAnuj Mittal
In cases when a package like qemu might have files with same names in multiple directories, the rename logic might go wrong and create multiple rename pair for a single directory. Make sure that we process each rename pair once. Also, don't print FILELIST as part of PKGSIZE to ensure that it gets printed only once when reporting package changes. Fixes [YOCTO #12559] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-07package_manager.py: Print offending package instead of non-sense traceJason Wessel
If you have a package that does not generate a manifest due to using a noexec rule, the package name should be printed so the problem can be tracked down. With out the patch you get an error that makes it look more like the package_manager is broken as shown below. oe-core/meta/lib/oe/package_manager.py', lineno: 534, function: create_packages_dir 0530: 0531: for dep in rpmdeps: 0532: c = taskdepdata[dep][0] 0533: manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs) *** 0534: if not os.path.exists(manifest): 0535: continue 0536: with open(manifest, "r") as f: 0537: for l in f: 0538: l = l.strip() File: '/usr/lib/python3.5/genericpath.py', lineno: 19, function: exists 0015:# This is false for dangling symbolic links on systems that support them. 0016:def exists(path): 0017: """Test whether a path exists. Returns False for broken symbolic links""" 0018: try: *** 0019: os.stat(path) 0020: except OSError: 0021: return False 0022: return True 0023: Exception: TypeError: stat: can't specify None for path argument Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06selftests: Add test case for booting a generic EFI boot partition imageCalifornia Sullivan
Simple test case that adds 'efi' to MACHINE_FEATURES, sets WKS_FILE to "efi-bootdisk.wks.in", installed required boot items, and attempts to boot the wic image. Quick check to make sure that the feature actually works. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06sdk: only install locales if we're using glibcRoss Burton
Using glibc-locale to install locales only makes sense if we're using glibc. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-04oeqa/runtime/opkg.py: add runtime test for opkgYeoh Ee Peng
Add runtime test for opkg to test that it can install ipk package from remote source. [YOCTO# 11488] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-04oeqa/runtime/apt.py: add runtime test for aptYeoh Ee Peng
Add runtime test for apt to test that it can install deb package from remote source. [YOCTO# 11488] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-01sdk: generate locale archive and remove packagesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01sdk: install specified locales into SDKRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01package-manager: add install_glob()Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01package_manager: improve install_complementaryRoss Burton
- No need to use bb.utils.which() as subprocess will search $PATH - Clarity flow by moving the install inside the try/except Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01lib/oe/recipeutils: add .txz extension to archive listPaul Eggleton
Prompted by bitbake commit 2ba8a6b25ccc12e7b543e8450121e5311c7a701d, add .txz to the list of archives used within get_recipe_local_files() here as well. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01lib/oe/path: implement is_path_parent()Paul Eggleton
In a few places we have checks to see path B is the parent of path A, by adding / to the end of the path B and then seeing if path A starts with the suffixed path B. Unfortunately there are two potential flaws: (1) path A needs to be suffixed with / as well or the directory itself won't match (semantics perhaps, but in a lot of scenarios returning True is correct); (2) you need to run os.path.abspath() on both paths first or you will wrongly return False for some relative paths where you should return True. Let's solve this once and for all by writing a function that takes care of these and put it in oe.path. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01sstatesig: Move hardcoded native toolsJoshua Watt
Now that SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS supports the wildcard syntax, these exclusions no longer need to be hardcoded Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01sstatesig: Add recipe wildcardJoshua Watt
The special string "*" on the left hand side of the dependency specification matches all recipes except the one on the right hand side. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01sstatesig: Ignore icecc-create-env in task sigsJoshua Watt
Changes to the icecc-create-env recipe should not cause all recipes to rebuild just because the have inherited icecc. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-27sstatesig/staging/package_manager: Create common sstate manifest codeRichard Purdie
Create a common function for locating task manifest files rather than several implementations with missing pieces. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-27package_manager: Filter to only rpms we depend uponRichard Purdie
Currently do_rootfs gets to see all rpms in the deploy directory. This filters that view to only rpms which the image recipe has actual depends upon which potentially removes some sources of confusion in the image construction. This makes builds more reproducibile and also fixes contamination issues where dnf picks up packages it shouldn't be able to 'see'. [YOCTO #12039] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24sstatetests: pass the right files when comparing sigfilesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24utils.py: Fix parallel_make limitJoshua Watt
parallel_make_argument() was incorrectly taking the maximum of the limit and the calculated value instead of the minimum. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24oe-selftest: add a test for recipes without maintainersAlexander Kanavin
'bitbake -c checkpkg world' is moved to class initializer to avoid it being run twice in a row. The no-maintainers test checks only oe-core recipes, as other layers may be be configured, and assigning maintainership to specific people via maintainers.inc is known to be used only in oe-core. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-24oe-selftest: fix tests to reflect man->man-db transitionAlexander Kanavin
Rather than apply a patch twice, an incorrect patch is applied (as the new man-db recipe does not have any patches yet). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-02-20oeqa/buildperf/base: Fix fetchall reference to use runall bitbake optionRichard Purdie
The fetchall task was removed, use its replacement bitbake option. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-16utils.py: add parallel make helpersJoshua Watt
The code to extract the integer number of parallel build threads and construct a new argument from them has started to be copied in multiple locations, so create two new helper utilities to aid recipes. The first helper (parallel_make()) extracts the integer number of parallel build threads from PARALLEL_MAKE. The second (parallel_make_argument()) does the same and then puts the result back into a format string, optionally clamping it to some maximum value. Additionally, rework the oe-core recipes that were manually doing this to use the new helper utilities. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-09oe-selftest: meta_ide: add tests for meta-ide-supportYeoh Ee Peng
QA team were testing meta-ide-support manually. Add automated tests to test that bibtake meta-ide-support will create the toolchain and environment setup script. Also test that after using environment setup script, one can compile c program and build cpio project. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29rootfs.py: change the notice about deferring scripts to first boot from ↵Alexander Kanavin
warning to a note Now that the first boot deferral needs to be requested explicitly, it's not really something to be concerned about. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to ↵Alexander Kanavin
first boot 'exit 1' is not optimal for two reasons: 1) Code is hard to read; it is not obvious that it means 'defer what follows to first boot'. 2) Worse, this hides actual errors in the scriptlets; there is no difference between scriptlet failing because it's intended to be run on target and scriptlet failing because there's a bug or a regression somewhere. The new, supported way is to place the code that has to run on target into pkg_postinst_ontarget(), or, if a more fine-tuned control is required, call 'postinst-intercepts defer_to_first_boot' from pkg_postinst() to explicitly request deferral to first boot. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing ↵Alexander Kanavin
postinst_intercept hooks That hook is empty, and doesn't need to be executed; it merely indicates that packages that have used it are requesting to defer their postinst scripts to first boot unconditionally. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate ↵Alexander Kanavin
function Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29oeqa/runtime: add gobject-introspection testRoss Burton
(From OE-Core rev: 497a95b576e19e39e20ac280d0db24f51b7c9679) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-23imagefeatures: disable f2fs from test_image_features by defaultSaul Wold
Since the primary f2fs utilities are provided by the meta-openembedded meta-filesystems layer, we disable the testing of that functionality here. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22buildhistory_analysis: colourise more outputRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-22lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie
repos don't conflict The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-18buildhistory-diff: add support for colourising the outputRoss Burton
Colour value removes in red and additions in green, making it easier to scan the output for relevant changes. This adds a --colour option to specify whether colouring should be on, off, or detected. The default is detected, and depends on whether stdout is a TTY (same behaviour as git). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-14selftest/cases/devtool.py: fix workspace layer checkingRobert Yang
Fixed: $ oe-selftest -r devtool.DevtoolTests.test_create_workspace [snip] 2017-12-20 18:28:59,404 - oe-selftest - INFO - Traceback (most recent call last): File "/workspace2/lyang1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f return func(*args, **kwargs) File "/workspace2/lyang1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 177, in test_create_workspace self.assertTrue('/workspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf') AssertionError: False is not true : This test cannot be run with a workspace layer in bblayers.conf [snip] $ bitbake-layers show-layers NOTE: Starting bitbake server... layer path priority ========================================================================== meta /workspace2/lyang1/poky/meta 5 meta-poky /workspace2/lyang1/poky/meta-poky 5 meta-yocto-bsp /workspace2/lyang1/poky/meta-yocto-bsp 5 meta-selftest /workspace2/lyang1/poky/meta-selftest 5 There is no workspace layer, but I'm in /workspace2, this patch can fix the problem. [YOCTO #12442] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-10gnupg: use native version for signing, rather than one provided by hostAlexander Kanavin
Using host gpg has been problematic, and particularly this removes the need to serialize package creation, as long as --auto-expand-secmem is passed to gpg-agent, and gnupg >= 2.2.4 is in use (https://dev.gnupg.org/T3530). Sadly, gpg-agent itself is single-threaded, so in the longer run we might want to seek alternatives: https://lwn.net/Articles/742542/ (a smaller issue is that rpm itself runs the gpg fronted in a serial fashion, which slows down the build in cases of recipes with very large amount of packages, e.g. glibc-locale) Note that sstate signing and verification continues to use host gpg, as depending on native gpg would create circular dependencies. [YOCTO #12022] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-10manifest.py: sort package listMichael Blättler
The entries of the created manifest file are always in a different order. To ensure a deterministic build output the entries are ordered alphabetically. Signed-off-by: Michael Blättler <michael.blaettler@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-10nativesdk/sdk: Update sdk dummy providersRichard Purdie
When we migrated rpm v5 -> v4, we lost the ability to drop "per file" dependencies from the rpm backend for things like "/bin/bash" and "/usr/bin/env" which meant the sdks were becomming 'bloated'. This restores the functionality using a dummy package, similarly to the way the buildtools perl issue was addressed. It also removes the non-functional old code so as not to confuse people in future. I ran into this problem trying to filter dependencies to only rpms a build directly depends upon and it turns out we have some determinism issues in this area so this is something key to fix. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06package_manager.py: remove obsolete MULTILIB_ARCHSRobert Yang
It had been removed since 2011: commit b774bf44ef004276da12a83ebd69715c00b596ac Author: Lianhao Lu <lianhao.lu@intel.com> Date: Tue Aug 16 16:26:49 2011 +0800 package(_ipk).bbclass: opkg using ALL_MULTILIB_PACKAGE_ARCHS Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06package_manager.py: print running dnf commandRobert Yang
This can make debug easier, for example, makes it easy to run the command mannually. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06oe/copy_buildsystem.py: make sure layer existsRobert Yang
It had a problem when nested layer before, e.g.: layer_a/layer_b/ And when layer_b is handled before layer_a, then layer_a dir existed, so it would be treated as already handled, which was wrong, check conf/layer.conf can fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06bitbake.conf: Set AUTOREV to have a vardepvalueRichard Purdie
If you have a recipe which does not include SRCPV in PV but does set SRCREV = "${AUTOREV}" and you run do_fetch, then change the repo to a new commit then run do_unpack, do_unpack will fail since the new commit doesn't exist in the repo that was fetched. The problem is the revision chosen is not represented in the do_fetch task hash. It if were, the fetch would rerun first and the commit would be present. It works when PV includes SRCPV since that does contain the chosen commit from the AUTOREV. The solution is to include the SRCPV value into the representation of AUTOREV used for checksum calculation purposes. Add a selftest for this issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>