aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2012-09-28sstate: Relax the duplicate file whitelist for nowRichard Purdie
do_package is a machine specific task at the moment due to packagedata. This means do_package tasks and their dependencies rerun between different machines with various duplicate file installations. There are plans to fix this but they're too invasive before release. This patch relaxes the whitelist for sstate duplicate file detection to account for this. Post-release, we re-enable stricter settings once do_package is not machine specific. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28license.conf/bbclass: Move globals to license.confElizabeth Flanagan
This requires the changes to bitbake.conf that allow parsing of license.conf. As we should now be parsing license.conf, we can move some globals out of license.bblcass and into the conf file. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28license.bbclass: Variable standardizationElizabeth Flanagan
The variable mentioned in license.conf is LICENSE_PATH. The variable used in license.bbclass is LICENSE_DIR. Conforming to what is in license.conf Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28sanity: Added explicit network error status in SanityCheckFailed eventBogdan Marinescu
If we fail a network test, a special flag is set in the SanityChekFailed event. This helps Hob identify the network error properly and display a special message to the user. [YOCTO #3025] Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-28sanity.bbclass: bblayers.conf should be updated automaticallyConstantin Musca
- add check_bblayers_conf bitbake function which does the bblayers.conf v4 -> v5 update if necessary (every layer should make its specific bblayers.conf upgrades appending to the check_bblayers_conf function) - we ask the user to re-run bitbake because we can't trigger reparsing without being invasive [YOCTO #3082] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-27Revert "autotools.bbclass: using relative paths for acpaths"Richard Purdie
This reverts commit aa66ef6598c84231577d139ec7be413e73fac2b1 since bdwgc-native fails to build after it. Anything which runs with a sub-configure will fail after this change. It therefore needs rethinking. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27autotools.bbclass: using relative paths for acpathsWenzong Fan
Fix autotools.bbclass to use relative paths for acpaths instead of absolute ones. Since absolute paths may cause potential autoreconf error like: Can't exec "/bin/sh": Argument list too long ... This error occurs while building coreutils with long TMPDIR, because it has bunch of m4 files need to be expanded. [YOCTO #2766] Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27cml1.bbclass: Convert tab indentation in python functions into four-spaceJason Wessel
Based on the previous commit 604d46c686d06d62d5a07b9c7f4fa170f99307d8 (Convert tab indentation in python functions into four-space), the cml.bbclass was not converted, and in order to properly extend it with external bbappend's it needs to be converted. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26package_rpm.bbclass: change the arch's "-" to "_" for platformRobert Yang
The platform and platform_extra will be written to /etc/rpm/platform, the rpm's arch has changed the "-" to "_", so the value in platform should also be updated. [YOCTO #3159] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26package_rpm.bbclass: no initial_solution in the second buildRobert Yang
There is no initial_solution.manifest in the second build when incremental rpm image generation, since the initial solution has been skipped. So we should check it before cat it. [YOCTO #3128] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26package_ipk: Remove spurious '-i' in grep command for log_checkPhil Blundell
ipk_log_check uses a case-sensitive grep (which is correct) when deciding whether there were any errors or not. But if it decides that there were, it then uses a case-insensitive grep to display them. This results in a large amount of irrelevant and confusing output which makes it hard to see the real errors amongst the noise. Suppress this by removing the unwanted -i. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26sstate: Remove master manifest usageRichard Purdie
This was added to allow detection of duplicate files being installed by sstate. There is a much simpler way, just check if the file already exists. This effectively uses the kernel VFS as the cache which is much more efficient. This resolves a significant performance bottleneck (lock contention on a single file) when running builds that are just being generated from sstate cache files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26packagedata/multilib: Fix search patch for multilib buildsRichard Purdie
The current multilib search path code for packagedata is flawed since it doesn't correctly handle changes in the TARGET_VENDOR/TARGET_OS that multilib may make. This patch enhances the code to correctly build the search paths so multilib packagedata is found correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26sstate: Fix SSTATE_DUPWHITELIST variable usageRichard Purdie
We need to split this variable before using it. Otherwise a single "/" character in the list whitelists every overlapping sysroot file which was not the intention making the whole thing useless. We'll start seeing warnings about overlapping files now this is working correctly after this patch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25Add and use 'localedir' variableChristopher Larson
This avoids the hardcoding of ${libdir}/locale which is all over the place, and will facilitate use of ${exec_prefix}/lib/locale instead of ${libdir}/locale. This doesn't actually change any output at this time. Verified this with buildhistory against the packages produced from core-image-base. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24terminal: pass data store all the way through to terminal classJason Wessel
Passing the data store will be needed for firing a custom event for the screen class. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24rootfs_ipk: Avoid leaving run-postinsts around if online package management ↵Phil Blundell
is disabled If all postinsts have already been run during rootfs construction then there's no point in having run-postinsts in the installed system. Clean it up at the same time that update-rc.d and suchlike are being removed. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24classes/multilib: prevent multilib extension of nativesdk recipesPaul Eggleton
It isn't supported to mix multilib and nativesdk in the same target, so explicitly skip multilib processing if nativesdk is inherited. As a bonus this fixes a bunch of related "missing file" warnings from the file checksum code during parsing because BPN was not correctly stripped for these targets. Second half of the fix for [YOCTO #3146]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24classes/multilib: ensure MLPREFIX is set for image recipesPaul Eggleton
We need MLPREFIX to be set so that oe.utils.prune_suffix() (as used for the value of BPN) can derive the bare name from the multilib-extended name for image recipes. BPN being set correctly avoids missing file warnings during parse from the file checksum code for (unusual) images that set SRC_URI, such as build-appliance-image. First half of the fix for [YOCTO #3146]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24autotools: Remove special handling for autoconf* and automake*Phil Blundell
For reasons that are now shrouded in obscurity, autotools.bbclass has long contained a special heuristic to avoid attempting to run autoreconf when building autoconf or automake themselves. However, the wildcard test against PN which is used there is problematic when trying to build another package whose name happens to start with "autoconf", and in any case it is silly to do this test at runtime for every package. The individual recipes for autoconf and automake can just as easily suppress the behaviour that they don't want by providing a custom do_configure() method which just runs configure. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21insane.bbclass: Improve ability to detect enabled testsRichard Purdie
Define an ALL_QA variable which can be used to determine which tests to run. Improve the libdir test to work in the case it is set to raise an error rather than a warning. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-21insane.bbclass: add library dir sanity checkRadu Moisan
Check in ${PKGD} for libraries in wrong locations. Trigger a warning if so. Eg. Catch recipe installing /lib/bar.so when ${base_libdir}="lib32" or installing in /usr/lib64 when ${libdir}="/usr/lib" [Yocto #2038] Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: allow toolchain installation from another directoryLaurentiu Palcu
This patch will allow one to run the installer from another directory than the one where it's actually located. Suppose the installer is in /home/user/test/my/sdk and the current directory is in a different place. With this patch, one can run the installer like this: $ sh ~/test/my/sdk/poky-eglibc-x86_64-arm-toolchain-gmae-1.2+snapshot-20120920.sh [YOCTO #3135] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: relocate symlinks tooLaurentiu Palcu
The directory usr/libexec/ in the SDK sysroot contains the default symlinks to the toolchain binaries and these, too, need to point to the correct toolchain path. [YOCTO #3090] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: remove references to Poky distro from tarball installerLaurentiu Palcu
The installer should be generic. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-21SDK: fix installation into symlinked directoriesLaurentiu Palcu
The SDK installation scripts should not canonicalize symlinked directories because the entire relocation would be done to the directory to which the symlink points. Instead, if the installation is a symlink, use that path to relocate the binaries. For example, if we have the following symlink: /opt/sdk -> ~/my/test/sdk the binaries will be relocated to /opt/sdk not ~/my/test/sdk as it is done now. [YOCTO #3102] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define any options and furthermore allows 'echo -e' to be the default behavior. This means that in dash 'echo -e' will actually print '-e' and interpret backslashes by default. We use instead 'printf' builtin command with or without '\n' to simulate 'echo -e' or 'echo -n'. 'printf' needs format while 'echo' can be used without any arguments. So 'echo >' was replaced by 'printf "" >'. 'echo' without '-n' flag adds a new line by default so to keep the same behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is used. [YOCTO #3138] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-19image_types: fix squashfs-lzma image creationSaul Wold
This removes the dependency on a seperate binary which we don't seem to have. So, use mksquashfs's -comp lzma to replace that functionality [YOCTO #3126] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-19rootfs_rpm: Add Multilib prefix to installed_packages listSaul Wold
RPM does not name it's packages with the Multilib prefix, but the rootfs_rpm class keeps track of the Multilib prefixs in a list. Use that list to re-attach the prefix for use with the license bbclass, buildhistory bbclass will also use this and make it more accurate between multilib and non-multilib. Use the embedded "Platform" information to ensure we get all the correct matching. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14patch.bbclass: increase securityConstantin Musca
- Use mkdtemp for generating temp dir names - Use bb.utils.remove for removing temp dirs - Add comment for explaining the "patch" workaround [YOCTO #3070] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14kernel-yocto: fix kernel configuration audit for custom yocto kernelsBruce Ashfield
It was reported that the kernel configuration checks for custom yocto kernels had the following output: NOTE: validating kernel configuration grep: /meta-series: No such file or directory grep: /meta-series: No such file or directory WARNING: Can't find any BSP hardware or required configuration fragments. WARNING: Looked at //cfg///hdw_frags.txt and //cfg///required_frags.txt in directory: //cfg// NOTE: Tasks Summary: Attempted 375 tasks of which 367 didn't need to be rerun and all succeeded. which is not inspire confidence in the output of the process. Completely inhibiting the check is one option to remove the messages, but that removes the ability see output, which can help move users to a better or more fully configured linux-yocto based kernel. To fix this, we have to ensure that the path to the meta-series is always valid, and that the tools can deal with not all files existing in the audit directory. Since custom yocto kernels do not set KMETA (they don't have a meta branch), we ensure that a default of 'meta' is passed to the audit ('meta' is always valid), and that kconf_check itself can deal with an incomplete set of input audit files. The net result is output like this (using a defconfig with invalid options for the kernel being built): NOTE: validating kernel configuration This BSP sets 19 invalid/obsolete kernel options. These config options are not offered anywhere within this kernel. The full list can be found in your kernel src dir at: meta/cfg/standard/qemux86/invalid.cfg There were 1 instances of config fragment errors. The full list can be found in your kernel src dir at: meta/cfg/standard/qemux86/fragment_errors.txt The full list can be found in your kernel src dir at: meta/cfg/standard/qemux86/missing_required.cfg Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-14image_types.bbclass: Round up ROOTFS_SIZE after base_size checkAndrei Gherzan
If we round up ROOTFS_SIZE to IMAGE_ROOTFS_ALIGNMENT before checking if base_size is greater then IMAGE_ROOTFS_SIZE, we can end up adding an unaligned value to IMAGE_ROOTFS_SIZE. Obviously, if IMAGE_ROOTFS_EXTRA_SPACE was overwritten with an unaligned value. So let's add the round up code after the base_size calculus and it's comparison. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-14patch.bbclass: Use one TMPDIR per patching processConstantin Musca
We must use one TMPDIR per process (/tmp/${PID}) so that the patching processes don't generate the same temp file name (the "patch" program uses the TMPDIR environment variable for deciding where to create the temp files). [YOCTO #3070] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: place all found licenses on one lineVladimir Zapolskiy
Cosmetic change, settle all found licenses into one line and report warning about missing licenses loudly. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: correct license info in lisense.manifestVladimir Zapolskiy
Trivial change, do not cut off plus symbol from license name, otherwise information about package license is corrupted. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: account LICENSE_${pkg} values in manifestVladimir Zapolskiy
Trivial change, process LICENSE_${pkg} and LICENSE values. This fixes multiple cases, when license is not specified at all in license.manifest Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: remove redundant nested if statementsVladimir Zapolskiy
Cosmetic change, which improves code perception. Also check for locale packages firstly, this shall improve performance a little. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: check license manifest for double recordsVladimir Zapolskiy
Trivial typo bugfix, avoid multiple records in license.manifest. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/license: define LICENSE_MANIFEST variableVladimir Zapolskiy
Cosmetic change, saves space and reduces code line length. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12autotools.bbclass: Add functionality to force a clean of ${B} when ↵Richard Purdie
reconfiguring (and ${S} != ${B}) Unfortunately whilst rerunning configure and make against a project will mostly work there are situations where it does not correctly do the right thing. In particular, eglibc and gcc will fail out with errors where settings do not match a previously built configuration. It could be argued they are broken but the situation is what it is. There is the possibility of more subtle errors too. This patch adds removal of the build directory (${B}) when configure is rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}. We could simply use a stamp but saving out the previous configuration checksum adds some data at no real overhead. If we find there are things where we want to disable this behaviour with CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally. [YOCTO #2774] [YOCTO #2848] This is particularly helpful for eglibc and gcc which use split builds by default and are a particular source of reconfigure type problems. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/sanity: remove obsolete codePaul Eggleton
We can now rely upon the minimum BitBake version having the SanityCheckFailed event, so remove the code to handle if this is not there. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12classes/sanity: skip tune checks if machine is invalidPaul Eggleton
If there is no valid machine configuration it's almost guaranteed that the tune checks will fail, so just suppress them in that case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12package_rpm.bbclass: Avoid unnecessary installs in complementary passMark Hatle
When called with the complementary install option, the first step is to backup the install manifest so that we can avoid installing items previously installed. However, this backup process skipped the initial_install portion of the manifest, causing early install items like libc6, bash, and base-files to be installed a second time. Fix this by cating the files to original_solution. This is done as an append to allow multiple calls to package_install_internal_rpm to work. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12image.bbclass: Enable the complementary install to be called w/ globbing paramsMark Hatle
If the image.bbclass is called with arguments, and these arguments are not "populate_sdk", they will be passed in as the expected GLOBS. This enables external components and scripting to use the rootfs_install_complementary code. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-12sstate: Append to EXTRASSTATEMAPS and add commentRichard Purdie
Appending to EXTRA_SSTATEMAPS is better than just hardcoding a value. Also add a comment about why this is necessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10classes/packageinfo: use better method to check if package existsPaul Eggleton
Instead of using a rather error-prone method of looking for output package files in order to determine if a package got created, use the .packaged file within pkgdata. This fixes two separate issues: * Some packages apparently not being found by this code e.g. all apm/apmd packages when using ipk packaging. * Buggy implementation of this checking code which triggered an exception during the event handler if PKGV was overridden on a per-package basis (as it is with external-sourcery-toolchain), which blocked Hob from completing parsing at 99% - fixes [YOCTO #2651]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10core-image: allow root login when debug-tweaks is enabledSaul Wold
This allows root to login over ssh with an empty password just like dropbear when the debug-tweaks are enabled, it's important to disable debug-tweaks for a production system as this will leave open a security hole! Thanks to Marc for the settings. Cc: Marc Ferland <marc.ferland@gmail.com> [Yocto #3078] Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10package_rpm.bbclass: fix incremental rpm image generationRobert Yang
* Check ${target_rootfs}/etc/passwd rather than ${target_rootfs}${rpmlibdir} to make sure that it has been previously installed. * Remove the "--nodeps" when incremental image generation, it should take care of the dependencies. Still use "--replacefiles --replacepkgs" in case there are conflicts. [YOCTO #3047] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10bin_package.bbclass: binary package recipe classRobert Yang
This is used for the binary package recipe, it's been suggested that it would be a useful feature to be able to easily take an RPM or similar containing a software binary from a 3rd party software vendor and integrate it into an image created by the build system. * Brief introduction - The binary pkg can be .rpm, .deb, .ipk and other formats which can be unpacked by bitbake fetcher. - Let bitbake unpack the bianry package, just like unpack the source package. - Skip the do_configure and do_compile. - Install the files to ${D} - Other steps are similar to the source package's recipe. * Note: - The "subdir" parameter in the SRC_URI is useful for the binary package recipe, so I added an example in the comment. - I have sent a patch to bitbake-devel mailing list to support unpack the .rpm, .ipk, and .deb files. [YOCTO #1592] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10package_rpm.bbclass: fix the arch (replace "-" with "_")Robert Yang
rpm can't use the "-" as the arch, which causes problem, e.g., when MACHINE = "beagleboard": * The arch should be armv7a-vfp-neon, but rpm only takes the armv7a, this is incorrect since it is mixed with real arch armv7a. * The nativesdk's arch should be i686-nativesdk (or x86_64-nativesdk), but rpm only takes the i686 (or x86_64), this in incorrect since it is mixed with the arch i686 (or x86_64). Replace "-" with "_" when rpm package and the rootfs generation would fix the problem, I think this is fine since it doesn't change the tune's arch, the package manager doesn't care about the arch's name, but it needs a unify arch system to avoid confusing. This is similar to what we have done on the deb which fixed the arch i486, i586 and so on to i386. [YOCTO #2328] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>