summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2017-09-13python*native.bbclass: suppress user site dirsMartin Kelly
Currently, $HOME/.local is being added into sys.path for the native Python, causing subtle host contamination. Suppress this by exporting PYTHONNOUSERSITE = "1" as documented in PEP 370. Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13goarch.bbclass: set ARM_INSTRUCTION_SET to "arm"Matt Madison
Go does not play well with thumb, so ensure that the toolchain and any packages use arm, not thumb, instructions. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13go.bbclass: Add ptest supportOtavio Salvador
This adds ptest support for Go packages so its unittest content is packaged and integrated onto the test framework. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13go.bbclass: Add "ldflags" to QA skip listOtavio Salvador
Currently every Go package will end with GNU_HASH in the ELF binary however adding it to every recipe is cumbersome so instead we handle that here. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13go.bbclass: add support linking against shared runtimeMatt Madison
For architectures that support it, use the -linkshared build option to build packages against the shared Go runtime. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13goarch.bbclass: identify archs with Go dynamic linking supportMatt Madison
Go only supports shared libraries for some architectures, so add a variable for use elsewhere that gets a non-null value only for those architectures. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13insane: consider INSANE_SKIP without package-specifier tooRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-13insane: don't pass skip list to functions which don't respect itRoss Burton
When these functions are being called INSANE_SKIP has already been taken into account, so don't confuse the code by passing the skip list. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-13kernel: Move Device Tree support to kernel.bbclassOtavio Salvador
The Device Tree is commonly used but it is still kept as a .inc file instead of a proper class. Instead now we move the Device Tree code to a kernel-devicetree class and automatically enable it when the KERNEL_DEVICETREE variable is set. To avoid breakage in existing layers, we kept a linux-dtb.inc file which raises a warning telling the user about the change so in next release this can be removed. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12image_types: support lz4 compressed squashfsEnrico Scholz
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12go.bbclass: enable nativesdk builds for Go packagesMatt Madison
Adding the necessary overrides for nativesdk builds. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12go.bbclass: clean up CGO_xxx settingsMatt Madison
* use conditional assignment for the CGO_xxx variables, so they can be overridden more easily * remove the TOOLCHAIN_OPTIONS and TARGET_CC_ARCH references, since those are already present in CC and CXX * remove the TARGET_ prefix so the values are appropriate for native, nativesdk, etc. builds * move the GOROOT export away from the CGO settings and closer to its definition Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12go.bbclass: remove some xxx_FINAL variablesMatt Madison
GOROOT_FINAL is used by the Go linker for rewriting source paths when the build GOROOT is not the same as the runtime GOROOT, but the other _FINAL variables aren't really needed. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12go.bbclass: remove GO_GCFLAGS nad GO_LDFLAGSMatt Madison
These variables are not used anywhere. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12go: split out go-runtime into separate recipeMatt Madison
Reorganize the Go toolchain build to split out the Go standard runtime libraries into a separate recipe. This simplifies the extension to crosssdk and cross-canadian builds. * Adds a patch to the go build tool to prevent it from trying to rebuild anything in GOROOT, which is now resident in the target sysroot. * 'go' bb and inc files are now for building the compiler for the target only. * 'go-cross' bb and inc files are now just for the cross-compiler. * Adds virtual/<prefix> PROVIDES for the compiler and runtime * Removes testdata directories from the sysroot during staging, as they are unnecessary and can cause strip errors (some of the test files are ELF files). * Re-enables pacakage QA checks, adding selective INSANE_SKIP settings where needed. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12Revert "kernel-module-split: rrecommend kernel-image instead of rdepend"Martin Hundebøll
This reverts commit e0ed52c51464855e9a6a37ea49df7efde7e91076. Commit e0ed52c514 ('kernel-module-split: rrecommend kernel-image instead of rdepend') changed kernel modules to rrecommend kernel-image instead of rdepend on kernel. This broke existing setups, where the kernel is omitted by setting RDEPEND_kernel-base = "". Revert the patch, as the existing way of omitting kernel-image in images works just fine. Signed-off-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11staging: gracefully abort if two recipes conflict in the sysrootRoss Burton
When building the per-recipe sysroot keep track of what files we're installing and where they came from, so we can detect when a file is installed by two different recipes and tell the user what these recipes are (instead of just showing a os.link() stack trace). [ YOCTO #11631 ] (From OE-Core rev: 606a8e0ca218f023e362c3678122d36d537f95de) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: add GO_INSTALL_FILTEROUT variableMatt Madison
When using the Go 'vendor' mechanism to bring in dependencies for a Go package, the default GO_INSTALL setting, which uses the '...' wildcard, will include the vendored packages in the build, which produces incorrect results. There are also some Go packages that are structured poorly, so that the '...' wildcard results in building example or test code that should not be included in the build, or fail to build. This patch adds a mechanism for filtering out a subset of the sources. It defaults to filtering out everything under the 'vendor' subdirectory under package's main directory, which is the normal location for vendored packages, but can be overridden by a recipe to filter out other subdirectories, if needed. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: add do_unpack function to handle common casesMatt Madison
Go source trees have a particular structure, with all sources located under ${GOROOT}/src/<import-path>. The fetcher step implemented by the 'go get' command automatically follows this structure, so we need to do the same here. Since most Go packages are hosted in git repositories, this adds a custom do_unpack() function that sets the destsuffix to match the expected directory structure, for any git SRC_URIs that haven't had a destsuffix explicitly set in the recipe. This simplifies recipe writing for the most common cases. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: separate ${S} and ${B}Matt Madison
Add a do_configure task to populate ${B} by symlinking in the src subdirectory under ${S}, which lets us point GOPATH at ${B}. This lets us take advantage of the automatic directory creation and cleaning for do_configure. This necessitates a change to do_install to split the installation of the sources and built artifacts. Taking advantage of some additional tar options, we can eliminate the extra staging area and extra recursive chown command. So overall efficiency should be improved. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: Use an auxiliary variable to add the build dependenciesOtavio Salvador
This is going to easy the addition of nativesdk and virtual providers in the future. This change is based on the meta-golang[1] layer. Thanks to Matt Madison <matt@madison.systems> for his work on this. 1. https://github.com/madisongh/meta-golang Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: exported function cleanupMatt Madison
Since this is a class, it should follow the class function export mechanism for its task functions, and should set directory-related flags for directories they need. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: Enable parallel buildOtavio Salvador
The parallel build is based on PARALLEL_MAKE variable but can be overriden setting the GO_PARALLEL_BUILD one. This change is based on the meta-golang[1] layer. Thanks to Matt Madison <matt@madison.systems> for his work on this. 1. https://github.com/madisongh/meta-golang Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: Use a global Go build flagsOtavio Salvador
We now use a GOBUILDFLAGS to provide a global variable to control the build flags to be given to Go. This change is based on the meta-golang[1] layer. Thanks to Matt Madison <matt@madison.systems> for his work on this. 1. https://github.com/madisongh/meta-golang Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11goarch.bbclass: Add support for ARMv5Otavio Salvador
This adds support to return the proper ARMv5 format. This change is based on the meta-golang[1] layer. Thanks to Matt Madison <matt@madison.systems> for his work on this. 1. https://github.com/madisongh/meta-golang Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11goarch.bbclass: Replace logic for setting GOARMWill Newton
The previous logic applied a regex to TUNE_FEATURES which could set the GOARM value to 7 incorrectly, for example when dealing with an arm1176 core. Simplify to check for the presence of "armv7" instead. At the same time add a check for "armv6" and set GOARM to 6 in that case. Signed-off-by: Will Newton <willn@resin.io> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11go.bbclass: Fix binary installation path detectionOtavio Salvador
Go toolchain changes the installation path when building for the same architecture as the build host. This was already been considered in the GO_BUILD_BINDIR variable but was not being used by the go class. This fixes following error: ,---- | ERROR: go-dep-0.3.0-r0 do_package: QA Issue: go-dep: Files/directories | were installed but not shipped in any package: | /usr/lib/x86_64-oel-linux/go/bin/dep | Please set FILES such that these items are packaged. Alternatively if | they are unneeded, avoid installing them or delete them within | do_install. `---- Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11goarch.bbclass: Stop passing True as second argument of d.getVarOtavio Salvador
The d.getVar has the second argument as True by default, avoid passing it here. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11kernel: Stop using update-alternativesOtavio Salvador
The update-alternatives where using relative links so not being really in use since December 2016 (see OE-Core:c7bc46b9 "kernel: Fix symlinks") so instead we now generate the relative symlinks during the do_install task and drop the update-alternatives use at all. Acked-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11package_[deb|ipk]: improve multiprocess logic when creating deb/ipk packagesLeonardo Sandoval
Current implementation does not handle possible exceptions coming from child processes, the latter responsible for creating packages. With the aim to have more control, use pipes to communicate exceptions and stop package creation in case of failure. Helps to debug [YOCTO #12012]. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11package_deb, ipk: improve subprocess output on package manager commandLeonardo Sandoval
Redirecting stderr to stdout helps debugging issues, i.e instead of just getting the return code, get also the error log from the pkg manger This commit is in the way to figure out the root cause of [YOCTO #12012], where dpkg-deb fails with a 2 return code and according to the man page, there are multiple issues leading to the same code. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11gtk-doc.bbclass: add all directories where .so files are found to library ↵Alexander Kanavin
search path This should reduce the need to manually specify the path in recipes. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11insane.bbclass: write QA issues to log file only when they are in ERROR_QA ↵Martin Jansa
or WARN_QA * QA check which aren't included in WARN_QA and ERROR_QA are shown during the build only as NOTE message (not shown at all with default knotty setting), so it might be surprising to see them later in qa.log file Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-05cve-check.bbclass: detect patched CVE's also from patch file namesMikko Rapeli
While poky master branch has been fixed so that all CVE patch files have the: CVE: CVE-2017-1234556 strings in the patch comments, many older versions of poky and other meta layers are not, but the CVE patches quite often have the CVE id in the patch file name. If the CVE: string also found, there are no duplicates in the report. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-05rootfs-postcommands: add test for unsatisfied RRECOMMENDSJose Alarcon
The do_rootfs log contains a number of unsatisfied package recommendations. At the moment those are only visible when reviewing the rootfs log. This patch adds an extra check to surface any unsatisfied recommendation as WARNINGS to the build output. Enable this check with: ROOTFS_POSTPROCESS_COMMAND += "rootfs_log_check_recommends;" Signed-off-by: Jose Alarcon <jose.alarcon@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-05rootfs-postcommands: remove empty lineJose Alarcon
Signed-off-by: Jose Alarcon <jose.alarcon@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-01insane.bbclass: Warn if ${COREBASE}/LICENSE is usedSaul Wold
The top level LICENSE file is not actually a license, it refers other licenses that are used by Bitbake and Meta-data. Relying on this file could cause problems for recipes when this file changes, which it is about to. (From OE-Core rev: a1948ab38c9cb7f0b16cce9dadc03ae6e2fe44ad) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-01package_deb.bbclass: Handle colons in dependenciesPeter Kjellerstedt
Perl dependencies may look as "Perl(Foo::Bar)", but dpkg does not support the non-alphanumeric characters. There was already special handling present for turning '(' and ')' into '__'. This change does the same for ':'. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-01package: Change PACKAGE_BBCLASS_VERSIONRichard Purdie
The silent rpmdeps failures fixed in a preceeding commit mean we need to rerun all packaging. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-01staging: Fix a logic error which caused dependency removalRichard Purdie
There was a logic error in the dependency cleanup code which meant it would remove dependencies which other tasks still depended upon. Fix the path names so the comparisions work as intended. This fixes dependencies accidentally disappearing from sysroots under certain reconfiguration situations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31classes/license: drop erroneous sha256 parameter in LIC_FILES_CHKSUMPaul Eggleton
In OE-Core commit a48fea275b08ff3d3dfc9a928aeb04768db35873, a check on the value of a "sha256" parameter was added, however there was no mention of this in the commit message and no corresponding code to actually verify the checksum as sha256 was added along with it either, so there's no point in getting the value. Additionally it was assuming that a sha256 value would be present without checking first, with the result that if you leave out the md5 value in a recipe intentionally in order to get it to tell you the correct value on the next build, you got a traceback instead of the appropriate error containing the information. Drop this entirely - if we want to implement this we need to do it properly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-30image_types.bbclass: improve reproducibility of .gz filesJuro Bystricky
When compressing with "gzip", do not save the time stamp in the compressed file metadata. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-30qemuboot.bbclass: create deterministic qemuboot.conf fileJuro Bystricky
The lines in qemuboot.conf are in random order. This patch fixes this by printing the lines in sorted order. This makes it easier to compare two different builds for any differences. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-30(PRE)MIRRORS: fix pattern for npm:// without slashOlaf Mandel
For URIs with the npm:// transport but with no other slash in it, the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match. Make the last slash in the pattern optional in the mirros.bbclass and own-mirrors.bbclass classes. Many URIs with the npm:// transport have no slash after the host part: npm://registry.npmjs.org;name=foo;version=0.1.2 This means that MIRRORS and PREMIRRORS containing entries like the first one will not match these URIs: npm://.*/.* # fails to match npm://.*/?.* # matches this and URIs with path components For normal regular expressions, a pattern like 'npm://.*(/.*)?' would probably be preferred, but that won't work here: the pattern gets split into the substrings 'npm', '.*(' and '/.*)?', which are not valid regular expressions individually. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29gettext.bbclass: do not add virtual/gettext to DEPENDSAlexander Kanavin
gettext has a notoriously slow configuration step, and so in my testing this greatly speeds up building core-image-minimal: from 21m36s to 19m2s (empty sstate and tmp, but pre-populated downloads). I have also built world, and core-image-sato to make sure it doesn't break or modify the build, and there is no difference whatsoever in packages and images content. Target gettext seems not to be used for anything. Also fix up insane.bbclass to remove the corresponding QA check. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29insane: add qa check for uppercase recipe nameYeoh Ee Peng
Since we disabled uppercase characters in overrides a few releases ago, uppercase characters in recipe names (and for that matter, distro and machine names) cannot be supported due to their reliance upon overrides including the name. QA check will produce an warning message when it verify that recipe name is uppercase. [YOCTO# 11592] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27staging: Ensure dependencies are removed before being addedRichard Purdie
Currently items are added to the sysroot, the obsolete items are removed. If a change such as pkgconfig -> pkgconf is made, this leads to conflicts of overlapping files in the sysroot. In order to better support this, handle removing items before adding them. This requires some minor refactoring to construct the installed list before the main function loop, otherwise there are no changes in this patch other than reordering the operations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-27staging: Avoid sysroot removal racesRichard Purdie
Currently a task could remove a dependency needed by another task leading to build failures, often due to missing dependencies (e.g. dynamic libraries not being found). This was often seen for all-arch recipes in package_write_rpm. When removing a dependency, first check that no other task active for the recipe has that same dependency. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-24populate_sdk_ext: Add BB_SERVER_TIMEOUT to SDK_LOCAL_CONF_BLACKLISTRichard Purdie
Whilst this should work we see failures in testsdkext at the moment when this is set. Add this to the blacklist for now until we can fix these issues meaning we can at least test BB_SERVER_TIMEOUT in other scenarios. Bug 119733 has been opened to track this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-24kernel-yocto: relax BSP definition testBruce Ashfield
commit 44aea7b873 [kernel-yocto: ensure that only valid BSPs are built] introduced a new check to ensure that a valid BSP definition was found, rather than building something that 'closely' matched the current MACHINE. This check breaks valid configurations which do not have a bsp definition but are otherwise completely configured machines. To allow both elements to co-exist (and not add warnings or errors to otherwise valid builds), we first check to see if an empty bsp definition was found, but then check to see if a defconfig was provided. If a defconfig has been provided, that is a sign that the board configuration is complete and we should continue the build without otherwise bothering the user. Tested on meta-raspberrypi and linux-yocto* Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>