summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* sanity.bbclass: Improved error messageJuro Bystricky2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When a non-existing MACHINE is specified, sanity check issues the following message: Please set a valid MACHINE in your local.conf or environment However, MACHINE can also be set in multiconfig .conf file(s). Hence we may have several different MACHINE settings within one (multiconfig) build, so the present error message is fairly ambiguous. This patch remedies this by explicitly naming the offending MACHINE and by amending the list of places where this erroneous MACHINE definition could have originated. MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file. [YOCTO#10810] (From OE-Core rev: a7cb408dd784178197687a2129e936620bf6a0d3) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd-boot.bbclass: Fix SYSYTEMD_BOOT_CFG creationAlejandro Hernandez2017-01-161-0/+3
| | | | | | | | | | | | | This patch makes sure the directory which will contain the systemd configuration (loader.conf) is created before the configuration file is written, fixing errors when it tried to write it to a non-existent directory (From OE-Core rev: f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: print license text as part of QA messagePatrick Ohly2017-01-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It it is hard to select exactly the right lines from a file, in particular because the documentation did not specify the exact semantic (YOCTO #10898). When the QA license check fails, it now includes the license text for which the md5sum was calculated. When adding a new entry to LIC_FILES_CHKSUM, developers can then verify that they picked the desired lines. When the checksum of an older entry changes, the developer does not have to manually look up the changed text. Here's an example which probably has an endline which is too large (message triggered by changing the md5sum in the recipe): ERROR: cmake-native-3.7.1-r0 do_populate_lic: QA Issue: cmake-native: The LIC_FILES_CHKSUM does not match for file://Source/cmake.h;beginline=1;endline=3;md5=deadbeef cmake-native: The new md5 checksum is 4494dee184212fc89c469c3acd555a14 cmake-native: Here is the selected license text: vvvvvvvvvvvvvvvvvvvvvvvvvvvv beginline=1 vvvvvvvvvvvvvvvvvvvvvvvvvvvvv /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ endline=3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cmake-native: Check if the license information has changed in .../cmake.h (lines 1 through to 3) to verify that the LICENSE value "BSD" remains valid [license-checksum] The beginline/endline values are only repeated in the borders if set. License snippets larger larger than 20 lines (configurable with QA_MAX_LICENSE_LINES) are truncated in the middle. (From OE-Core rev: b5b869348adc8e932eb58ecdfdff93d1d63e775c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc.bbclass: Add task buildcleanOla x Nilsson2017-01-161-1/+18
| | | | | | | | | | | | | | | | | | The buildclean task should call the package build system clean command, just implemented for Make for now. This is meant for recipes where S == B, but can be useful as a standalone task for other recipes too. When S == B, set it to run before do_clean which will do what most developers expect when calling bitbake -c clean. For S != B, do not add it before clean as it is not needed and may take some time. (From OE-Core rev: cfaad320d9565003e97893efcb14d00d0b8e23bb) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Modify kernel modules installation path.Amarnath Valluri2017-01-162-7/+7
| | | | | | | | | | Use ${base_libdir}/modules inplace of /lib/modules for kernel modules installation path. (From OE-Core rev: 0ccb2efe9837e2915c093341a662dffc1df00866) Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: sort passwd entriesPatrick Ohly2017-01-161-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The /etc passwd files in a rootfs consist of the default entries from base-passwd plus anything that gets added via package installation, EXTRA_USERS_PARAMS and/or system sysusers. The execution order of preinst scripts is not perfectly deterministic, or at least unrelated changes caused it to change in a non-deterministic way, resulting in irrelevant changes in the order of passwd entries. useradd-staticids.bbclass ensures that the numeric IDs don't change, but re-ordering can still occur, which is bad for reproducible builds and file-based update mechanisms like swupd which work best if changes are as minimal as possible. To achieve that, the files get sorted in a post-processing command, enabled by default. Sorting is based primarily on the numeric IDs, so for example, the "root" user continues to be listed first. "nobody" now is at the end, which wasn't the case before. The order of the entries should not matter, but in obscure cases where it does (like having multiple entries for the same numeric ID) this behavior can be disabled by setting SORT_PASSWD_POSTPROCESS_COMMAND to an empty string. Fixes: YOCTO #10520 (From OE-Core rev: ba684f436908ac2300a00c174d5aa06b4f824367) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion typesRandy Witt2017-01-161-3/+11
| | | | | | | | | | | | | | Previously if IMAGE_TYPEDEP_* contained a conversion type of the form, "foo.bar", the dependency on CONVERSION_DEPENDS_bar would not get added to the task depends for do_rootfs. [YOCTO #10883] (From OE-Core rev: 037d39898e0e16c6d5b24a8d3844abfb328d3c14) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: look for wks files in <layer>/wicEd Bartosh2017-01-161-1/+1
| | | | | | | | | | | | Added <layer>/wic directory to the list of paths to look for wks files. This makes wic behaviour consistent when invoked manually and by bitbake. (From OE-Core rev: d345985db69dc86e9a8f8e2506b250d8780374cb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gummiboot: Remove old gummiboot recipe, related class and wks fileAlejandro Hernandez2017-01-161-121/+0
| | | | | | | | | | | | | | Since the gummiboot project is no longer being maintained and we are using systemd-boot as a replacement instead, we can now clean up all remaining gummiboot files. [YOCTO #10332] (From OE-Core rev: 65eb3f51b70baaf24de871301a7247d5baed00ed) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gummiboot: Remove/change gummiboot references with systemd-bootAlejandro Hernandez2017-01-092-4/+2
| | | | | | | | | | | | | | | After systemd-boot was introduced, its been tested for a while with no major issues being found until now, this patch completely replaces all gummiboot instances with systemd-boot ones, taking the next step into cleaning up systemd-boot/gummiboot. [YOCTO #10332] (From OE-Core rev: f9a61d3400ad9068a6d83b8eb6aefe3098c58e68) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster: prevent use of unset variable BUILDSTATS_BASEJochen Jaegers2017-01-091-3/+3
| | | | | | | | (From OE-Core rev: aca5555881edf4751540203591aadbaf3d17bf41) Signed-off-by: Jochen Jaegers <jochen.jaegers@riedel-at.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fix alternatives and rc.d orderingDavid Vincent2017-01-092-9/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using an alternative as an initscript, the ordering between update-rc.d and update-alternatives tasks during prerm and postinst tasks must always be the following in order to work: * prerm: - stop daemon - remove alternative * postinst: - add alternative - start daemon This patchset adds comments to the scripts generated by both classes and organize the generated sections based on those comments. [YOCTO #10433] Changes since v5: - Remove boolean in d.getVar() calls (From OE-Core rev: aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Add optional srcdir arg to srctree_hash_filesOla x Nilsson2017-01-091-3/+3
| | | | | | | | | | Make it easier to reuse the function for other dirs than EXTERNALSRC. (From OE-Core rev: 9ddcfb51e637acba82089da6430ac77e29f0f1ef) Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: Set STAMPCLEAN to match STAMPOla x Nilsson2017-01-091-0/+1
| | | | | | | | | | | Only the last stamp file should be kept, but unless STAMPCLEAN matches files generated using STAMP old stamp files may linger. This may cause false positives for skipping tasks. (From OE-Core rev: 6d60f60e38e0e00e6753f5b136277f27d6204e63) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildstats: don't expand variable pointing to SystemStatsPaul Eggleton2017-01-091-1/+1
| | | | | | | | | | | We're placing an object into the datastore - it's very definitely not something we want to be expanding. (From OE-Core rev: adfee41d2b1edbd2abd09f9101c359919e21e5d6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: fix file conflict messagePaul Eggleton2017-01-091-10/+12
| | | | | | | | | | | | | | | | | | | | | | * Fix not decoding output from grep ("Matched in b'manifest...') * Fix showing "Matched in b''" if no match (show "not matched to any task" instead) * Drop the filtering out of .populate-sysroot from matched manifest names - it should have been .populate_sysroot so it doesn't work, and in any case the value of removing the task name is questionable given that we aren't removing it for any other task, and that the rest of the filename isn't only the task name, we might as well have the whole thing. At least then you can do a find on that exact name without wildcards and find it. * Fix indenting of file list entries and indent "matched in" further underneath * Minor punctuation fixes (From OE-Core rev: 4675ce43496898fccbac738835d7e92b1cca648e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: handle filenames containing square bracketsPaul Eggleton2017-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | If a recipe installs a file or directory whose name contains square brackets [ ] that form a valid glob expression and that file then they won't be correctly removed from the sysroot, because we pass each path in the sstate manifest to our oe.path.remove() function which calls glob.glob() on the path passed into it and the expression won't actually match the original filename. Since we don't expect to put any wildcarded expressions in the sstate manifests, and we already have a try...except around this, we can actually use os.remove() here instead. Similarly, when we pass existing file paths to "grep" looking through the manifests, we don't want those paths to be treated as regexes - so use grep's -F command line switch. Fixes [YOCTO #10836]. (From OE-Core rev: fd8a57861024fc82e15a2a4ec8c20ed0ebb242f6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm: handle square brackets in filenamesPaul Eggleton2017-01-091-0/+6
| | | | | | | | | | | | | | | | | | When constructing a spec file we list files and directory paths in the %files section. If ] or [ characters are in a file or directory name, rpm treats them as wildcards which will mean it won't properly match the filename. Instead, transform these into an ? wildcard so they don't cause a problem. (This fixes packaging the npm package "file-set" and anything that happens to depend upon it, since it includes tests with files that contain unusual characters including ] and [). (From OE-Core rev: f95adb749619e70920c6cc6cd01c6d02cd348fd8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Various getVar/getVarFlag expansion parameter fixesRichard Purdie2017-01-0918-44/+44
| | | | | | | | | | | | | | | | | There were a few straggling expansion parameter removals left for getVar/getVarFlag where the odd whitespace meant they were missed on previous passes. There were also some plain broken ussages such as: d.getVar('ALTERNATIVE_TARGET', old_name, True) path = d.getVar('PATH', d, True) d.getVar('IMAGE_ROOTFS', 'True') which I've corrected (they happend to work by luck). (From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: whitelist do_package tasksEd Bartosh2017-01-051-1/+1
| | | | | | | | | | | | | | | | With enabled SSTATE_MIRRORS sstate code expects mirrors to contain entries for all tasks, which is not the case for ext installer as it uses reduced sstate cache. Added do_package tasks to BB_SETSCENE_ENFORCE_WHITELIST to prevent installer failing with ERROR: Sstate artifact unavailable [YOCTO #10832] (From OE-Core rev: 2ed46ada4b8e496493835e84b36f7e9c367f59d2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: fix working with uninative sstateEd Bartosh2017-01-051-1/+4
| | | | | | | | | | | | | Mapped uninative sstate directories to make ext SDK installer to use them when it's run on systems with gcc version different from gcc version used to build installer. [YOCTO #10832] (From OE-Core rev: 549df5f82c9b2d4feb6f459cb3b2f240efb9a981) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* module.bbclass: allow to override location of Module.symversAndré Draszik2017-01-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | Requiring all build systems for external kernel modules to place Module.symvers directly into ${B}/. is quite an artificial assumption/requirement. It doesn't have to end up there, but could easily end up somewhere below ${B}. Allow to override the location below ${B} Note that we still don't make use of multiple Module.symvers in case there are any generated by one single kernel module build, but this is no change in behaviour from before and could be added if there really is a demand for that. Reported-by: Denys Dmytriyenko <denis@denix.org> (From OE-Core rev: caa0fa2ddf0c97255b38b1ec8579944ab4821ff1) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk: don't force target debug packages into SDKRoss Burton2017-01-051-4/+1
| | | | | | | | | | | | | | TOOLCHAIN_TARGET_TASK doesn't need to explicitly list sdk-target-dbg because if SDKIMAGE_FEATURES contains dbg-pkgs (as it does by default) then they'll all be installed anyway. This means that if the user removes dbg-pkgs from SDKIMAGE_FEATURES then the SDK correctly doesn't have debug packages in. [ YOCTO #9078 ] (From OE-Core rev: 4c711830ae26008f73bbf557964bdb86b8c922da) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Parameterise the use of STAGING_DIRRichard Purdie2016-12-221-3/+4
| | | | | | | | | | This means that a user can change TMPDIR in a multiconfig situation and still only have one path to the uninative setup. Without this change its not possile to make such a setup work. (From OE-Core rev: 779422c5458f5f643b3a4a0dedaa4d9ad709367a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ncurses.inc: add v6 binconfig-disabled entriesTrevor Woerner2016-12-221-0/+1
| | | | | | | | | | | Newer host distributions are moving to ncurses6, therefore add entries so the host's ncurses{w}6-config scripts aren't picked up. (From OE-Core rev: 0174152272c546dd6cb6bc4b7238c232ab9133b3) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Fix symlinksDavid Vincent2016-12-221-3/+3
| | | | | | | | | | | | | | | When installing a kernel package, the symlinks created by update-alternatives should point to a path relative to KERNEL_IMAGEDEST and not an absolute path to '/boot'. Failing to do so causes problems when resolving the symlink inside some bootloaders which mount the boot partition elsewhere. (From OE-Core rev: c7bc46b9bc29dd0953ab8d63b50fa105bb66892e) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* arch-mips: Add MIPS 64r6 N32 tuneZubair Lutfullah Kakakhel2016-12-222-0/+4
| | | | | | | | | | Add MIPS64R6-n32 tuning options. (From OE-Core rev: e723dbb9614f7d7e7e158bc9afd0b2bfac0fbee2) Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: Fix gnutls mirror directoryJussi Kukkonen2016-12-201-1/+1
| | | | | | | (From OE-Core rev: 833f43f71b9a1665c26b6e1874546cb7d37ffd47) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: don't count every hardlink for PKGSIZERoss Burton2016-12-171-1/+4
| | | | | | | | | | | | | | When calculating PKGSIZE we sum the size of files after doing lstat() so we don't count directory metadata overhead, but were not correctly handling hardlinks. This results in packages such as e2fsprogs-mke2fs having PKGSIZE of 1.5M when it's actually a single 300K binary with five hardlinks. [ YOCTO #10423 ] (From OE-Core rev: e82a7f879419828b42b5cc71e6229c8235090f21) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* upstream-version-is-even.bbclass: exclude various alphas, betas, ↵Alexander Kanavin2016-12-171-1/+1
| | | | | | | | | | | | | | pre-releases etc. Was a problem with perl in particular. (From OE-Core rev: cc40b3ad2c4a725f93d0b984f23d34d247cffb2f) (From OE-Core rev: 428531463574f4e7722912d1960bd288df586c14) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-1621-67/+67
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-16118-1585/+1585
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: rebuild uninative for gcc 4.8 and 4.9Ed Bartosh2016-12-162-3/+4
| | | | | | | | | | | | | | | | | | | Some c++ libraries fail to build if uninative is built with gcc 5.x and host gcc version is either 4.8 or 4.9. The issue should be solved by making separate uninative sstate directory structure sstate-cache/universal-<gcc version> for host gcc versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc is either 4.8 or 4.9 and it doesn't match gcc version used to build uninative. [YOCTO #10441] (From OE-Core rev: d36f41e5658bbbb6080ee833027879c119edf3e0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: Use PACKAGE_INSTALL instead of IMAGE_INSTALLJackie Huang2016-12-161-1/+1
| | | | | | | | | | | | | | | | | The initramfs image recipes changed to use PACKAGE_INSTALL so they will not be affected by IMAGE_INSTALL, and will cause error when inherit extrausers: | ERROR: core-image-minimal-initramfs-1.0-r0 do_rootfs: core-image-minimal-initramfs: usermod command did not succeed. So use PACKAGE_INSTALL as well in extrausers.bbclass to fix it. (From OE-Core rev: fa541362e2d2cc0494a86a413b7b52dfe3eee908) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/patch: move several functions to oe.patchPaul Eggleton2016-12-141-101/+4
| | | | | | | | | | | | Move patch_path(), src_patches() and should_apply() to oe.patch, making them easier to call from elsewhere (particularly across the UI/server boundary). (From OE-Core rev: 2724511e18810cc8082c1b028e3b7c8a8b5def56) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/patch: move in logic to commit for additional tasksPaul Eggleton2016-12-141-0/+69
| | | | | | | | | | | | | | | If PATCHTOOL is "git", and PATCH_COMMIT_FUNCTIONS is set to "1", for additional tasks between do_unpack and do_patch, make a git commit. This logic was previously implemented in devtool itself, but it makes more sense for it to be implemented in the patch class since that's where the rest of the logic is for this (or in lib/oe/patch.py). It also makes it possible for this to work with tinfoil2. (From OE-Core rev: f24f59ea1d8bc335ea8576f6a346d0935f4a3548) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: fix license file checksumming when source not under TMPDIRPaul Eggleton2016-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | With the changes to the code for extracting source for a recipe, we are properly executing the tasks for a recipe, which means their stamps (and therefore signatures) are important. When running devtool extract on the lsof recipe I noticed that do_fetch and do_unpack were executing a second time when we called for do_patch, and this turned out to be because LIC_FILES_CHKSUM in that recipe contains an entry which is an absolute path (has ${S} at the start). Normally this wouldn't be an issue since S is under TMPDIR and thus the existing code would ignore it, however devtool's extraction code extracts to a temporary directory which is not under TMPDIR; the result was the path to this file was not being ignored and the second time around when the license file had been extracted it was incorporated into the signature. We don't want this, so explicitly exclude S as well as B and WORKDIR for good measure. (From OE-Core rev: 1c99d74a862f25e23ea6465fab7ddc9ce74d6974) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: suppress log_check mechanism for warnings/errors logged ↵Paul Eggleton2016-12-141-1/+9
| | | | | | | | | | | | | | | | | | | | | | through BitBake If you printed a warning through bb.warn() / bbwarn or an error through bb.error() / bberror, this was also being picked up by our log_check mechanism that was designed to pick up warnings and errors printed by other programs used during do_rootfs. This meant you saw not only the warning or error itself, you saw it a second time through log_check, which is a bit ugly. Use the just-added BB_TASK_LOGGER to access the logger and add a handler that we can use to find out if any warning or error we find in the logs is one we should ignore as it has already been printed. Fixes [YOCTO #8223]. (From OE-Core rev: fb37304d27857df3c53c0867e81fbc8899b48089) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: explicitly trap subcommand errorsBruce Ashfield2016-12-131-0/+7
| | | | | | | | | | | | | | | | | To trap errors and halt processing, do_kernel_metadata was recently switched to exit on any non zero return code. While the concept is sound, there are subcommands that have legitimate non-zero return codes. Instead of removing set +e, we'll explicitly check the return code of the commands that can error, and throw a bbfatal to alert the user. (From OE-Core rev: a4705e62d0973c290011fc0d250501d358b659e8) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: add do_write_qemuboot_conf to task listRoss Burton2016-12-131-1/+1
| | | | | | | | | | | | We need to add do_write_qemuboot_conf to the list of tasks to be wiped as otherwise the second time an image is built it will fail. [ YOCTO #10758 ] (From OE-Core rev: 3206f408e908870629eb47afac6249a3c9497a66) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: don't change directory when generating tarballRoss Burton2016-12-131-6/+2
| | | | | | | | | | There's no need to chdir() as tarfile.add() can be told what name to use in the archive. (From OE-Core rev: d0b282bce34db44dde4dd7f53a64dfaafe6789de) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: allow recipes to override the product nameRoss Burton2016-12-131-1/+5
| | | | | | | | | | | Add a new variable CVE_PRODUCT for the product name to look up in the NVD database. Default this to BPN, but allow recipes such as tiff (which is libtiff in NVD) to override it. (From OE-Core rev: ba330051570a4c991885ee726cb187e0c911bd4f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add SH4 musl mapping to the QA arch testsVladimir Zapolskiy2016-12-081-0/+1
| | | | | | | | | | | | | | This change allows to pass QA for packages built with sh4-oe-linux-musl toolchain, the problem is reproted while building core-image-minimal target: ERROR: readline-7.0-r0 do_package_qa: Error executing a python function in exec_python_func() autogenerated (From OE-Core rev: dff25cb16ffca0876e5a747644bd6223129df402) Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: ignore initscript in prerm and preinst when systemd is activeAndreas Oberritter2016-12-081-5/+14
| | | | | | | | | | | | | | In hybrid systemd/sysvinit builds, if the recipe inherits systemd and systemd is installed, we can safely assume that the service gets stopped by the prerm script fragment from systemd.bbclass. This fixes deinstallation of packages with initscripts returning errors when no running service was found. The preinst shouldn't run the initscript either, because postinst will call systemctl restart. (From OE-Core rev: f2cc0fdfd97b097145e40bc52674e17378cec863) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: split binary localedata even more if asked toAndreas Oberritter2016-12-081-14/+25
| | | | | | | | | | | | | | | | | If GLIBC_SPLIT_LC_PACKAGES is set to a non-zero value, convert glibc-binary-localedata-XX-YY to be a meta package depending on glibc-binary-localedata-XX-YY-lc-address and so on. This enables saving quite some space if someone doesn't need LC_COLLATE for example. Some regex code was removed from output_locale_binary_rdepends, because legitimize_package_name already converts to lowercase. (From OE-Core rev: 40b4b31092058f8833ada3dfc254d362dd3139c1) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: inherit image_types_uboot when neededRobert Yang2016-12-081-0/+9
| | | | | | | | | | | | | | | | | | Fixed: MACHINE = "qemuarm" IMAGE_FSTYPES += "ext3.bz2.u-boot" [snip] No IMAGE_CMD defined for IMAGE_FSTYPES entry 'ext3.bz2.u-boot' - possibly invalid type name or missing support class [snip] This is because image_types_uboot is not inherited, inherit it when needed will fix the problem. (From OE-Core rev: 742a22ab7fd333e99d8701220d5a1db28347b1af) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix kernel_do_compile for KERNEL_IMAGETYPE = "vmlinux.gz" on ↵Andreas Oberritter2016-12-081-0/+1
| | | | | | | | | | | | mips The target directory didn't exist. (From OE-Core rev: bd62851dc236a0279c735b290782602e275de5c1) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: do not copy bundled initramfs to /bootAndreas Oberritter2016-12-081-6/+0
| | | | | | | | | | | These files cause warnings because they don't get packaged, now that they don't land in kernel-vmlinux anymore. (From OE-Core rev: a49569e3a7534779bbe3f01a0647fd076c95798d) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Avoid wildcards for kernel imagesAndreas Oberritter2016-12-081-2/+2
| | | | | | | | | | | | | | | With multiple kernel images enabled starting with 'vmlinux', e.g. vmlinux.gz and vmlinux.bin, all files landed inside the kernel-vmlinux package. On top of that, even initramfs images were included, e.g. vmlinux.gz-initramfs-*. (From OE-Core rev: b7f4133b44b740e8ac8e758b0d4a3ee32d326332) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Use real filenames in kernel packagesAndreas Oberritter2016-12-081-1/+1
| | | | | | | | | | | | | | | When iterating over kernel image types to set up their packaging variables, don't use make targets but the real names. It was surprising if both vmlinux.bin and vmlinux.gz were enabled and only the latter had its filename extension removed from the package name. (From OE-Core rev: aa189f183e10588f7e8d642f351bd9b8d69f3ea9) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>