aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-04-05sanity.bbclass: Improved error messageJuro Bystricky
When a non-existing MACHINE is specified, sanity check issues the following message: Please set a valid MACHINE in your local.conf or environment However, MACHINE can also be set in multiconfig .conf file(s). Hence we may have several different MACHINE settings within one (multiconfig) build, so the present error message is fairly ambiguous. This patch remedies this by explicitly naming the offending MACHINE and by amending the list of places where this erroneous MACHINE definition could have originated. MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file. [YOCTO#10810] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a7cb408dd784178197687a2129e936620bf6a0d3) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05image/packagegroup/populate_sdk: Drop do_populate_sysroot task properlyRichard Purdie
Setting do_populate_sysroot as noexec means the code keeps thinking it can find a manifest file for it. It also complicates sstate installtion since the code would believe there is an sstate object there it should look for. Instead, delete the task. This causes sdk failures as the dependencies are wrong so fix those as well. (From OE-Core rev: bd7d0314038a4c1a8e8c9ebdb7194f8e17db3fef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05toolchain-shar-extract: compare SDK and host gcc versionsEd Bartosh
If ext sdk is built by gcc version higher than host gcc version and host gcc version is 4.8 or 4.9 the installation is known to fail due to the way uninative sstate package is built. It's a known issue and we don't have a way to fix it for above mentioned combinations of build and host gcc versions. Detected non-installable combinations of gcc versions and print an installation error. [YOCTO #10881] (From OE-Core rev: bfb9ea2604557804bd8c16adb57ccdd868a4020f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05populate_sdk_base.bbclass: add documentation packages to SDKs if ↵Alexander Kanavin
api-documentation is in DISTRO_FEATURES (From OE-Core rev: d2b7b3fca328449cd87997be7f897b59433a153d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05buildhistory: fix latest_srcrev in the common caseChristopher Larson
buildhistory was writing srcrevs.values() as SRCREV when only one srcrev/branch exists. This returns a view of the dictionary values in python 3, and used to return a list in python 2, neither of which is an appropriate value for SRCREV. It was resulting in latest_srcrev files like this: # SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed" SRCREV = "dict_values(['346584bf6e38232be8773c24fd7dedcbd7b3d9ed'])" Which in turn would result in invalid output in buildhistory-collect-srcrevs. Fix by calling `next(iter())` on the `.values()` Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit ef826a395612400924bbe49859d256b237ff59e1) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05libc-package.bbclass: split binary localedata even more if asked toAndreas Oberritter
If GLIBC_SPLIT_LC_PACKAGES is set to a non-zero value, convert glibc-binary-localedata-XX-YY to be a meta package depending on glibc-binary-localedata-XX-YY-lc-address and so on. This enables saving quite some space if someone doesn't need LC_COLLATE for example. Some regex code was removed from output_locale_binary_rdepends, because legitimize_package_name already converts to lowercase. (From OE-Core rev: 40b4b31092058f8833ada3dfc254d362dd3139c1) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05archiver: avoid archiving source for glibc-localeZhenbo Gao
Avoid archiving source for glibc-locale as its tasks do_fetch do_unpack and do_patch have already been deleted. Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05populate_sdk_base: depend on nativesdk-glibc-localeRoss Burton
If we're building a SDK and we're using glibc so may be installing locales, add a build-dependency on natiesdk-glibc-locale so the locales we need will exist. (From OE-Core rev: 8d6869a0a89d8cf3c6e57723fab2750ba2c885db) (From OE-Core rev: bad37bfd766c39efe5a5db95668c855d1c45a059) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-05populate_sdk: install UTF-8 locales in SDKsRoss Burton
As glibc 2.27 can't read older locale-archives, SDKs using glibc 2.27 on hosts using glibc earlier than 2.27 won't be able to find any locales, so bitbake won't start and Python can't use UTF-8. So by default install all locales into the SDK. Special-case Extensible SDKs by installing no locales as they ship glibc in a buildtools, and that will have the locales. Locale installation requires cross-localedef, so add that to DEPENDS. Also remove the explicit en_US addition in buildtools-tarball as it is now redundant. (From OE-Core rev: 96896568d197cd06302713c24c0f7d91bfaea6c1) (From OE-Core rev: 385dd115d00aabbcd970ef6b62353480d87a5a55) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-03-15uninative: Add compatiblity version checkRichard Purdie
If glibc is newer on the host than in uninative, the failure mode is pretty nasty for clusters where the sstate is shared, including the Yocto Project autobuilder. This check aborts the use of uninative in such scenarios where a newer glibc version appears and avoids corruption of sstate caches. We use ldd to check the glibc version since that is included in libc-bin (or equivalent) which locales use so it should always be present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-07buildstats.bbclass: Avoid index exception in /proc/PID/io parsingPavel Modilaynen
There is some probability (depends on system load) to get empty or line containing "0" as the last line while reading /proc/PID/io. Avoid build failure by checking if line contains separator ":" before split. Backport from pyro commit b26feaf51af55f17fad79dbd53dd3ec0a37c38ff Signed-off-by: Pavel Modilaynen <pavelmn@axis.com> Signed-off-by: Daniel Lublin <daniel@lublin.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-03insane: consider INSANE_SKIP without package-specifier tooRoss Burton
this is needed for the updated linux-firmware as it needs this INSANE_SKIP support (From OE-Core rev: 618093c6b7c919f25094f56b82610bee7c97f99f) Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 604939186cc08ab0429ebe00f3e32661847f0cf0) Adjusted for pyro context Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Adjusted for morty contect Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-01-21populate_sdk_ext: Set cleandirs correctlyRichard Purdie
The current conflicting use of SDKDEPLOYDIR causes a race between do_populate_sdk and do_populate_sdk_ext potentially causing the SDK to either go missing or the build to fail. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-21lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie
repos don't conflict (From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-21image: Fix previous broken commit to set expand parameter to getVarRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-20image: Expand PV to avoid AUTOREV parsing failuresRichard Purdie
Currently, setting PV to include SRCPV for build-appliance results in: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export ftp_proxy="http://proxy.yocto.io:5187/"; export FTP_PROXY="http://proxy.yocto.io:5187/"; export PATH="${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:/home/pokybuild/ yocto-autobuilder/yocto-worker/buildtools/build/scripts:${TMPDIR}/ work/qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/x86_64-poky-linux:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot/usr/bin/crossscripts:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/usr/sbin: ${TMPDIR}/work/qemux86_64-poky-linux/build-appliance-image/ fetcheravoidrecurse-r0/recipe-sysroot-native/usr/bin:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/sbin:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/bin:/home/ pokybuild/yocto-autobuilder/yocto-worker/buildtools/build/bitbake/bin:${TMPDIR} /hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/poky failed with exit code 127, output: /bin/sh: 1: git: not found This is because PV is being expanded when TMPDIR is unset. Expand PV in advance to avoid this problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-09populate_sdk_ext: Use prebuilt uninative tarballRichard Purdie
For uninative to work, it relies on it being updated to new versions as newer glibcs are built. This means the uninative generated by the current build may not be as recent as the uninative that is being downloaded by uninative.bbclass. If this occurs, we can get symbol mismatch errors. Ultimately, the sstate and the uninative versions need to match so we should use the same tarball as uninative.bbclass is using, not the one we built. [YOCTO #12405] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-09uninative: Handle futex hangs caused by glibc version mismatchesRichard Purdie
We've been seeing hangs in smart on the autobuilders where it hangs in pthread futex calls. It appears to happen when some components are installed from sstate (which use the interpreter from uninative) and other components are built natively (and use the host's interpreter). Its primarily affecting software which uses shared memory with futexs in for locking purposes (which bdb does called from librpm from smart). This isn't an issue in pyro and rocko and beyond since they use recipe specific sysroots which included a change to always change to the uninative interpreter. We could backport those changes but they're fairly invasive changes to the sstate code. This patch is a more minimal change which ensures binaries are always using the uninative interpreter regardless of whether they're built locally or installed from sstate. This is only an issue if you're using an sstate mirror and hosts with a variety of different libc versions. It has only become an issue on recent libc versions where there was clearly some forwards compatibility issue introduced. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10sign_rpm.bbclass: force rpm serial signingLeonardo Sandoval
Newer versions of gpg (at least 2.1.5 and 2.2.1) have issues when signing occurs in parallel so (unfortunately) the signing must be done serially. Once the upstream problem is fixed, this patch must be reverted, otherwise we loose all the intrinsic parallelism from bitbake. [YOCTO #12022] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-10-10kernel.bbclass: fix KERNEL_IMAGETYPE(S) for Image.gzNicolas Dechesne
KERNEL_IMAGETYPES lists all the kernel images that we want to build. in cb17b6c2a7 (kernel.bbclass: support kernel image type of vmlinux.gz), some logic was added to support vmlinux.gz which is not a target built by kernel makefiles (only vmlinux). It is clear that the goal of this logic is only to support vmlinux.gz and not others compressed format (such as Image.gz) which are valid target for kernel makefiles. For Image.gz we should rely on the kernel makefiles and not do the compression in kernel class. This patch updates the logic used to filter out non supported kernel target from KERNEL_IMAGETYPES, and make vmlinux.gz a 'special case', instead of *.gz. If more special cases are needed in the future, we could add them in a similar way. This patch should be a no-op for anyone using vmlinux or vmlinux.gz, and on top of that it is fixing the build for Image.gz which was not working until now. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cfc0c897656fe67e81a6a5dcd936dff785529f41) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-09-22image.bbclass: Sorted ctypes to avoid basehash errorGerson Fernando Budke
When selected multiple subimages a similar error could happend: Variable do_image_cpio[subimages] value changed \ from 'cpio.gz.u-boot cpio.gz' to 'cpio.gz cpio.gz.u-boot' To avoid this, 'ctypes' should be sorted at 'gen_conversion_cmds'. This garantee that 'CONVERSION_CMD_xxx' are always written in tha same order and consequently 'do_image_cpio' have the same hash. (From OE-Core rev: 271f1a5f65b8685a1e3645026876251122ef3974) Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file in the deploy directory warrants the complexity it brings elsewhere. Let's just remove it entirely. In particular, if two do_image_complete tasks run in parallel they risk both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time. Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file. In theory this should be safe because "cp -alf" will just cause one to overwrite the other. Unfortunately, coreutils cp also has a race[1] which means that if one copy creates the file at just the wrong point the other will fail with: cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to +‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680 (From OE-Core rev: 71e9e88847d7000781642ea6187ebd8f40dfdcfe) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29insane.bbclass: fix override handling in RDEPENDS QAGan Yau Wai
The package_qa_check_rdepends() in insane.bbclass has incorrectly replace its localdata OVERRIDES value with the package name. Fixing it by appending the package name to the existing OVERRIDES value. This resolves RDEPENDS QA error when setting PACKAGECONFIG using a pn- override at local.conf. Cherry picked from master 60d28dd72daee235150ab6605cbf953f1ea691df and modified to work with older bitbake where 2nd parameter in localdata.getVar was mandatory. [YOCTO #11374] Signed-off-by: Gan Yau Wai <yau.wai.gan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CCMartin Jansa
* without this we cause nativesdk-linux-libc-headers to depend on target specific KERNEL_CC (through icecc_get_tool -> icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH -> TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by bitbake-diffsigs: OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2 OE qemux86@ ~/build/oe-core $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* basehash changed from 39774238b66763c598153132e87a2c1a to aa2d66e770bf533e312536eb0a401c4c Variable TARGET_CC_KERNEL_ARCH value changed from '${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to '' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDsTom Rini
When we have more than one CONVERSION_CMD being used, for example ext4.gz.sha256sum we will see errors about "metadata is not deterministic". This is because we do not have a stable order of intermediate files that will be removed in the generated shell command. We fix this by calling sorted() on the set of rm_tmp_images so that we will have a stable hash again. Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 98a2afeb3a53bec7a72a4a9846e1dba636cc6f3d) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29image.bbclass: Correct chaining compression supportTom Rini
When chaining of compression/conversion types was added, we had a new way to handle doing things like "ext4.bz2.sha256sum" or "ext2.gz.u-boot". However, because the U-Boot image class isn't included normally, it wasn't properly converted at the time. After the support was added the "clean" argument that the .u-boot code uses no longer functions. The fix for this inadvertently broke chaining compression/conversion. First, correct the u-boot conversion code. Fixes: 46bc438374de ("image.bbclass: do exact match for rootfs type") Cc: Zhenhua Luo <zhenhua.luo@nxp.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0a7ce0b971a208956cb895ba5a869ec8c5d94703) excluded lz4 and lzo chnages Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29archiver: Escape recipe name in regexJoshua Watt
The recipe name needs to be escaped when using it in a regular expression so that and special characters are treated literally Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29GNU_MIRROR: switch from ftp to httpsMaxin B. John
Based on the same reason behind DEBIAN's switch from ftp: https://www.debian.org/News/2017/20170425 (From OE-Core rev: ba119d836c0f4b20a39c92fa2e64abb0d5a55ad4) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-08-29DEBIAN_MIRROR: switch from ftp to httpMaxin B. John
All public-facing debian.org FTP services will be shut down on November 1, 2017 The mirrors should just be accessed using HTTP instead. https://www.debian.org/News/2017/20170425 Fixes [YOCTO #11413] (From OE-Core rev: c2cdc4d9155d7a3b9cba60fa9cbb448cf64c62bd) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-06-16package_ipk: Clean up Source entry in ipk packagesRichard Purdie
There is the potential for sensitive information to leak through the urls there and removing it brings this into the behavior of the other package backends since filtering it is likely error prone. Since ipks don't appear to be generated at all if we don't set this, set the field to the recipe name used (basename only, no paths). This avoids information leaking. We may want to drop the field if opkg can allow that at a future point but the recipe name is a suitable identifier for now. Reported-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-13sstate.bbclass: check if mirror directory is writableEd Bartosh
Commit 51edde653707e7a3cd2186082458f01f32cd1996 makes a wrong assumption that SSTATE_MIRRORS have write permissions. A mirror is by definition outside of it's user control. In my use case it happens I does not have permissions to update the access time of the dereferenced symbolic-link file. Checked if file is writable before changing its atime. Thanks to Paulo Neves for the patch. [YOCTO #11307] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-25insane: remove broken unsafe-references-in-binaries testRoss Burton
This test aims to detect binaries in /bin which link to libraries in /usr/lib, for the case where the user has /usr on a separate filesystem to /. However it doesn't scan both image/ and the sysroot, so if a binary in /bin links to a library in /usr/lib that was built by the same recipe then it will error out. This test isn't enabled by default, and because of this serious bug I suspect nobody else is enabling it either. As /usr being on a separate partition to / is a very rare configuration these days I think we should delete the test: if someone cares sufficiently they should write a test that actually works. (From OE-Core rev: a6af5bbf3dad6f0951c67a0aae13ef86a8906893) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18sstate.bbclass: update .siginfo atimeEd Bartosh
.siginfo files are not being accessed from local or NFS-mounted sstate mirrors when sstate package is installed, so their atime is not updated. If sstate mirror is cleaned based on access time, they get deleted, even though they are still being used. Updated atime of .siginfo symlinks with 'touch -a'. This command dereferences symlinks pointing to the local mirror and updates atime of the .siginfo file on the mirror. [YOCTO #10857] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-05-18sanity.bbclass: modify check for shellJuro Bystricky
Due to the recently implemented update-alternatives for bash binary, sanity checker may end up with a (false-positive) error such as: Error, /bin/sh links to /bin/bash.bash, must be dash or bash This patch modifies the test: presence of "/bash" or "/dash" in shell binary name results in pass. [YOCTO#11108] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-05-18image_types.bbclass: fix image dependency chain collectionAndre McCurdy
If image type "foo" depends on image type "bar.xz", then dependencies should be collected from the base image type (ie "IMAGE_DEPENDS_bar") not from "IMAGE_DEPENDS_bar.xz". Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8a9f249a9166347cc0468191ce130003e3d306e1) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-05-18image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion typesRandy Witt
Previously if IMAGE_TYPEDEP_* contained a conversion type of the form, "foo.bar", the dependency on CONVERSION_DEPENDS_bar would not get added to the task depends for do_rootfs. [YOCTO #10883] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 037d39898e0e16c6d5b24a8d3844abfb328d3c14) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-02-08classes: Fix alternatives and rc.d orderingDavid Vincent
When using an alternative as an initscript, the ordering between update-rc.d and update-alternatives tasks during prerm and postinst tasks must always be the following in order to work: * prerm: - stop daemon - remove alternative * postinst: - add alternative - start daemon This patchset adds comments to the scripts generated by both classes and organize the generated sections based on those comments. [YOCTO #10433] Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2)
2017-01-12populate_sdk_ext: whitelist do_package tasksEd Bartosh
With enabled SSTATE_MIRRORS sstate code expects mirrors to contain entries for all tasks, which is not the case for ext installer as it uses reduced sstate cache. Added do_package tasks to BB_SETSCENE_ENFORCE_WHITELIST to prevent installer failing with ERROR: Sstate artifact unavailable [YOCTO #10832] (From OE-Core rev: 2ed46ada4b8e496493835e84b36f7e9c367f59d2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-12populate_sdk_ext: fix working with uninative sstateEd Bartosh
Mapped uninative sstate directories to make ext SDK installer to use them when it's run on systems with gcc version different from gcc version used to build installer. [YOCTO #10832] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11uninative: Parameterise the use of STAGING_DIRRichard Purdie
This means that a user can change TMPDIR in a multiconfig situation and still only have one path to the uninative setup. Without this change its not possile to make such a setup work. (From OE-Core rev: 779422c5458f5f643b3a4a0dedaa4d9ad709367a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-11uninative: rebuild uninative for gcc 4.8 and 4.9Ed Bartosh
Some c++ libraries fail to build if uninative is built with gcc 5.x and host gcc version is either 4.8 or 4.9. The issue should be solved by making separate uninative sstate directory structure sstate-cache/universal-<gcc version> for host gcc versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc is either 4.8 or 4.9 and it doesn't match gcc version used to build uninative. [YOCTO #10441] (From OE-Core rev: d36f41e5658bbbb6080ee833027879c119edf3e0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel-yocto: explicitly trap subcommand errorsBruce Ashfield
To trap errors and halt processing, do_kernel_metadata was recently switched to exit on any non zero return code. While the concept is sound, there are subcommands that have legitimate non-zero return codes. Instead of removing set +e, we'll explicitly check the return code of the commands that can error, and throw a bbfatal to alert the user. (From OE-Core rev: a4705e62d0973c290011fc0d250501d358b659e8) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11archiver: don't change directory when generating tarballRoss Burton
There's no need to chdir() as tarfile.add() can be told what name to use in the archive. (From OE-Core rev: d0b282bce34db44dde4dd7f53a64dfaafe6789de) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11cve-check: allow recipes to override the product nameRoss Burton
Add a new variable CVE_PRODUCT for the product name to look up in the NVD database. Default this to BPN, but allow recipes such as tiff (which is libtiff in NVD) to override it. (From OE-Core rev: ba330051570a4c991885ee726cb187e0c911bd4f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel.bbclass: fix kernel_do_compile for KERNEL_IMAGETYPE = "vmlinux.gz" on ↵Andreas Oberritter
mips The target directory didn't exist. (From OE-Core rev: bd62851dc236a0279c735b290782602e275de5c1) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel.bbclass: do not copy bundled initramfs to /bootAndreas Oberritter
These files cause warnings because they don't get packaged, now that they don't land in kernel-vmlinux anymore. (From OE-Core rev: a49569e3a7534779bbe3f01a0647fd076c95798d) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel.bbclass: Avoid wildcards for kernel imagesAndreas Oberritter
With multiple kernel images enabled starting with 'vmlinux', e.g. vmlinux.gz and vmlinux.bin, all files landed inside the kernel-vmlinux package. On top of that, even initramfs images were included, e.g. vmlinux.gz-initramfs-*. (From OE-Core rev: b7f4133b44b740e8ac8e758b0d4a3ee32d326332) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel.bbclass: Use real filenames in kernel packagesAndreas Oberritter
When iterating over kernel image types to set up their packaging variables, don't use make targets but the real names. It was surprising if both vmlinux.bin and vmlinux.gz were enabled and only the latter had its filename extension removed from the package name. (From OE-Core rev: aa189f183e10588f7e8d642f351bd9b8d69f3ea9) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11kernel.bbclass: allow uncompressed initramfs archivesAndreas Oberritter
The code failed to copy the initramfs in case it was a plain cpio archive. (From OE-Core rev: 7dbdb4ea91aa027866da2bd46c65fe65a25c848f) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-01-11staging: Drop unused SYSROOT_LOCKRichard Purdie
This hasn't been used in years and isn't referenced anywhere, drop the definition. (From OE-Core rev: 68258f856f08f35813964e58ef761471e29373ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>