summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* package_rpm.bbclass: run pre/post installation scriptlets using sh -eAlexander Kanavin2018-01-301-4/+4
| | | | | | | | | | | | | | | | | | | | This allows catching errors in the scriptlets which would otherwise go unnoticed, e.g. this sequence: ==== bogus_command proper_command ==== would work just fine. Note that this patch needs all of the preceding patches, as otherwise running failing scriptlets with -e would defer them to first boot, instead of properly reporting failure and aborting the package installation. (From OE-Core rev: 3cd8a55d5298ce9cc176e402fdb727abb26a1a4c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: add support for pkg_postinst_ontarget()Alexander Kanavin2018-01-301-0/+20
| | | | | | | | | | | | | | | | | | | | | This function is a convenient and more readable shortcut for situations when the postinst code always needs to run on target. All commands that cannot be executed during cross-install and can only be run on target should go into this function. They will only be executed on first boot (if package was cross-installed) or immediately during package installation on target. Plain pkg_postinst() works as before: it is run during cross-install time, it can contain a request to defer to first boot, and it is also run during package installation on target. Also fix the oeqa test for this functionality to use the new function where appropriate. (From OE-Core rev: 229f4e975fb6957f44b5c56735fd6d58564098d7) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/utils: remove compatibility functionsRoss Burton2018-01-301-41/+0
| | | | | | | | | | | These base_* functions were moved into meta/lib/oe back in 2010 and wrappers left in utils.bbclass for compatibility. It's been eight years, so I think it's time to remove them. (From OE-Core rev: 0391fcad9103abca0796a068f957d0df63ab4776) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: don't use deprecated functions from utils.bbclassRoss Burton2018-01-305-14/+14
| | | | | | | | | | | These functions were moved to meta/lib/oe in 2010 and the base_* functions in utils.bbclass were intended to be a short-term compatibility layer. They're still used in a few places, so update the callers to use the new functions. (From OE-Core rev: c97acbd034532895ce57c6717ed1b3ccc7900b0d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: enable gi test suiteRoss Burton2018-01-291-4/+4
| | | | | | | | (From OE-Core rev: d8243c4588d4f1bb057fd917bfea130c4907e24c) (From OE-Core rev: 1c896b34d2d9fdf941941bd29257a4714795da5a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: Adjust for clang compilerKhem Raj2018-01-291-2/+7
| | | | | | | | | | | | Remove hardcoding c/c++ compiler to be gcc alone, its possible to use clang as replacement for cross compilers from meta-clang, therefore set clang/clang++ if TOOLCHAIN = "clang" (From OE-Core rev: 05789489d25a5ceac0403613ad789d78198be6ee) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: improve reproducibility of RPM packagesJuro Bystricky2018-01-291-0/+1
| | | | | | | | | | | | The RPM packages contain BUILDHOST based on the current build host. This breaks reproducibility if the same package is build on two different hosts. To improve reproducible builds, we always set BUILDHOST as "reproducible". (From OE-Core rev: f3beb683380ec0d9efa0d6af83205350afd1b2de) 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>
* archiver: don't require that images are built using RPM to build SRPMsRoss Burton2018-01-291-4/+5
| | | | | | | | | | | | | | The requirement for images being built using RPM is too strict to have access to the RPM functions, simply checking that package_rpm is in PACKAGE_CLASSES is sufficient. Also fail if SRPMs are requested but package_rpm isn't enabled, instead of silently not doing what we were asked. (From OE-Core rev: cdae5c41e4f67a8757efc5ce1ef11d730edc3af1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Fix matching of architecture independent packagesOtavio Salvador2018-01-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OE-Core changes the architecture independent RPM packages to use "noarch" instead of "all". This change has been included in the commit below: ,---- | commit 341810aff923ace6b1cc1e15e19383c4f8773b51 | Author: Alexander Kanavin <alexander.kanavin@linux.intel.com> | Date: Mon Jan 9 16:37:28 2017 +0200 | | package_rpm.bbclass: make architecture-independent .rpm packages | "noarch" instead of "all" | | Too many places in dnf/rpm4 stack make that assumption; let's not | fight against it. | | Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> `---- This is causing problems with machines that has "all" inside the machine name. Reported-by: Alexandru Palalau <ioan-alexandru.palalau@nxp.com> (From OE-Core rev: 3e4ddeab65d4d2e4aaf03d442c2a1a8c7a2ce8a2) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: make SRC_URI defconfig removal more specificBruce Ashfield2018-01-271-1/+1
| | | | | | | | | | | | | | | | | | | commit 7e98c295c1bb511e [kernel-yocto: ensure that only a single defconfig is processed] has an overly broad replacement strategy for 'defconfig' and hence will chop up any fragment name that happens to contain that string. If we change the processing to split on whitespace and drop any full work 'defconfig' fragments, we'll get the behaviour we want (no duplicate defconfigs, but fragments with defconfig in their name are fine). [YOCTO #12487] (From OE-Core rev: fd2678190db6575dc909104b60c284d0c41f605f) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: correctly handle LICENSE_${PN}Ross Burton2018-01-261-2/+7
| | | | | | | | | | | | | | | | | | RPM spec files don't distinguish between spec-level license and the primary package license, so always output the License for every package (defaulting to the recipe-wide license) and use LICENSE_${PN} if set for the primary package. As the primary use of package_rpm is to generate built packages, this fixes the license fields in the generated packages. [ YOCTO #12057 ] (From OE-Core rev: 8c333e592fa7a3a887c792ac14e5cde2141b5d35) (From OE-Core rev: 42e0de37d18f072dc5dcf5dc45cb441e4c2110d8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Convert SkipPackage -> SkipRecipeRichard Purdie2018-01-267-19/+19
| | | | | | | | | | The new name is much more consistent with what this actually means. We put the pieces in place to rename everything a while back but looks like we forgot to actually do it! Fix that now. (From OE-Core rev: af9612f5d6b848fceea22d10ee964437299be776) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: add support for modern f2fs flash filesystemSaul Wold2018-01-231-0/+20
| | | | | | | | | | | | | | | | The f2fs filesystem is a newer flash filesystem that is available in meta-filesystems. This needs a minimum sized blank space to operate in correctly. The f2fs has overprovision functionality and when building smaller filesystems, you actually need more space, therefore under 500M (or so) double the amount of space needed in order to handle the overprovision functions in f2fs. (From OE-Core rev: dec029686a47b574edfce4472fe2167db54398fb) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipg: use xz when building packagesRoss Burton2018-01-231-2/+2
| | | | | | | | | | Add a dependency on xz-native and pass '-Z xz' to opkg-build to use xz instead of gzip when building packages. (From OE-Core rev: b95b6ba1a2959e2294a8848fa35f20163388eb06) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: support Image kernel type for arm64Zumeng Chen2018-01-231-0/+4
| | | | | | | | | | | | Image will be generated for arm64, and no compression for Image in u-boot as well. So we just put the file into the right place for the rest of the build to find it. (From OE-Core rev: ce6337ab4b415ee18360dfe4443a71ab75a60254) Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-01-222-0/+2
| | | | | | | | | | | | repos don't conflict The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. (From OE-Core rev: 5e5569c962c9ebc898eeb5044214e95117b190e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Set cleandirs correctlyRichard Purdie2018-01-221-1/+1
| | | | | | | | | | The current conflicting use of SDKDEPLOYDIR causes a race between do_populate_sdk and do_populate_sdk_ext potentially causing the SDK to either go missing or the build to fail. (From OE-Core rev: 792cfbab488782a7bd610fc2078077d5497be4d1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: deltask populate_sdk and populate_sdk_extRobert Yang2018-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "bitbake image -cpopulate_sdk/ext" generates SDK/eSDK for all multilib variants, so "bitbake lib32-image -cpopulate_sdk/ext" is not needed, and it doesn't work well, for example: MACHINE ?= "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake lib32-core-image-minimal -cpopulate_sdk_ext [snip] Exception: FileExistsError: [Errno 17] File exists: '/buildarea/lyang1/test_q64/tmp/sysroots-components/core2-64/openssl/sysroot-providers/openssl10' -> '/buildarea/lyang1/test_q64/tmp/work/qemux86_64-pokymllib32-linux/lib32-core-image-minimal/1.0-r0/lib32-recipe-sysroot/sysroot-providers/openssl10' [snip] The problem is populate_sdk_ext installs all multilib variants, and extend_recipe_sysroot() handles foo-image depends lib32-foo-image, but doesn't handle lib32-foo-image depends foo-image, we can use a lot of trick ways to make it work: 1) Get foo-image's RECIPE_SYSROOT when build lib32-foo-image 2) Handle conflicts with foo-image.do_rootfs 3) Handle conflicts when "bitbake lib32-foo-image foo-image -cpopulate_sdk_ext" And maybe other potential problems, this looks painful, so just delete the task. [YOCTO #12210] (From OE-Core rev: 77144bc808be02deb3351c9c1bf5b4f2b8c3a6ec) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: use Ninja by defaultRoss Burton2018-01-191-1/+1
| | | | | | | | | | | | This changes the cmake class to use Ninja instead of Make by default. If a recipe is broken with Ninja then the recipe can set OECMAKE_GENERATOR="Unix Makefiles" to change back to Make. (From OE-Core rev: bacaa26decb8a1e3fa672e1923954793fde48766) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: allow the generator to be changedRoss Burton2018-01-191-2/+18
| | | | | | | | | | | | Add OECMAKE_GENERATOR variable to control which generator is used by CMake, defaulting to the upstream default of Unix Makefiles for now. The other supported option is Ninja, which is faster than Make for large projects (for example, using Ninja takes three minutes off webkitgtk:do_compile for me). (From OE-Core rev: 6e3f719076cab469f56cd1555bd219a5c3fd135d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: add MESON_LINK_ARGS to vardepsMartin Kelly2018-01-191-1/+1
| | | | | | | | | | | | | | | | Currently, we include MESON_C_ARGS in write_config[vardeps], but we don't include MESON_LINK_ARGS, which also affects meson.cross. In addition, we include TOOLCHAIN_OPTIONS, from which both are derived. Add MESON_LINK_ARGS, and remove TOOLCHAIN_OPTIONS, which does not directly appear in meson.cross and should be pulled in indirectly by MESON_C_ARGS and MESON_LINK_ARGS. (From OE-Core rev: 4db37cc8d9139076682e2528d29e92fad2eb1c90) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: include C{, XX}FLAGS in cross argsMartin Kelly2018-01-191-4/+6
| | | | | | | | | | | | | | | | | | Currently, CFLAGS and CXXFLAGS are not making it into the compile line. This is because meson appends CFLAGS/CXXFLAGS from the environment only for native but not for cross builds (probably to keep cross-builds more isolated). As a result, we need to make sure these vars goes into meson.cross. This is similar to what cmake.bbclass does with OECMAKE_C_FLAGS and OECMAKE_CXX_FLAGS. Change c_args and cpp_args in meson.cross to include these vars, and update write_config[vardeps] accordingly. (From OE-Core rev: f435d1b75d3775f6ec0df6027766008b40209fd7) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: compile with --buildtype plainMartin Kelly2018-01-191-0/+1
| | | | | | | | | | | | | | | OE manages all the compile flags, so we don't want meson to inject its own flags. Currently, it's injecting -O0 and causing build breaks when security flags are enabled (because _FORTIFY_SOURCE requires an optimized build and meson defaults to a debug -O0 build). Add --buildtype plain so meson will not add its own optimization flags. (From OE-Core rev: 73ff85986d82c8da601d7c7cf9a02961f2f66a09) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: upgrade 3.9.5 -> 3.10.1Otavio Salvador2018-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The 3.10.1 version has been in Dec 13, 2017, and has a great set of features and improvements since the last upgrade. The release notes of 3.10 release is available at: https://cmake.org/cmake/help/v3.10/release/3.10.html Patches updates: - cmake-Prevent-the-detection-of-Qt5.patch: so it replaces the sed command calls inside the cmake.inc - 0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch: merged upstream, so it has been removed. - support-oe-qt4-tools-names.patch: rebased. License-checksum-change: added new contributors (From OE-Core rev: 9e58926f1cea9d5cb18cb923855d1ae98f88a8ac) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Use KERNEL_IMAGETYPE_FOR_MAKE in do_bundle_initramfsThomas Perrot2018-01-191-1/+1
| | | | | | | | | | | In the case of a fitImage the this step should be done on the image use to assemble the fitImage. (From OE-Core rev: a061c6bfd3a049a2c8d14bcfafd6e1837afb95e5) Signed-off-by: Thomas Perrot <thomas.perrot@tupi.fr> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: drop unnecessary True options from calls to getVarAndre McCurdy2018-01-192-9/+9
| | | | | | | | | | | | | | The older style calls (plus a bashism in kernel.bbclass, fixed separately) were introduced via the recent change to add support for multiple kernel packages: http://git.openembedded.org/openembedded-core/commit/?id=6c8c899849d101fd1b86aad0b8eed05c7c785924 (From OE-Core rev: e660ef68de3b3891a26ed6e10d96dc4efaf03ffc) 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>
* kernel.bbclass: drop legacy fallback to yes '' | make oldconfigAndre McCurdy2018-01-181-1/+1
| | | | | | | | | | | | | The "oldnoconfig" target has been supported since Linux 2.6.36. According to OLDEST_KERNEL, the oldest kernel currently supported by OE is 3.2.0, so the fallback to yes '' | make oldconfig is no longer required. (From OE-Core rev: 6abee5468e05333fbd9bd5ac8fc203a749ae3b3e) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/debian: clean up process spawningRoss Burton2018-01-181-10/+9
| | | | | | | | | | This code is old and was of it's time, rewrite it to use modernish (we support Python 3.4, so can't use subprocess.run()) subprocess and re idioms instead. (From OE-Core rev: 8f7fdab41b8d6aced6753920bb5deed147c9baa8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/debian: fix library path handlingRoss Burton2018-01-181-10/+16
| | | | | | | | | | | | | | | The existing code is looking for libraries in all paths which end in ${libdir}. This caused false-positives for recipes such as lz4 which had files called /usr/lib/lz4/ptest/usr/lib/liblz4.so, and resulted in lz4-ptest being incorrectly renamed to liblz4. Solve this by explicitly looking for ${libdir} etc under the packages-split directory. (From OE-Core rev: 7b1896f6f5367010b54c6a8b300db84037734533) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: allow target names to be overriddenRoss Burton2018-01-181-4/+7
| | | | | | | | | | | Don't hardcode the targets used in do_compile and do_install, instead build "all" and "install" by default but respect OECMAKE_TARGET_COMPILE and OECMAKE_TARGET_INSTALL variables. (From OE-Core rev: 806765ec466597d38231d4be303cb48c26e21466) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add automatic dependency on xz-native for .deb SRC_URIDariusz Pelowski2018-01-141-0/+4
| | | | | | | | | | FetchMethod.unpack requires xz for unpacking of embedded data.tar.xz (From OE-Core rev: 57f0a4ee29b9fc15749a9d42fdf01718a7099c2d) Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross-canadian/gettext: Drop unneeded nativesdk-gettext dependencyRichard Purdie2018-01-142-5/+1
| | | | | | | | | | | In line with the other gettext cleanups, drop the nativesdk-gettext dependency as it isn't needed (similarly to the previous target gettext dependencies). This then means we can drop DEPENDS_GETTEXT as there are no other users. (From OE-Core rev: c43c054cb778e0c5c082996cd6e6c45f5fc9e1bf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove bashism in kernel_do_installRicardo Salveti2018-01-141-1/+1
| | | | | | | | | | | | | | possible bashism in run.do_install line 163 (should be 'b = a'): if [ "kernel" == "kernel" ]; then Fixes "[: kernel: unexpected operator" when not using bash by default, which causes the default kernel image link to not be created. (From OE-Core rev: 9d82fffd24742a5eb40bcb9b9ecea01a42be0be6) Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: don't wipe gettext macros from gettextRoss Burton2018-01-141-1/+1
| | | | | | | | | | | | | | We usually forcibly delete any gettext macros we come across to ensure that the latest versions we ship are used, but if we're building gettext then it's a bad idea to delete the gettext macros. Historically this hasn't been a problem as the top-level gettext configure doesn't use AM_GNU_GETTEXT so the deletion was never done, but this may change. (From OE-Core rev: f16657df977e54210774812d4e616403c76eb060) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: use HOST_CC_ARCH, not TARGET_CC_ARCHChristopher Larson2018-01-131-1/+1
| | | | | | | | | | Using TARGET_CC_ARCH is inconsistent with CC, which uses HOST_CC_ARCH, and the rest of meson.bbclass, which uses HOST_PREFIX, HOST_OS, etc. (From OE-Core rev: 8a61e0c0c53275ebc623296f46676d920b11eb3b) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: drop legacy armv7a-vfp-neon TUNE_PKGARCH renamingAndre McCurdy2018-01-131-7/+0
| | | | | | | | | | | | | | | | | | ARM specific TUNE_PKGARCH renaming was adding in 2011 handle the transition from armv7a -> armv7a-vfp-neon: http://git.openembedded.org/openembedded-core/commit/?id=08c0b7060009113e8dffdef51ff6b9b4b7f28894 Active package feeds should now have long since updated to the new naming. For example, Angstrom stopped using on the legacy naming in 2012: https://github.com/Angstrom-distribution/meta-angstrom/commit/2e33fb5bd08edda6457dd211f4ff4ec4aad9d85d (From OE-Core rev: 0341a3c44e511d3246096edd3009432805e57b89) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: support wic in eSDKChang Rebecca Swee Fun2018-01-131-1/+1
| | | | | | | | | | | | | Make 'wic' image creation tool/command available in eSDK environment. This would allow eSDK users to manipulate images within eSDK environment. [YOCTO #12177] (From OE-Core rev: 90df6758a9f8753c646b129aa912e3849bf4c987) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gnupg: use native version for signing, rather than one provided by hostAlexander Kanavin2018-01-112-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Using host gpg has been problematic, and particularly this removes the need to serialize package creation, as long as --auto-expand-secmem is passed to gpg-agent, and gnupg >= 2.2.4 is in use (https://dev.gnupg.org/T3530). Sadly, gpg-agent itself is single-threaded, so in the longer run we might want to seek alternatives: https://lwn.net/Articles/742542/ (a smaller issue is that rpm itself runs the gpg fronted in a serial fashion, which slows down the build in cases of recipes with very large amount of packages, e.g. glibc-locale) Note that sstate signing and verification continues to use host gpg, as depending on native gpg would create circular dependencies. [YOCTO #12022] (From OE-Core rev: 08fef6198122fe79d4c1213f9a64b862162ed6cd) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Expand PV to avoid AUTOREV parsing failuresRichard Purdie2018-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, setting PV to include SRCPV for build-appliance results in: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export ftp_proxy="http://proxy.yocto.io:5187/"; export FTP_PROXY="http://proxy.yocto.io:5187/"; export PATH="${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:/home/pokybuild/ yocto-autobuilder/yocto-worker/buildtools/build/scripts:${TMPDIR}/ work/qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/x86_64-poky-linux:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot/usr/bin/crossscripts:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/usr/sbin: ${TMPDIR}/work/qemux86_64-poky-linux/build-appliance-image/ fetcheravoidrecurse-r0/recipe-sysroot-native/usr/bin:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/sbin:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/bin:/home/ pokybuild/yocto-autobuilder/yocto-worker/buildtools/build/bitbake/bin:${TMPDIR} /hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/poky failed with exit code 127, output: /bin/sh: 1: git: not found This is because PV is being expanded when TMPDIR is unset. Expand PV in advance to avoid this problem. (From OE-Core rev: 9ca2fad2e569597f460e6bcbbd96077c8b8cfce9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: remove invalid PACKAGE_INSTALLRobert Yang2018-01-111-1/+0
| | | | | | | | | | | | The PACKAGE_INSTALL is only used by image recipe, the previous code had handled it in "if bb.data.inherits_class('image', d)", handle it again doesn't make any sense (there is no PACKAGE_INSTALL for non-image recipe), so remove it. (From OE-Core rev: 6b25c76da51180da7c97308d5f8f5558c68cdca3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: sstate_hardcode_path(): fix for multilibRobert Yang2018-01-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only substituted staging_target for target recipe which didn't work for multilib, for example, postinst-useradd-lib32-polkit: * No multilib: PATH=/path/to/tmp-glibc/work/core2-64-wrs-linux/polkit/0.113-r0/recipe-sysroot-native/bin staging_target=/path/to/tmp-glibc/work/core2-64-wrs-linux/polkit/0.113-r0/recipe-sysroot The PATH would be substituted to: FIXMESTAGINGDIRTARGET-native/bin Not the funny "-native/bin", this works well. * When multilib: PATH=/path/to/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-polkit/0.113-r0/recipe-sysroot-native/bin staging_target=/path/to/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-polkit/0.113-r0/lib32-recipe-sysroot Now staging_target endswith "/lib32-recipe-sysroot", so it can't replace '/recipe-sysroot-native' in PATH , so PATH can't be fixed, and there would be build errors when building multilib + rm_work, for example: chown: invalid user: ‘polkitd:root’ Substitute staging_host for target recipe can fix the problem, now all of native, cross and target need substitute staging_host, so we can simply the code a little. (From OE-Core rev: 087510795331fa21ff52f103269087c06b1660fa) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk/sdk: Update sdk dummy providersRichard Purdie2018-01-112-1/+8
| | | | | | | | | | | | | | | | | | When we migrated rpm v5 -> v4, we lost the ability to drop "per file" dependencies from the rpm backend for things like "/bin/bash" and "/usr/bin/env" which meant the sdks were becomming 'bloated'. This restores the functionality using a dummy package, similarly to the way the buildtools perl issue was addressed. It also removes the non-functional old code so as not to confuse people in future. I ran into this problem trying to filter dependencies to only rpms a build directly depends upon and it turns out we have some determinism issues in this area so this is something key to fix. (From OE-Core rev: 9d490dc01dcedb216129b22cbe17a6c99efc4f5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Handle / in dependency nameRichard Purdie2018-01-111-3/+5
| | | | | | | | | | | | | We can end up with / in dependency names from file dependencies but the deb format doesn't allow this. Filter the names to allow such dependencies to work. Names have to start with an alphanumeric digit so also handle this. This allows for future handling of "per file" dependencies similarly to the rpm backend, bring parity to the functionality of the backends. (From OE-Core rev: fc08972688d784f561c8be88d3100d6baaf22070) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/cross: remove redundant DEPENDS_GETTEXT assignmentRoss Burton2018-01-112-4/+0
| | | | | | | | | | DEPENDS_GETTEXT defaults to gettext-native, so there's no need to set it again in these classes. (From OE-Core rev: 5e4b1915e7a5a94d410c5292b5ed2f447c82b18a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Always put cmake package files in -dev packagesMike Crowe2018-01-071-0/+2
| | | | | | | | | | | | Various recipes that inherit cmake contain FILES_${PN}-dev magic to add the generated package files to their -dev packages. Since this is a standard feature of cmake, we might as well teach cmake.bbclass to do this itself so those recipes can be simpler. (From OE-Core rev: d91dc4666683a96e9d03cbbd21b8a546f9069c93) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: remove unneeded bb.data.inherits_class()Robert Yang2018-01-061-2/+0
| | | | | | | | | It is duplicated to previous. (From OE-Core rev: 1309b800fbc48bc6a3b7864eb7827b24f855ddac) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib.bbclass: remove obsolete DEFAULTTUNE_ML_Robert Yang2018-01-061-1/+0
| | | | | | | | | | | | | | It had been dropped by: commit 65581c68d130fa74d703f6c3c92560e053857ac7 Author: Alexander Kanavin <alexander.kanavin@linux.intel.com> Date: Mon Feb 13 16:44:48 2017 +0200 rootfs_rpm.bbclass: migrate image creation to dnf (From OE-Core rev: 38df1653da65a8a4e5f84b369b699307d5b4fc4f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_global.bbclass: fix indentRobert Yang2018-01-061-1/+1
| | | | | | | (From OE-Core rev: 52f121a726da573c90e5857caff95e50b01ea02a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: don't rename layers when failedRobert Yang2018-01-061-11/+9
| | | | | | | | | | | | | | | | | The previous code: os.rename(sdkbasepath, temp_sdkbasepath) try: foo finally: os.rename(temp_sdkbasepath, sdkbasepath) always renamed the path, it made the debug harder when error happened. drop the "try: finally" makes the debug easier. (From OE-Core rev: 32126512349d65f0dbc31196c4ec6e1a1147cf5e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.bbclass: add a newline after own-mirrorsRobert Yang2018-01-061-1/+1
| | | | | | | | | | Otherwise it would generate lines like the following when multilib: INHERIT += "own-mirrors"SSTATE_MIRRORS += " \n file://.* file:///path/to/../share/sstate-cache/PATH" (From OE-Core rev: 65b2a0e1ba7e176f3e405ed8968665660fc414d3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>