aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2017-03-13package.bbclass: fix locations of debugedit and rpmdeps utilitiesAlexander Kanavin
rpm4 installs them in different locations than rpm5. This also replaces our custom rpmdeps-oecore with standard rpmdeps; I'm not seeing a significant performance penalty. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13u-boot: add option to specify FDT argument in extlinux.confJack Mitchell
Also fixes a use before defined bug with localdata. Signed-off-by: Jack Mitchell <jack@embed.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13terminal: Use original PATH for terminalsRichard Purdie
Now that we filter out PATH to only the utilities we rely upon, the devshel terminal was broken since it can no longer find the terminals. Even if we fix that, the user couldn't access any of their commands within devshell which somewhat defeats its purpose. Add the original PATH back to the environment to restore that behaviour since this is more in line with user expectations and it wouldn't be possible (or desireable) to whitelist all the commands a user might want to use from the shell. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11uninative: remove unneeded call to sparse copyStephano Cetola
As of this commit: 39f5a05152aa0c3503735e18dd3b4c066b284107 patchelf no longer inflates file sizes. Since the files are no longer inflated by patchelf, we can skip using cp with the --sparse option. More details as to how patchelf has changed are available in that commit log. Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11classes: add devupstream classRoss Burton
This class lets you use BBCLASSEXTEND to add a variant of the recipe that fetches from an alternative URI (such as git:) instead of a tarball. For example: BBCLASSEXTEND = "devupstream:target" SRC_URI_class-devupstream = "git://git.example.com/example" SRCREV_class-devupstream = "abcd1234" This variant will have DEFAULT_PREFERENCE set to -1 so it needs to be selected to be used, and any development-specific tweaks can be done with the class-devupstream override, for example: DEPENDS_append_class-devupstream = " gperf-native" do_configure_prepend_class-devupstream() { touch ${S}/README } It currently only supports creating a development variant of the target recipe, not native or nativesdk. The BBCLASSEXTEND syntax (devupstream:target) was chosen so that support for native and nativesdk can be added at a later date. Support for other version control systems such as subversion is limited, as bitbake's automatic fetch dependencies on for example subversion-native are not generated. [ YOCTO #10215 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-11base/bitbake.conf: Filter contents of PATH to only allow whitelisted toolsRichard Purdie
We currently have a determinism problem in that the host tools present in PATH can influence the build. In particular, the presence of pkg-config on the build host can mask missing pkgconfig class dependencies. This adds in a new HOSTTOOLS variable and then uses it to set up a directory of symlinks to the whitelisted host tools. This directory is placed as PATH instead of the usual /usr/bin:/bin and so on. This should improve determinism of builds and avoid the issues which have been particularly obvious since the introduction of recipe specific sysroots. If users find there is a tool missing, they can extend HOSTTOOLS from a global class or global conf file. Right now the settings should be enough to build everything in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10go: Add recipes for golang compilers and toolsKhem Raj
* This is converging the recipes for go from meta-virtualization and oe-meta-go * Add recipes for go 1.7 * go.bbclass is added to ease out writing recipes for go packages * go-examples: Add an example, helloworld written in go This should serve as temlate for writing go recipes * Disable for musl, at least for now * Disable for x32/ppc32 which is not supported Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10license: don't assume source files are UTF-8Ross Burton
We can't assume that source files are entirely UTF-8, so when copying the license blocks open the file as binary instead of text. [ YOCTO #11135 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10sanity.bbclass: allow s3 protocol when sanity checking MIRRORS, etcAndre McCurdy
Bitbake now supports an Amazon AWS S3 fetcher: http://git.openembedded.org/bitbake/commit/?id=6fe07ed25457dd7952b60f4b2153d56b15d5eea6 Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10sstate.bbclass: update .siginfo atimeEd Bartosh
.siginfo files are not being accessed from local or NFS-mounted sstate mirrors when sstate package is installed, so their atime is not updated. If sstate mirror is cleaned based on access time, they get deleted, even though they are still being used. Updated atime of .siginfo symlinks with 'touch -a'. This command dereferences symlinks pointing to the local mirror and updates atime of the .siginfo file on the mirror. [YOCTO #10857] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08useradd.bbclass: drop obsolete codeMaxin B. John
Cleanup useradd class by removing the code made obsolete by the introduction of Recipe Specific Sysroot. Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08kernel-arch: Lock the toolchain to use gcc compilerKhem Raj
kernel and external modules are still using gcc to build Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08base.bbclass: improve wording when skipping recipes with incompatible licensesAndre McCurdy
The previous wording, e.g. ERROR: wget was skipped: incompatible with license GPLv3 isn't very clear and could be taken to imply that the recipe is incompatible with its own license. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08module.bbclass: Add inherit of pkgconfigPeter Kjellerstedt
This is needed for the make_scripts task. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08buildhistory.bbclass: Only execute get_extra_sdkinfo when sdk is enabledAníbal Limón
If sdk ins't in BUILDHISTORY_FEATURES the get_extra_sdkinfo fails because no information about sdk is generated in buildhistory repo. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04buildhistory.bbclass: use tabs as separator in installed-package-sizes.txtMikko Rapeli
All other fields are separated by tabs except KiB and binary package name. This helps users, *cough managers*, who import this file into MS Excel to calculate file system usage summaries. Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04kernel.bbclass: Give sanity check function an opt-out variableCalifornia Sullivan
Having no opt-out method and adding the task to linux-yocto.inc was causing issues. For example, linux-yocto-dev would often fail because it uses AUTOREV with no way to dynamically change the PV. Add a variable to turn off the sanity check, allowing an easy opt out, and set the opt-out variable in linux-yocto-dev, fixing the issue with AUTOREV. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04package.bbclass: Add SHLIB detection support for mingw targetsNathan Rossi
Add support to detect dll files as shared objects as well as process Windows .dll and .exe files to determine the runtime libraries dependencies. This implementation is sufficient to detect and map runtime library dependencies between packages. And does not implement any version naming conventions that might apply for .dll files (e.g. lib*-x.dll). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04update-alternatives.bbclass: Disable for mingw32 targetsNathan Rossi
When building for mingw32 targets (e.g. nativesdk cross compiling for windows), disable the dependency on update-alternatives as the Windows platform does not support symlinks or package management. This avoids the complex (partly non-buildable for mingw32) dependency chain virtual/update-alternatives -> opkg-utils -> python -> ... Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04autotools.bbclass: delete the extra varflag set for autotools_copy_aclocalsDengke Du
The autotools_copy_aclocals has been droped, so the varflag set for that should be removed. Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04ptest.bbclass: use BPN in PTEST_PATH for multilibJackie Huang
Use BPN instead of PN in PTEST_PATH for multilib builds, or we get two directories for a package in libdir which doesn't make sense, e.g. $ ls /usr/lib/*coreutils /usr/lib/coreutils: libstdbuf.so /usr/lib/lib32-coreutils: ptest Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro featureAndre McCurdy
USE_LDCONFIG could previously be set to 0 by distros which do not require ldconfig or ld.so.conf on the target. Since more and more recipes may need to respect that option, replace the ad-hoc variable with a distro feature. Distros which previously set: USE_LDCONFIG = "0" Should now instead use: DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig" Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04wic: add WKS_FILE_DEPENDS variableEd Bartosh
This variable should be used to specify dependencies that will be added to DEPENDS only if wic image build is 'active' i.e. when 'wic' is in IMAGE_FSTYPES. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-03testsdk: Fix lockfile patchRichard Purdie
In the previous lock removal patch I mixed up the two tasks and broke sdk testing. Fix this by removing locks for both sdk and extsdk. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03populate_ext_sdk: Merge auto.conf into local.confRichard Purdie
auto.conf is included before local.conf. Instead of keeping them separate, merge them into the extsdk local.conf. As it happens we can do this quite neatly, more neatly than the current code IMO and it makes the configuration easier for the end user to understand too. This means auto.conf is then available for the testsdk code to use for testing purposes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03populate_ext_sdk: Append to SSTATE_MIRRORSRichard Purdie
We need to appent to SSTATE_MIRRORS in case other areas of code are also setting the variable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03testsdk: Drop lockfile usageRichard Purdie
We should be able to test sdks in parallel. As far as I can tell, this restriction crept in for no good reason, based on locks that testimage used for the non-qemu case. Therefore remove the lock and allow sdks to test in parallel. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03sanity: Allow whitespace only mirror entriesRichard Purdie
Forcing the use of "\n" in mirror variables is pointless, we can just require that there are pairs of values. With the bitbake restriction relaxed, we can relax the sanity check too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-02testsdk: Use auto.conf instead of local.conf to set SSTATE_MIRRORRichard Purdie
The local.conf file can get overritten and changed by the SDK so (ab)use auto.conf instead to ensure our configuration tweaks get applied. Also ensure we append to any other configured SSTATE_MIRROR variable that already exists. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext/devtool: use finally instead of repeating cleanupRoss Burton
Use the finally: block to always to cleanup. Now that the test harness in testsdk.bbclass has monkey-patched CalledProcessException to display the output we don't need to do that in the test case. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01populate_sdk_ext: Allow generation of meta-extsdk-toolchain even for minimal ↵Richard Purdie
SDKs If you build a minimal eSDK currently, you don't build meta-extesdk-toolchain even if you will have built most of its dependencies. This means when you try and install a toolchain into the eSDK, it fails, breaking our automated testing of the eSDK. Therefore add the dependency unconditionally even when a minimal eSDK is being built and allow the automated testing to work. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01testsdk: Handle minimal eSDK and avoid download costsRichard Purdie
When using a minimal eSDK, testing currently fails as the sdk isn't populated. We therefore setup the eSDK under test to point at local sstate and execute a command to ensure the toolchain is populated since most of the tests depend on this being present. At the same time, add in a link to DL_DIR through own-mirrors so that tests which fetch source (e.g. the kernel module one) can use the local stash. This cuts test execution of the kernel module test from 2000s to 120s. We did try using DL_DIR directly but that causes uninative issues requiring other workarounds so own-mirrors is neater. Together these fixes unbreak eSDK testing on the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01insane.bbclass: Add missing dependenciesMariano Lopez
package_qa task requires some tools installed in sysroot; with the introduction of recipe specific sysroot this task won't have such tools installed if it's forced to run. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01base.bbclass: Fix OE_IMPORTSJoshua Watt
Udpate OE_IMPORTS to include oe.license because it is being used. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01buildstats.bbclass: Avoid index exception in /proc/PID/io parsingPavel Modilaynen
There is some probability (depends on system load) to get empty or line containing "0" as the last line while reading /proc/PID/io. Avoid build failure by checking if line contains separator ":" before split. Signed-off-by: Pavel Modilaynen <pavelmn@axis.com> Signed-off-by: Daniel Lublin <daniel@lublin.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01license.bbclass: run chown only under pseudoMarkus Lehtonen
The copy_license_files() function in license.bbclass is called in two different contexts. First, it is run as part of the do_populate_lic task. In addition, it is called from do_package task when LICENSE_CREATE_PACKAGE is enabled. The function has code that changes the owner of license files to root which is meant only to happend in the latter case - i.e. under do_package which is run under pseudo. Previously, the code was blindly always running chown and just ignored errors that happened when running from do_populate_lic. This patch changes it to be more intelligent, only doing chown when running under pseudo. [YOCTO #10897] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01classes/license.bbclass: Don't copy unneeded licenses by packageAníbal Limón
Usually a recipe only provides one package but when provides more than one package the LICENSE variable per package (i.e. linux-firmware) needs to take into account to avoid unnecesary copy of licenses into packages. The patch validates if LICENSE exists in package LICENSES in order to don't copy unneeded licenses. As result of this patch some packages will not contain licenses there are not into LICENSE variable. For example: acl contains GPLv2+ instead of GPLv2+ and LGPLv2.1+ libacl contains LGPLv2+ instead of GPLv2+ and LGPLv2.1+ This behaviour is declared on the acl recipe as: SUMMARY = "Utilities for managing POSIX Access Control Lists" HOMEPAGE = "http://savannah.nongnu.org/projects/acl/" SECTION = "libs" LICENSE = "LGPLv2.1+ & GPLv2+" LICENSE_${PN} = "GPLv2+" LICENSE_lib${BPN} = "LGPLv2.1+" [YOCTO #10325] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01license.bbclass: Don't copy again LICENSE already handled as no-genericAníbal Limón
The NO_GENERIC_LICENSE mapping was added [1] to enable copy LICENSES from upstream source code into recipe licenses, previously that only common-licenses was processed. This result on copy twice the NO_GENERIC_LICENSE specified because there is a mapping between license in LIC_CHKSUM and NO_GENERIC_LICENSE. In order to avoid double copy one as generic_ and other as LICENSE. keep track of licenses already copied. For linux-firmware the result will be only generic_ licenses into common-licenses. [YOCTO #10325] [1] http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104222.html Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01recipes: Make use of the new bb.utils.filter() functionPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-28kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file in the deploy directory warrants the complexity it brings elsewhere. Let's just remove it entirely. In particular, if two do_image_complete tasks run in parallel they risk both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time. Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file. In theory this should be safe because "cp -alf" will just cause one to overwrite the other. Unfortunately, coreutils cp also has a race[1] which means that if one copy creates the file at just the wrong point the other will fail with: cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to +‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680 Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23binconfig.bbclass: fix get_binconfig_mangle()Robert Yang
The command was: s += " -e 's:-L${libdir}:-LOELIBDIR:;'" s += " -e 's:-I${includedir}:-IOEINCDIR:;'" s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'" s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'" The STAGING_LIBDIR and STAGING_INCDIR now contains WORKDIR, so the result would be incorrect like: TCL_INCLUDE_SPEC='-IFIXMESTAGINGDIRTARGET/usr/include/recipe-sysroot/usr/include/tcl8.6' Note, the "/usr/include/recipe-sysroot" is not needed. Move the last two sed commands ahead will fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23native.bbclass: populate native recipe with it's filesSaul Wold
This allows a native package's recipe-sysroot-native to be populated with that packages native image files. This in turns allows it to be used by scripts or other tools without creating un-necessary DEPENDS. An example of this is systemtap-native and the crosstap script. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23kernel.bbclass: do_deploy requires depmodwrapperRobert Yang
Fixed: run.do_deploy.27809: line 155: depmodwrapper: command not found Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23terminal.bbclass: export configure varsRobert Yang
So that we can easily reproduce configure by: $ $CACHED_CONFIGUREVARS ./configure $CONFIGUREOPTS $EXTRA_OECONF [YOCTO #9423] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23useradd-staticids: fix typo for '--expiredate'Peter Bergin
There is a typo in the useradd-staticids.bbclass that causes error during do_install. If build was configured to use usedadd-staticids and the recipe included (for example): USERADD_PARAM_${PN} = "--expiredate '' testUser" Due to the typo this added the wrong option '--expiredata ' that caused an error. Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23oeqa/runtime/context.py: Fix use of getTarget() with testexportMariano Lopez
The idea on getTarget is to use kwargs to send custom variables to different targets, instead of this, a new variable was added (just used for custom targets) and this broke testexport. So in order to fix it, just add the custom variable to kwargs. This fixes the use of getTarget() in testexport class that was introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-23image_types_wic: fix expansion errorEd Bartosh
Variable WKS_SEARCH_PATH was not fully expanded when used directly in this expression: WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}" This caused expansion error: bb.data_smart.ExpansionError: Failure expanding variable WKS_FULL_PATH, .... which triggered exception SyntaxError: invalid syntax (WKS_FULL_PATH, line 1) Calling d.getVar instead of directly referencing variables should fix the issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-19image-container.bbclass: Error if not using linux-dummyRandy Witt
In the typical case of a container, the user doesn't particularly care about the kernel version used. Since using linux-dummy prevents building a kernel in the most common case, alert the user if they choose a container image, but don't also specify linux-dummy. In the cases the user actually does want to build against particular kernel headers, etc, they can override by setting IMAGE_CONTAINER_NO_DUMMY = "1". [YOCTO #9502] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-19image-container.bbclass: Add the "container" IMAGE_FSTYPESRandy Witt
The "container" fstype does very little other than pick tar.bz2 as the actual image type and disable installation of ROOTFS_BOOTSTRAP_INSTALL. [YOCTO #9502] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-19kernel-yocto: trivial: remove extra } from bsp_definitionBruce Ashfield
A typo introduced an extra } in the logging of the bsp_definition. While this won't cause problems .. it needs to be fixed! Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>