aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2013-07-09populate_sdk_base: fix bashismLaurentiu Palcu
Only the printf bash builtin knows about %q format option for escaping spaces. The coreutils version doesn't. Unfortunately, neither dash nor sh have a printf builtin. So, escape the spaces using sed. [YOCTO #4811] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09systemd: Don't enable systemd services when native.Randy Witt
It shouldn't be desired that systemd enable services when using class native. Blanking out the SYSTEMD_PACKAGES when native seems like the most straightforward way to fix this problem. Signed-off-by: Randy Witt <rewitt@declaratino.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09classes/testimage.bbclass: new class for image testsStefan Stanacar
Replacement class for imagetest-qemu.bbclass. It launches a qemu instance and runs test modules defined in TEST_SUITES. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Radu Moisan <radu.moisan@intel.com>
2013-07-05sstate.bbclass: Add an extra check for sstate_mirrorsJoe MacDonald
BB_NO_NETWORK disables any fetching, however if we're using an external sstate cache, we may want to be able to fetch those objects even if we are not fetching the upstream sources. Denote this situation by setting SSTATE_MIRROR_ALLOW_NETWORK in local.conf. When it is found, for sstate cache fetches, mask off BB_NO_NETWORK for the local function. Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-05insane.bbclass: Added QA warning for shipping /usr/share/info/dirMihai Prica
/usr/share/info/dir should be generated at install time in a postinst. Added QA warning to check at build time for this file. The warning is disabled by default. [YOCTO #3969] Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-05classes/insane: fix libdir check regexesPaul Eggleton
Ensure these do not pick up e.g. /lib/systemd/system/uuidd.socket, but ensure we pickup e.g. /usr/lib/libnss3.so.1d (example from Debian). This also fixes the broken exec_re regex (lib*.). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02classes/package: print command output when commands failPaul Eggleton
When external commands such as debugedit fail, it can be useful to see their output, so use oe.utils.getstatusoutput() instead of subprocess.call() to capture this and print it on failure. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02qt4e.bbclass: export OE_QMAKE_QT_CONFIGJonathan Liu
The class is inheriting qmake2.bbclass which exports OE_QMAKE_QT_CONFIG pointing to the qt4 qconfig.pri when it should be pointing to the qt4-embedded qconfig.pri. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02terminal: Run command using a wrapper scriptTyler Hall
Some terminals may not pass the environment into the child process. This is true when using "tmux split-window." If tmux is already running, it will start the command with the tmux session environment, ignoring the environment where the command was issued. This could possibly be worked around when launching tmux by injecting variables into the user's session environment or adding the variables to the "update-environment" tmux setting. However, both methods would permanently alter the user's session, which is undesirable. By using a wrapper script, we have full control over the final environment. Replace the env dictionary with an empty data smart that will contain the exported variables and a wrapper function that execs the original command. Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-28classes/insane: remove la2 check which no longer exists from ERROR_QAPaul Eggleton
This check was actually removed a very long time ago in 6656381714c5956f71ca634f5a5f4aa4661bbf7e, before we even changed the QA checks to use names instead of numbers - the name was probably added ERROR_QA mistakenly because it hadn't also been removed from the comment listing the QA checks or the function that determined which ones were errors. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28qt4*.bbclass: disable build qt on mips64 with 64 bits userspaceKai Kang
Qt/qt-embedded build fails on mips64 with 64 bits userspace. Set COMPATIBLE_HOST in qt4e.bbclass and qt4x11.bbclass to disable build qt/qt-embedded and packages which inherit these two classes on mips64 with 64 bits userspace. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28packagedata: Show error when trying to change PE/PV/PR from runtime/pkgdataRichard Purdie
PN/PE/PV/PR should never change between do_package and the following do_package_write_* tasks. If any do change you would see build failure due to the wrong WORKDIR being used for example. This patch ensures that if something is going wrong we see the error earlier and with some better warning about what the real problem is. [YOCTO #4102 partial] This is a rewritten version of a patch from Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28package: Ensure we iterate all the pool objectsRichard Purdie
There is the possibility that if we don't iterate through the multiprocessing pool objects we might not catch return codes and this could lead to hung/zombie processes either temproarily or on a wider scale. Adding this certainly doesn't hurt anything and is better practise so we might as well do it. Its not 100% clear if this fixes some issues or not. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27sanity.bbclass: Check for the known broken version of makeMark Hatle
See GNU Savannah bug 30612 -- make 3.82 is known to be broken. A number of vendors are providing a modified version, so checking for just the version string is not enough. We also need to check if the patch for the issue has been applied. We use a modified version of the reproduced to check for the issue. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27autotools.bbclass: force copy Makefile.in.in to ${S}/po/Roy.Li
If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27useradd.bbclass: Add members to a groupMikhail Durnev
useradd.bbclass supports adding new users and new groups. But it does not support adding existing users to existing groups. There is a need of adding users to some groups (e.g. audio). The class was extended to call groupmems utility with arguments passed via GROUPMEMS_PARAM. Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27image_types.bbclass: set 'filetype' ext4 featureEnrico Scholz
Generating filesystems with this flag allows more efficient directory traversals because getdents() returns the filetype in 'd_type' which allows to avoid an extra lstat() call. Creating ext4 filesystems with 'mkfs.ext4' sets this flag by default too. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27sanity.bbclass: Fix COREBASE sanity testsRichard Purdie
We need to expand the COREBASE variable, no idea how these tests were previously working at all... Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27sanity.bbclass: Add check for @ character in build directory nameRichard Purdie
The @ character is not escaped properly in too many places within the system to easily support it so add the character to the list of blacklisted characters. Also tweak the other messages and ensure that all appropriate error messages are disabled in one go. [YOCTO #4772] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25populate_sdk_base, adt_installer: abort install if path contains spacesLaurentiu Palcu
Spaces are not handled properly in some parts of oe-core and it's safer to abort toolchain installation if path contains spaces. Even though we fix space handling in the toolchain installation script, there are various other parts in the toolchain (perl scripts, sysroot path passed to toolchain binaries, shebang lines) that would need special handling. So, for now, just bail out if path contains spaces. The checking for spaces in the path is done after expanding relative paths to absolute and tilde conversion. [YOCTO #4488] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24sanity.bbclass: Various improvementsRichard Purdie
I started trying to make some changes in sanity.bbclass and couldn't stand the current code. This patch splits out the one big function into a number of smaller units and adds a status class which handles queuing of messages and issues like network errors and whether a reparse is required. It also cleans up some syntax and obsolete code. The other fundamental change is the tests are split into ones which run once and those which run at every build. This was always the way the class was intended to work but that got lost somewhere along the way. This patch fixes that. Its still far from perfect but it is hopefully an improvement and sets the scene for other improvements to be built on top of this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24sanity.bbclass: Drop horrible obsolete minversion hackRichard Purdie
We once needed to do this, things seem to work fine without this now, thankfully. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20base.bbclass: Ensure finalised data is displayed in build bannerRichard Purdie
The build banner displayed at the start of builds can be misleading since the data store has not been finalised. As easy way to illustrate this is to use something like: DEFAULTTUNE = "i586" DEFAULTTUNE_<machineoverride> = "core2" and the banner will display the i586 tune yet the core2 tune will be used. We can avoid this if we finalise a copy of the data before displaying it. [YOCTO #4225] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20utility-tasks/distrodata: Add recideptask flag for fetchall/checkuriallRichard Purdie
See the bitbake commit adding the recideptask flag for details of the problem but in summary, we weren't seeing the [depends] of tasks like do_rootfs being taking into account for fetchall. This was leading to not all sources being fetched and this is the OE-Core part of the fix for this problem. BB_DEFAULT_TASK is the default task used since this is the one that most commands would end up targeting and is how users expect the command to behave. [YOCTO #4597] (From OE-Core rev: abf468963a087244887384122fd5202909e7f118) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20classes/buildhistory: fix error when no packages are installedPaul Eggleton
"xargs -n1 basename" will execute basename even if there are no lines piped into it, causing a "basename: missing operand" error if no packages are installed, which will happen for the target portion of buildtools-tarball. (xargs' -r option could have been used here, but it is a GNU extension and I thought it best to avoid that for the sake of future interoperability). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-19classes/package_tar: fix file ownership within tarballsPaul Eggleton
The fakeroot flag wasn't correctly set leading to files within the output tarballs having uid/gid values from the build host instead of the desired target permissions. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17utils.bbclass: Tweak create_wrapperRichard Purdie
Currently the full path is specified to exec however this may incorporate a build path which in the nativesdk case, is not transformed to a target system path. This leads to failures due to incorrect paths. This patch ensures the full build path is not encoded into the wrapper script. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17classes/externalsrc: enable global inherit and simplify usagePaul Eggleton
This class can now be inherited globally using INHERIT += rather than needing to inherit it in the recipe itself. Additionally, instead of setting S (and optionally B), set EXTERNALSRC (and optionally EXTERNALSRC_BUILD) to point to the external source and build locations respectively. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17archiver.bbclass: check if package contains a copyleft licenseKevin Strasser
The copyleft filter is only excluding packages that contain a closed source license. This is because oe.license.is_included() returns a boolean value that indicates if the license is excluded, and a string that contains the matched included licenses. If the string is empty it indicates that no licenses were matched. Reject packages that do not contain a copyleft license. [YOCTO 4630] Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-17distrodata.bbclass: fix syntax errorsLaurentiu Palcu
Thes were added by the recent event handler changes. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14classes/conf: Add eventmasks for event handlersRichard Purdie
Now that bitbake supports masking events for event handlers, lets use this so event handlers are only called for events they care about. This lets us simplify the code indentation a bit at least as well as mildly improving the event handling performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14scripts/buildenv-internal/sanity: Update to python 2.7.3 as a minimumRichard Purdie
We're finding bugs in python 2.6 and starting to require unittest functionality in python 2.7.x. Its time to bump the minimum version requirement. Anyone without python 2.7.x can use the buildtools-tarball out to install a standalone python/git/tar setup which will work with the system. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14sanity: Drop pseudo test, now unneededRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14scripts/bitbake sanity.bbclass: Migrate tests for git and tar versionsRichard Purdie
Migrate tests for correct git and tar versions from the wrapper script to the sanity class. This sets the scene to allow us to remove the bitbake wrapper script. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13classes/qmake_base: allow parallel makeJonathan Liu
Remove MAKEFLAGS= from EXTRA_OEMAKE to allow parallel make. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-13qt: update qmake2 class to export qconfig.pri mkspecFelipe F. Tonello
This is necessary when Qt applications want to know variables such as QT_MAJOR_VERSION, QT_VERSION, QT_MINOR_VERSION, GCC version, etc. Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-11sanity.bbclass: non-zero status means that we need -march.Randy MacLeod
A non-zero status from the march test for gcc means that the "march" flag is needed. Correct the logic to return True in this case. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11copyleft_compliance: set 'dirs' flag on taskChristopher Larson
Without this, due to bitbake defaulting to ${B}, it's possible to get ${S} inadvertantly created before do_unpack, breaking the unpack of git sources, which expect the destination to not exist. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11sstate.bbclass: fetch archive+siginfo in a single pstaging_fetchChristopher Larson
This avoids unnecessary duplication of setup. The only visible change in behavior will be the case if siginfo exists and the archive does not, in which case it'll redownload both, but this doesn't seem unresasonable to me, particularly since the archive is downloaded first, making this case particularly unlikely. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11sstate.bbclass: kill MIRRORS and FILESPATH to speed up fetchingChristopher Larson
The default FILESPATH isn't really of use, as we don't expect to find sstate archives buried in layer recipe directories, and the default MIRRORS is intended for use for fetching SRC_URI, not sstate. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11copyleft_compliance: handle localpaths ending with '/'Christopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11license.bbclass: include all licenses in the manifestChristopher Larson
When we don't have a generic license file for the license in question, we can warn, but we should still include it in the manifest, otherwise the manifest doesn't reflect reality. Failing to include a license listed in the recipe in the manifest can't be allowed. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11insane.bbclass: quiet package errors not in *_QAChristopher Larson
Currently, if a package QA type from package.bbclass is not listed in ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs from the behavior of the rest of the QA handling (which doesn't call package_qa_handle_error at all if it's in neither _QA variable), and is nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's output. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-10package_rpm.bbclass: handle pre/post remove scriptletsLaurentiu Palcu
Currently the scriptlet_wrapper is designed to handle only pre/post install scriptlets. This patch will slightly change the wrapper script to handle also pre/post remove scriptlets when we want to remove packages from the final image. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10rootfs_rpm.bbclass: switch to using run-postinstsLaurentiu Palcu
Since run-postinsts was made generic, use it for RPM too. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10image.bbclass: remove unneeded files from the imageLaurentiu Palcu
This patch creates a new function, rootfs_remove_unneeded(), that will be called after rootfs_*_do_rootfs is called and which will handle delayed postinstalls in a generic fashion, for all backends in the same way. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10rootfs_*.bbclass: add some helper functionsLaurentiu Palcu
This patch adds the following helper functions: * delayed_postinsts - outputs the list of delayed postinstalls; * save_postinsts - this will save the delayed postinstalls for ipk/deb in /etc/(ipk|deb)_postinsts; * rootfs_remove_packages - removes packages from an image; Additionaly, this patch will remove a piece of code in rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for all backends; [YOCTO #4484] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10classes/qmake_base: update .pro hackJonathan Liu
This adds support for lconvert and xmlpatterns tools and tweaks the sed expressions to handle more complex assignments in .pro files like: LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10classes/qmake2: export OE_QMAKE_LCONVERT and OE_QMAKE_XMLPATTERNSJonathan Liu
These will be used by qmake_base.bbclass. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10classes/buildhistory: split SDK data by IMAGE_NAMEPaul Eggleton
Data from SDKs produced from different images or different meta-toolchain style recipes should go into separate directories, since SDK_NAME doesn't include anything to differentiate these by default (only pieces for the distro name and architectures). Note you should delete or move existing data under the buildhistory/sdk/ directory manually after this change. Fixes [YOCTO #4622]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>