aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2014-07-25autotools.bbclass: Enhance sed regexp to avoid extra subshellMatthieu Crapet
head -n1 can be done using sed. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25debian.bbclass: inherit packageRoss Burton
This class defines a package_name_hook implementation but as EXPORT_FUNCTIONS is order-dependent it needs to inherit package.bbclass first to ensure that the "base" definition in there is defined first, otherwise with a suitable inherit order of debian and then a packaging class can result in the stub package_name_hook being incorrectly used. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25ptest-gnome: add ptest helper for GNOME packagesRoss Burton
Many GNOME packages are using their InstalledTests pattern, where the test suite can be trivially installed. To avoid repeating the same logic over and over, add a class to encapsulate this. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25cross-canadian: Copy target_ definitions from cross.bbclassRichard Purdie
A while back we fixed the cross definitions to work better in multilib configurations, apply the same fixes to cross-candian.bbclass Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variantsRichard Purdie
Most people expect the toolchain from a multilib build to contain multilib components. This change makes that happen and is easy for users to override should they want something different. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25allarch: Generate same package for MIPS and non-MIPS targetsMike Crowe
LINKER_HASH_STYLE differs between MIPS and non-MIPS targets. This means that LDFLAGS differs too. LDFLAGS is exported so it influences all task hashes. Unfortunately this means that packages with architecture "all" differ depending on whether they are built for a MIPS or non-MIPS target. This causes a lot of unnecessary churn in the ipk/all directory when switching build targets. The simplest way to fix this is to ensure that LDFLAGS stays the same for architecture "all" packages by clearing it. It shouldn't being used by such packages anyway. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25kernel: don't copy .so.dbg files into kernel source installBruce Ashfield
In 3.16+ x86-64 kernel builds produce a vdso64.so.dbg file. If this file is copied into the kernel source install multiple QA failures are triggered. Specifically, this file triggers a debug package split that results in files installed but not shipped, and invalid .debug file errors. By ensuring that .so files are not copied, we avoid this incorrect split with no impact on future build phases. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2014-07-25insane: Add build depends checkRichard Purdie
Now that we can get the task dependency tree from bitbake, we can start to use this to strengthen our QA checks. If a dependency is added on something which isn't in our dependency tree, that is obviously a bad thing for example. This patch therefore checks the RDEPENDS against the list of tasks and ensures we do have a dependency present, if not a QA warning or error can be issued through the usual mechanism. The implementation is complicated by needing to resolve the RDEPENDS to a PN using pkgdata. Its possible that can be an RPROVIDES of another package so we need to check that too if it isn't a direct RDEPENDS. To allow this test to work, we need to extend the do_package_qa dependencies to include all RDEPENDS. In practise the do_package_write_* tasks already do this so there should be no new circular dependencies or any issues like that. For now the issues are warnings as there are issues this finds in OE-Core which need to be resolved and certainly will be in other layers too. This change should simplify and assist some of Martin's dependency scripts, the idea for this came from a discussion with Martin. It has changed in that it doesn't just cover shlibs dependencies but checks all dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23toolchain-script: Really fix CANADIANEXTRAOE issuesRichard Purdie
There was an error in the previous fix for the powerpc toolchain issue, this should correct it (and simplify the code too). [YOCTO #6490] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23sanity: Check for setgid/setuid TMPDIRRichard Purdie
Building in a TMPDIR which has setgid or setuid is a bad idea. We could try and reset the permissions but since these can also invade into other directories like the cache or sstate, lets tell the user to fix it instead. [YOCTO #6519] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23kernel-module-split.bbclass: Allow autoloading multiple modules or modules ↵Martin Jansa
where basename != module name * new KERNEL_MODULE_AUTOLOAD syntax doesn't support modules where basename and module name don't match (usually - and _), e.g.: module_autoload_bq27x00_battery = "bq27x00-battery" * sometimes it's useful to load modules in particular order and module_autoload allowed to just list multiple modules, e.g.: module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-s3c24xx snd_soc_s3c24xx_i2s snd-soc-dfbmcs320 snd-soc-wm8753 snd-soc-neo1973-wm8753" or module_autoload_g_ether = "s3c2410_udc g_ether" restore this possibility which is useful for incorrect dependencies between modules Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23image.bbclass/rootfs.py: add variables to rootfs[vardeps]Roxana Ciobanu
Added base variables and package backend specific variables to rootfs[vardeps] in order for rootfs to rebuild when changes are made. Set some variables as [func] to inform bitbake that they are shell scripts, so that it invokes its shell dependency parsing. Without marking them as functions, changes in the actual function body would not trigger rootfs rebuilds. [YOCTO #6502] Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19insane.bbclass: avoid QA errors for n32 kernelMing Liu
A series of commits had been integrated to avoid qa checking code throwing the bitsize not matched error for x32 kernel files, the same logic is also needed by n32 kernel which was not addressed in that series. This commit extends the condition for n32 kernel files. Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19default-distrovars/multilib: update license whitelists to use canonical namesRoss Burton
Now that all licenses are canonicalised to SPDX names when processing, we need to rename the whitelists to the match. [RP: Fixed up multilib.bbclass too] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19license.bbclass: canonicalise licenses when dealing with INCOMPATIBLE_LICENSERoss Burton
If INCOMPATIBLE_LICENSE=GPL-3.0 but the recipe sets LICENSE=GPLv3, the current code won't trigger because they're different strings. Fix this by attempting to canonicalise every license name to a SPDX name, so both names in this example become GPL-3.0. [ YOCTO #5622 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19initscripts: save /etc/timestamp with seconds accuracyBlair Elliott
Currently, /etc/timestamp is saved with minutes accuracy. To increase the accuracy, modify the save-rtc.sh and bootmisc.sh scripts to save and read /etc/timestamp respectively with seconds accuracy. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19populate_sdk_base: ensure that filenames with empty space character are handledJoão Henrique Ferreira de Freitas
When extracting toolchain, if the list $executable_files has filenames with empty space character, the list will created but relocate_sdk.sh will not handle it well. This will lead to the below erro: ./tmp/deploy/sdk/buildtools-mytools-x86_64-nativesdk-standalone-1.6.1.0.sh Enter target directory for SDK (default: /opt/mydistro/mytoolset/1.6.1.0): You are about to install the SDK to "/opt/mydistro/mytoolset/1.6.1.0". Proceed[Y/n]? Extracting SDK...done Setting it up.../opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: sintaxe error `token' `(' /opt/mydistro/mytoolset/1.6.1.0/relocate_sdk.sh: line 2: `e The same occurs with replacement of ${SDKPATH} in configs/scripts/etc files. We should ensure that full path is protected before relocate_sdk.sh and ${SDKPATH} replacement calls. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19license.bbclass: fix indentation in python functionRoxana Ciobanu
If we don't fix this, the fix for bug 6502 will trigger warnings that the write_package_manifest function contains tabs. Related to fix for [YOCTO #6502]. Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-17fontcache: Fix build dependency errorsRichard Purdie
This addresses warnings like: WARNING: QA Issue: liberation-fonts rdepends on fontconfig-utils but its not a build dependency? [build-deps] since the dependencies were being added at package time and were not visible to bitbake. Also take the opportunity to convert to use PACKAGEFUNCS rather than the horrible populate_packages_append. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-17cross-canadian: Fix shlibs directory after recent shlibs changesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16classes/insane: Show QA check nameChong Lu
QA errors/warnings would show the name of the QA failure in the error/warning message. The format is listed: <message> [QA check name] You can see which QA check you need to disable if you want to disable it. [YOCTO #6160] Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-11insane: Ensure do_package_qa happens after do_packagedataRichard Purdie
We're relying on the packagedata being available for this task to work correctly so lets ensure it is with the correct dependency. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10package.bbclass: add a stub implementation of package_name_hookRoss Burton
do_package() calls package_name_hook so that e.g. debian-style renaming through debian.bbclass can happen. If there is no class providing a package_name_hook then this causes "WARNING: Function package_name_hook doesn't exist" every time do_package() is executed. Silence this warning by providing an empty package_name_hook in package.bbclass. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10bootimg.bbclass: Add parameter to specify HDDIMG volume IDRicardo Neri
Users and children of the bootimg class may need to specify at build time the volume ID of the HDDIMG vfat partition. An example of this may be when at runtime the partition is uniquely identified by the volume ID. The HDDIMG_ID is expected to be provided externally. If the variable is not set, mkdosfs will use the default volume-id. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10kernel.bbclass: update KERNEL_IMAGE_MAXSIZERobert Yang
* Make KERNEL_IMAGE_MAXSIZE and IMAGE_ROOTFS_SIZE have the same algorithm: - Use Kbytes as the unit since we use this in other codes. - Use "du" rather than "ls" to figure out the size since we use this in image.py. [YOCTO #2610] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10package.bbclass: Generate runtime-rprovides dataRichard Purdie
Currently, given a list of rdepends its near impossible to figure out which ones are potentially invalid and which might be an RPROVIDES of a package. This problem is simple to solve, we can write lookup data into the pkgdata. This patch does that, accounting for the fact that multiple packages can RPROVIDE the same thing (particularly with locales). Its done with symlinks so the performance overhead is minimal. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10insane: Split do_package_qa into a separate task (from do_package)Richard Purdie
Its possible to run the package QA checks as a separate task rather than as part of the do_package task. This offers more parallelism but the fact that made me propose this is that ideally we'd like to access pkgdata to help add new tests and to do that, we need to run later in the task list. We also need to add in RDEPENDS to the task which apply to do_package_write_* but not do_package. See the subsequent patches for why this is desireable. If we split into a separate task, we need to add in calls to read the sub package data, build the cache structure used by do_package and cover the task with sstate (which is empty and just acts as a stamp saying it passed package QA). We also need to handle our own dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10package.bbclass: Rewrite shlib_provider handling to include RPATHRichard Purdie
Change the do_package shlibs code to account for RPATHS. This means that for library dependency purposes, only libraries in system paths or in any declared RPATH will be seen. This is important to resolve problems people have been having where similarly named libraries in "private" paths were conflicting, e.g. with gstreamer. For now this code assumes the default search path is libdir and base_libdir and places ASSUME_SHLIBS in libdir so they are searched by default. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10package.bbclass: Improve shlibs pkgdata file formatRichard Purdie
Instead of having a .list file and a .ver file, place the version information into the .list file in a ":" delimited string. Also place the path to the library here, this can then be used to evaluate RPATHs in the shlib dependency code. Since the disk format has changed, the easiest way to avoid build failures in the same TMPDIR is to change the shlibs directory to shlibs2. sstate dependency code with ensure everything rebuilds. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10package.bbclass: Rewrite sonames data structure to include library pathRichard Purdie
In order to do more advanced processing of the shared libraries, we need to know where a given library is located on disk so we can know whether its a system path or a private directory for example. This patch adds this information into the 'sonames' data structure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10package.bbclass: Improve shlibs needed data structureRichard Purdie
Improve the shlibs 'needed' data structure to include the file and any rpath information. This allows various cleanups to the data structure and moves us closer to being able to resolve shlibs providers issues based on path in due course. This commit doesn't change any stored data, just cleans up internal data structures (for example dropping the needed_from dict). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08sanity.bbclass: Update minimum git version to 1.7.8Richard Purdie
To quote "Maxin B. John" <maxin.john@enea.com>: git version 1.7.8 added the --list option to git-branch. Since we depend on this option in git.py, the minimum requiremnt for git should be updated to Git 1.7.8+ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08binconfig-disabled: add a default value and comment for BINCONFIGRoss Burton
To avoid syntax errors when inheriting this class without setting BINCONFIG, add a default value and a comment. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08package_rpm.bbclass: Should be using HOST_* not TARGET_*Mark Hatle
When building target packages, HOST_OS and TARGET_OS are the same, as is the VENDOR field. However, when building an SDK this is not true. The patch corrects the oversight and switches to using the 'HOST' version and resolves the issue of meta-mingw not working w/ the rpm packaging. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03autotools.bbclass: remove autotools_set_crosscompilingRoss Burton
The only reference to this function is a commented-out assignment, and nothing in oe-core nor meta-oe uses autotools_set_crosscompiling directly. As it's unused, remove it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03toolchain-scripts: Add handling for CANADIANEXTRAOSRichard Purdie
When we build a general toolchain script we should add all the OS variants to PATH, not just the current one. This is because some can cross reference each other and if the triplet prefixed ld can't be found for example, you recieve strange errors. Doing this resolves bugs exposed during SDK testing. [YOCTO #6490] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03meta: fix no newline at end of fileRobert Yang
Add a '\n' to the last line of the file to fix: No newline at end of file Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29classes/kernel: Use full path for symlink in update-alternatives.Drew Moseley
Use a fully qualified path for the <path> parameter in calls to update-alternatives. The chkconfig-alternatives version requires a full path and without it, the symlink is not properly created. Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29populate_sdk_base: Remove confusing echoRichard Purdie
Remove a confusing echo after the previous commit, thanks for a suggestion from Laurentiu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> A
2014-06-29populate_sdk_base: add auto-completion in setupDennis Meier
Signed-off-by: Dennis Meier <meier.dennis@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29classes/report-error: tweak summary messagePaul Eggleton
* We don't want everyone to remove their identifying info, just if they feel the need to * Split lines for clarity * A couple of grammar/spelling tweaks Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29patch.bbclass: unset TMPDIR after useRoss Burton
GNU Patch < 2.6.1 has a race condition so we create a per-instance TMPDIR to avoid this. This was implemented by setting os.environ[TMPDIR] but at the end of do_patch the temporary directory is deleted but TMPDIR is not unset. In general this doesn't cause a problem but if do_patch is embedded in a larger function then TMPDIR is set to a directory that doesn't exist. Avoid this by removing TMPDIR from os.environ when the directory is deleted. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29distutils/distutils3: Fix bashismRichard Purdie
read -d is a bashism. Replace with a direct exec to avoid the problem in this case. This fixes silent build failures in do_install of tasks on systems with dash as /bin/sh. Also merge the fix to distutils for only changing necessary files to disutils3 as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25own-mirrors: Add gitsm:// mirror supportRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25gtk-doc: Add pkgconfig inheritRichard Purdie
Anything using gtk-doc will be using pkgconfig as well so add in the dependency rather than doing it for each and every recipe. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25populate_sdk: Fix TOOLCHAIN_TARGET_TASK_ATTEMPTONLY implementationMark Hatle
The variable was only partially implemented, and the part that was there was named incorrectly to, missing the 'TASK' piece. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25classes/package_rpm.bbclass: Fix SDK Suffix referenceMark Hatle
The meta-mingw layer attempts to change the SDK Suffix, but the rpm packaging had a hard coded reference to _nativesdk. I did a quick scan for other hard coded entries and did not fine any more. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25cmake.bbclass: restore OECMAKE_SOURCEPATHRoss Burton
Some packages put their CMakeLists.txt file in a subdirectory, so assuming that it is in ${S} won't work. Restore OECMAKE_SOURCEPATH (defaulting to ${S}) so that the location of CMakeLists.txt can be set if required. Based on a patch by Miroslav Keš <miroslav.kes@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24gummiboot.bbclass: Ensure MLPREFIX is applied to depends flagMing Liu
Add MLPREFIX to depends flag to ensure the correct gummiboot is dependended upon. Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24grub-efi.bbclass: Ensure MLPREFIX is applied to depends flagMing Liu
Add MLPREFIX to depends flag to ensure the correct grub-efi is dependended upon. Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>