summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* populate_sdk_base: depend on nativesdk-glibc-localeRoss Burton2018-04-041-0/+1
| | | | | | | | | | | | | 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>
* populate_sdk: install UTF-8 locales in SDKsRoss Burton2018-04-042-2/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* uninative: Add compatiblity version checkRichard Purdie2018-03-151-0/+7
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 676d4d91064d4e4f7abb2bd3597a0ddd5b7e2390) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats.bbclass: Avoid index exception in /proc/PID/io parsingPavel Modilaynen2018-03-141-0/+5
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 31a098032eb82eb40eaa3952de4d29ab472e368a) 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>
* insane: consider INSANE_SKIP without package-specifier tooRoss Burton2018-03-041-1/+2
| | | | | | | | | | | | | | | | | | | this is needed for the updated linux-firmware as it needs this INSANE_SKIP support (From OE-Core rev: 618093c6b7c919f25094f56b82610bee7c97f99f) (From OE-Core rev: 4c1de18cb5d2bf4067246bf7242abde0f0917a3a) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Set cleandirs correctlyRichard Purdie2018-01-221-1/+1
| | | | | | | | | | 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. (From OE-Core rev: 39fd8c129e2bff7f2f1649b7f6e036ccc50fd5d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-01-223-0/+6
| | | | | | | | | | repos don't conflict (From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8) (From OE-Core rev: 04610f713e47cd5fc9e44e258589cb24f27bf1bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix previous broken commit to set expand parameter to getVarRichard Purdie2018-01-211-1/+1
| | | | | | (From OE-Core rev: eb5ca672c793e7c2151e7f2fef26e0c25130d840) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Expand PV to avoid AUTOREV parsing failuresRichard Purdie2018-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 9ce26c121f52d5194732be34f93e86128e1fdeaf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Use prebuilt uninative tarballRichard Purdie2017-12-111-6/+7
| | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 1e6beee55d2bbe40de54c09f7a48fcb1240a426e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Handle futex hangs caused by glibc version mismatchesRichard Purdie2017-12-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 6b149a88cd33c65c7f306f785f4d24ee2909809c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm.bbclass: force rpm serial signingLeonardo Sandoval2017-10-101-0/+6
| | | | | | | | | | | | | | | 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] (From OE-Core rev: 3aced3783b808449cd50f12684c061151861a1a5) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix KERNEL_IMAGETYPE(S) for Image.gzNicolas Dechesne2017-10-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 241cc3083f873743ac3551237acc62e55abbbf05) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Sorted ctypes to avoid basehash errorGerson Fernando Budke2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 7401ef4d816030bd6844e2e1f1910ac86cdcbe70) 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>
* kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe2017-08-293-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 20c39fdbb25c1b1867709c5bfb3ae2baef249be9) 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>
* insane.bbclass: fix override handling in RDEPENDS QAGan Yau Wai2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 15fabf4d6507d2a3f9b98ad56e822eba35950662) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CCMartin Jansa2017-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | * 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 '' (From OE-Core rev: 6aa5dcc472e6be971a4cef06aab5c1c125367eca) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDsTom Rini2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | 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> (From OE-Core rev: a786b59a42e6b49229e2e0633728fd7b268438a9) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Correct chaining compression supportTom Rini2017-08-292-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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> (From OE-Core rev: e1546856890a438b5ea3763af3cdc13db8e8f236) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Escape recipe name in regexJoshua Watt2017-08-291-2/+2
| | | | | | | | | | | | The recipe name needs to be escaped when using it in a regular expression so that and special characters are treated literally (From OE-Core rev: a26d12e43059fe37c843d3ff9480ead2e796e21f) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* GNU_MIRROR: switch from ftp to httpsMaxin B. John2017-08-291-1/+1
| | | | | | | | | | | | | | Based on the same reason behind DEBIAN's switch from ftp: https://www.debian.org/News/2017/20170425 (From OE-Core rev: ba119d836c0f4b20a39c92fa2e64abb0d5a55ad4) (From OE-Core rev: 16a43d53533dcc9bb6fca141b2a66cff648df0d2) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* DEBIAN_MIRROR: switch from ftp to httpMaxin B. John2017-08-291-17/+17
| | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 04790a0d9ddc072a19701ba449a3aefe51dc3997) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk: Clean up Source entry in ipk packagesRichard Purdie2017-06-161-4/+3
| | | | | | | | | | | | | | | | 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> (From OE-Core rev: 4c353eeff45f91533f22392f129bc5a477ee5207) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: check if mirror directory is writableEd Bartosh2017-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 112ae104287ad4078a9fa90fb2a42f4c814ef824) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove broken unsafe-references-in-binaries testRoss Burton2017-05-251-41/+0
| | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 2f5b5685f75fc63489b628b540fcdd4c7cb27096) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: update .siginfo atimeEd Bartosh2017-05-181-0/+2
| | | | | | | | | | | | | | | | | | | | | .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] (From OE-Core rev: 9f8013e3339533c7d60139c1993a5d077fe02ee5) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: modify check for shellJuro Bystricky2017-05-181-1/+3
| | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 3f2bc735e514b27a21ac47524fe0c5ca16e19dd7) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix image dependency chain collectionAndre McCurdy2017-05-181-1/+1
| | | | | | | | | | | | | | 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". (From OE-Core rev: 854fff614059100494326adeec7c48fa5272d080) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion typesRandy Witt2017-05-181-3/+11
| | | | | | | | | | | | | | | | 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] (From OE-Core rev: c0ff0e1ff872b04006b26c6db4f8c9cf053b0764) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fix alternatives and rc.d orderingDavid Vincent2017-02-082-9/+40
| | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: b0c70bef015f1b2a30556a5db5e255592d5bf316) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: whitelist do_package tasksEd Bartosh2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: eb2fc2cd9081a4533ed30fe81c9f491b06cc5ae1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: fix working with uninative sstateEd Bartosh2017-01-121-1/+4
| | | | | | | | | | | | | 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] (From OE-Core rev: fb945c0fd2e66d70461e6cf2e602020eeabe32f7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Parameterise the use of STAGING_DIRRichard Purdie2017-01-111-3/+4
| | | | | | | | | | | | 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) (From OE-Core rev: f50547fb9d70a8ae079380c25e697da3d2c2b181) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: rebuild uninative for gcc 4.8 and 4.9Ed Bartosh2017-01-112-3/+4
| | | | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 3d39ca5c91dbb62fb43199f916bd390cd6212e3d) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: explicitly trap subcommand errorsBruce Ashfield2017-01-111-0/+7
| | | | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: a4888a63620fa05e1399355d9e20c2da586efb4c) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: don't change directory when generating tarballRoss Burton2017-01-111-6/+2
| | | | | | | | | | | | | | There's no need to chdir() as tarfile.add() can be told what name to use in the archive. (From OE-Core rev: d0b282bce34db44dde4dd7f53a64dfaafe6789de) (From OE-Core rev: d637d5f02be4eab26cfab7352a8ea584fb1f7e4d) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: allow recipes to override the product nameRoss Burton2017-01-111-1/+5
| | | | | | | | | | | | | | | 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) (From OE-Core rev: bee636b759feafba544e95d6355c52eb85e4ba72) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix kernel_do_compile for KERNEL_IMAGETYPE = "vmlinux.gz" on ↵Andreas Oberritter2017-01-111-0/+1
| | | | | | | | | | | | | | | | mips The target directory didn't exist. (From OE-Core rev: bd62851dc236a0279c735b290782602e275de5c1) (From OE-Core rev: a7c49e98cff402b5400643ae2a04ae3f345c5bce) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: do not copy bundled initramfs to /bootAndreas Oberritter2017-01-111-6/+0
| | | | | | | | | | | | | | | 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) (From OE-Core rev: 6a4e09b295d760654fd43897841c014d50f109ab) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Avoid wildcards for kernel imagesAndreas Oberritter2017-01-111-2/+2
| | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: a248ef51ae680e81cf78f07fe242ac6e01a5fcb4) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Use real filenames in kernel packagesAndreas Oberritter2017-01-111-1/+1
| | | | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 07e93839ee0dc25904fb93d6ae236e3ab16982ec) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: allow uncompressed initramfs archivesAndreas Oberritter2017-01-111-1/+1
| | | | | | | | | | | | | | | The code failed to copy the initramfs in case it was a plain cpio archive. (From OE-Core rev: 7dbdb4ea91aa027866da2bd46c65fe65a25c848f) (From OE-Core rev: 0d65292296ed9fb82e7bfbcca42d4b7a39ba6ca9) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Drop unused SYSROOT_LOCKRichard Purdie2017-01-111-1/+0
| | | | | | | | | | | | | This hasn't been used in years and isn't referenced anywhere, drop the definition. (From OE-Core rev: 68258f856f08f35813964e58ef761471e29373ad) (From OE-Core rev: b8b261d2e40457ee2e0cf1e8f40bd22230eb8ca7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: exit on non-zero return codeBruce Ashfield2017-01-111-1/+0
| | | | | | | | | | | | | | | | | | | | Historically the processing of kernel meta data contained some commands that exited with a non-zero return code. Special processing was required to properly deal with their exit. That is no longer true, and instead of handling all return codes and doing an explicit 'exit' call, we can remove set -e from the routine and have all errors be trapped and stop processing. (From OE-Core rev: 476ffd57cf5b6fba40d4e3f5dd913824ab8a8d3d) (From OE-Core rev: 620c74336dad517037fcf26c8f7bf8c013b213c1) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: don't block on service restartMark Asselstine2017-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current class works fine when a recipe uses SYSTEMD_AUTO_ENABLE 'enable' and has no on device pkg_postinst(), ie when the postinst is run as part of rootfs creation. However, when there is a component of pkg_postinst() that is run on device the 'systemctl restart' is run as part of the run_postinsts.service at boot. This results in the boot spinning indefinitely with: [ *** ] A start job is running for Run pending postinsts (7s / no limit) The issue could potentially be that the packages service has an 'After' clause which comes later in the boot, beyond run_postinsts.service, creating a chicken before the egg scenario. Even service files without an 'After' clause cause this situation however. Despite this not being the cause of the issue this fix will prevent this scenario from happenning. Using strace we are able to find that during boot, when run_postinsts.service is running attempting to start or restart any service will result in the call get stuck on poll(). Since the run_postinsts.service does not monitor the outcome of the call to restart we can work around this by using '--no-block'. (From OE-Core rev: 6ad6a0084a73088fc2a27ab9958e5c46d6e094fc) (From OE-Core rev: caad8aa89f9815a278e39296497596996a35fe95) Signed-off-by: Mark Asselstine <mark.asselstine@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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: rewrite the expanded-d test as a QAPKGTESTRoss Burton2017-01-111-19/+13
| | | | | | | | | | | | | | | | | Instead of being executed for every file in every package, this is now just called for each package. It is also now correctly called for packages which don't have any content but do have postinst scripts. [ YOCTO #10711 ] (From OE-Core rev: afda72b2424528eaff9054327530bdf5654bec66) (From OE-Core rev: b653bfb800a470894ec93c8bb4acd12a143716a6) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add QAPKGTEST, a package-wide equivilant to QAPATHTESTRoss Burton2017-01-111-0/+20
| | | | | | | | | | | | | | | | QAPATHTEST defines a function that is executed for every file in every package. For tests which just need to look at the datastore this is massive overkill. Add QAPKGTEST, which is invoked for each package in the recipe. (From OE-Core rev: acc3cc26099c77e4eeb44c75bc7167ab58ef1147) (From OE-Core rev: e7751fa0bdb5bc9b217a0bf267a9c658bec997fa) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: factor out the test matrix processingRoss Burton2017-01-111-21/+25
| | | | | | | | | | | | | Pull the test matrix processing out as a function so it can be reused. (From OE-Core rev: 3caccd3f6079b7e284d32e1eb0217107425e7bf8) (From OE-Core rev: 3b21c285d4ff08ae6f613700c5936e39e7e3051d) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: fix expanded-d testRoss Burton2017-01-111-2/+1
| | | | | | | | | | | | | | | This test should be looking for the expanded value of ${D} in the expanded value of pkg_postinst and so on, but one of the getVar() calls was passing expand=False so the test would never be true. (From OE-Core rev: cc545044cba51317bee32e3bf674723e422e3a8a) (From OE-Core rev: 9d4f094a7c9cbff0d3db5f339d084b2b7c70df86) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add aarch64 baremetal mappings to the QA arch testAlexandre Belloni2017-01-111-0/+2
| | | | | | | | | | | | | | | Add mappings for aarch64-elf and aarch64_be-elf to binary lookup table which allows for the generation of baremetal toolchains. (From OE-Core rev: e90a1c4b8fd7baa738eb4683e5eac60905e04296) (From OE-Core rev: 9a8a4fe56901f88f143e86652edc7039345d49fc) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>