summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* buildhistory: write the contents of the sysrootRoss Burton2019-06-281-1/+9
| | | | | | | | | | Changes to the sysroot are just as interesting during development, so write the file listing for the sysroot to buildhistory too. (From OE-Core rev: b3ac82a27ab70ed6996fe3087a578ac637820329) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: fix directories setuid and setgid bitsJoël Esponde2019-06-281-1/+2
| | | | | | | | | | | | | | | populate_packages relies on ``mkdir`` to both create a directory and set its permissions. However, ``mkdir`` honors the ``umask`` value. Therefore, some bits may be lost in the operation. In our case, the setgid bit on the directories were lost. This commit fixes this by having a distinct call to create the directory and to set the permissions. (From OE-Core rev: 0f82b53a650e76e0129fae6ce7581a41d042315b) Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@easymile.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipesRobert Yang2019-06-271-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake core-image-minimal update-alternatives: libtool has multiple providers with the same priority, please check /path/to/rootfs/usr/lib/opkg/alternatives/libtool for details Both libtool and lib32-libtool have the same priority (as they're the same recipe), so update-alternatives won't deterministically pick a provider. This means you could end up with an image using a 32-bit pkgconfig and 64-bit libtool, for example. Make extended recipes reduce priority by 1 (or 2, 3 ... when there are multiple variants in MULTILIB_VARIANTS) to fix the problem. [YOCTO #13418] (From OE-Core rev: a2f53255ed7fb3657c470cd6a4452d883edd11cc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives.bbclass: run update-alternatives firstly in postinst scriptRobert Yang2019-06-271-2/+5
| | | | | | | | | | | | | | | | | | Recipes like postfix run command newaliases in postinst, but newaliases is installed as newaliases.postfix, it needs run update-alternatives to update it to newaliases, so there was an error when installed postinst on target. Fixed: $ opkg install postfix Configuring postfix. ///var/lib/opkg/info/postfix.postinst: line 4: newaliases: command not found Run update-alternatives firstly will fix the problem. (From OE-Core rev: 52c36dd869c605c0065c17f9ed502a319ce3dd84) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_global: Fix KERNEL_VERSION expansion problemsRichard Purdie2019-06-271-4/+10
| | | | | | | | | | | | KERNEL_VERSION gets expanded at runtime to contain the real kernel version. There is code to ensure the signatures are determinisic but the multilib expansion code breaks this. Exclude the variable from the datastore used for expansion to avoid this. (From OE-Core rev: c068f907fee16477f59b6e5b168208aa4f677544) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_global: Fix multilib rebuild issueRichard Purdie2019-06-271-2/+1
| | | | | | | | | | | | | | | | | | | Building lttng-modules for a "lib32" multilib, then changing to a "lib64" multilib with "lib32" removed doesn't rebuild lttng-modules. This is due to the multilib pieces in RPROVIDES being added after RecipeParsed which is after the signatures are generated. Changing this to RecipeTaskPreProcess allows the multilib components to be accounted for correctly in the task hashes. This addresses failures on the autobuilder seen in lib64-core-image-sato-sdk builds where lttng-modules was being reused from qemux86 world build's lib32 version. (From OE-Core rev: a8dc13d4e4e34b061be5c2dd71f26cc0ad92a72e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache: rename intercept to update_gtk_icon_cacheRoss Burton2019-06-271-2/+2
| | | | | | | | | | | The intercept is called update_icon_cache which is vague: rename to update_gtk_icon_cache to make it clearer what it is for, and add a comment explaining what class caused it to be used. (From OE-Core rev: 3158adbe684890adc56af11e19af872e90e09d41) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: be idiomaticRoss Burton2019-06-271-8/+9
| | | | | | | | | | Instead of generating a series of indexes via range(len(list)), just iterate the list. (From OE-Core rev: 27eb839ee651c2d584db42d23bcf5dd764eb33f1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: avoid host contamination by GOCACHERicardo Ribalda Delgado2019-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | By default GOCACHE is set to $HOME/.cache. Fixes: ERROR: go-cross-dbfp4-1.12.1-r0 do_compile: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120) ERROR: Logfile of failure stored in: /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120 Log data follows: | DEBUG: Executing shell function do_compile | Building Go cmd/dist using /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/recipe-sysroot-native/usr/lib/go. | failed to initialize build cache at /home/pokyuser/.cache/go-build: mkdir /home/pokyuser/.cache: permission denied | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located at /workdir/build/tmp/work/x86_64-linux/go-cross-dbfp4/1.12.1-r0/temp/log.do_compile.8120) ERROR: Task (/workdir/repo/poky/meta/recipes-devtools/go/go-cross_1.12.bb:do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 23 tasks of which 16 didn't need to be rerun and 1 failed. (From OE-Core rev: 9a6d208b9979035bbfc1def80fb6558db4bddb12) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: support enable/disable optionsChangqing Li2019-06-211-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update-rc.d has added support of enable/disable options, which are expected to keep the previous configuration even after upgrade the packages. With support for these options, it will only create start/stop link when there are none, or it will keep the previous configuration. Our preinst uses "-f remove" to remove any links under the /etc/rcrunlevel.d which is conflicting behavior with disable/enable options, so remove it. For example, if a user disabled one service before upgrade, then after upgrade the service could be started. This happens because during preinst, all links have been deleted, then postinst may create the link to start service. With this change, we remove preinst and therefore keep the previous links so that after upgrade, if a link existed for the package, then the postinst will not create new start/stop links. * remove '-f' for postinst. Previously, the keepalived recipe used 'remove' during postinst, so we needed the -f, but now the keepalived recipe has fixed this problem, so it's safe to remove '-f'. [Yocto #12955] (From OE-Core rev: 7981d5261429cfb06030280460086f9af91876d9) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Clarify comment in cmake toolchain fileuninative-2.6Richard Purdie2019-06-201-1/+1
| | | | | | | | | | | | The comment is misleading and there was confusion in a bug report. In the native case STAGING_DATADIR would be equal to the native value so there isn't any issue but tweak the comment. [YOCTO #12761] (From OE-Core rev: 0fdf76305a3cb543c23d6122c523ce5c2af04a0c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Consider CVE that affects versions with less than operatorPierre Le Magourou2019-06-201-2/+14
| | | | | | | | | | | | | | In the NVD json CVE feed, affected versions can be strictly matched to a version, but they can also be matched with the operator '<='. Add a new condition in the sqlite query to match affected versions that are defined with the operator '<='. Then use LooseVersion to discard all versions that are not relevant. (From OE-Core rev: 3bf63bc60848d91e90c23f6d854d22b78832aa2d) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Manage CVE_PRODUCT with more than one namePierre Le Magourou2019-06-201-11/+14
| | | | | | | | | | In some rare cases (eg. curl recipe) the CVE_PRODUCT contains more than one name. (From OE-Core rev: 7f62a20b32a3d42f04ec58786a7d0db68ef1bb05) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: Remove dependency to cve-check-tool-nativePierre Le Magourou2019-06-201-45/+26
| | | | | | | | | Use the new update-cve-db recipe to update database. (From OE-Core rev: bc144b028f6f51252f4359248f6921028bcb6780) Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: define PACKAGECONFIG_CONFARGS before only sometimes appending ↵Martin Jansa2019-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | | to it * just to make sure it's expaned by bitbake before it gets executed in shell * e.g. with cmake.bbclass and cmake recipe (any recipe without PACKAGECONFIG options have this issue) it looks like this: bitbake -e cmake | grep EXTRA_OECMAKE= EXTRA_OECMAKE=" -DCMAKE_DOC_DIR=share/doc/cmake-3.14 -DCMAKE_USE_SYSTEM_LIBRARIES=1 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 -DKWSYS_CHAR_IS_SIGNED=1 -DBUILD_CursesDialog=0 -DKWSYS_LFS_WORKS=1 \${PACKAGECONFIG_CONFARGS}" (From OE-Core rev: 745b63f4e11a6536cabd97013973562631a0e080) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binconfig: don't try to fix up .la filesRoss Burton2019-06-191-9/+0
| | | | | | | | | | If we're going to clean buildpaths from installed .la files then we should do it globally, not in a class that only six recipes in oe-core use. (From OE-Core rev: bd4e2cd3f70243f52215f8c92bcd7eb088a9b9f6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove empty test that does nothingRoss Burton2019-06-191-7/+0
| | | | | | | (From OE-Core rev: 5da7ad1a483d0840a9a2e3b95fa62a1901be73f2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve buildpath warning messagesRoss Burton2019-06-191-1/+2
| | | | | | | | | | | | | | | | Instead of reporting large chunks of the work directory and not the package name: "File /work/corei7-64-poky-linux/libidn2/2.2.0-r0/packages-split/libidn2-dev/usr/lib/pkgconfig/libidn2.pc in package contained reference to tmpdir" We can clean up the paths and be more useful: "File /usr/lib/pkgconfig/libidn2.pc in package libidn2-dev contains reference to TMPDIR" (From OE-Core rev: 156329247b40e9ee97e6249468ac3b9af4dffb68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: introduce FIT_HASH_ALGAyoub Zaki2019-06-191-5/+8
| | | | | | | | | | sanitize fitImage hash algorithm selection with FIT_HASH_ALG switch default hash algorithm from sha1 to sha256 (From OE-Core rev: 8c9d5d59cb1575fac17c461090937df4cbb3d3b5) Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: show time spent writting buildhistoryMartin Jansa2019-06-191-0/+4
| | | | | | | | | | | * especially when pushing longer history to slow remote git server or when it timeouts during the push, it's useful to see where the time was actually spent (From OE-Core rev: 96f1225d47985d94d9ed91eb5e7affdd70671c79) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: compress arm64 kernelsBonnans, Laurent2019-06-181-2/+2
| | | | | | | | | | AArch64 images are not self-decompressing, thus usually much larger. Boot times can be reduced by compressing them in FIT and uImages. (From OE-Core rev: a725d188b5d6b5d3c5cf21cc2f3070a0fe711e18) Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: Combine stderr into stdout to see actual dtc errorJaewon Lee2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the subprocess command to run dtc was not properly displaying the error on console. Combining stderr into stdout for the dtc subprocess so the actual error can be seen on console without having to open the do_compile log. For example, previously on a dtc error, just the following stack trace and dtc command was being shown on console: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) ... Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '${INCLUDES}, '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1 with this patch, the actual error from the dtc command will be appended like the following: Subprocess output: Error: Label or path not found FATAL ERROR: Syntax error parsing input tree (From OE-Core rev: 1da43a558ffd5040a1b5aaebfc1c5118f5e59c01) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons: inherit python3nativeAnuj Mittal2019-06-141-0/+5
| | | | | | | | | | | | | | | | | | | scons tries to get build time vars by loading sysconfigdata. Inherit python3native instead of using host python and unset _PYTHON_SYSCONFIGDATA_NAME to avoid the need to depend on target python3 for sysconfigdata when using scons to build. Avoids build errors on still supported CentOS 7: | DEBUG: Executing shell function do_compile | scons: *** SCons version 3.0.5 does not run under Python version 3.4.8. | Python 2.7 or >= 3.5 is required. (From OE-Core rev: 44f303ba9fb193a985e8e4b7c6962883ae3970d1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: uboot-sign: Check UBOOT_DTB_BINARY before adding depsAlex Kiernan2019-06-122-2/+2
| | | | | | | | | | | | Since UBOOT_DTB_BINARY empty means we don't need to inject signatures into the U-Boot DTB, we can remove the dependencies between consumers of these two classes and resolve a circular dependency between u-boot and kernel. (From OE-Core rev: c6b49cb75285e71909d1f9e4bf636f186941b519) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: add override for image recipeChangqing Li2019-06-121-0/+2
| | | | | | | | | | | | | MACHINE set to qemux86-64 for lib32-core-image-sato, during do_rootfs, it will run install_complementary, which will get localedir by d.getVar("libdir"), without override, libdir will still be lib64. add override to fix it. (From OE-Core rev: 8ed0cf040abbfb0999ac92b59ca9b7067d340202) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Avoid passing empty prefix to os.path.relpathMike Crowe2019-06-121-7/+7
| | | | | | | | | | | | | | | | With meta-micro, ${prefix} is the empty string. This means that CMAKE_INSTALL_BINDIR:PATH and friends end up containing paths starting with many instances of "../", presumably due to os.path.relpath attempting to find its way to the current directory. Let's avoid this by ensuring that the root path always ends in a slash. If it already ends in a slash then adding another one shouldn't cause any problems. (From OE-Core rev: 67b19414c1c17f71f39c971b9f9fdd1f776516a1) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Make task clean depend on cleaning of make-mod-scriptsHaiqing Bai2019-06-111-0/+1
| | | | | | | | | | | | | | | | The package 'make-mod-scripts' creates files in 'kernel-build-artifacts/include/config' which are removed by 'cleanall/cleansstate' of 'virtual/kernel'. And this causes the below error while building out of tree kernel module: ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. Suggested-by: Jun Nie <jun.nie@linaro.org> (From OE-Core rev: f79c95f6a883e999e0c2ecfd60b6b696b7595497) Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: license: fix non-SPDX license being removed from INCOMPATIBLE_LICENSEQuentin Schulz2019-06-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-SPDX license (which is not an alias to an SPDX license) cannot currently be marked as incompatible in INCOMPATIBLE_LICENSE. In the current state, we take all INCOMPATIBLE_LICENSE and pass them through expand_wildcard_licenses which is only adding SPDX licenses that match the glob regexp of what is in INCOMPATIBLE_LICENSE (be it a direct match to an SPDX license or via an alias). This does not work well with custom licenses. E.g.: foo.bb: LICENSE = "FooLicense" conf/local.conf: INCOMPATIBLE_LICENSE = "FooLicense" `bitbake foo` Gives no warning, no error, builds and packages successfully, because INCOMPATIBLE_LICENSE is basically empty since FooLicense is neither in SPDXLICENSEMAP nor in SRC_DISTRIBUTE_LICENSES. Let's add the original licenses to the list returned by expand_wildcard_licenses to be able to handle the aforementioned case. INCOMPATIBLE_LICENSE = "FooLicense GPLv2 GPLv3+" used to "resolve" to "GPLv2 GPLv3". It now resolves to "FooLicense GPLv2 GPLv3 GPLv3+" which fixes the issue with custom licenses not being in SPDXLICENSEMAP or SRC_DISTRIBUTE_LICENSES and thus being left out of the blacklisted licenses. I needed to pass a list to expand_wildcard_licenses from the license_image class instead of the current output of map() because the operator [:] does not work on this kind of type, and list(map()) or anything that iterates over map() actually moves the iterator and breaks the forloop right after in expand_wildcard_licenses. (From OE-Core rev: 2d976587d703462db2b7b78661b05ac22fb93787) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Add OE_EXTRA_IMPORTSChris Laplante2019-06-081-1/+3
| | | | | | | | | | | | OE_IMPORTS is not intended to be touched by users, but there are cases in which layers might want to make additional Python modules available to Python functions. For example, Python modules defined in the layer themselves (under meta-layer/lib). (From OE-Core rev: 00fa8391365863fa7805ad61b2d1a8425b9ea040) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: consider QB_DEFAULT_FSTYPEAdrian Freihofer2019-06-081-1/+5
| | | | | | | | | | | | testimage.bbclass starts qemu with the first image type found in the IMAGE_FSTYPES list. It's weird: this ['wic', 'tar'] works but this ['tar'. 'wic'] does not. If QB_DEFAULT_FSTYPE is defined, this fstype is booted. (From OE-Core rev: aedb6bf9b6ccf37f69372642bc4c5dbbca92d0d9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons.bbclass: use python3-sconsTim Orling2019-06-081-1/+1
| | | | | | | | | | | SCons has supported python3 since 3.0.0 release, use it. [YOCTO #13381] (From OE-Core rev: 2ce507d65cd2558edc9e7929aff7b80463c26998) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Clean up writing of runtime pkgdata filesPeter Kjellerstedt2019-06-071-38/+18
| | | | | | | | | | This introduces a variable, PKGDATA_VARS, that contains the names of the variables that are to be output in the runtime pkgdata files. (From OE-Core rev: 43e55bfa040425cf93d94ac626a31f6fd00a7a74) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: Sort ELF file listJoshua Watt2019-06-041-0/+6
| | | | | | | | | | | Sorts the list of detected ELF files by path before processing. This ensures that when multiple files are hardlinked together the first one found is always the same. This is required to have reproducible builds. (From OE-Core rev: de86bfeda6e3845336a0b56c883b49219967128f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Ensure do_populate_sysroot has dependency on useradd variablesRichard Purdie2019-06-011-0/+1
| | | | | | | | | | | | | | | The do_populate_sysroot task doesn't rerun if you change any of the USERADD_PARAM or GROUPADD_PARAM variables, only do_package will. If another task depends on the recipe, this means it won't see any updated changes. This patch adds in the missing vardeps ensuring the code is deterministic. [YOCTO #13232] (From OE-Core rev: 37d0382a3c67f47f8cfdd977a041069bf912b8c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix build architecture corruption of sstate artefactsRichard Purdie2019-05-312-3/+5
| | | | | | | | | | | | | | | | | | | | When mixing aarch64 and x86_64 host builds with common sstate, useradd failures were found. This was due to references to: /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo or /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo on the wrong architecture within the useradd postinst files. Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains the arch component as well to avoid this. Add extra comments to cause the relavent sstate to be rebuilt. (From OE-Core rev: 0384622f72a6c0bd8225cf06f692340fdef67d4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: package modules.builtin.modinfoBruce Ashfield2019-05-311-1/+1
| | | | | | | | | | | | | | As of commit 898490c010b [moduleparam: Save information about built-in modules in separate file] (kernels v5.2-rc1+), modules.builtin.modinfo is generated as part of the kernel build process. We package it along with the other module artifacts, so it can be used by scripts/other build steps. (From OE-Core rev: 112a4d3b2b4a829dd5657b6533b1c1bb589d6c8e) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "image_types: use pigz to create .gz files"Anuj Mittal2019-05-301-1/+1
| | | | | | | | | | | | This reverts commit a559ffab30b7b45849ace023808c1fb20811d43d. This is not needed now that pigz has been marked as a drop-in replacement. (From OE-Core rev: 3a73662ea72fbf0180d9a66032b6d92248ae4ddf) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add named SRCREVs to the sstate hashMichael Ho2019-05-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fetchers support named sources that require setting a SRCREV with the source name as a suffix. These named SRCREV variables are not captured in the sstate hash calculation because they're only referenced within the bitbake fetcher function. Several recipes avoid this bug by adding the different SRCREVs to their packaging versioning but this is not enforced so it is very trivial to trip this bug case. Add a snippet to the base.bbclass anonymous python to add all named SRCREV variables to the vardeps of do_fetch to capture them in the sstate hash calculation. Testing of the bug can be shown by running the following bitbake commands with this patch set not applied: bitbake vulkan-demos | tee sed -i 's/SRCREV_gli = ".*"/SRCREV_gli = "xxx"/' \ ../meta/recipes-graphics/vulkan/vulkan-demos_git.bb bitbake vulkan-demos | tee; The above results in no errors despite a broken SRCREV because the recipe is considered unchanged by the bitbake sstate hash. After applying this patch the above commands instead result in a fetcher error which is correct. (From OE-Core rev: fdc000b8ae1577f1b29efb2cc4927664ad41e21c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Use compiler launcher variable when ccache is enabledPhilippe Normand2019-05-301-2/+9
| | | | | | | | | | | Setting the CMAKE_C{,XX}_COMPILER_LAUNCHER variables is the recomended way to deal with ccache in CMake. It allows build scripts to optionally opt-out of ccache, which is especially useful when the pre-processed GCC output is required. (From OE-Core rev: 0a36d1b342c0b4760bc75794c2e941a17012bc19) Signed-off-by: Philippe Normand <philn@igalia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Switch from bz2 to xzRichard Purdie2019-05-301-2/+2
| | | | | | | | (From OE-Core rev: 29fc9210b973be68de474e75068e4c72371afe5a) (From OE-Core rev: b6645596f2d2faf8f1fdfbedfe1edd004fbce6bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Use highest compression level for xzRichard Purdie2019-05-291-1/+1
| | | | | | | | | Whilst this may take longer to compress, it reduces network transfer and potentially extraction time so is worthwhile. (From OE-Core rev: 0a89d486cf596da791c27cff14ef3d6ca1cbb75a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* layer.conf: Whitelist lttng-tools->lttng-modules dependencyRichard Purdie2019-05-271-0/+3
| | | | | | | | | | | The API between lttng-tools and lttng-modules is safe, whitelist it as the dependency fixes tools failures. This needs a hack in the multilib class as right now there is no way to know if a given recipe is a kernel module or not. This needs to be revisited. (From OE-Core rev: 584e713bf7f6885a13c440cd45c0f469feb3a694) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: Make meson support aarch64_be.Lei Maohui2019-05-271-0/+2
| | | | | | | | | Added aarch64_be into cpu family. (From OE-Core rev: 40187613038aa9c1ca16eaa46d0669f69f80a398) Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add sanity checks to SRC_URIRoss Burton2019-05-211-1/+12
| | | | | | | | | | | | The SRC_URI almost definitely shouldn't be using ${PN}, and GitHub */archive/* tarballs are dynamically generated so the checksums will change over time. Detect both of these, and emit a QA warning if found. (From OE-Core rev: 21f84fcdd659544437fe393285c407e1e9432043) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: remove some temporary build filesJean-Marie LEMETAYER2019-05-211-0/+1
| | | | | | | | | | | | | | | | | | Fixes [YOCTO #11028] When dealing with node modules which use "node-gyp" [1] to build native addons to node. Some temporary build files stay in the image: object files, static library files, dependency files, ... This commit does not keep only the required files, but remove the files which can leads to QA issues (staticdev with static library files). [1]: https://github.com/nodejs/node-gyp (From OE-Core rev: bac9075f51f6acba2fcfbe9f79f97f5171186d9c) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: fix node and npm default directory conflictJean-Marie LEMETAYER2019-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #13349] When dealing with node modules which have declared "bin" files [1], npm will create a link in '/usr/bin' with a relative link to '../lib/node_modules/<module bin file>'. The commits e9270af4296ce2af292059617a717e42fc17425c and 2713d9bcc39c712ef34003ce8424416441be558e explicitely use '/usr/lib/node/' as install directory, but does not care about the "bin" symbolic linked files. In order to keep valid links, and to keep it as simple as possible, the path '/usr/lib/node_modules/' is used as install directory for npm. And a symbolic link is created to have a valid '/usr/lib/node/' path, needed for node. [1]: https://docs.npmjs.com/files/package.json#bin (From OE-Core rev: 2d72007deea7ed529f82b8a6e67e2715dd0a0dca) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: get npm package name from npm packJean-Marie LEMETAYER2019-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #12534] When using npm packages with exotic names, like "JSONSelect" (with uppercase) or "@angular/cli" (with at sign and slash), there are three different names: - the recipe name ("jsonselect" or "angular-cli") - the npm module name ("JSONSelect" or "@angular/cli") - the npm pack name ("JSONSelect" or "angular-cli") The commit fa9c077068a2acea04389fa2b44eb2e93548fce2 allow to have different recipe name and npm module name by setting the NPMPN variable. This commit allows to have yet another npm pack name. The pack filename is now dynamically retrieved from the 'npm pack' command. (From OE-Core rev: b6ffa59d03fbf53d1681fce5f8c3c1f163cf9923) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi-cfg, systemd-boot-cfg: use MACHINE_ARCHMartin Jansa2019-05-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | * both use KERNEL_IMAGETYPE variable which is MACHINE specific * fixes: === Comparing signatures for task do_configure.sigdata between hammerhead and mako === ERROR: grub-bootconf different signature for task do_configure.sigdata between hammerhead and mako basehash changed from 710332f3ec15670302dd690708730c9e418d53790ce36d6a91b049ae4f7069b1 to c9a46e58b4634b5fd47d20683f8320e15f5c4cb7628e3a62ed97d8528d7aabd2 Variable KERNEL_IMAGETYPE value changed from 'zImage-dtb' to 'zImage' ERROR: systemd-bootconf different signature for task do_configure.sigdata between hammerhead and mako basehash changed from 2abbaf6d7760696fbf1ff5df5705239b475ccbf6f0c831fc4031984c0ce0e9f2 to 24f1e7886dee02b04bc180acc1c946ad82ce842655e5a5f4a8006f4a8490f985 Variable KERNEL_IMAGETYPE value changed from 'zImage-dtb' to 'zImage' detected with: openembedded-core/scripts/sstate-diff-machines.sh --targets=world --tmpdir=tmp-glibc/ --analyze --machines="hammerhead mako qemux86" (From OE-Core rev: 90a47da8c50da49ecaf0e2786dc4d9a78c61189e) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: adjust a condition checkingMing Liu2019-05-161-1/+2
| | | | | | | | | | | do_bundle_initramfs does not have to depend on ${INITRAMFS_IMAGE}:do_image_complete if INITRAMFS_IMAGE_BUNDLE is not set. (From OE-Core rev: 6676411fccff2d331878e4ca1f9411aafb056a80) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Add RDEPENDS frpm PN-ptest to PN packageRichard Purdie2019-05-151-0/+1
| | | | | | | | | | | | | Many different ptests are breaking as they assume that ${PN}-ptest depends on ${PN}. It doesn't currently but should. If we fix this, many different ptests start passing when they previously failed. It does depend on fixing an issue in the dbus-test recipe which is done in the preceeding patch (mentioned in case this gets backported). (From OE-Core rev: b47194b57d94260b4e6438c5bf74914027f0b520) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>