aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2016-04-13image.bbclass: use max() instead of indexing booleansRoss Burton
There's some code dotted around OE that uses (a, b)[foo < bar] instead of the more idiomatic "test and a or b". Or in this case, just max(). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13package.bbclass: handle links in sorted orderBill Randle
When processing links, the directories are processed in unsorted order which can result in cases like /var/lock -> /run/lock handled before /var/run -> /run throwing an error for /var/run because /run already exists. Change the link processing to ensure links are processed in sorted order of the destination. [YOCTO #9430] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13sanity: allow sftp and ssh mirrorsRoss Burton
URLs in MIRRORS and PREMIRRORS are vetted against a hard-coded list of protocols which were missing sftp: and ssh:, so add them. [ YOCTO #9444 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13toaster.bbclass: improve package information collectionJoshua Lock
The PACKAGES variable doesn't include all packages potentially generated by a recipe, not least of all because it doesn't include dynamic packages created via do_split_packages() or similar. Instead of trying to guess which packages were generated, walk ${PKGDESTWORK}/runtime to find all package information that was written to disk. This allows us to read all information for the complete list of packages generated by the recipe. For example before this patch we get SinglePackageInfo events for 9 packages from ncurses. With the patch applied we get 20 events for all of the packages created during an ncurses build. As a bonus we also switch to using the same postfuncs for both do_packagedata and do_packagedata_setscene as they each result in a PKGDESTWORK with the relevant directories and files created. [YOCTO #9115] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-12archiver: Ensure sstate-inputdir directory is createdRichard Purdie
Without this, do_archive_sources will fail for the gcc tasks where there is common source and the other tasks are not added as dependencies. The failure happens when trying to restore these tasks from sstate. To fix this ensure the sources directory is created as expected by the sstate code. [YOCTO #9433] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09archiver: Fix ASSUME_PROVIDED issuesRichard Purdie
Currently the dependencies injected by this class for recipes in ASSUME_PROVIDED e.g. tar-native or chrpath-native are ignored. We need to use their "replacement" names, e.g. tar-replacement-native. This avoids broken archives and sstate failures with these recipes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09distrodata: Exclude DATETIME reference from sstate checksumRichard Purdie
Otherwise the task hash changes between server and worker context leading to changing task checksums. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAMERobert Yang
If we create hdddirect in the first time, and run bitbake to create vmimg in the second time, then the previouse created ${IMAGE_LINK_NAME}.hdddirect may can not be found since it contains the data string which are different. Use IMAGE_LINK_NAME to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09image_types.bbclass: fix elfRobert Yang
Fixed: | DEBUG: Executing shell function do_image_elf | Cannot open `/path/to/tmp/sysroots/qemux86-64/usr/src/kernel/bzImage': (null) | WARNING: exit code 1 from a shell command. The bzImage is in DEPLOY_DIR_IMAGE Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09image_types.bbclass: set nodesize for btrfsRobert Yang
The default value is 16K which is too big to create image for core-image-minimal: rootfs.btrfs is too small to make a usable filesystem Minimum size for each btrfs device is 41943040. Use 4K as ext2/3/4 to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09useradd_base.bbclass: prevent variable expansion in $optsMark Asselstine
Many user/group operations will involve hashes which will include '$' followed by a number or even possibly an env. variable name. Passing $opts to flock requires that we take additional precautions to prevent the unexpected expansion of these instances. This was found by an image which used usermod operations to set the password hash for root. The image could not be logged-in to and examining /etc/shadow clearly showed that $0 and other $* variables had been expanded unexpectedly. This change returnes the behavior to what existed prior to commit 2ebf697b46c42cee8bfa6d2e6087397f8cce385c [useradd_base.bbclass: replace retry logic with flock]. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09extrausers.bbclass: drop retry count for perform_user/group* callsMark Asselstine
Commit 2ebf697b46c42cee8bfa6d2e6087397f8cce385c [useradd_base.bbclass: replace retry logic with flock] dropped the 3rd (retry) parameter for these functions. These are simply being ignored now but we should remove the retry count to avoid confusion. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08toaster.bbclass: strip task from the targetEd Bartosh
Current code in toaster_buildhistory_dump assumes that bitbake target doesn't contain task name. It uses target as a part of path to the files with data that it analizes. It fails to find files if target contains task name. Stripping task from the target should solve this. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08image-live.bbclass: fix iso + efi onlyRobert Yang
When the user only builds iso + efi only, the syslinux-native which provides isohybrid is required to build iso, so add syslinux-native to DEPENDS. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08devtool: Create unlocked-sigs.inc containing items in the workspaceRandy Witt
When a recipe is added to the workspace, the signatures for the tasks will change. This means that bitbake must be told to allow the signatures to be different if they are in locked-sigs.inc. This is done by creating an unlocked-sigs.inc file which contains all the recipes in the workspace each time devtool reads the workspace. So not only will necessary things get added, previously added items will be removed by virtue of them no longer being in the workspace. This also makes sure that the extensible sdk picks up unlocked-sigs.inc as part of the configuration. [YOCTO #9195] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08populate_sdk_ext.bbclass: Enable locked sigs errorsRandy Witt
With the extensible sdk we want there to be an error if a task tries to run without signatures that match locked-sigs.inc. This patch enables that error. [YOCTO #9195] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08sstatesig.py: Split single locked sigs check into multiple checksRandy Witt
Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace SIGGEN_LOCKEDSIGS_CHECK_LEVEL. SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a warning or error if a task's hash in the locked signature file doesn't match the computed hash from the current metadata. SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a warning or error if a task that supports sstate is in the locked signature file, but no sstate exists for the task. Previously you could only have warning/errors for both controlled by SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk, because we know sstate won't exist for certain items in the reverse dependencies list for tasks. However, we still want to error if task signatures don't match. [YOCTO #9195] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06image_types: use compress framework to produce checksums for imagesAlexander D. Kanevskiy
Existing compress framework for producing various compressed versions of images is powerfull enough to be extended for other uses, e.g. to convert types of images. It is possible to use it also to produce image checksums at the time of image generation. This commit adds support for all supported at the moment coreutils hashing algorithms: md5, sha1, sha224, sha256, sha384 and sha512 Usage: IMAGE_FSTYPES_append = " hddimg.sha256sum" Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06sanity.bbclass: fix a hardcode in check_path_length()Robert Yang
* Fixed: 410 -> limit Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06useradd.bbclass: remove user/group created by the package in clean* taskMaxin B. John
At present, if a recipe is built which creates users/groups via useradd.bbclass, those users/groups are not removed from sysroot when the recipe/package is cleaned using clean/cleansstate/cleanall or when a recipe is rebuild and 'unstaged' from the the sysroot. The "userdel_sysroot_sstate()" provides that functionality. [YOCTO #9262] Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05patch.bbclass: remove useless path assignmentAlex Franco
A path variable is assigned the value of PATH from the environment, before the PATH is set on the environemnt from the value of PATH in the bb datastore. This seems to be an unnecessary leftover. [YOCTO #8543] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05package: do_split_packages: expand variables in extra_dependsRoss Burton
If a recipe passes for example extra_depends="${PN}-dev" to do_split_packages() then it isn't expanded, so the check for the multilib prefix doesn't work. Solve this centrally by expanding extra_depends inside do_split_packages(). [ YOCTO #9381 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05sanity: Increase minimum git version to 1.8.3.1Richard Purdie
The kernel tools assume git > 1.7.9.5, I'm unsure of the exact version but the oldest in our infrastructure is 1.8.3.1. The git fetcher also currently has nasty workarounds for git < 1.7.9.2. Moving to 1.8.3.1 as our minimum version seems sane at this point as the oldest we're testing/supporting. [YOCTO #6162] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05license.bbclass: fix warnings when run in unprivileged "container" envBjørn Forsman
An unprivileged "container" environment like this[1] doesn't have root account (uid 0) which causes tons of "Invalid argument" warnings: $ bitbake ... ... WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]' ... Fix it by handling EINVAL similar to existing handling of EPERM (which was added for when not running under pseudo). [1]: The real environemnt is buildFHSUserEnv from NixOS/nixpkgs, but a demonstration of the issue can be done like this: $ touch f $ unshare --user --mount chown 0:0 f chown: changing ownership of ‘f’: Invalid argument Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05externalsrc: avoid race in temporary git index fileMarkus Lehtonen
Use a unique tempfile as the temporary git index file when determining the git hash of the source tree. A fixed filename was obviously causing races (with the git index.lock file) under oe-selftest where multiple bitbake instances were run against the same source tree at the same time. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-04classes/buildhistory: fix grammar in commentsPaul Eggleton
Fix a minor grammatical error in the comments here. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-04classes/buildhistory: fix filtering of depends-nokernel.dotPaul Eggleton
For images we produce a number of filtered dependency .dot files for readability, the first of which is depends-nokernel.dot which filters out just the kernel itself (not kernel modules). Unfortunately the filter specifications hadn't been updated for the dash-to-underscore removal or the 4.x kernel upgrade, thus the filtering wasn't actually doing anything. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-04classes/buildhistory: optimise getting package size listPaul Eggleton
Invoking oe-pkgdata-util in turn for every package in the list was slow with a large image. Modify oe-pkgdata-util's read-value command to take an option to read the list of packages from a file, as well as prefix the value with the package name; we can then use this to get all of the package sizes at once. This reduces the time to gather this information from minutes to just a second or two. Fixes [YOCTO #7339]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03image-vm: Exclude DISK_SIGNATURE_GENERATED from task signatureRichard Purdie
Otherwise the task hash changes between server and worker context leading to changing task checksums. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03populate_sdk_ext: Exclude BBTASKDEPDATA from task signatureRichard Purdie
Otherwise the task hash changes between server and worker context leading to changing task checksums. The dependency data here is tracked by other pieces of the signature. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03kernel-yocto: enforce SRC_URI specified branchBruce Ashfield
During the simplication and cleanup of branches and kernel meta data handling, the ability to force build a branch that didn't match the meta data was dropped. There are valid uses cases when a different branch should be built (testing, development, etc), so we restore the capability with this change. If after the kernel meta data is processed the current branch does not match the SRC_URI specified branch, a warning is generated about the impending branch switch and that the user should double check that they are building what they expect. WARNING: After meta data application, the kernel tree branch is standard/base. The WARNING: SRC_URI specified branch standard/gt. The branch will be forced to standard/gt, WARNING: but this means the board meta data (.scc files) do not match the SRC_URI specification. WARNING: The meta data and branch standard/gt should be inspected to ensure the proper WARNING: kernel is being built. Reported-by: Steve Sakoman" <steve.sakoman@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03insane.bbclass: avoid false positives on library locationBill Randle
package_qa_check_libdir() reports that the file libsoletta.so.0.0.1-gdb.py in /usr/share/gdb/auto-load is in the wrong location. Before generating a warning for files in non-standard locations, check that the file is an actual elf file (and hence a real library file). [YOCTO #9215] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03grub-efi.bbclass: use GRUB_ROOT rather than APPEND for root deviceRobert Yang
Use APPEND for grub's root device may cause confusion, for example, when building efi + pcbios, there maybe be two root=/dev/ram0, one of them would be carried to the installed target, and the target would fail to boot. Use GRUB_ROOT to fix the problem, and remove SYSLINUX_ROOT from APPEND will fix the problem. [YOCTO #9354] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03base: Fixup PACKAGECONFIG incorrect mappingsRichard Purdie
PACKAGECONFIG doesn't work in cross-canadian recipes at the moment as DEPENDS are prepended with mlprefix. A recipe is either nativesdk, native or target so adjust the if statements accordingly, use inherits_class for more accurate recipe classification and add cross-canadian support. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01classes/packagegroup: Refactor code to be simplerUlf Magnusson
This makes the code a bit shorter and more readable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01image: Fix debugfs image type recursion loopFreudiger Raphael
The debugfs prefix is striped from t, but not from baset. Therefore baset never matches t. Signed-off-by: Freudiger Raphael <raphael.freudiger@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)Andre McCurdy
Reuse the 'license' variable, instead of calling d.getVar('LICENSE', True) again. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0Andre McCurdy
base.bbclass sets 'check_license' to False (and therefore skips license checking completely) for native, nativesdk, etc recipes (ie anything which could potentially be classed as "host tools"), so supporting a dedicated whitelist of GPLv3 host tools is not necessary. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-vm.bbclass: remove invalid codeRobert Yang
It has been done in syslinux.bbclass. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-live.bbclass/image-vm.bbclass: remove duplicated codeRobert Yang
Move the common code to live_vm_common.bbclass and remove duplicated ones. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31bootimg.bbclass: merge it into image-live.bbclassRobert Yang
They are doing the same things: create live images, merge them into one bbclass makes it easy to understand. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31boot-directdisk.bbclass: merge it into image-vm.bbclassRobert Yang
They are doing the same things: create virtual machine images, merge them into one bbclass makes it easy to understand. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image.bbclass: Make unneeded packages for a read-only rootfs configurablePeter Kjellerstedt
Previously the list of packages that are considered unneeded for a read-only rootfs was hardcoded. This made it impossible to, e.g., have shadow installed on a system with a read-only rootfs, but where /etc is mounted writable. This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than update-alternatives (as was previously the case) since this should actually remove the intended package. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31oe-publish-sdk: exclude sstate-cache if publishing minimal SDKPaul Eggleton
If SDK_EXT_TYPE is set to "minimal" then the SDK won't contain many sstate artifacts, and you're required to set up an sstate mirror in this case anyway so there's no point publishing the "stub" sstate-cache directory from within the SDK since it won't be useful for update purposes and may be confused with the real sstate-cache. There is however a possibility that people might publish the real sstate-cache directory under the same output directory provided to oe-publish-sdk, thus deleting it after extracting (as we were doing with other files we wanted to clean up at the end) would be problematic, besides which extracting it and then deleting it is wasteful. Thus, introduce a "-p" command line option to the SDK installer that we can use to tell tar not to extract the items we don't want when publishing. This has the added benefit of mostly keeping references to these in the place they belong i.e. in populate_sdk_ext.bbclass. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31classes/populate_sdk_ext: support setting vars from environment at build timePaul Eggleton
When running bitbake you may pass in values of variables from the external environment (making use of BB_ENV_EXTRAWHITE), and you may choose to do this when building the extensible SDK, for example: MACHINE=qemuarm bitbake -c populate_sdk_ext core-image-minimal You would naturally expect those settings to be reflected in the extensible SDK itself; however they were not, since we were only considering local.conf and auto.conf. Check the variables mentioned in BB_ENV_EXTRAWHITE to see if any are different than the values set in local.conf/auto.conf and add lines setting them in the SDK's local.conf if so. Fixes [YOCTO #9339]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31image-live.bbclass: DEPENDS on syslinuxRobert Yang
The mkisofs requires syslinux/isolinux.bin which is provided by target syslinux, for pcbios, the depends is already there, but for EFI, it isn't, so add the depends. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30sanity.bbclass: Use pythonexception to raise real exceptions without backtracesRichard Purdie
If the sanity code encounters a version change is doesn't understand, the current output is unreadable and confusing for the user, particularly due to the presence of the backtrace. Use improved functionality in bitbake to improve this and correctly pass python exceptions around. [YOCTO #9291] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30uninative: Switch md5sum -> sha256Richard Purdie
There are various concerns about md5 so use sha256 instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30archiver.bbclass: addtask do_deploy_archives_setsceneRobert Yang
There was a do_deploy_archives_setscene, but no addtask. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-29siteinfo: Fix musl 64bit targetsKhem Raj
Found that ssize_t was being wrongly computed for mips64 musl because it was using wrong cache files. alias them to glibc versions, musl doesn't _yet_ have target incompatibilities to note in siteinfo thankfully. Add musl aliases for aarch64 and ppc64 targets Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>