summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* kernel.bbclass: avoid duplicates in KERNEL_IMAGETYPE_FOR_MAKEAndre McCurdy2018-05-221-12/+16
| | | | | | | | | | | | | | | | Currently if KERNEL_IMAGETYPES contains both vmlinux and vmlinux.gz, KERNEL_IMAGETYPE_FOR_MAKE will end up containing two copies of vmlinux, which will result in two calls to "make vmlinux" from kernel_do_compile(). Avoid duplicating vmlinux in KERNEL_IMAGETYPE_FOR_MAKE plus some minor non-functional updates to formatting and comments. (From OE-Core rev: 80455a0b6cce6d12a5b32194d0cad2e4c7f71599) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: drop _build-${BUILD_OS} over-rideAndre McCurdy2018-05-222-2/+0
| | | | | | | | | | | | | Building on a host OS other than a recent version of Linux is not recommended or supported. Drop the historical _build-${BUILD_OS} over-ride to avoid giving the impression that other host OS's might be supported. (From OE-Core rev: 428fc39356cb77830de9e0d3f1dbd00f5868290a) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0Andre McCurdy2018-05-222-20/+17
| | | | | | | | | | | | | | | | There doesn't seem to be a clear reason to have two separate variables to hold whitelisted GPLv3 recipes. Both variables are treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is already equivalent to adding it to WHITELIST_GPL-3.0. Anyone needing to whitelist a GPLv3 recipe should now just use WHITELIST_GPL-3.0. (From OE-Core rev: d4dea76fbe9765d489e3e522a9d2c22049610c7b) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: drop _virtclass-native and _virtclass-nativesdk overridesAndre McCurdy2018-05-152-3/+0
| | | | | | | | | | | | | | | | The _virtclass-XXX over-rides are problematic in that they are higher priority than _forcevariable, which is documented as being the highest priority over-ride. Since they are now obsolete (replaced by _class-native and _class-nativesdk) drop them entirely rather than try to fix their priority. (From OE-Core rev: c5aa33ac483618bc23fbaccb0a18853186f9155d) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: detect CVE IDs listed on multiple linesJon Szymaniak2018-05-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Some backported patches fix multiple CVEs and list the corresponding identifiers on multiple lines, rather than on a single line. cve-check.bbclass yields false positive warnings when CVE IDs are presented on multiple lines because re.search() returns only the first match. An example of this behavior may be found when running do_cve_check() on the wpa-supplicant recipe while in the rocko branch. Only CVE-2017-13077 is reported to be patched by commit de57fd8, despite the patch including fixes for a total of 9 CVEs. This is resolved by iterating over all regular expression matches, rather than just the first. (From OE-Core rev: 8fb70ce2df66fc8404395ecbe66a75d0038f22dd) Signed-off-by: Jon Szymaniak <jon.szymaniak.foss@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/dnf: Add new dnf test casesJose Perez Carranza2018-05-151-3/+8
| | | | | | | | | | | | | Add test cases to test “exclude” and “installroot“ options, also modify the logic of filtering packages on the feed to have all the packages needed by the tests. [YOCTO #10744] (From OE-Core rev: 1121806603c6f621d084b692216f3f616a0768dc) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: Stop appending _setscene to do_image_complete_setscene stampsMike Crowe2018-05-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Each time I build my image after the first, I end up with a do_image_complete_setscene stamp file with an extra _setscene appended to the name. Eventually, the filenames end up being so long that mv complains and the build fails. It looks like this behaviour was introduced when the special handling was added for do_image_complete in 2ff9d40dc88d43567472218cf3d3faf414398c71. So, let's ensure that the *_setscene* pattern is matched before anything else so that any do_image_complete_setscene stamp file is always ignored and the do_image_complete non-setscene stamp file is moved only once. It's not straightforward to just move *do_image_complete* after the *_setscene* pattern because do_image_complete stamps would then match do_image*. (From OE-Core rev: f04e6bd144deb0c8fe2742f66b18904b6619a502) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: improve do_unpack[cleandirs] logicRoss Burton2018-05-111-1/+1
| | | | | | | | | | | If a recipe sets S to ${WORKDIR}/ then the S != WORKDIR test doesn't work as expected. Use os.path.normpath() to normalise the paths so string comparison works. (From OE-Core rev: 06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Permit overriding of KERNEL_IMAGETYPE_FOR_MAKEMike Crowe2018-05-111-5/+6
| | | | | | | | | | | | | | | | | | Commit a1690131691507bbf5853540229b3ad775b836bf removed the ability of recipes to set KERNEL_IMAGETYPE_FOR_MAKE. Fix that by letting recipes continue to set their own KERNEL_IMAGETYPE_FOR_MAKE if they so wish. They may have been doing so for a while, and don't want to have their carefully-selected value trampled on by kernel.bbclass. This may be required if the recipe itself wants to build one type of kernel, but post-process it into a different type, rather like the vmlinux->vmlinux.gz support provided by kernel.bbclass. (From OE-Core rev: 38abd26fe7de321e0f1fc4895f754f34dee90f6c) 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>
* allarch.bbclass: Exclude package_do_shlibs from do_package signatureKhem Raj2018-05-091-0/+1
| | | | | | | | | | | | | | | | | | | shlibs is largely useless for allarch, the particular usecase where it fails is when DISTRO_FEATURE is changing due to libc being different e.g. Variable package_do_shlibs value changed: -DISTRO_FEATURES{ldconfig} = Set +DISTRO_FEATURES{ldconfig} = Unset musl -> glibc or other way around 'ldconfig' gets added or deleted to DISTRO_FEATURE set, neither this distro feature nor the shlibs processing during packaging is of interest to allarch packages which are largely arch independent scripts (From OE-Core rev: 06602d56d1d311562144eafe459fcea36931a34c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: Drop obsolete rpc and libnslKhem Raj2018-05-091-4/+0
| | | | | | | | | use libnsl2 and rpcsvc-proto packages (From OE-Core rev: 9dc9983901cec364ea57a72b9da1a0396b60663a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: drop obsolete codesChen Qi2018-05-041-5/+0
| | | | | | | | | | | | | | | The SSTATECLEANFUNCS mechanism was introduced to solve user/group deletion problem. After RSS mechanism was introduced, there's no need to do so. There was a patch to remove these obsolete codes for useradd.bbclass, but the codes in sstate.bbclass were not removed. So clean it up. (From OE-Core rev: 215b83ce892a7002ed0b1bd7b82a08e67ae15121) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic: add do_image_wic before do_image_completeMing Liu2018-05-041-0/+1
| | | | | | | | | | | | | | | We have some tasks depending on image's do_image_complete task, and we are also using WKS files to generate partitioned images, but now there is lacking a inter dependency between do_image_wic and do_image_complete, so we have to depend on both of them. Fixed by adding the dependency. (From OE-Core rev: e3a25f06f2cde701415f4130a43c9b3895d42f10) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native bbclass: handle base_libdir as wellKoen Kooi2018-05-041-0/+2
| | | | | | | | | | Native.bbclass needs to fixup both base_libdir and libdir to handle things like multiarch. This fixes wic and ext4.* image failures during do_rootfs where mkfs.ext4 can't find its libraries. (From OE-Core rev: 464dad0dc93aeeedd34d90c2f06596060ec135fd) Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts/meta-ide-support: Handle dash shells correctlyRichard Purdie2018-05-041-1/+1
| | | | | | | | | | | | Where /bin/sh is dash, the recent toolchain scripts change fails as the $(pwd) usage in oe-init-build-env doesn't function correctly. Fix this by saving and restoring the cwd and calling the script within its own directory. This fixes meta-ide-support on dash based systems. (From OE-Core rev: dceca6d34071b4cbef9e28bbf19dc12f5d925525) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: preserve host path in environment setup scriptChin Huat Ang2018-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | The environment setup script generated in the build directory sets the PATH variable by expanding ${PATH} which would have host paths filtered. Sourcing this script to run runqemu will not work as it complains host stty (/bin/stty) cannot be found. To resolve this, the script no longer expands ${PATH} during generation time, instead it will now source oe-init-build-env to initialize the build environment so that all host paths will be preserved. Also be sure to prepend STAGING_BINDIR_TOOLCHAIN to the PATH variable so that the toolchain from the build directory can be found. [YOCTO #12695] (From OE-Core rev: a64a144096c0637387244b89ed22f4b5352b2522) Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Make staticlib problems non-fatalOla x Nilsson2018-04-231-3/+6
| | | | | | | | | | | Allow debugsource listing using dwarfsourcefiles to fail for static libraries when the archive content is not as expected. (From OE-Core rev: e2235b7567a9aba474cda4cdc20cc9bfffc63711) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "icecc.bbclass: Improve error reporting"Joshua Watt2018-04-231-13/+7
| | | | | | | | | | | | | This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac. The "-E" option for flock is not ubiquitously supported, so don't use it. (From OE-Core rev: 802a2877a78a44c17f3e142f7d12017a08d09dad) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Fix PACKAGELOCK handlingRichard Purdie2018-04-231-5/+6
| | | | | | | | | | | | | | | | | | | PACKAGELOCK is there to protect readers of PKGDATA_DIR from writes and files changing whilst they're being read. With various changes to the codebase, the lock code has become confused as the files are now written by the sstate code in do_packagedata, not in do_package directly any longer. This change cleans up the code so read sites take the shared lock (anything in do_package), write sites take the full lock (do_packagedata sstate). The lock from do_package sstate is no longer needed since it doesn't write outside WORKDIR. (From OE-Core rev: d46cadbbb42aa71f9436d640891d6ccc8f8e3618) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Only try and process static lib debug symbols on targetos ↵Richard Purdie2018-04-201-1/+2
| | | | | | | | | | | != mingw* "package.bbclass: Include dbgsrc for static libs" introduced a regression on mingw, fix this by excluding on that TARGETOS. (From OE-Core rev: 305dda730738a8fb3789047b06fcc45d10212aa3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Include dbgsrc for static libsOla x Nilsson2018-04-201-12/+32
| | | | | | | | | | | | | | The debugsource must be added from the package providing the static lib, because any package using that lib does not have access to the source code. Fixes [YOCTO #12558] (From OE-Core rev: eefa5ba35663fabe1f3f8cf7f1ff126d51240613) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Set the dynamic linker to use at compile timeRichard Purdie2018-04-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Its possible some dynamic runtime library in the dependency chain may come from sstate and link to libraries which need the libc from uninative. If we don't do this and binaries are run at do_install time they would fail to find the symbols from the later libc. Examples: cmake-native do_install: bin/cmake: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by TOPDIR/tmp/work/x86_64-linux/cmake-native/3.10.3-r0/recipe-sysroot-native/usr/lib/libexpat.so.1) dbus-native do_install: tmp/work/x86_64-linux/dbus-native/1.12.2-r0/build/bus/.libs/lt-dbus-daemon: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x32/build/build/tmp/work/x86_64-linux/dbus-native/1.12.2-r0/recipe-sysroot-native/usr/lib/libexpat.so.1) This issue is resolved when the interpreter is changed at sstate unpack time but this isn't soon enough to avoid issues at compile/install time. By specifing which dynamic linker/loader to use at compile time, this race window is removed entirely. (From OE-Core rev: 35867ee035030ab76fc9ccdb0eb1c3f80126301c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Add allow-shlib-undefined to BUILD_LDFLAGS and drop other workaroundsRichard Purdie2018-04-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a problem when for example, a glibc 2.27 based system builds some library like libpopt-native and puts it into sstate then it is reused on a pre glibc-2.27 system to build something which depends on popt like rpm-native. This results in an error like: recipe-sysroot-native/usr/lib/libpopt.so: undefined reference to `glob@GLIBC_2.27' In the past we've had this problem with new symbols like getrandom and getentropy, here its with a more complex symbol where there is an old version and a newer version. We've looked into various options, basically we cannot link against our uninative libc/ld.so since we don't have the right headers or compiler link libraries. The compiler doesn't allow you to switch in a new set either, even if we did want to ship them. Shipping a complete compiler, dev headers and libs also isn't an option. On the other hand if we follow the ld man page, it does say: """ The reasons for allowing undefined symbol references in shared libraries specified at link time are that: - A shared library specified at link time may not be the same as the one that is available at load time, so the symbol might actually be resolvable at load time. """ which is exactly this case. By the time the binary runs, it will use our uninative loader and libc and the symbol will be available. Therefore we basically have a choice, we get weird intermittent bugs, we drop uninative entirely, or we pass this option. If we pass the option, we can drop the other workarounds too. (From OE-Core rev: 75a62ede393bf6b4972390ef5290d50add19341a) (From OE-Core rev: d18bf7fa8e80d6cfaf3fdbe1ab06eec84b954432) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Set and export TZ envvar to UTCRichard Purdie2018-04-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We just ran into an issue where tar failed to build on one server setup but built everywhere else just fine. It was running makeinfo to regenerate some docs files and makeinfo was too old for the host it was running on. There was no dependency on makeinfo-native as it was not meant to be regenerating the docs. It was being regenerated as a date from a timestamp used in the docs was different in Asian timezones than in the other timezones our builds were being tested in. I added an entry to https://wiki.yoctoproject.org/wiki/TipsAndTricks/ about how this was debugged. As such, lets default to setting and exporting TZ to 'UTC' as was already pioneered by the reproducibile builds work. This makes the builds deterministic. [YOCTO #12665] (From OE-Core rev: 2a90ae7a3286724ff9e3615c4dbf56038f703810) (From OE-Core rev: e31f31f81efe4b60938b724bece2a03c7c74a68d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add '-b' option to file call in isELFMark Hatle2018-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isELF function works by running: result = file <pathname> if 'ELF' in result By default 'file' will prepend the result with the path name of the file that is being checked. This usually works fine, such as: $ file /home/foo/openembedded-core/meta/classes/package.bbclass /home/foo/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines However, if the path includes 'ELF', ELF will end up in the result, and then the check will return positive. $ file /home/ELF/openembedded-core/meta/classes/package.bbclass /home/ELF/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines This will then result in the isELF coming back true, and possibly causing the checks that use isELF, such as the 'is it already stripped' check, to do the incorrect thing. Adding the '-b' option to file will result in the path being omitted in the result: $ file /home/ELF/openembedded-core/meta/classes/package.bbclass Python script, ASCII text executable, with very long lines (From OE-Core rev: 5a324e9b2cf6378f8eaa4e394f9cb36d4e2680ac) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: improve binary reproducibilityJuro Bystricky2018-04-181-2/+23
| | | | | | | | | | | | | | | | | | | | Conditionally support binary reproducibility of rootfs images. If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified then: 1. set /etc/timestamp to a reproducible value 2. set /etc/version to a reproducible value 3. set /etc/gconf: set mtime in all %gconf.xml to reproducible values The reproducible value is taken from the variable REPRODUCIBLE_TIMESTAMP_ROOTFS. [YOCTO #11176] [YOCTO #12422] (From OE-Core rev: 11e45082ad00b9c172e59bf6b2a76dd613773f5a) 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>
* testimage: run systemtap test on SDK imagesRoss Burton2018-04-181-2/+4
| | | | | | | (From OE-Core rev: f7f26bd0fe7085515bdebf23107ed8647a0c98fe) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: Bump version numberJoshua Watt2018-04-131-1/+1
| | | | | | | | | | | Bump the version number for force remotes to use a newly generated environment, since the old one potentially had a few bugs (From OE-Core rev: 6c3b2ac41f3412ebce8364df637d64e34daab8a6) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: Improve error reportingJoshua Watt2018-04-131-7/+13
| | | | | | | | | | | | Improve reporting when the icecream environment cannot be created by assigning the flock call a specific error number when the lock fails so it can be distinguished from environment creation errors. (From OE-Core rev: 563448a7a3ca87cc07528c18f8047913e0468e7a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: Add ICECC_ENV_DEBUG variableJoshua Watt2018-04-131-1/+5
| | | | | | | | | | | The ICECC_ENV_DEBUG variable can be set in local.conf to pass additional debugging options to the Icecream toolchain creation script. (From OE-Core rev: be913284bb34ebf4a71770646044603a2a27d01b) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: use xz -T instead of pixzRoss Burton2018-04-131-2/+2
| | | | | | | | | | | | | | xz has native support for threaded compression now and SDK creation was the only part of oe-core which is using pixz instead of xz. Not only does this remove pixz-native from the SDK dependencies, but in my limited testing xz -T0 is slightly faster and produces smaller archives than pixz for the same input. (From OE-Core rev: ce1cfa57d9828c0898f52e736f671ce8db534031) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: use pigz to create .gz filesRoss Burton2018-04-131-1/+1
| | | | | | | | | | | Since pigz is no longer a drop-in replacement for gzip (oe-core 1624b7b) the image creation has been using gzip instead of pigz, despite still depending on pigz-native. Fix this by invoking pigz explicitly. (From OE-Core rev: 214fa7fe3b162162d2fa8b31eec28bedd86fcc7d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: be a bit more strict when searching ↵Martin Jansa2018-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ${PN}-${LICENSE_PACKAGE_SUFFIX} in packages * linux-firmware contains ${PN}-license package since this commit: commit 1ee083da0730408fffdbbf5f29abc299c0e61be9 Author: Jackie Huang <jackie.huang@windriver.com> Date: Mon Apr 13 10:17:21 2015 +0800 linux-firmware: fix the mess of licenses * LICENSE_CREATE_PACKAGE functionality in license.bbclass when enabled adds new package with suffix: LICENSE_PACKAGE_SUFFIX ??= "-lic" but then it checks if ${PN}-${LICENSE_PACKAGE_SUFFIX} is included in PACKAGES before adding it and when found it shows: WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: linux-firmware-lic package already existed in linux-firmware. and doesn't add the ${PN}-lic to PACKAGES and causes another warning: WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: QA Issue: linux-firmware: Files/directories were installed but not shipped in any package: /usr /usr/share /usr/share/licenses /usr/share/licenses/linux-firmware that's because it was searching ${PN}-lic in PACKAGES as a string so it found ${PN}-lic as a substring of ${PN}-license, add a split to search in an list (From OE-Core rev: 9b9897fc034819385a9d4ce591cc79dd458f3f24) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: Minor simplification of get_deployed_dependencies()Peter Kjellerstedt2018-04-101-3/+1
| | | | | | | | | | | Since ${SSTATE_ARCHS} now contains ${PACKAGE_EXTRA_ARCHS} there is no longer any need to add those extra architectures to the list of architectures handled in get_deployed_dependencies(). (From OE-Core rev: e55e6df4f1434458cdfa0e2d3610b48119e5a782) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Add ${PACKAGE_EXTRA_ARCHS} to SSTATE_ARCHSPeter Kjellerstedt2018-04-101-2/+3
| | | | | | | | | | | | | | | | | This makes sure files provided by packages that use any of the extra architectures defined using ${PACKAGE_EXTRA_ARCHS} are cleaned from tmp/sysroot-components when sstate_eventhandler2() executes. Without this, changing a package from using one of the extra architectures to another architecture would lead to files being leftover in tmp/sysroot-components, which could later be picked up when creating the RSS for another package rather than the files that belonged to the updated package. (From OE-Core rev: b959b3bd92aa2939d407800fc4167b0535fd4674) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Use ${MACHINE_ARCH} instead of ${MACHINE} for stamp-extra-info task ↵Peter Kjellerstedt2018-04-105-5/+5
| | | | | | | | | | | | | flag Without this change, there will be two sstate index files in tmp/sstate-control for any machine that contains a dash in the name. (From OE-Core rev: 29e7799bdb3773c40492e01448e0c614ed44583d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: add image-combined-dbg helper classVictor Kamensky2018-04-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | There is IMAGE_GEN_DEBUGFS="1" variable that enables build of additional rootfs-dbg and additional archive that contains complimentary symbols files for a given image. But the issue with this resulting directory and tarball that before use it has to be combined with original image content. It is required since all cross debugging tools like gdb, perf, and systemtap need file system that contains both target executables/libraries and their symbols. Those tools need to find executable/library first and through it debuglink note find corresponding symbols file. image-combined-dbg when added to USER_CLASSES just copies final resulting rootfs back into rootfs-dbg creating combined target and debug symbols rootfs that can be used for debugging directly. (From OE-Core rev: 7ccb077f51c9232de70e5c6f9897fd9986e3be9d) Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix archive for linked kernel sourceTom Hochstein2018-04-051-0/+5
| | | | | | | | | | | | When archiving a kernel, if S is ${WORKDIR}/git, then ${WORKDIR}/git is in fact a soft link into work-shared, and the archive contains just the soft link. Fix by archiving the real directory. (From OE-Core rev: 564204dd6b73697ef4b6c17243067892876cc323) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix build errors for kernels that don't use kernel-yocto.bbclassTom Hochstein2018-04-051-2/+6
| | | | | | | | | | | Special handling for kernel source in work-shared was incorrectly limited to kernel-yocto.bbclass instead of kernel.bbclass. (From OE-Core rev: b8c5680a67888d43540366a40bd0c501e926ac31) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gio-module-cache.bbclass: pass in ${libexecdir}Alexander Kanavin2018-04-051-0/+1
| | | | | | | | | | When it was something else than /usr/libexec (e.g. when installing native SDK packages), things broke down. (From OE-Core rev: d99e819a6cbde6d1116c434ddba4c5f8eca7e6d8) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: run postinst interceptsAlexander Kanavin2018-04-051-1/+1
| | | | | | | | | | | | | | Previously this wasn't done, and so any packages installed from populate_sdk would not have the postinsts fully executed (particularly generation of various caches via running nativesdk or target binaries with qemu wasn't working). [YOCTO #12630] (From OE-Core rev: a484ff072eea3f47de2c3348048201249cefa46b) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: fix do_unpack[cleandirs] varflag handlingEnrico Jorns2018-04-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As introduced by a56fb90dc3805494eeaf04c60538425e8d52efc5 ('base.bbclass wipe ${S} before unpacking source') the base.bbclass uses a python anonymous function to set the 'do_unpack' varflag 'cleandirs' to either '${S}' or '${S}/patches' depending on equality of '${S}' and '${WORKDIR}'. Not that this only differs from the way almost all other recipes set or modify a tasks 'cleandirs' flag, it also has a significant impact on the kernel.bbclass (and possibly further ones) and causes incorrect behavior for rebuilds triggered by source modification, e.g. by a change of the defconfig file for a kernel build. The kernel.bbclass tries to extend do_unpack[cleandirs]: | do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" As python anonymous functions are evaluated at the very end of recipe parsing, the d.setVarFlag('do_unpack', 'cleandirs', '${S}') statement in base.bbclass will overwrite every modification to cleandirs that is done as shown for the kernel class above. As a result of this, a change to a kernels 'defconfig' will lead to an updated defconfig file in ${WORKDIR}, but as ${B} never gets cleaned and ${B}/.config still exists, it will not be copied to ${B}/.config and thus not find its way in the build kernel. This is a severe issue for the kernel development and build process! This patch changes setting of the cleandirs varflag in base.bbclass to a simple variable assignment as almost all other recipes do it. This now again allows overwriting or appending the varflag with common methods such as done in kernel.bbclass. This issue affects morty, pyro, rocko and master. (From OE-Core rev: 20901b9783220aa6e7adae4951c531919c20859b) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/externalsrc: ensure cleandirs code handles non-absolute pathsPaul Eggleton2018-04-051-1/+2
| | | | | | | | | | | | | | | | It's possible that a trailing or extra slash somewhere in the external source path could result in the directory not being removed from cleandirs; it's also possible that a cleandirs entry is somewhere underneath the source tree and that tree should never have parts of it deleted by the build system. Use oe.path.is_path_parent() (which makes paths absolute before checking them) to find out if any path in cleandirs is anywhere underneath the external source path, and drop it if it is. (From OE-Core rev: 87ec0fb470274d980f8553a85f778809c269c5d7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/externalsrc: handle if cleandirs contains python expressionsPaul Eggleton2018-04-051-1/+3
| | | | | | | | | | | | | | Use the existing oe.recipeutils.split_var_value() function to split the unexpanded value of the cleandirs varflag, in case it contains python expressions - we don't want to split the expression itself as the chunks will not expand properly individually and we can miss something that expands to the source tree (and thus it can get deleted, the avoidance of which is the whole point of this code). (From OE-Core rev: 611cee69d7300a4746edd752c9557af60e7beecc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: add variables to the whitelist so that it does not re-triger ↵Cuero Bugot2018-04-031-0/+3
| | | | | | | | | | | | | | | | recipe parsing When uninative is activated (poky's default) internal datastore variables are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) to enable uninative support. This is happening after parsing is done at the beginning of the build. On the next bitbake call the recipe would be parsed if the two variables above were not added to the parsing whitelist BB_HASHCONFIG_WHITELIST. The fix is to add these two variables to the recipe parsing whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when uninative.bbclass is used. (From OE-Core rev: 75bb95ada98ef129d2fa48568f27dddb078c852c) Signed-off-by: Cuero Bugot <cbugot@sierrawireless.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: improve reproducibilityJonathan Liu2018-04-031-0/+1
| | | | | | | | | | | Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented on every build. It is visible in the output of "cat /proc/version" after the hash character. (From OE-Core rev: 7fa32ee42c3320e9e2b24ef747e43484b719f617) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* default-distrovars: set default KERNEL_IMAGETYPE(S)California Sullivan2018-03-314-6/+0
| | | | | | | | | | | | | | | | | | | | | With the change from assuming kernels will be named "vmlinuz" everywhere, to instead using KERNEL_IMAGETYPE, we require that KERNEL_IMAGETYPE is set to something. Instead of setting the default in multiple individual files, set it in default-distrovars.inc. x86(-64) arches get bzImage as the default. Others get zImage as per meta/conf/documentation.conf. Also set KERNEL_IMAGETYPES, as we will eventually be switching away from KERNEL_IMAGETYPE. Thanks to Andre McCurdy <armccurdy@gmail.com> for the arch defaults part. (From OE-Core rev: a57d784211a39587538094425ee0246e9ddfbf9d) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: set _builddir to B not SRichard Purdie2018-03-301-1/+1
| | | | | | | | | | | | | Recipes which use a shared workdir (e.g. gcc-runtine and libgcc) can race over temporary files causing interesting build failures. Using B instead of S avoids this problem. [YOCTO #12605] (From OE-Core rev: d6c13a5ff441f7076eb327c0d0b747bd7603db0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: Don't extend make-mod-scripts as a multilib version doesn't make ↵Richard Purdie2018-03-301-1/+1
| | | | | | | | | | | any sense The multilib version would race against then non-ml version leading to all kinds of odd build failures. (From OE-Core rev: 6bb70bd3857edb8cb6cc1317f57b899a89be2653) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: change Debian anonscm to salsaMikko Rapeli2018-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Debian anonscm service in Alioth is shutdown and thus fetching sources fails. https://wiki.debian.org/Alioth "Alioth is broken, and there is nobody around to fix it. Don't ask the remaining people who give it life support to implement fixes and changes. It is being replaced by a cocktail of ?GitLab (see Salsa), read-only repos and keep-alive mechanisms. See below for more information." https://wiki.debian.org/Salsa "What is Salsa? Salsa is the name of a collaborative development server for Debian based on the gitlab software. Salsa is supposed to provide the necessary tools for package maintainers, packaging teams and other Debian related individuals and groups for collaborative development. What is the status of Salsa? After various discussions about the future of Alioth, the Alioth Sprint in August 2017 gave birth to the initial setup of the the upcoming Salsa service. The productive weekend resulted in a working prototype and was launched as a beta in December 2017. It left its beta status in January 2018." (From OE-Core rev: 08ff7b42d8b7d06ef61255185c95e900ada8769b) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>