aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2015-09-08WIP: classes/packagefeed-stability: add class to help reduce package feed churnpaule/packagefeed-stabilityPaul Eggleton
When a dependency causes a recipe to effectively be rebuilt, its output may in fact not change; but new packages (with an increased PR value, if using the PR server) will be generated nonetheless. There's no practical way for us to predict whether or not this is going to be the case based solely on the inputs, but we can compare the package output and see if that is materially different and based upon that decide to replace the old package with the new one. This class effectively intercepts packages as they are written out by do_package_write_*, causing them to be written into a different directory where we can compare them to whatever older packages might be in the "real" package feed directory, and avoid copying the new package to the feed if it has not materially changed. We use build-compare to do the package comparison. (NOTE: this is still a work in progress and there are no doubt unresolved issues.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-09-08classes/sstate: break out function to get sstate manifest filenamePaul Eggleton
It is useful in a few different contexts to see which files have been written out by an sstate task; break out a function that lets us get the path to the manifest file easily. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-09-06sstate: implement basic signing/validationRoss Burton
To provide some element of integrity to sstate archives, allow sstate archives to be GPG signed with a specified key (detached signature to a sidecar .sig file), and verify the signatures when sstate archives are unpacked. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06cross-canadian.bbclass: typo fix in comments (s/repsonsible/responsible/)Mario Domenech Goulart
Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06boot-directdisk.bbclass: use rootfs UUID by defaultPatrick Ohly
This changes the default SYSLINUX_ROOTFS such that the rootfs is no longer expected under a fixed device path. Instead, the UUID is used to find it. This makes the resulting .hdddirect (and thus also the vdi/vdmk/qcow2 images derived from that) more flexible. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06boot loader: support root=UUIDPatrick Ohly
As mentioned when introducing the VM images (https://bugzilla.yoctoproject.org/show_bug.cgi?id=7374), the resulting images only work when the image is mounted as a disk that results in the hard-coded path (/dev/sda in the current default). Using the file system UUID to find the rootfs is more flexible. To enable this for boot-direct.bbclass and thus image-vm.bbclass (aka FSTYPEs vdi/vmdk/qcow2), set SYSLINUX_ROOT = "root=UUID=<<uuid-of-rootfs>>". The rootfs image must use an ext file system. The special string will get replaced in the APPEND line with the actual UUID when the boot loader (grub-efi, syslinux or gummiboot) writes the boot loader configuration files. At that time, the rootfs image has already been created and its UUID can be extracted using "tune2fs -l", which also should be available because the e2fsprogs-native tools were needed to create the image in the first place. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06image-vm.bbclass: support specifying an initramfsPatrick Ohly
Set INITRD_IMAGE to automatically add a custom initramfs to the boot partition. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06image-vm.bbclass: avoid duplicating syslinux default valuesPatrick Ohly
Some of the SYSLINUX defaults are the same as in the underlying syslinux.bbclass. Let's not duplicate them, because that makes changing the default harder. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06report-error: send only last 5242000 characters in error logsMartin Jansa
* otherwise whole build report submission is rejected because it's too big Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03testimage: filter proper test cases by tagszjh
If a test case is decorate by oeqa.utils.decorators.tag, this case will by add a tag, testrunner will filter these tags by TEST_SUITES_TAGS [YOCTO #7849] Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03image.bbclass: add rootfs_check_host_user_contaminatedChristopher Larson
This function is intended to be used in ROOTFS_POSTPROCESS_COMMAND, and checks for any paths outside of /home which are owned by the user running bitbake. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03insane.bbclass: add host-user-contaminated testChristopher Larson
- Add a test which checks for any paths outside of /home which are owned by the user running bitbake. - Add the test to WARN_QA by default. This test has been in meta-mentor for some time, and in our ERROR_QA for our builds, and has caught a number of issues for us. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03insane.bbclass: handle tests which need fakerootChristopher Larson
If any tests listed in FAKEROOT_QA are enabled (listed in ALL_QA), then run do_package_qa under fakeroot. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-02kernel.bbclass: add the runtime dependency on kernel-vmlinux for kernel-imageKevin Hao
When a BSP uses vmlinux for boot, the kernel-image package is just empty. But by default the kernel-vmlinux is not installed. Then the pkg_postinst_kernel-image() would create a symlink to a non-existent file. Fix this by adding the runtime dependency on kernel-vmlinux for kernel-image if the KERNEL_IMAGETYPE is "vmlinux". Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-02insane.bbclass: Check for invalid characters (non UTF8) on recipe metadataLeonardo Sandoval
Check if invalid characters are present on recipe's metadata. Fields taken into account are: 'DESCRIPTION', 'SUMMARY', 'LICENSE' and 'SECTION'. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01package_rpm: support signing of rpm packagesMarkus Lehtonen
This patch adds a new bbclass for generating rpm packages that are signed with a user defined key. The packages are signed as part of the "package_write_rpm" task. In order to enable the feature you need to 1. 'INHERIT += " sign_rpm"' in bitbake config (e.g. local or distro) 2. Create a file that contains the passphrase to your gpg secret key 3. 'RPM_GPG_PASSPHRASE_FILE = "<path_to_file>" in bitbake config, pointing to the passphrase file created in 2. 4. Define GPG key name to use by either defining 'RPM_GPG_NAME = "<key_id>" in bitbake config OR by defining %_gpg_name <key_id> in your ~/.oerpmmacros file 5. 'RPM_GPG_PUBKEY = "<path_to_pubkey>" in bitbake config pointing to the public key (in "armor" format) The user may optionally define "GPG_BIN" variable in the bitbake configuration in order to specify a specific gpg binary/wrapper to use. The sign_rpm.bbclass implements a simple scenario of locally signing the packages. It could be replaced by a more advanced class that would utilize a separate signing server for signing the packages, for example. [YOCTO #8134] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01runexported: Make it compatible with host dumpMariano Lopez
Currently it is not possible to run a exported test, but this patch will allow to use the HosDumper class when running a exported test, otherwise the HostDumper class will break runexpored test. [YOCTO #8118] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31mirrors.bbclass: Update gnutls mirrorsJussi Kukkonen
* Remove mirror sites that no longer exist * Update the gnutls.org path so the gnupg mirror gets used Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31Fix mode +st on TMPDIR when creating itAlex Franco
A sanity check fails when TMPDIR has setuid, setgid set. It was proposed to fix this on TMPDIR creation instead of failing with a sanity test only. This patch handles removal of those special bits (and additonally, the sticky bit) from BUILDDIR and TMPDIR when these directories are created. [YOCTO #7669] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30image.py: write bitbake variables to .env fileEd Bartosh
Write set of bitbake variables used by wic into build/tmp/sysroots/<machine>/imagedata/<image>.env List of variables is defined in WICVARS variable in meta/classes/image_types.bbclass. This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30image_types.bbclass: add wic image typeEd Bartosh
wic image type is used to produce partitioned images. Image configuration should be stored in either <recipe>.<machine>.wks or <recipe>.wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30dump: allow to have datastore vars on dump commandsMariano Lopez
This allows to have datastore variables in the dump commands and will get the data when a new instance it's created. Also this remove special cases from the commands. [YOCTO #8118] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-08-30dump: Created new classes for dump host and targetMariano Lopez
It makes sense to separate the dump commands from the oeRuntimeTest class, this way it can be used in all the test context. These are the changes included in this patch: - Created classes: BaseDumper, HostDumper, TargetDumper - Create an instance of HostDumper in imagetest.bbclass and add it to TestContext class, this way any class that have access to the TestContext would be able to dump logs from the host - Create an instance of TargetDumper in QemuTarget class after get the runner, this way it is accessible during the tests. [YOCTO #8118] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2015-08-30classes/buildhistory: add build result to commit messagePaul Eggleton
We have the command in the commit message, we might as well have the build result as well (succeeded/failed and whether or not it was interrupted by the user). The interrupted part relies upon a change to BitBake to extend the BuildCompleted event to include an attribute for that, but will not fail if the attribute is not present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: include metadata revisions in commit messagePaul Eggleton
We do already commit these into the repository itself, but have them in the commit message as well as a reference. As part of this, refactor out running "git commit" into a separate function so we don't have to duplicate the code in the two places we call it. Implements [YOCTO #7966]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: handle additional files at recipe levelPaul Eggleton
Avoid an error when attempting to remove previous data if it's not a subdirectory - we were assuming that anything that wasn't named "latest" or "latest_srcrev" had to be a directory. This makes it possible to have a buildhistory_emit_pkghistory_append which writes additional files at the recipe level. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: fix permissions in package file listingPaul Eggleton
If we want the correct file permissions to show up here as they would on the target, we need to run the command under pseudo. Normally we'd set the fakeroot varflag on the function and that would be enough, but it turns out that setting fakeroot on a non-task function that you execute using bb.build.exec_func() isn't working at the moment. Work around this by simply using FAKEROOTENV and FAKEROOTCMD. Unfortunately that means we have to duplicate the command for the two cases but I couldn't find a better means of doing that that actually works. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: tweak buildhistory_list_pkg_filesPaul Eggleton
* Avoid using ${...} for shell variables (since they could be expanded as bitbake variables if present) * Use files-in-package.txt rather than files-in-<packagename>.txt; the file is already in a subdirectory named with the package name and this naming is consistent with that of files-in-image.txt. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: indent recently added function consistentlyPaul Eggleton
Shell functions use tabs in this file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: exclude . in file listingsPaul Eggleton
We don't care about the permissions on the top-level directory in which the files are contained, just everything under it; this also avoids lists with just this entry in it for empty packages. Affects file listings for both images and packages. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30classes/buildhistory: ensure we push when "no changes" commits are madePaul Eggleton
If there aren't any changes, we still make a commit to the buildhistory repo, but this wasn't being pushed if BUILDHISTORY_PUSH_REPO is set. Move the push to the end to make it unconditional. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30testimage: Run commands in target and host when test failsMariano Lopez
This patch modify three files altought two of them are minimal modifications. This version includes the changes proposed by Paul. testimage.bbclass: Create new vars for easy modification of the dump directory and commands to be run on host and target when a test fails TESTIMAGE_DUMP_DIR: Directory to save the dumps testimage_dump_target: Commands to run on target testimage_dump_host: Commands to run on host oetest.py: - Allow to use the vars defined in testimage class - Now able to run commands in the host and dump the results - Fix an issue with the condition where to run the dump commands (Before it run the commands every test after a failure, now it runs the commands only in tests that failed) - Fix the output to stdout [YOCTO #8118] (From OE-Core rev: 26fe645457633f90bb5ddbb12f5f7b9ca4a06cc5) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30autotools.bbclass: Allow dependency tracking option to be overriddenRoy Li
CONFIGUREOPT_DEPTRACK can not be overridden since it is set by = Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-30package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie
Changes to OVERRIDES (e.g. from changing MACHINE) should not change the sstate signatures of do_package_write_*. Exclude the variable explicitly in the package classes to avoid this. (From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30nativesdk.bbclass: set sbindir to bindirChristopher Larson
The sbindir vs bindir separation really doesn't mean much in this context, and toolchain-scripts.bbclass doesn't add sbindir to the PATH, so set the former to the latter. (From OE-Core rev: 51a19850700bd96e3d2e104e1626aceb73a48e72) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30update-rc.d.bbclass: explicitly dep on initscriptsChristopher Larson
update-rc.d doesn't just want an initscripts package, it wants initscripts-functions. In the case where VIRTUAL-RUNTIME_initscripts is set to nothing, update-rc.d still needs initscripts-functions to satisfy its runtime dependencies. Further, we shouldn't be using a *runtime* virtual in a *build time* variable. This should resolve image creation failures with configurations without sysv initscripts when a recipe inherits update-rc.d and doesn't inherit systemd. (From OE-Core rev: e6642ae0849e5ac3174c643a7693af25d829d6d1) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30image.bbclass: re-run do_rootfs when feature packages changeChristopher Larson
Currently, FEATURE_PACKAGE_<feature> isn't in any vardeps, so changing the packages for a feature won't change the checksum for do_rootfs. Rather than explicitly adding those to vardeps, just use the expanded form of FEATURE_INSTALL and FEATURE_INSTALL_OPTIONAL, so the actual list of packages from the features goes into the checksum. (From OE-Core rev: fdd1669e04bd8219344b1896b9d9c6a187e4f84e) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30cross-canadian.bbclass: support for TCLIBC="baremetal"Juro Bystricky
Allow "baremetal" builds. (From OE-Core rev: 0cd3121058ea620c74622f1200c8040696b4d1d8) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29Empty image: filesystem allocationAlex Franco
Increase sparse image block size when ROOTFS_SIZE is smaller than the minimum needed for ext4 to fit into it. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29Empty image: package list splitting and iterationAlex Franco
A few short fixes to splitting/iteration done over package lists in license.bbclass, package_manager.py and rootfs.py. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24package_rpm.bbclass : escape "%" in files and directories nameSébastien Mennetrier
The rpm process replace all the "%name" in the spec file by the name of the package. So, if the package is composed of some files or directories named "%name...", the rpm package process failed. Replace all "%" present in files or directories names by "%%%%%%%%" to correctly escape "%" due to the number of times that % is treated as an escape character. Jeff Johnson says this is the Right Thing To Do. [ YOCTO #5397 ] Signed-off-by: Sébastien Mennetrier <smennetrier@voxtok.com> Signed-off-by: Michaël Burtin <mburtin@voxtok.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/insane: fix QA check message referring to nativesdkPaul Eggleton
nativesdk has been a prefix rather than a suffix for some time now. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/cmake: add arch conversion routineAlexander Kanavin
cmake expects target architecture strings in the format of uname(2), which do not always match TARGET_ARCH (e.g. powerpc vs ppc). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24classes/gnomebase: change tarball compression to xzAlexander Kanavin
Upstream, xz has been the only format for some time now, so let's make it the default and adjust recipes that package old stuff. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24kernel-arch: Force BFD kernel when using gcc for linkingKhem Raj
We redefine LD to point to ld.bfd when building kernel, which works in most cases since kbuild system calls out for bare LD most of the time, however some of newer kernels e.g. 4.1+ have some code added which can call gcc directly to do the linking job e.g. arm vdso code This causes build failures when we have configured the default cross toolchain to use gold linker as default. Errors like BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try linking with -N | arm-angstrom-linux-gnueabi-objcopy:arch/arm/vdso/vdso.so[.hash]: Bad value start happening. With this patch we force gcc to choose bfd linker as well Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24gnome: move introspection options to gnomebaseRoss Burton
The gnome class is really a convenience class to include other classes, so move the introspection arguments into gnomebase.bbclass. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19binconfig-disabled: write an message to stderr to help confused developersRoss Burton
Often configure scripts or Makefiles that use the stub scripts written by binconfig-disabled fail mysteriously with no obvious problem. Attempt to solve this by writing an error to stderr which hopefully makes it to the logs. [ YOCTO #8169 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19package_deb.bbclass: Allow UTF-8 characters on control filesLeonardo Sandoval
Allow UTF-8 characters on control files. Also handle an expection in case of invalid characters (non UTF-8). [YOCTO #6693] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19archiver.bbclass: Run deploy_archives in $WORKDIRClemens Lang
In recipes that are exempt from source code archiving due to COPYLEFT_LICENSE_EXCLUDE, do_deploy_archives does not have a transitive dependency on do_unpack. Given enough parallelism, this means do_deploy_archives can run at the same time or before do_unpack. Because do_deploy_archives did not specify a working directory, its working directory was ${B}, which defaults to ${S}, which may be set by a recipe to a directory that is created by do_unpack. In this case, do_deploy_archives can fail because do_unpack deletes and re-creates the directory and do_deploy_archives cannot change into the non-existent directory. Avoid this problem by explicitly specifying a working directory for do_deploy_archives (and for do_deploy_all_archives as well for good measure). Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19image_types.bbclass: allow replacing tar commandPatrick Ohly
Usually, the host's tar command is sufficient. However, special cases like archiving xattrs depend on a modern GNU tar version. The new IMAGE_CMD_TAR makes that possible, with xattrs given as example. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>