summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* rm_work: Simplify looping codeRichard Purdie2018-06-211-39/+39
| | | | | | | | | The current looping structure is confusing, simplify it a bit to improve readability. Should be no functionality changes. (From OE-Core rev: 498065b51b205b43d7dae1008014eba85a8f138c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Improve code commentsRichard Purdie2018-06-211-13/+13
| | | | | | | | | | This function is a little obtuse, add more comments about what its doing and why. Also combine some of the statements where possible to improve clarity. (From OE-Core rev: 3e0c22e9bd9757cd458a073a3f043a48184d7bab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: The do_setscene task has not existed for yearsRichard Purdie2018-06-211-3/+0
| | | | | | | | | Once, there were do_setscene tasks but this hasn't been the case for years, drop the old code. (From OE-Core rev: b13a691f1cfc0d68a0f94c343fa3a1b987dbe117) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Stop appending _setscene to do_image_complete_setscene stampsRichard Purdie2018-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a reworked version of the issue which 5479654eeaaa0f81bfff54ca49369c87f1658705 attempted to fix. """ Each time I build my image after the first, I end up with a do_image_complete_setscene stamp file with an extra _setscene appended to the name. Eventually, the filenames end up being so long that mv complains and the build fails. It looks like this behaviour was introduced when the special handling was added for do_image_complete in 2ff9d40dc88d43567472218cf3d3faf414398c71. """ Instead of the original approach which broke do_package_setscene, add an entry to explictly stop the stacking _setscene pieces on do_image_complete. It's not straightforward to just move *do_image_complete* after the *_setscene* pattern because do_image_complete stamps would then match do_image*. (From OE-Core rev: 0f4e734e0ef40076351ed7ff795aac36197e4949) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "rm_work: Stop appending _setscene to do_image_complete_setscene stamps"Richard Purdie2018-06-211-4/+4
| | | | | | | | | | | Whilst this fixes the do_image_complete_setscene append problem, it creates a new problem since the code can no longer reach the *do_package_setscene.* code block below it. This breaks builds as per [YOCTO #12765]. Revert this change in search of a better fix. This reverts commit 5479654eeaaa0f81bfff54ca49369c87f1658705. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, populate_sdk_base.bbclass: make all variants of ↵Alexander Kanavin2018-06-182-2/+4
| | | | | | | | | | | | | | | | | qemuwrapper-cross available in sysroots The variants are needed in particular when executing postinst_intercepts as those may require running binaries built for different architectures and against different sets of library paths, when multilib is in use (or nativesdk host packages are installed), so a single global variant of the script was not working. I do understand expanding PATH and DEPENDS in this manner is hackish, however every other approach I could think of is worse. (From OE-Core rev: 2f31eecc40ea4d0865aa28d65a0ba7d5a629393a) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin2018-06-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. (From OE-Core rev: d10fd6ae3fe46290c6e3a5250878966d9f12ca3f) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept ↵Alexander Kanavin2018-06-181-42/+28
| | | | | | | | | | | | | | | mechanism This has the following benefits: - consistent with how the other caches are created into target rootfs - only runs once per package manager transaction, instead of once per every immodule package - correctly postpones to first boot if qemu is not working; from postinst itself this would've required special arrangements to avoid what is now a do_rootfs failure. (From OE-Core rev: cca3c084b6c9bf600d7306e3fe12c4f236b78656) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Only add uninative and checksum if inherited uninative classJeremy Puhlman2018-06-181-2/+3
| | | | | | | | | | The checksum value is only calculated if the uninative class is inherited, so check for inherit before adding it to local.conf (From OE-Core rev: 3b5b832589d943700b273e3a4d83561be0c47f36) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Multilibize the UPDATERCPN variableJeremy Puhlman2018-06-181-0/+1
| | | | | | | | | | | | | | | | | The audit package specifies the following: UPDATERCPN = "auditd" However because it is not multilibized, the value "auditd" is used to search for the package to add the post install script too. In the mutlilib alternate abi case, that package does not exist. It ends up assigning the post install script to the lib32-audit-lic package, which subsequently failes to execute the script due to the initscript it is trying to turn on is not installed. (From OE-Core rev: ce99653e1af50d9e8f070ca6ae810908c4c138c6) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: only use lists of commands in cross file if requiredRoss Burton2018-06-181-12/+13
| | | | | | | | | | | | | | | | There's a bug in Meson[1] where it find_program("foo") will fail if foo is defined in the cross file as a list. This is causing the Meson build of libdrm to fail, but for this instance we can work around the problem by only using lists in the cross file if there are arguments, and just using a string if there are not. [1] https://github.com/mesonbuild/meson/issues/3737 (From OE-Core rev: 7fd8bc469c2caacc1c2021bd0aa83dd6da7fe1e7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: fix corebase identificationDamien Riegel2018-06-181-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating the extended SDK, there is a copy step where this class goes through the layers and other stuff that have been copied to generate the SDK. The corebase; ie. the folder that contains the core layer 'meta' is treated in a special way. Unfortunately in our tree, we have: sources/meta/meta | `- core layer `------- corebase In populate_sdk_ext's copy_buildsystem, the heuristic to determine which element of the list returned by copy_bitbake_and_layers is corebase is fooled by such layout. In copy_bitbake_and_layers, corebase is already handled specifically and reliably, so we should let that function tell us which folder is corebase instead of trying to determine it. To do so, change the return type of copy_bitbake_and_layers to a tuple that contains (corebase, copied_layers). It also simplifies the code on the caller side. (From OE-Core rev: 5368bc5d0d3606198b93e877bcafcd77bb5f4fd1) Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Add DTBO support for configurationsAlex Kiernan2018-06-181-10/+32
| | | | | | | | | | | When generating overlay DTB configuration sections, U-Boot doesn't want the kernel specified again as we already have that in our base DTB. Add support for this to allow bootm to process overlay configuration sections. (From OE-Core rev: c0db9776beb4f519079a554a733353c368739dcf) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Allow setting of DTB/DTBO relocation addressAlex Kiernan2018-06-181-0/+10
| | | | | | | | | | | Introduce UBOOT_DTB_LOADADDRESS and UBOOT_DTBO_LOADADDRESS so that you can set where U-Boot loads full and overlay DTBs. This is required when using bootm's overlay support to construct the final DTB. (From OE-Core rev: 05d2230db1d7379494814407fc0d79d7e755d89e) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: drop obsolete sshd UseDNS rootfs postprocessingAndre McCurdy2018-06-151-11/+0
| | | | | | | | | | | | | The sshd UseDNS option has defaulted to "no" since openssh 6.8p1, so it's no longer necessary to postprocess the rootfs to force the option: https://www.openssh.com/txt/release-6.8 (From OE-Core rev: 0cb4f11614bd3b17db8e6b3516761193cd45d082) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: set SECURITY_CFLAGS for mips64Kai Kang2018-06-151-1/+1
| | | | | | | | | | | | | | | | | When include conf/distro/include/security_flags.inc, NOPIE flags are still required for mips64 target builds. Otherwise it fails to build packages such as glide which inherit go.bbclass: | .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/ | gcc/mips64-wrs-linux/7.3.0/ld: .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o: | relocation r_mips_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC` Use override 'mipsarch' to set SECURITY_CFLAGS for both mips and mips64. (From OE-Core rev: 98b24e9268dc444356ce8bd9ddfec6adcce5e02a) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-extlinux-config.bbclass: Add baudrate in console bootparamOtavio Salvador2018-06-151-1/+1
| | | | | | | | | | | | By default, we ought to use console="${console},${baudrate}" as console bootparam as commonly it is left to be passed with the bootargs. (From OE-Core rev: 2ce3534b2011cf5516780c9fd7e00bd107619adc) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manpages.bbclass: Update RDEPENDS and post install scriptsKai Kang2018-06-151-0/+32
| | | | | | | | | | | | | If a package installs manual files, it should update manual index cache after its installation. Add package 'man-db' to RDEPENDS which contains command 'mandb' to update the cache. And do the update in the post install scripts. (From OE-Core rev: 078900f2416202b677471b10b69c8defb0f14c8d) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpan_build.bbclass: tell Module::Build the replacementJens Rehsack2018-06-151-1/+1
| | | | | | | | | | | | | Instead of patching Module::Build, maybe Module::Build::Tiny and all other similar tools, use the official way to tell them which is the target perl on target. (From OE-Core rev: f3925216b06ff7fbe21989210f8eb11e16be6631) (From OE-Core rev: 306435507c4790ec44f30cd3c7fa7d340b441ec4) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C libraryAlejandro Enedino Hernandez Samaniego2018-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds the posibility to build using TCLIBC=newlib. It allows users to build baremetal applications with the use of a C library. Newlib is a lightweight C library meant to be used on embedded systems, it is meant to be easily portable for new platforms and to provide basic functionality on them, by design, it provides stubs for some of these core functions declared as weak, so they can be built correctly and then linked against some other library which provides specifics about the platform being used if need be, libgloss takes care of these in some cases, but it can also be extended, this patch also allows the user to easily add other libraries to it by adding them to NEWLIB_EXTENDED for this specific reason. (From OE-Core rev: 9f0570351a7b0877aa50efff5fe9a9ef368cb38f) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Adds powerpc to elf headers machine dictionaryAlejandro Enedino Hernandez Samaniego2018-06-151-0/+1
| | | | | | | | | | | This patch adds makes it possible to build elf for powerpc by adding this combination to the elf headers machine dictionary, this can be useful when trying to build baremetal applications where the TARGET_OS=elf (From OE-Core rev: 6f7ef4f6049fa8f2a8e17abfcf53ccbc22394088) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: specify dependencies for compilation for config tasksBruce Ashfield2018-06-122-2/+5
| | | | | | | | | | | | | | | | | | | | | | | With recent kernels (i.e. 4.17+) the configuration phase of the kernel will check for capabilities/options of the compiler for CVE and other mitigation support. For a general kernel, we want to ensure that CC is fully defined when the config targets are invoked (so the proper compiler will be checked). For linux-yocto, we also need to specify the compiler/tools dependencies for the configme task since it executes before configure and hence the main kernel build DEPENDS will not always be in the sysroot before it executes. Without those dependencies the kernel will be incorrectly configured (i.e. bison is missing) or the configuration will fail the mitigation tests. [YOCTO #12757] (From OE-Core rev: ff1bdd75d50f0ebac3d599e461685ace29559a82) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: pass env to post-relocateMartin Kelly2018-06-071-4/+16
| | | | | | | | | | | | | | It's useful for the post-relocate scripts to be able to see the SDK environment, for example to see the values of CC, CXX etc. in order to dynamically generate toolchain files. To enable this, source the SDK environment script prior to calling the relocate scripts. (From OE-Core rev: adcf69ee3310171580c28e141fec6997b1f06da4) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: print post-relocate errorMartin Kelly2018-06-071-0/+5
| | | | | | | | | | | | Currently, if a post-relocate script fails, it fails silently. We should be louder about this, as it likely indicates a broken SDK. Print a message if a post-relocate script fails. (From OE-Core rev: 369b5f3f98f8455c79731621cc669ad1948e2022) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: allow non-sh post-relocateMartin Kelly2018-06-071-1/+4
| | | | | | | | | | | | Currently, we look only for scripts matching *.sh, which means we can't write post-relocate scripts in other languages. Expand this to allow any type of script. (From OE-Core rev: 5569a6ec6d3c4358719350cac88afa69a76097a8) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: retab fileMartin Kelly2018-06-071-1/+1
| | | | | | | | | | A function is uses a mix of spaces and tabs. The rest of the file uses tabs, so switch to tabs uniformly. (From OE-Core rev: 693daaac7399a5a7665cd3bcbc915ff93db36db5) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dropbear: drop run time detection of read-only rootfsAndre McCurdy2018-06-041-4/+1
| | | | | | | | | | | | | | | | Previously, when dropbear was started via its init script, relocation of DROPBEAR_RSAKEY_DIR to support read-only rootfs was handled at run time from within the init script. Update the init script to take advantage of the read-only rootfs config setup by read_only_rootfs_hook() and therefore be consistent with startup under systemd (where relocation of DROPBEAR_RSAKEY_DIR is handled by the read_only_rootfs_hook() at build time). (From OE-Core rev: 4990f87b2f6a8b30c8d1c767636e7f5527f595ba) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: move codes into testimage_mainChen Qi2018-06-041-7/+6
| | | | | | | | | | | | | | | | | | | | | | testimage-auto is expected to run testimage task's codes automatically. But in fact, it's currently missing some codes, including testimage_sanity and create_rpm_index. This leads to the problem of unexpected runtime failure of test_dnf_makecache. The error message is as below. RESULTS - dnf.DnfRepoTest.test_dnf_makecache - Testcase 1744: ERROR This error is caused by the fact that create_rpm_index is not executed before running the tests. There's no reason why such codes should not be in testimage_main, so move them into it. (From OE-Core rev: fa7ba486ded13907f63f9300f66350ba2835a3f7) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: also check 'auto' to create rpm indexChen Qi2018-06-041-1/+1
| | | | | | | | | | | | | | Having 'auto' in TEST_SUITES will also run the 'dnf' test cases, so also check it to determine whether to create rpm index or not. This is to fix the following error when TEST_SUITES = "auto". RESULTS - dnf.DnfRepoTest.test_dnf_makecache - Testcase 1744: ERROR (From OE-Core rev: c1f4177848d25a9121f2a85da655ee414cd424b1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: fix behavior of empty TEST_SUITESChen Qi2018-06-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The current behaviour of TEST_SUITES is very confusing. setting: TEST_SUITES = "" result: Execute all test cases. setting: TEST_SUITES = "some_case_not_exist" result: Error out with 'Empty test suite' message. The expected behaviour of TEST_SUITES should be: 1. when 'auto' is in it, execute as many test cases as possible 2. when no valid test case is specified, error out and give user message The first one is implemented by a previous patch. The second one is fixed in this patch. Also add debug message to show test cases to be executed. This is for easier debugging. (From OE-Core rev: 909568821fbad8a6a7034b10a2dc349a210fdfc6) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: refactor native overrideMartin Kelly2018-06-041-10/+7
| | | | | | | | | | The native override is specified in two different places, so let's move it into a function to reduce code duplication. (From OE-Core rev: c455ec4a12d4966524da9436722476aa2d428765) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: update obsolete comment about rpm do_unpack dependenciesAndre McCurdy2018-05-291-1/+1
| | | | | | | | | | | | The previous comment was made obsolete by: http://git.openembedded.org/openembedded-core/commit/?id=2f31f1795bc0c85b1646bc7d9596bbe778cb84e5 (From OE-Core rev: 9a9330aebe201078a47441e1ef9a19a659017ba8) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc.bbclass: don't configure with --disable-dependency-trackingAndre McCurdy2018-05-291-0/+3
| | | | | | | | | | | | | One of the uses of externalsrc is to enable iterative editing and rebuilding of source files during development. In such situations, disabling Automake dependency tracking can lead to sources not being rebuilt even though files they depend on have been modified. (From OE-Core rev: af2f802d5b59203a887982af83252565b8078085) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: avoid duplicates in KERNEL_IMAGETYPE_FOR_MAKEAndre McCurdy2018-05-221-12/+16
| | | | | | | | | | | | | | | | Currently if KERNEL_IMAGETYPES contains both vmlinux and vmlinux.gz, KERNEL_IMAGETYPE_FOR_MAKE will end up containing two copies of vmlinux, which will result in two calls to "make vmlinux" from kernel_do_compile(). Avoid duplicating vmlinux in KERNEL_IMAGETYPE_FOR_MAKE plus some minor non-functional updates to formatting and comments. (From OE-Core rev: 80455a0b6cce6d12a5b32194d0cad2e4c7f71599) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: drop _build-${BUILD_OS} over-rideAndre McCurdy2018-05-222-2/+0
| | | | | | | | | | | | | Building on a host OS other than a recent version of Linux is not recommended or supported. Drop the historical _build-${BUILD_OS} over-ride to avoid giving the impression that other host OS's might be supported. (From OE-Core rev: 428fc39356cb77830de9e0d3f1dbd00f5868290a) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0Andre McCurdy2018-05-222-20/+17
| | | | | | | | | | | | | | | | There doesn't seem to be a clear reason to have two separate variables to hold whitelisted GPLv3 recipes. Both variables are treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is already equivalent to adding it to WHITELIST_GPL-3.0. Anyone needing to whitelist a GPLv3 recipe should now just use WHITELIST_GPL-3.0. (From OE-Core rev: d4dea76fbe9765d489e3e522a9d2c22049610c7b) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: drop _virtclass-native and _virtclass-nativesdk overridesAndre McCurdy2018-05-152-3/+0
| | | | | | | | | | | | | | | | The _virtclass-XXX over-rides are problematic in that they are higher priority than _forcevariable, which is documented as being the highest priority over-ride. Since they are now obsolete (replaced by _class-native and _class-nativesdk) drop them entirely rather than try to fix their priority. (From OE-Core rev: c5aa33ac483618bc23fbaccb0a18853186f9155d) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: detect CVE IDs listed on multiple linesJon Szymaniak2018-05-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Some backported patches fix multiple CVEs and list the corresponding identifiers on multiple lines, rather than on a single line. cve-check.bbclass yields false positive warnings when CVE IDs are presented on multiple lines because re.search() returns only the first match. An example of this behavior may be found when running do_cve_check() on the wpa-supplicant recipe while in the rocko branch. Only CVE-2017-13077 is reported to be patched by commit de57fd8, despite the patch including fixes for a total of 9 CVEs. This is resolved by iterating over all regular expression matches, rather than just the first. (From OE-Core rev: 8fb70ce2df66fc8404395ecbe66a75d0038f22dd) Signed-off-by: Jon Szymaniak <jon.szymaniak.foss@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/dnf: Add new dnf test casesJose Perez Carranza2018-05-151-3/+8
| | | | | | | | | | | | | Add test cases to test “exclude” and “installroot“ options, also modify the logic of filtering packages on the feed to have all the packages needed by the tests. [YOCTO #10744] (From OE-Core rev: 1121806603c6f621d084b692216f3f616a0768dc) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Stop appending _setscene to do_image_complete_setscene stampsMike Crowe2018-05-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Each time I build my image after the first, I end up with a do_image_complete_setscene stamp file with an extra _setscene appended to the name. Eventually, the filenames end up being so long that mv complains and the build fails. It looks like this behaviour was introduced when the special handling was added for do_image_complete in 2ff9d40dc88d43567472218cf3d3faf414398c71. So, let's ensure that the *_setscene* pattern is matched before anything else so that any do_image_complete_setscene stamp file is always ignored and the do_image_complete non-setscene stamp file is moved only once. It's not straightforward to just move *do_image_complete* after the *_setscene* pattern because do_image_complete stamps would then match do_image*. (From OE-Core rev: f04e6bd144deb0c8fe2742f66b18904b6619a502) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: improve do_unpack[cleandirs] logicRoss Burton2018-05-111-1/+1
| | | | | | | | | | | If a recipe sets S to ${WORKDIR}/ then the S != WORKDIR test doesn't work as expected. Use os.path.normpath() to normalise the paths so string comparison works. (From OE-Core rev: 06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Permit overriding of KERNEL_IMAGETYPE_FOR_MAKEMike Crowe2018-05-111-5/+6
| | | | | | | | | | | | | | | | | | Commit a1690131691507bbf5853540229b3ad775b836bf removed the ability of recipes to set KERNEL_IMAGETYPE_FOR_MAKE. Fix that by letting recipes continue to set their own KERNEL_IMAGETYPE_FOR_MAKE if they so wish. They may have been doing so for a while, and don't want to have their carefully-selected value trampled on by kernel.bbclass. This may be required if the recipe itself wants to build one type of kernel, but post-process it into a different type, rather like the vmlinux->vmlinux.gz support provided by kernel.bbclass. (From OE-Core rev: 38abd26fe7de321e0f1fc4895f754f34dee90f6c) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* allarch.bbclass: Exclude package_do_shlibs from do_package signatureKhem Raj2018-05-091-0/+1
| | | | | | | | | | | | | | | | | | | shlibs is largely useless for allarch, the particular usecase where it fails is when DISTRO_FEATURE is changing due to libc being different e.g. Variable package_do_shlibs value changed: -DISTRO_FEATURES{ldconfig} = Set +DISTRO_FEATURES{ldconfig} = Unset musl -> glibc or other way around 'ldconfig' gets added or deleted to DISTRO_FEATURE set, neither this distro feature nor the shlibs processing during packaging is of interest to allarch packages which are largely arch independent scripts (From OE-Core rev: 06602d56d1d311562144eafe459fcea36931a34c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Drop obsolete rpc and libnslKhem Raj2018-05-091-4/+0
| | | | | | | | | use libnsl2 and rpcsvc-proto packages (From OE-Core rev: 9dc9983901cec364ea57a72b9da1a0396b60663a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: drop obsolete codesChen Qi2018-05-041-5/+0
| | | | | | | | | | | | | | | The SSTATECLEANFUNCS mechanism was introduced to solve user/group deletion problem. After RSS mechanism was introduced, there's no need to do so. There was a patch to remove these obsolete codes for useradd.bbclass, but the codes in sstate.bbclass were not removed. So clean it up. (From OE-Core rev: 215b83ce892a7002ed0b1bd7b82a08e67ae15121) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic: add do_image_wic before do_image_completeMing Liu2018-05-041-0/+1
| | | | | | | | | | | | | | | We have some tasks depending on image's do_image_complete task, and we are also using WKS files to generate partitioned images, but now there is lacking a inter dependency between do_image_wic and do_image_complete, so we have to depend on both of them. Fixed by adding the dependency. (From OE-Core rev: e3a25f06f2cde701415f4130a43c9b3895d42f10) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native bbclass: handle base_libdir as wellKoen Kooi2018-05-041-0/+2
| | | | | | | | | | Native.bbclass needs to fixup both base_libdir and libdir to handle things like multiarch. This fixes wic and ext4.* image failures during do_rootfs where mkfs.ext4 can't find its libraries. (From OE-Core rev: 464dad0dc93aeeedd34d90c2f06596060ec135fd) Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts/meta-ide-support: Handle dash shells correctlyRichard Purdie2018-05-041-1/+1
| | | | | | | | | | | | Where /bin/sh is dash, the recent toolchain scripts change fails as the $(pwd) usage in oe-init-build-env doesn't function correctly. Fix this by saving and restoring the cwd and calling the script within its own directory. This fixes meta-ide-support on dash based systems. (From OE-Core rev: dceca6d34071b4cbef9e28bbf19dc12f5d925525) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: preserve host path in environment setup scriptChin Huat Ang2018-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | The environment setup script generated in the build directory sets the PATH variable by expanding ${PATH} which would have host paths filtered. Sourcing this script to run runqemu will not work as it complains host stty (/bin/stty) cannot be found. To resolve this, the script no longer expands ${PATH} during generation time, instead it will now source oe-init-build-env to initialize the build environment so that all host paths will be preserved. Also be sure to prepend STAGING_BINDIR_TOOLCHAIN to the PATH variable so that the toolchain from the build directory can be found. [YOCTO #12695] (From OE-Core rev: a64a144096c0637387244b89ed22f4b5352b2522) Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Make staticlib problems non-fatalOla x Nilsson2018-04-231-3/+6
| | | | | | | | | | | Allow debugsource listing using dwarfsourcefiles to fail for static libraries when the archive content is not as expected. (From OE-Core rev: e2235b7567a9aba474cda4cdc20cc9bfffc63711) 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>