summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* sstate.bbclass: Fix up white space lost in last commit.Peter Urbanec2014-10-181-20/+20
| | | | | | | | | | | Commit e9672387 split one long line into a multi-line string, but in the process white space between words was lost. This results in badly formatted output when this message is printed. (From OE-Core rev: b145374c0a498de0160a9b81f50ce0066ab14862) Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: specify func dirs for sstate_hardcode_pathWenzong Fan2014-10-181-0/+5
| | | | | | | | | | | | | | | | | | | | | For some recipes that inhrient cmake, the ${B} may be removed by cmake_do_configure() while sstate_hardcode_path() running, this causes build errors: Exception: OSError: [Errno 2] No such file or directory: \ '/path/to/build' The function sstate_hardcode_path() called command: $SSTATE_SCAN_CMD which extended as "find ${SSTATE_BUILDDIR} ..." So the proper function dirs could be ${SSTATE_BUILDDIR}. (From OE-Core rev: a949943e622b08485fc7632a0a743bc009079c67) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: skip pre/postrm scripts on upgrade, write only one shebangAndreas Oberritter2014-10-111-2/+15
| | | | | | | | | | | | | | | | Trying to upgrade busybox removing symlinks but update-alternatives need these links (sed, cut, tail, etc) in order to work. Adding test to avoid this scripts on upgrade fix the problem, same solution are found in package_rpm class. [YOCTO #6768] (From OE-Core rev: 7b9161dd0c475cca6ea7eb507f7c3c51869eb493) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_do_shlibs: Look for provider in the path thats in shlib_provider ↵Khem Raj2014-10-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dictionary shlib2 code puts the information about path where a provider will be found. e.g. {'/usr/lib/llvm3.3': ('libllvm3.3-llvm-3.3', '3.3')} This is obtained from new shlib2 pkgdata from llvm3.3/3.3-r0/pkgdata/shlibs2/libllvm3.3-llvm-3.3.list However when we search for NEEDED libraries we ignore the key above which is the path where the provider library is installed and instead just seach in libdir and base_libdir and hence libraries which are not in above standard search paths gets ignored even if they appear in DT_NEEDED sections and a note is emitted NOTE: Couldn't find shared library provider for libLLVM-3.3.so, used by files: .... IMO this note should actually become an error since if we do not have all DT_NEEDED libraries in image the system is dysfunctional. This patch extracts this libpath from key and add it to seach paths when looing for a provider of a shared library [YOCTO #6798] Change-Id: Ie5f08632e37ba8d3439c8aaae33bc68b8996792f (From OE-Core rev: bf8472274ac1e9a35f8cbc82357da6c95b396759) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchains-scripts: Add support for target environment scriptsRichard Purdie2014-10-101-0/+5
| | | | | | | | | | In a similar way to the previous script which adds support for native environment scripts, this adds support for target environment scripts too. (From OE-Core rev: 2d9466734f0c0c90724820bc36992b2800ffa4d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: split the too long lineRobert Yang2014-10-101-1/+22
| | | | | | | | | | | | The too long line would cause "git send-email" report errors: patch contains a line longer than 998 characters Though we can use "--no-validate" to force the send. (From OE-Core rev: e96723879eb3352a5bdea7b3e1a576edf9550e5a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: the second bb.fatal not workRobert Yang2014-10-101-1/+1
| | | | | | | | | | | | | | The code: bb.fatal("foo1") bb.fatal("foo2") Would make the second one not work, use bb.error for first one to fix the problem. (From OE-Core rev: 33a87187a8520e190bcade76cc965aa58faaa85a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: Allow sourcing of subscript for environmentOtavio Salvador2014-10-101-0/+10
| | | | | | | | | | | | | | | | | | | Sometimes we require extra environment settings to be available on the environment for proper SDK work. This were done, in past, using '_append' tasks however with the split of the environment in a canadian package this has been broken. The easier and more flexible solution is to use environment subscripts which are sources by the main script. These are now looked at: $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh and sourced. (From OE-Core rev: 457291f2ca084d1f43c0cca2175b448a22761887) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk.bbclass: Fix SRC_URI whitespace handlingMark Hatle2014-10-061-1/+1
| | | | | | | | | | | | | | | | | | | The SRC_URI may contain whitespace, but be otherwise empty. This can happen in the case: MYSRC = "" MYSRC_arm = "file://myarm.patch" SRC_URI += "${MYSRC}" Unless we strip blank spaces, to determine if it is empty, we can end up generating a "Source: " line which in invalid. This leads to the error: invalid Source: field is speified in the generated CONTROL file (From OE-Core rev: 16cedc3bce6fc37543e9ef053cd7c589e523ca1c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Reverse runtime symlinks should be tied to package generationOtavio Salvador2014-10-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In case a package is not generated (is empty and does not has allow empty flag set) the package data regarding reverse runtime dependency shouldn't be done. This were causing a false-positive in the meta-fsl-arm layer, when building mesa, as: ,----[ Error during build of MX53 in meta-fsl-arm ] | ERROR: The recipe mesa is trying to install files into a shared area | when those files already exist. Those files and their manifest | location are: | /.../build/build/tmp/sysroots/imx53qsb/pkgdata/runtime-reverse/libopenvg-dev | Matched in manifest-imx53qsb-amd-gpu-x11-bin-mx51.packagedata | Please verify which recipe should provide the above files. `---- Fixes [YOCTO: #6795] (From OE-Core rev: 9ef8728514b02dd2e18e87645298d9ec2e8a785a) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian: Disable the packagedata stamp-extra-infoRichard Purdie2014-10-061-0/+1
| | | | | | | | | | | Similarly to native/cross disable this since otherwise the packagedata can be marked as machine specific and if you switch machines which share an architecture, you'll get toolchain overlapping files errors. (From OE-Core rev: 96d557be3dedd6aea6199b3d28fbb7f5549fad69) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: enable a link for external module buildingNitin A Kamble2014-10-061-1/+2
| | | | | | | | | | | | | | | | | | Even though the kernel-dev package provides the required support for building external kernel modules on the target, some commonly used scripts and utilities fail as they are not finding the kernel module build support files at the desired location. Create the /lib/modules/<kernel-version>/build link on target pointing to the sources provided by the kernel-dev package, to fix the issue. Fixes Bug: [YOCTO #2968] (From OE-Core rev: aafa4bc896eb944aa4fc406807dd7e02f4b9b7ba) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Added bc-native as DEPENDSAlejandro Hernandez2014-10-061-1/+1
| | | | | | | | | | | The makefile checks for bc during for compilation [YOCTO #6781] (From OE-Core rev: c067e52cffe002de3b39aa1bced308dd532859c1) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add rpm allarch to overwrite whitelistRichard Purdie2014-09-301-1/+2
| | | | | | | | | | | The packagegroup allarch rpm files for multilib can overwrite each other since they are in theory indentical (in contrast to the other backends). We therefore need to whitelist this to avoid build failures now this overwrite failure is fatal. (From OE-Core rev: d59ade0ca2cf629937434fa423dfbf35ce1209fc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Add SPDX-specific source tree variable.leimaohui2014-09-301-1/+5
| | | | | | | | | | | | | Add SPDX-specific source tree variable for recipes where $S is a subdirectory of the source tree. [ RB - add a comment for SPDX_S ] (From OE-Core rev: 41784ad0588b4aba6897d6e9e0efd0314ab19747) Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: Fixup shell condition test syntax errorDarren Hart2014-09-301-1/+1
| | | | | | | | | | | | A warning is issued when run about an unexpected operator due to a syntax error with an extra if empedded in the shell conditional. Remove the extra if. (From OE-Core rev: f0566e127abc7bb90588b2a8bee12ad3e7d35b3e) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add SRCREV to do_fetch() hashRoss Burton2014-09-301-0/+1
| | | | | | | | | | | | Without this changing just the SRCREV won't re-fetch unless you embed the SRCREV into PV. The downside here is that every hash changes, so this causes a full rebuild. (From OE-Core rev: a414b17e1d783ad68a2d0f7d5922967449c05797) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Exclude MULTI_PROVIDER_WHISTLIST from do_populate_sysrootRichard Purdie2014-09-301-0/+1
| | | | | | | | | | | If you switch between multilib and non-multilib builds, pretty much everything rebuilds due to the use of MULTI_PROVIDER_WHITELIST in do_populate_sysroot. It doesn't need to do this so exclude that variable for checksum purposes. (From OE-Core rev: 7f3a44ff30d07083ee8c4e2b7ac91dc6a9c8857b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: update the timestamps after installRobert Yang2014-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Update the sstate file's timestamps after it is installed, it will be very useful for removing the old sstate file, especially, it's not easy to remove when use the shared SSTATE_DIR, we can easily remove them with this change, for example: $ find state-cache -type f -ctime +10 -exec rm -f {} \; Will remove the sstate file which isn't used by recent 10 days. We can use the -atime, but it is not always available, for example, when mounted with "-o noatime". The touch is a very light weight action, and the scripts/sstate-cache-management.sh also requires this. (From OE-Core rev: bbee747466a6947319cff2ffd676abf9432c16ae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gnomebase: fix indentationRoss Burton2014-09-291-7/+7
| | | | | | | (From OE-Core rev: 103ded50380916d210e293913eebb173f014063e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Change overlapping files warning to a fatal errorRichard Purdie2014-09-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When files overlap in the sysroot, something bad usually happened. We've had two independent cases recently where a couple of months after one of these warnings was shown, builds failed due to corruption. This change moves the warning to become a fatal error. The complaint I've had about this is that we need to tell the user what happened and more importantly how to recover from it. If we could recover from it, great but the trouble is we simply don't know what happened. As a compromise, we can document several of the possible scenarios in the error message. We don't normally go to this level of detail however in this case, I'm lacking other viable alternatives. I do believe it is important to stop as corruption occurs rather than letting the build contunue into territory that is not deterministic amongst other things. The complex message is followed by a simpler one in case the long message is too much for the user. (From OE-Core rev: 179ac7de03977b6e440409eddb2166819e07286a) (From OE-Core rev: 4b503f25f1ef8f554d3c76d88399db379dc818cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d/systemd: Remove OVERRIDES dependencyRichard Purdie2014-09-232-0/+3
| | | | | | | | | | | | | Taking run-postinsts and building for two machines which have different OVERRIDES leads to two different sets of stamps for an allarch package. We don't need to depend on OVERRIDES in these classes, the end resulting variables are good enough. We can therefore exclude the dependency and allow a single package to be generated for run-postinsts. (From OE-Core rev: fdc949154e64afb41dd4db3a97be74a15963128d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Add uninative - a way of reusing native/cross over multiple distrosRichard Purdie2014-09-231-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These patches are the start of a new idea, a way of allowing a single set of cross/native sstate to work over mutliple distros, even old ones. The assumption is that our own C library is basically up to date. We build and share a small tarball (~2MB) of a prebuilt copy of this along with a patchelf binary (which sadly is C++ based so libstdc++ is in there). This tarball can be generated from our usual SDK generation process through the supplied recipe, uninative-tarball. At the start of the build, if its not been extracted into the sysroot, this tarball is extracted there and configured for the specified path. When we install binaries from a "uninative" sstate feed, we change the dynamic loader to point at this dynamic loader and C librbary. This works exactly the same way as our relocatable SDK does. The only real difference is a switch to use patchelf, so even if the interpreter section is too small, it can still adjust the binary. Right now this implements a working proof of concept. If you build the tarball and place it at the head of the tree (in COREBASE), you can run a build from sstate and successfully build packages and construct images. There is some improvement needed, its hardcoded for x86_64 right now, its trivial to add 32 bit support too. The tarball isn't fetched right now, there is just a harcoded path assumption and there is no error handling. I haven't figured out the best delivery mechanism for that yet. BuildStarted is probably not the right event to hook on either. I've merged this to illustrate how with a small change, we might make the native/cross sstate much more reusable and hence improve the accessibility of lower overhead builds. With this change, its possible the Yocto Project may be able to support a configured sstate mirror out the box. This also has positive implications for our developer workflow/SDK improvements. (From OE-Core rev: e66c96ae9c7ba21ebd04a4807390f0031238a85a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use one package split for all firmware filename extensionsCarlos Rafael Giani2014-09-221-4/+1
| | | | | | | (From OE-Core rev: dd5313228879487ca2b11fc5d38fb821a2a810a5) Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base/meta-environment: Remove overlap from the twoRichard Purdie2014-09-221-26/+1
| | | | | | | | | | | | | | | | | | | | Currently we have the horrible situation where meta-environment packages the toolchain environment files and they get included in the SDK but are broken, then, the SDK code overwrites them with good versions. This is suboptimal. This change fixes the code in meta-environment to create working files and adds in the multilib support from populate_sdk_base, then we remove the code in that base bbclass and rely on the packages being installed if/as/when needed. This removes the duplication and the broken versions of the files, hopefully making all well. [YOCTO #6608] [YOCTO #6613] (From OE-Core rev: 063355e5965439c7b3253d692d7ab0ed1189d123) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass : Add support for cmake projects that use .S files.Philip Balister2014-09-221-0/+3
| | | | | | | | | | | | UHD and GNU radio use the cmake build system. The toolchain file made from cmake.bbclass does not set the variable needs by cmake projects that use .S files. UHD added some .S files and these changes are required to build recent UHD. (From OE-Core rev: 43ce4b804d433662fe77c6f5298060ba74a0e639) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: set SIGGEN_LOCKEDSIGS_CHECK_LEVEL default to errorHongxu Jia2014-09-171-0/+2
| | | | | | | (From OE-Core rev: 65020364bd089afbb83cd216e7ae2f837077bfc5) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig/sstate: Add support for locked down sstate cache usageRichard Purdie2014-09-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been giving things some thought, specifically why sstate doesn't get used more and why we have people requesting external toolchains. I'm guessing the issue is that people don't like how often sstate can change and the lack of an easy way to lock it down. Locking it down is actually quite easy so patch implements some basics of how you can do this (for example to a specific toolchain). With an addition like this to local.conf (or wherever): SIGGEN_LOCKEDSIGS = "\ gcc-cross:do_populate_sysroot:a8d91b35b98e1494957a2ddaf4598956 \ eglibc:do_populate_sysroot:13e8c68553dc61f9d67564f13b9b2d67 \ eglibc:do_packagedata:bfca0db1782c719d373f8636282596ee \ gcc-cross:do_packagedata:4b601ff4f67601395ee49c46701122f6 \ " the code at the end of the email will force the hashes to those values for the recipes mentioned. The system would then find and use those specific objects from the sstate cache instead of trying to build anything. Obviously this is a little simplistic, you might need to put an override against this to only apply those revisions for a specific architecture for example. You'd also probably want to put code in the sstate hash validation code to ensure it really did install these from sstate since if it didn't you'd want to abort the build. This patch also implements support to add to bitbake -S which dumps the locked sstate checksums for each task into a ready prepared include file locked-sigs.inc (currently placed into cwd). There is a function, bb.parse.siggen.dump_lockedsigs() which can be called to trigger the same functionality from task space. A warning is added to sstate.bbclass through a call back into the siggen class to warn if objects are not used from the locked cache. The SIGGEN_ENFORCE_LOCKEDSIGS variable controls whether this is just a warning or a fatal error. A script is provided to generate sstate directory from a locked-sigs file. (From OE-Core rev: 7e14784f2493a19c6bfe3ec3f05a5cf9797a2f22) (From OE-Core rev: 884d4fa3e77cf32836f14a113c11489076f4a84d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: fix sstate_hardcode_path()Robert Yang2014-09-161-1/+1
| | | | | | | | | | | | | | | The "grep -e (x|y)" doesn't work, for example: $ echo xy | grep -e '(x|y)' No output We can use "grep -E" (extended regexp) or "grep -e x -e y" to fix it. It only affected the cross recipes. (From OE-Core rev: 62722de6d0ec00608eacc2cb0396362aced00047) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: Improve disk usageRichard Purdie2014-09-161-1/+8
| | | | | | | | | | | | Currently copies of the license files are made which wastes disk space and adversely affects performance. We can link these instead in most cases for small performance gains. (From OE-Core rev: 0b0f3631fd22f731b6aeedb73965e367b695028b) (From OE-Core rev: fe00d4f479c4fb5e4be5dda616a4de0a257ef6c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Fix incorrect return value handlingRichard Purdie2014-09-161-1/+2
| | | | | | | | | | | | | | The use of [ and && here means $? is reset and the exit 1 error interception wasn't working, leading to "file changed as we read it" errors from sstate_create_package when heavily using hardlinks. Fix this by placing $? into a variable. (From OE-Core rev: 6e51f900b76b06c09a3d6927f8db7398e2c035ed) (From OE-Core rev: 75040a098e11927e6872e3a2a6286fe3ed0c7f47) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_base: enable adding custom commands to SDK install script1.7_M3Paul Eggleton2014-09-111-0/+7
| | | | | | | | | | | | Add an SDK_POST_INSTALL_COMMAND variable which allows additional commands to be added towards the end of the SDK install script, for e.g. additional processing that needs to be done as part of installing the SDK. (From OE-Core rev: 10df0718d6a626d99beb68cde8d914ee0820d7eb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packagegroup.bbclass: Use immediate expanded PACKAGE_ARCH valueOtavio Salvador2014-09-101-2/+6
| | | | | | | | | | | | | | When the PACKAGE_ARCH is dependant of a override, the expanding is done too late triggering the false-positive error of wrong inclusion order. To fix this we use immediate expansion operator to evaluate the PACKAGE_ARCH value in order to choose to load 'allarch' class or not. (From OE-Core rev: 2c9b1d304daade7b0907320aeb9c522e7ab9dcab) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: handle .dsp firmwareCarlos Rafael Giani2014-09-101-0/+1
| | | | | | | | | | | A few firmware files use this filename extension, like korg/k1212.dsp . Create respective packages. (From OE-Core rev: 4a4877c2e7cdcb8a1d0a54add600c0cd4e92e647) Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix for sstate class changePaul Eggleton2014-09-101-1/+1
| | | | | | | | | | | | | SSTATEPOSTINSTFUNCS is now set with = in sstate.bbclass, and because the line here in buildhistory.bbclass ends up being parsed before that we now need to use _append or the value we are adding will be wiped out. This fixes buildhistory no longer recording package information since OE-Core revision 9d659c6f20fa4a141b491c62a3ef0dfb1f896d9c. (From OE-Core rev: b5c05b474554925524073023f3aac2532c87537f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu.bbclass: add -r ${OLDEST_KERNEL} parameterMartin Jansa2014-09-101-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * in some cases (e.g. with external toolchain which doesn't respect our reasonably old version set in OLDEST_KERNEL) it's possible to have libc which requires newer kernel than what we have on builders, qemu supports -r param to use different uname than what's returned by host system. * change qemu_run_binary to pass -r ${OLDEST_KERNEL} and add the same to QEMU_OPTIONS which are used by qemuwrapper-cross * maybe we should eventually convert all qemu_run_binary usages always include qemuwrapper-cross dependency and always call qemu through that (it seems very strange that qemu_target_binary is called from qemuwrapper and for allarch recipes it can return qemu-allarch as qemu binary). qemu_run_binary is used by: meta/classes/gtk-immodules-cache.bbclass: ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \ meta/classes/qemu.bbclass:def qemu_run_binary(data, rootfs_path, binary): meta/recipes-core/systemd/systemd_213.bb: ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ meta/recipes-graphics/pango/pango.inc: ${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \ and qemuwrapper directly by: scripts/postinst-intercepts/update_font_cache:PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\ scripts/postinst-intercepts/update_pixbuf_cache:PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\ (From OE-Core rev: 1f0bff320077f4d9f2ee51096a1438e8cae9dd0d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add extra intercept functions SSTATEPOSTCREATEFUNCSHongxu Jia2014-09-101-1/+3
| | | | | | | | | | | | | In some cases we do either need to add extra sstate manipulation functions, or change the existing modification functions. This patch parametrizes it to SSTATEPOSTCREATEFUNCS after sstate_create_package (From OE-Core rev: ed5fb9c69fcf0f6e8e98f72ac753c66119468ea5) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add QA check: file-rdepsRobert Yang2014-09-101-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ipk or deb can't depend on file such as "/bin/bash" or "/usr/bin/perl", so it knows nothing about the pkg depends bash or perl, thus there would be dependencies problems when we run "apt-get install/remove <pkg>" on the target, this check can help us find the issues and then fix them manually. * Benefits: - Help to fix file rdepends issues for ipk and deb - Help to fix abnormal rdepends. - Help to check whether the rdepends is OK or not after build each recipe (don't have to install to the image), for example, a recipe may generate 10 binary packages, only a part of them will be installed to the image by default, we can know whether the rdepends are OK or not for the ones which are installed, but can't know the ones which are not installed, this patch can help check all the 10 binary packages' rdepends. * Basic designs: - Get all the RDEPENDS on the chain. - Get the pkg's FILERPROVIDES from oe.packagedata.read_subpkgdata() and save to set filerdepends. - Get each RPDEPENDS' FILERPROVIDES, RPROVIDES and FILERPROVIDESFLIST, and save to set rdep_rprovides. - Do the set "filerdepends -= rdep_rprovides" and QA issue if filerdepends is not null. [YOCTO #1662] (From OE-Core rev: cd5e0f01cdb4e7c759c01cf3f87952a20253737c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Fix for Bug 6633Fabrice Coulon2014-09-031-2/+6
| | | | | | | | | | | | | | | When using the useradd-staticids.bbclass under meta/classes, this error occurs: "<username> - <username>: Username does not have a static uid defined." There was a problem with the regular expression for parsing parameters, it was sometimes returning an empty string. I have fixed this by skipping empty strings. (From OE-Core rev: f249ef32709069a2680b92dc5a5b4f6545d014b7) Signed-off-by: Fabrice Coulon <fabrice@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add optional improved directory handlingRonan Le Martret2014-09-031-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | During spec generation, ideally directories should not be auto packaged under the %file section of rpm packages but take ownership of specific directories. * packages only empty directories or explict directory. See: - http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html - "The %dir Directive" * This will prevent the overlapping of security permission. For example, in Tizen the directory /etc have smack label 'System::Shared' So Only one package should own and set the label of /etc to prevent the overwriting of the smack label. Existing behaviour is maintained if DIRFILES is not set. If it is set, the modified behaviour is used. If can be set to an empty value by core recipes to trigger the modified behaviour. [RP: Modified to allow optional usage of DIRFILES] (From OE-Core rev: 0e33d232916125ba5305ced7200cc00f8b5f7b22) Signed-off-by: Ronan Le Martret <ronan@fridu.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: fix logic in populate_packages_updatercdChen Qi2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'and' logic for the check is wrong. To make things clear, please see the example below. Say that we have a recipe A, which has a sysv-init style init script named initA and no corresponding service file. The recipe inherits update-rc.d, but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd' inside it, but it doesn't have 'sysvinit'. Now if we build an image, with the 'and' logic in the check, the symlinks for initA would not be installed into /etc/rc?.d directory. This is incorrect. Because there's no corresponding service. The symlinks in /etc/rc?.d/ should be created so that the service would be correctly started at boot time. The logic should really be 'or' in the check. This is actually what the code was when it was originally written. Several different situations are listed below to prove the correctness of the 'or' logic. If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed with corresponding preisnt/postinst generated and added. If 'sysvinit' is not in DISTRO_FEATURES, we have three situations. 1) A has initA and A.service. In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS, so no preinst/postinst about update-rc.d would be added and the symlinks for initA would not be created. 2) A has initA, and the functionality of initA is not implemented internally in systemd. In such situation, symlinks for initA would be installed. 3) A has initA, and the functionality of initA is implemented internally in systemd or in some other recipe. Examples for such situation are alsa-state and keymaps in OE. In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe so that there would be no preinst/postinst scripts about update-rc.d added. (From OE-Core rev: 6272c81509bbdb5d602056ceaa6f2c02bbf47a41) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/compress_doc.bbclass: compress man/info pagesHongxu Jia2014-09-031-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A distribution compression policy should be established, and used by all packages. It compressed man pages in ${mandir} and info pages in ${infodir} 1. The doc will be compressed to gz format by default, which is configured in ${DOC_COMPRESS} 2. It will automatically correct the compressed doc which is not in ${DOC_COMPRESS} but in ${DOC_COMPRESS_LIST} to the format of ${DOC_COMPRESS} policy 3. It is easy to add a new type compression by editing local.conf, such as: ... DOC_COMPRESS_LIST_append = ' abc' DOC_COMPRESS = 'abc' DOC_COMPRESS_CMD[abc] = 'abc compress cmd ***' DOC_DECOMPRESS_CMD[abc] = 'abc decompress cmd ***' ... [YOCTO #1238] (From OE-Core rev: 5c833e188bbf25c35c24f78eaa761a191d6b5801) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add builddir macro to define source directoryRichard Purdie2014-09-031-0/+1
| | | | | | | | This allows its usage in other RPM macros so files in ${S} can be found. (From OE-Core rev: 649ddd4b17e8a1f94ca9f4bc3a71560437c61909) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add custom extension support for spec generation.Richard Purdie2014-09-031-0/+5
| | | | | | | | | | | | | | | | | Add hooks to allow customisation of the rpm spec files. Since python functions aren't visible in the data store, one variable is used to trigger the call to a separately named function. A dummy function is not provided since this then triggers various class ordering complexities which are best avoided. Ultimately this will be replaced by a refactor of the code to generate the spec file using a python class. This allows the tizen layer to add hooks for the security manifests for example. (From OE-Core rev: 03ac91815013c0e85c4694b3ab849257e658aeba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-swab.bbclass: Account for eglibc -> glibc moveKhem Raj2014-09-011-1/+1
| | | | | | | (From OE-Core rev: 9942fe4b36e2a18510cb0805ddb7be71d72a75a2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: deltask package_qaRobert Yang2014-09-011-0/+1
| | | | | | | | | | | | | The native recipe doesn't need package_qa, and it has a race issue with do_unpack which requires the clean dir of ${S}, then causes error: NOTE: recipe opkg-utils-native-0.1.8+gitAUTOINC+eae0d8fa44-r0: task do_package_qa: Failed ERROR: Task 283 (virtual:native:/path/to/opkg-utils_git.bb, do_package_qa) failed with exit code '1' (From OE-Core rev: 6ad0979a6064755fd6d86b568bd3cbbcdd3d4e37) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: replace --is-ancestor with basic git porcelain commandsBruce Ashfield2014-09-011-2/+1
| | | | | | | | | | | | | | | --is-ancestor is a relatively new git option [commit 5907cda1, Aug 30 2012]. To support build machines with older versions of git installed, we can use the basic porcelain commands to acheive the same check. merge-base: "--is-ancestor A B" can be replaced with: if test "$(git rev-parse --verify A)" = "$(git merge-base A B)" (From OE-Core rev: 2ddfffe52720d1df70b04131eac553776da7bc73) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: convert echo statements to bb* equivalentsBruce Ashfield2014-09-011-32/+22
| | | | | | | | | | | Use the bbinfo, bberror, bbfatal equivalents to the existing echo statements within the kernel-yocto processing. This makes us consistent with the other messages from the build system. (From OE-Core rev: 1686d69de08bcecd39942802df18c4f0ca029ffe) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: allow custom non-meta, SRCREV format buildsBruce Ashfield2014-09-011-20/+22
| | | | | | | | | | | | When custom respositories are built (like a pure kernel.org repo), the machine_meta SRCREV format is not applicable. As such, we shouldn't check for the meta branch and we shouldn't only check SRCREV_machine based revisions. (From OE-Core rev: bf555ee3305114483aa5083cde1accd23b46a39e) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: clean overly complex branch checkoutBruce Ashfield2014-09-011-6/+5
| | | | | | | | | | | | | Since the git fetcher ensures that branches exist, we no longer need to validate the branch and have a conditional checkout of the source. We can remove some checks and ensure that whenever we exit the do_kernel_checkout routine that a branch is always checked out. (From OE-Core rev: 2ffa3f8be6996877cd552ff22260de35c19c413d) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>