summaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-05-15cve-check.bbclass: detect CVE IDs listed on multiple linesJon Szymaniak
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. Signed-off-by: Jon Szymaniak <jon.szymaniak.foss@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-14runtime/dnf: Add new dnf test casesJose Perez Carranza
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] Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-11rm_work: Stop appending _setscene to do_image_complete_setscene stampsMike Crowe
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*. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-11base: improve do_unpack[cleandirs] logicRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-09kernel: Permit overriding of KERNEL_IMAGETYPE_FOR_MAKEMike Crowe
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. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-09allarch.bbclass: Exclude package_do_shlibs from do_package signatureKhem Raj
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 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-09glibc: Drop obsolete rpc and libnslKhem Raj
use libnsl2 and rpcsvc-proto packages Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-04sstate.bbclass: drop obsolete codesChen Qi
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. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04image_types_wic: add do_image_wic before do_image_completeMing Liu
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. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04native bbclass: handle base_libdir as wellKoen Kooi
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. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04toolchain-scripts/meta-ide-support: Handle dash shells correctlyRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-04toolchain-scripts: preserve host path in environment setup scriptChin Huat Ang
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] Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-23package.bbclass: Make staticlib problems non-fatalOla x Nilsson
Allow debugsource listing using dwarfsourcefiles to fail for static libraries when the archive content is not as expected. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-23Revert "icecc.bbclass: Improve error reporting"Joshua Watt
This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac. The "-E" option for flock is not ubiquitously supported, so don't use it. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-23package: Fix PACKAGELOCK handlingRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-20package.bbclass: Only try and process static lib debug symbols on targetos ↵Richard Purdie
!= mingw* "package.bbclass: Include dbgsrc for static libs" introduced a regression on mingw, fix this by excluding on that TARGETOS. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-19package.bbclass: Include dbgsrc for static libsOla x Nilsson
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] Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-18uninative: Set the dynamic linker to use at compile timeRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-18uninative: Add allow-shlib-undefined to BUILD_LDFLAGS and drop other workaroundsRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-18bitbake.conf: Set and export TZ envvar to UTCRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-18package.bbclass: Add '-b' option to file call in isELFMark Hatle
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 Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-18rootfs-postcommands.bbclass: improve binary reproducibilityJuro Bystricky
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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-18testimage: run systemtap test on SDK imagesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Bump version numberJoshua Watt
Bump the version number for force remotes to use a newly generated environment, since the old one potentially had a few bugs Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Improve error reportingJoshua Watt
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. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13icecc.bbclass: Add ICECC_ENV_DEBUG variableJoshua Watt
The ICECC_ENV_DEBUG variable can be set in local.conf to pass additional debugging options to the Icecream toolchain creation script. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13populate_sdk_base: use xz -T instead of pixzRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-13image_types: use pigz to create .gz filesRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-09license.bbclass: be a bit more strict when searching ↵Martin Jansa
${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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-07license.bbclass: Minor simplification of get_deployed_dependencies()Peter Kjellerstedt
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(). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-07sstate.bbclass: Add ${PACKAGE_EXTRA_ARCHS} to SSTATE_ARCHSPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-07classes: Use ${MACHINE_ARCH} instead of ${MACHINE} for stamp-extra-info task ↵Peter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-06image: add image-combined-dbg helper classVictor Kamensky
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. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05archiver: Fix archive for linked kernel sourceTom Hochstein
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. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05archiver: Fix build errors for kernels that don't use kernel-yocto.bbclassTom Hochstein
Special handling for kernel source in work-shared was incorrectly limited to kernel-yocto.bbclass instead of kernel.bbclass. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05gio-module-cache.bbclass: pass in ${libexecdir}Alexander Kanavin
When it was something else than /usr/libexec (e.g. when installing native SDK packages), things broke down. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05sdk.py: run postinst interceptsAlexander Kanavin
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] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05base.bbclass: fix do_unpack[cleandirs] varflag handlingEnrico Jorns
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. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05classes/externalsrc: ensure cleandirs code handles non-absolute pathsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05classes/externalsrc: handle if cleandirs contains python expressionsPaul Eggleton
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). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-03uninative: add variables to the whitelist so that it does not re-triger ↵Cuero Bugot
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. Signed-off-by: Cuero Bugot <cbugot@sierrawireless.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-03kernel.bbclass: improve reproducibilityJonathan Liu
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. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-30default-distrovars: set default KERNEL_IMAGETYPE(S)California Sullivan
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. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-30package_rpm: set _builddir to B not SRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-30multilib: Don't extend make-mod-scripts as a multilib version doesn't make ↵Richard Purdie
any sense The multilib version would race against then non-ml version leading to all kinds of odd build failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-28mirrors.bbclass: change Debian anonscm to salsaMikko Rapeli
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." Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-28package.bbclass: use single quotes for path passed to file in isELF()Andre McCurdy
Apparently there are recipes in the wild which generate files with filenames containing '$' characters - which cause errors during packaging. Instead of adding another special case to escape '$' characters when constructing the command passed to oe.utils.getstatusoutput(), switch to using single quotes to quote the path - and therefore make isELF() consistent with the way filenames and paths are quoted by every other caller of oe.utils.getstatusoutput() in oe-core. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-28sanity.bbclass: quote path passed to stat in get_filesystem_id()Andre McCurdy
Although get_filesystem_id() is a private API and never gets passed a path containing spaces or other special characters, etc, quote the path anyway for consistency. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-25waf.bbclass: Throw error if waf doesn't existAmanda Brindle
Before, waf.bbclass would fail to catch FileNotFoundError. Now, it will catch this error and say that waf doesn't exist. Fixes [YOCTO 12553] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-25reproducible_build.bbclass: support for binary reproducibilityJuro Bystricky
Setup environment for builds requiring binary reproducibility. Determine and export SOURCE_DATE_EPOCH per each recipe. This is a crucial step to achieve binary reproducibility. The value for this variable (timestamp) is obtained after source code for a recipe has been unpacked, but before it is patched. If the code sources come from a GIT repo, we get the timestamp from the top commit. (GIT repo does not preserve file mktime timestamps). Otherwise, if GIT repo is not present, we try to get mtime from known files such as NEWS, ChangeLog, etc. If this also fails, we go through all files and get the timestamp from the youngest one. We create an individual timestamp for each recipe. The timestamp is stored in the file '__source_date_epoch.txt' (in the folder source-date-epoch_). Later on, each task reads this file and sets the exported value of SOURCE_DATE_EPOCH to the value found in the file. Uasge: INHERIT += "reproducible_build" [YOCTO#11178] [YOCTO#11179] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>