summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* distrooverrides.bbclass: DISTRO_FEATURES as overridesPatrick Ohly2017-06-141-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | This achieves the same goal as the same change to bitbake.conf itself, but because the class gets added later as part expanding INHERIT, this new approach is less likely to run into problems when DISTRO_FEATURES contains complex code. Another difference is that the class currently does not get inherited by default and thus is completely absent from a build unless some layer or include file adds it to INHERIT. Compared to the earlier code in bitbake.conf and a similar class in intel-iot-refkit, additional overrides now get sorted. This makes the final OVERRIDES more deterministic. The lessons learned about unintentionally depending on OVERRIDES are documented in the class because such problems are more likely to show up as unexpected signature differences when using this class. (From OE-Core rev: e982ca7f2d4fb0aef3fedc00af1e90f613e7b5ee) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute pathsRoss Burton2017-06-141-1/+6
| | | | | | | | | If these are set to URLs then the errors produced are not helpful. (From OE-Core rev: 946b6623154e748a0d75ff498802a720aeec27a6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix setting of vardeps flagEd Bartosh2017-06-141-1/+1
| | | | | | | | | | Added leading space to vardeps to avoid flag value to be added to the existing value without a separator. (From OE-Core rev: f582773c2b1e8db441f397867d3c9665fd265cec) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: improve setup of flagsEd Bartosh2017-06-141-3/+4
| | | | | | | | | | | | | Replaced setVarFlag calls to appendVarFlag to allow modification of prefuncs, postfuncs and subimages flags in inherited image classes. [YOCTO #11372] (From OE-Core rev: 6690f3ab43c04fa7cff7215d4a5d8d639e41aed8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: cleanup: add new variable "task"Ed Bartosh2017-06-141-13/+13
| | | | | | | | | | | Replaced repeated expression "do_image_%s" % t with a variable 'task' to simplify the code and increase readability. (From OE-Core rev: d24dd95f2c1c7f773875454bee3f2016c4e7553c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: fix typoChen Qi2017-06-141-1/+1
| | | | | | | | | The function is "sysroot_strip" instead of "split_and_strip_files". (From OE-Core rev: f2d349887710dcae05db09dc2277223e85fa1c19) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-config: check UBOOT_CONFIG variable, not flags, for error conditionsDenys Dmytriyenko2017-06-141-8/+3
| | | | | | | | | | | | | Sometimes there's a need to change existing UBOOT_CONFIG setting from a recipe, distro or local config, such as an override or even switch back to UBOOT_MACHINE. Unfortunately, there's no easy way to override or unset flags, so using them as an error condition is rather heavy-handed. Change those conditions to check the UBOOT_CONFIG variable itself, not its flags. (From OE-Core rev: b51383e5268ff33e43a39862814e065afbbd10ca) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: Exclude OVERRIDES from hashes in multilib functionsRichard Purdie2017-06-141-0/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Don't depend on OVERRIDESRichard Purdie2017-06-141-0/+1
| | | | | | | | | | In common with the other package handling functions, don't depend on the value of OVERRIDES. This means when we change MACHINE, we don't have to repackage everything. (From OE-Core rev: 6e24b4bbe708a25c827364a2d6d979b354ab3ef2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* allarch: Append to vardepsexclude, not overwriteRichard Purdie2017-06-141-2/+2
| | | | | | | | | These have values set elsewhere and this code was overwriting them leading to odd signature issues. Append instead preserving the original values. (From OE-Core rev: b756fd12c28d1ce3ca60b328927db996c6a52424) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "package.bbclass: Restore functionality to detect RPM dependencies"Richard Purdie2017-06-131-2/+3
| | | | | | | | | This reverts commit aea90e9ee6f34e7c1c08307080b1e29646668df6. RP hadn't meant to merge this yet and its causing problems so delay it until its ready. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-06-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost. Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine. During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected. Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout. (From OE-Core rev: aea90e9ee6f34e7c1c08307080b1e29646668df6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes/populate_sdk: Adds support for generating eSDK manifest filesFrancisco Pedraza2017-06-123-20/+58
| | | | | | | | | | | | | | | | | | | | Add get_extra_sdk_info to reuse code in buildhistory The functionalities to generate SDK and eSDK manifest files are different, the SDK comes from package information and the eSDK comes from sstate artifacts. Only execute write_sdk_{host, target}_manifest when is on populate_sdk class. Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess in populate_sdk_ext because at the end we have all the sstate artifacts to generate the manifest. [YOCTO #9038] (From OE-Core rev: 25ad7ed6f7bb0c931b404bda09576323200d093d) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza2017-06-121-12/+6
| | | | | | | | | | | | | | This function is going to be used for generating the target and host manifest files packages for eSDK. Added some fixes for buildhistory.bblclass, and docstring for get_extra_sdkinfo at oe.sdk [YOCTO #9038] (From OE-Core rev: f696b3bbe01969ce7ecb8174d63d3e1e172b473e) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()Peter Kjellerstedt2017-06-121-0/+8
| | | | | | | | | | | | When using RPM, depends.dot may contain dependencies such as "/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore them. While at it, also ignore dependencies that contain parentheses, e.g., "libc.so.6(GLIBC_2.7)". (From OE-Core rev: 3b42c400d2d7a6ebe37429a363e1d79200f87e9b) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Simplify parsing of depends.dotPeter Kjellerstedt2017-06-121-15/+13
| | | | | | | | | | | By using a single regular expression, the parsing of the depends.dot file can be simplified a lot. This should also make it less susceptible to formatting changes in that file. (From OE-Core rev: 49a321d03e527ad15c3a7fcb9d94980577535ca3) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Improve the generated depends.dot filePeter Kjellerstedt2017-06-121-4/+11
| | | | | | | | | | | | | | | | | | * Convert incorrectly formatted dependencies such as: "bar -> "foo" ">=" "1.2.3" into dependencies with edge labels: "bar -> "foo" [label=">= 1.2.3"] * Remove rpmlib() and config() dependencies such as: "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"] and: "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"] * Remove the trailing semicolon that was added to each line. It fills no purpose. (From OE-Core rev: 37ea2c8b299483f0e12fad66efa789c6445571e0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Improve the handling of runtime file dependenciesPeter Kjellerstedt2017-06-121-6/+10
| | | | | | | | | | | | | | | This makes the file-rdeps test support: * versioned dependencies, e.g., "perl (>= 5.000)", and * package dependencies among the file dependencies, e.g., "perl". It also ignores all "perl(...)" dependencies since it is expected that these are generated and handled by rpm itself and there is no reason to second guess what it is doing. (From OE-Core rev: 2cbeb6edbfcbd9378a5a79b17f7d31a49e0356ff) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Report all file-rdeps errors, not just the firstPeter Kjellerstedt2017-06-121-1/+1
| | | | | | | (From OE-Core rev: 3d0e5612585137409a8e16636a95ab59fb263136) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: force writing SRCREV valuesEd Bartosh2017-06-121-2/+5
| | | | | | | | | | | | | | | | Enabling SSTATE_MIRRORS sometimes causes SRCREV values not to be written/updated in the build history. This happens more often if SRCREV is set to ${AUTOREV} Explicitly writing SRCREVs when recipe history is being written should fix this. [YOCTO #10948] (From OE-Core rev: df74b97599a789db742fc7588009783f5f37ebff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Ensure DISTRO_FEATURES is determisticRichard Purdie2017-06-122-2/+2
| | | | | | | | | | | | set() order is random and hence the filtered native/nativesdk DISTRO_FEATURES could be set to random ordering. We've been lucky so far this tended not to cause issues but some queued changes highedlighted this. Thrown in a sorted() so the order is deterministic and we get consistent hash checksums between runs and between machines. (From OE-Core rev: 76391673754cf6a01d68eedbd4181e543fa2f427) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Correct the comment to state right dir for test casesKhem Raj2017-06-121-1/+1
| | | | | | | | (From OE-Core rev: b464e338b30fe038e081e0dcae9f50c120d2f81c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: use BB_CMDLINE to get bitbake command linePaul Eggleton2017-06-121-5/+8
| | | | | | | | | | | | | | | | We put the bitbake command line in the buildhistory commit message for informational purposes, but calling sys.argv to get that as we were previously doesn't really work in memory resident mode - that gives you the command used to start the bitbake server which is much less interesting. Use the just-introduced BB_CMDLINE variable instead. Part of the fix for [YOCTO #11634]. (From OE-Core rev: 1a6424ee4c865601ff324e9599a2f48c9e6723ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpan-base.bbclass: Move PERLVERSION and get_perl_version to a new fileTom Rini2017-06-122-23/+25
| | | | | | | | | | | | | | | It is possible for non-CPAN recipes to contain perl modules. These perl modules must reside in the versioned perl library directory in order to work in normal circumstances.. Export this logic to a separate class so that it can be reused without the rest of the cpan logic. Without this, dpkg will not export its perl code to the correct location and will not be found by utilities that expect to use it. (From OE-Core rev: f4edc200d3a9645f9674eae0f8d10926680ba4f8) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* openssh: allow to override OpenSSL HostKeys when read-only-rootfsAndré Draszik2017-06-121-2/+2
| | | | | | | | | | | | | | With these changes it is possible to have a .bbappend that - sets SYSCONFDIR to some persistent storage - modifies SYSCONFDIR/sshd_config to use ssh host keys from the (writable) sysconfdir (From OE-Core rev: 106b59d9f96f70d133fa1421091ad280d27a5b6a) Signed-off-by: André Draszik <adraszik@tycoint.com> Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: use multithreaded xz compressionAlexander Kanavin2017-06-121-0/+2
| | | | | | | | | | | | RPM's default is single-threaded gz; the change greatly helps with both buildtimes (when there is a small number of large-sized packages) and disk space taken by resulting rpms. (From OE-Core rev: f108c4d09926bd28e7a57b665fc8cb5373827780) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATUREJonathan Liu2017-06-121-1/+1
| | | | | | | | | | | | | These commands are not whitelisted by the HOSTTOOLS variable which silently prevents the MBR disk signature from being written to the image. Reported-by: Michael Davis <michael.davis@essvote.com> (From OE-Core rev: a58e53f55259acd79a98a0f8b8a435d2a5aef36e) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: add do_rootfs dependency on cve-checkPeter Marko2017-06-121-0/+1
| | | | | | | | | | | Since do_rootfs depends on cve-check results of all recipes, we need to recursively depend on recipe do_cve_check. (From OE-Core rev: a1af526e43cb476472a6203882c12deef297f542) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: do not parse error outputPeter Marko2017-06-121-1/+1
| | | | | | | | | | | | | Sometimes there are control messages in cve-check-tool printed to stderr. These lead to parsing error and thus failed build. This can happen for instance when cve database needs to be refreshed during build. (From OE-Core rev: 6d8a17f4c50be292990e37de65630a6b84466ee6) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: clean cve-check recipe result before re-buildingPeter Marko2017-06-121-0/+5
| | | | | | | | | | | | If there is cve report for a recipe in previous build and there is no result for current one, old cves are kept in CVE_CHECK_DIR. This happens on version upgrade or when cve/recipe is whitelisted. (From OE-Core rev: 85b4941c71a0e3c08a8c48d52a94dfe2897d2c92) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Change the order to logDetails and logSummaryAníbal Limón2017-06-092-3/+3
| | | | | | | | | | | | | Is better to log the summary at end to see in an easy way the actual result of the test run. [YOCTO #11622] (From OE-Core rev: 4e3ab36e8c90abc740cce1ba31faf6595116e1e2) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils-base.bbclass: Do not use -pie with hardeningKhem Raj2017-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build when PIE is turned on. It tries to build .so file using -pie and -shared flags together because its doing compile and link in same step CFLAGS and LDFLAGS are combined and does not work, ending in errors e.g. | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l ib/Scrt1.o: In function `_start_c': | /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main' | collect2: error: ld returned 1 exit status This error while cryptic is due to the fact that we are building a shared library but also pass -pie flag to the link step after specify LDHSARED ( which is -shared linker flags ) we can not use -pie when doing shared libs. This is true for all the python modules inheriting setup tools Disable the pie flags thusly for all modules using setuptools since this setting is done in setuptools makefiles which are then used during module compiles (From OE-Core rev: 6a4e3b696d32809279f1550cc1d67bc6b9979a03) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "distutils-base.bbclass: Do not use -pie with hardening"Ross Burton2017-06-091-2/+0
| | | | | | This reverts commit 0d1418026b378389a1668761d6429a94e6c047f8. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* setuptoools.bbclass: Do not use -pie with hardeningKhem Raj2017-06-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build when PIE is turned on. It tries to build .so file using -pie and -shared flags together because its doing compile and link in same step CFLAGS and LDFLAGS are combined and does not work, ending in errors e.g. | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l ib/Scrt1.o: In function `_start_c': | /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main' | collect2: error: ld returned 1 exit status This error while cryptic is due to the fact that we are building a shared library but also pass -pie flag to the link step after specify LDHSARED ( which is -shared linker flags ) we can not use -pie when doing shared libs. This is true for all the python modules inheriting setup tools Disable the pie flags thusly for all modules using setuptools since this setting is done in setuptools makefiles which are then used during module compiles (From OE-Core rev: dc1c16e9df365871b2c40998f63f304ffa610447) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: preserve sysroot paths in configured modeRoss Burton2017-06-061-0/+4
| | | | | | | | | | | | | do_ar_configured alters WORKDIR but also expects to be able to run do_configure, so forcibly expand the paths to the sysroots as otherwise they'll point to a non-existant directory in the temporary WORKDIR. [ YOCTO #11584 ] (From OE-Core rev: aa2240657b015d46e9ba4bcb6264709a82313d83) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: fix do_ar_original error for matchbox-desktopDengke Du2017-06-061-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR: matchbox-desktop-2.1-r0 do_ar_original: Can not determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: git://git.yoctoproject.org/matchbox-desktop-2 file://vfolders/%2A ERROR: matchbox-desktop-2.1-r0 do_ar_original: Function failed: do_ar_original ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function do_ar_original, when recipes have more than one source, it added the "name" URL parameter as suffix to identify the created tarball. But the URL type "file://" that we always used to represent a series of patches, it didn't have "name" parameter, so it failed. So set "name" to the folder name to identify the created tarball, for example: In matchbox-desktop bb file, the SRC_URI contains: file://vfloders/* We set "name" to "vfolders" to identify the created tarball. In connman-gnome bb file, the SRC_URI contains: file://images/* We set "name" to "images" to identify the created tarball. (From OE-Core rev: 0af636c635391b30c987dedeffe597ef4f8a1ed8) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: adapt do_unpack_and_patch to RSSMikko Ylinen2017-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | do_unpack_and_patch was not correctly run until recently ("archiver.bbclass: various fixes for original+diff mode") but with the fix applied, the errors we get indicate the function is not adapted to work with recipe specific sysroots. do_unpack_and_patch sets WORKDIR to ARCHIVER_WORKDIR which affects all path settings relative to WORKDIR, inluding the paths to recipes' sysroots. IOW, when do_unpack and do_patch are run, they cannot find the necessary native tools and files located in the sysroot (e.g., quiltrc) because the paths point to ARCHIVER_WORKDIR. Adapt do_unpack_and_patch to RSS by restoring the original STAGING_DIR_NATIVE after WORKDIR is changed to ARCHIVER_WORKDIR. (From OE-Core rev: db7d2cc5a4df3c2077ba874c7ae395c73fd9ed13) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils-base.bbclass: Do not use -pie with hardeningKhem Raj2017-06-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build when PIE is turned on. It tries to build .so file using -pie and -shared flags together because its doing compile and link in same step CFLAGS and LDFLAGS are combined and does not work, ending in errors e.g. | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l ib/Scrt1.o: In function `_start_c': | /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main' | collect2: error: ld returned 1 exit status This error while cryptic is due to the fact that we are building a shared library but also pass -pie flag to the link step after specify LDHSARED ( which is -shared linker flags ) we can not use -pie when doing shared libs. This is true for all the python modules inheriting setup tools Disable the pie flags thusly for all modules using setuptools since this setting is done in setuptools makefiles which are then used during module compiles (From OE-Core rev: 4b5d55228ed2565570d0e93cfea4efa8cbb789ea) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devshell.bbclass: clean up trailing whitespacesChang Rebecca Swee Fun2017-06-061-3/+3
| | | | | | | (From OE-Core rev: fac6c0fcb30d7cb49036cb32247569d65d1c5e7f) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devshell.bbclass: ensure toolchains available for do_devshellChang Rebecca Swee Fun2017-06-061-1/+1
| | | | | | | | | | | | Toolchains are required to be prepopulated in sysroot before entering devshell. [YOCTO #11464] (From OE-Core rev: eb8a1cdf5106d119f77db76f9a690826af9fcda3) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix KERNEL_IMAGETYPE(S) for Image.gzNicolas Dechesne2017-06-051-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: cfc0c897656fe67e81a6a5dcd936dff785529f41) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCHEd Bartosh2017-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | isoimage-isohybrid plugin fails with this error when trying to find initrd image: initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0] IndexError: list index out of range as it uses TRANSLATED_TARGET_ARCH value as part of the image. This approach stopped to work due to changes in oe core code. initrd file name is made using MACHINE variable. wic can't get value of this variable as it's not included into bitbake -e output. Used basename of deploy dir as MACHINE value to fix the breakage. (From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05) (From OE-Core rev: e26fa1c34c33ffdc678f8073dade0126aff08b40) 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>
* insane.bbclass: fix override handling in RDEPENDS QAGan, Yau Wai2017-06-031-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. [YOCTO #11374] (From OE-Core rev: 60d28dd72daee235150ab6605cbf953f1ea691df) Signed-off-by: Gan, Yau Wai <yau.wai.gan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: make a single commit per buildPaul Eggleton2017-06-031-7/+5
| | | | | | | | | | | | | | | | | | | Way back in OE-Core commit fba198ac7efe476a25c5761878ef2fcee97bf9f1 in 2012 we split committing to the repository, making a commit per top-level directory. However, as we add more information it becomes harder to see which commits belong to which build. Switch back to a single commit per build to keep the history tidier. To address the original concern, if you do want to see just the changes for a particular subdirectory, git can filter that for you - just specify that subdirectory as the last parameter on the git show / git diff command line and that's all you will see. (From OE-Core rev: b49a4a47783609fe9161fbc11cc7c7ff3ff4b6bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Escape recipe name in regexJoshua Watt2017-06-031-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: 53c8cceb744adda1bf899d62071d11b20a5dea98) 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>
* classes/test{export,images}: Change modules to listAníbal Limón2017-06-022-2/+2
| | | | | | | | | | With the new filters by <module>.[class].[testname] the modules arg is expected to be a list so use split into TEST_SUITES variable. (From OE-Core rev: b588c5c65e55a31d61c86553158eef409cd71086) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: Enable usage of OEQA thread modeAníbal Limón2017-06-021-0/+4
| | | | | | | | | | | | | oeqa/sdk/context.py - Use OETestContextThreaded. classes/testsdk.bbclass - Enable bb event thread mode to avoid corrupt the PIPE when multiple threads writes. [YOCTO #11450] (From OE-Core rev: 598c6579932c2ca1dbdb022c8bec8af2e6c21e6b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core: Move OETestContext.log{Summary, Details} into OETestResultAníbal Limón2017-06-022-6/+6
| | | | | | | | | | | | | Those methods are used to write in the log the results so it makes sense to have defined at OETestResult because is a format of the result itself. [YOCTO #11450] (From OE-Core rev: 33a783f59ed4e232f41f8b09dfa7955f2ddc2f80) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.bbclass: Remove unused import of OEStreamLoggerAníbal Limón2017-06-021-1/+0
| | | | | | | (From OE-Core rev: ab434125b9121e3d7c463a4b35ae60a4395f8392) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* module.bbclass: Add devshell supportStefan Wiehler2017-05-301-0/+20
| | | | | | | | | | Adds development shell support for out-of-tree kernel modules by reproducing the build environment of the compile task. (From OE-Core rev: 08e366a386caab547e0dbcad2d4ee08f44814262) Signed-off-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>