summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* bitbake.conf/sanity: Drop makeinfo as being required on buildhostRichard Purdie2020-02-031-1/+1
| | | | | | | | | | | | | | | | | This is a long standing 'odd' dependency which we've meant to resolve. We shouldn't need it and it introduces reproducability issues. We already have texinfo-dummy-native and texinfo-native which can provide it but the work to remove the hosttool was never completed. After cleaning up texinfo.bbclass, this can now be removed with minimal impact on build time. [YOCTO #13753] (From OE-Core rev: 0c58c479af151969dfb84d8763696da657f7248d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* texinfo: Only build texinfo when api-docs enabledRichard Purdie2020-02-031-1/+3
| | | | | | | | Also fix the crosssdk and cross-canadian cases. (From OE-Core rev: 95476373b20ba56c2877c70b5b36335446904f37) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* texinfo/texinfo-dummy-native: Drop native path prefixRichard Purdie2020-02-031-3/+1
| | | | | | | | | | Now we have recipe specific sysroots we don't need this native path prefix. It was breaking the crosssdk/cross-canadian cases and causing bugs, removing it is the simplest solution. (From OE-Core rev: f7c9e4c4cbb2a74a3627dc8da37083eef071e3cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/reproducible_build: Read SDE file laterJoshua Watt2020-02-031-9/+31
| | | | | | | | | | | | | | | | | Defers the resolution of the SOURCE_DATE_EPOCH until the variable needs to be actually realized with a value. The previous method of loading the value in anonymous python had issues because it could occur before other anonymous python functions that affect the location of the epoch file, such as when a recipe uses AUTOINC/AUTOREV or allarch.bbclass. Also adds more logging to help diagnose issues in the future. [YOCTO #13763] (From OE-Core rev: b3313a10a3eb93f0a3710a35de0404fb49cd6202) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Recognise ppc64 host ldsoKhem Raj2020-02-021-1/+1
| | | | | | | (From OE-Core rev: 15f7eedf3f153f844dd64f028877aac621e040d1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc: merge libc-common.bbclass into glibc.bbRoss Burton2020-02-021-37/+0
| | | | | | | | | | | | There's only one user of libc-common now that we don't ship both glibc and eglibc, so copy the contents directly into the recipe. [ YOCTO #12135 ] (From OE-Core rev: a0bff0db1eeb128776757d5f3d0bc1ebdc135498) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Fix error when toaster is used to monitor a buildMark Hatle2020-02-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | The error being corrected looks like: File: '/home/jenkins/workspace/OEBuild/build-32/oe-core/meta/classes/toaster.bbclass', lineno: 130, function: toaster_package_dumpdata 0126: lpkgdata = {} 0127: datadir = os.path.join(pkgdatadir, 'runtime') 0128: 0129: # scan and send data for each generated package *** 0130: for datafile in os.listdir(datadir): 0131: if not datafile.endswith('.packaged'): 0132: lpkgdata = _toaster_load_pkgdatafile(datadir, datafile) 0133: # Fire an event containing the pkg data 0134: bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d) Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/jenkins/workspace/OEBuild/builds/build-32/tmp-glibc/work/core2-64-oe-linux/puzzles/2_0.0+gitAUTOINC+c6e0161dd4-r0/pkgdata/runtime' There must be a small window before the data is available, but while the monitoring is on-going. (From OE-Core rev: c7329b17cbbef64984196e2b79a81988db1d2bf3) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: Give in and force CONFIG_SHELL to bashRichard Purdie2020-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | At present, CONFIG_SHELL becomes /bin/sh if its bash and /bin/bash if not. This isn't deterministic and leads to changes in ptest packages which include Makefiles. At first glance you'd think we'd hardcode to /bin/sh since most system shells are sane. Sadly the dash vs. bash leads to quoting differences in configure. The bash default is probably the safest option since configure tries to find bash and this is what most systems would end up using. The end result is a more consisent build environment. [YOCTO #13752] (From OE-Core rev: 33b1e27c29ed05da783f814cf9c3035675087ecc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrodata/maintainers: Add PARSE_ALL_RECIPES flag to fix test issuesRichard Purdie2020-01-272-2/+5
| | | | | | | | | | | | Currently the test depends on which DISTRO_FEATURES and targets are selected. Similar to SOURCE_MIRROR_FETCH, add PARSE_ALL_RECIPES to allow the test to see a much wider range of them. This avoids issues added by the new ucontext musl specific recipe and allows the current whitelist to be cleared out a bit (more cleanup can follow). (From OE-Core rev: c139e058bb2df48c79784cf3fd701e51bbc68427) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/cross/nativesdk: Drop obsolete do_populate_sysroot[stamp-extra-info]Richard Purdie2020-01-274-4/+0
| | | | | | | | | With recipe specific sysroot, these settings do nothing. Drop the obsolete code. (From OE-Core rev: 6269f1935f5fd2d9397045566f2e0e4fc0df85cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Disable CGO on riscv64Khem Raj2020-01-271-0/+1
| | | | | | | | | Its not supported yet (From OE-Core rev: ecec793f36545cab9c14a64b267b1d4f694d0323) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: Disable PIE on riscvKhem Raj2020-01-271-1/+1
| | | | | | | | | Its not _yet_ supported for riscv (From OE-Core rev: aeb38e003dc5e11008e301a584e93351745ef6e7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: update 0.52.1 -> 0.53.0Alexander Kanavin2020-01-271-1/+4
| | | | | | | | | | | Unset LD, and do not set ld in cross file from LD as new version of meson passes that value directly to -fuse-ld=... which requires one of lld, bfd, gold. (From OE-Core rev: e0e30637a139feb744ca284aa63d47efefc5cb5d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/npm: force to rebuild the prebuild addonsJean-Marie LEMETAYER2020-01-271-1/+6
| | | | | | | | | | | | This commit forces to rebuild the prebuild addons which are using node-gyp-build. https://www.npmjs.com/package/node-gyp-build (From OE-Core rev: dc4dda4d459ef66246cb7fb6f7d667c982707544) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/npm: use the native pythonJean-Marie LEMETAYER2020-01-271-0/+3
| | | | | | | | | | | | When building addons, the node-gyp build tool is looking for python. It is available in the native directory but not directly in the PATH. This commit configures npm to use the native python executable. (From OE-Core rev: 946fd69cba6f60c531ff34091cda3b7fee8ee594) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/npm: use the local node headersJean-Marie LEMETAYER2020-01-271-0/+3
| | | | | | | | | | | | When building addons, the node headers are needed to be able to compile properly. Usually they are downloaded by npm but network access in the do_compile task are unauthorized. Hopefully the local node headers are available in the native sysroot so lets use them. (From OE-Core rev: e4c111dacc808d8c7883f3a36dd5a9f65e7a44cc) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/npm: restrict the build to be offlineJean-Marie LEMETAYER2020-01-271-0/+3
| | | | | | | | | | | After the do_fetch task, every other tasks must not access the network. In order to ensure this point every npm command must use the offline configuration. In addition setting an invalid proxy is used as a safety. (From OE-Core rev: 1133f3ab485031df6e107f826b7398e5133f9c4d) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/npm: refactor the npm classJean-Marie LEMETAYER2020-01-271-75/+274
| | | | | | | | | | | | | | | | | | | | | | | This commit splits the npm build in three steps: 1. With the new npmsw fetcher, the sources and dependencies of the package have been fetched and unpacked. As sources can also be patched, a local cache must be configured to use these modified sources. 2. Next, the installation process is run using the local cache only. Some packages may need to be compiled. 3. The final installation filters the previously installed files to avoid unnecessary files. This new version also fixes multiple issues related to npm dependencies badly handled: package names, scope packages, installation directories (From OE-Core rev: fb2252ee0777c6d26dea94c7588c323a6b97e961) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Only show sstate mirror progress bar for >= 100 objectsPeter Kjellerstedt2020-01-271-4/+8
| | | | | | | | | | | | | | | With the introduction of the hash equivalence server, the progress bar for "Checking sstate mirror object availability" is shown repeatedly. Most of the times the number of objects scanned is very low and the progress bar completes almost immediately. To avoid all these unnecessary progress bars, set the minimum number of objects to 100 before the progress bar is shown. (From OE-Core rev: 114340e8d393cf60d0a596cb0800cf1b7fd198df) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manpages.bbclass: Fix rootfs host corruptionAlex Kiernan2020-01-271-1/+8
| | | | | | | | | | | | When running mandb we end up with files owned by the build user, correct this. Also pick up non-default locales and relocate their index.db files to /var/cache. (From OE-Core rev: 844781c5b260a52e8c06b872c74a13a22689bdb9) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fontcache: fix indentationRoss Burton2020-01-271-1/+1
| | | | | | | (From OE-Core rev: be65d542a30e68479602d6e2fe5c993e77a70dd3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: warn if cross property defaults are usedRoss Burton2020-01-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | The Meson idiom for checks which require running code on the target (which isn't possible in cross compilation) is to use a cross property, which the user can set in the cross file: if cc_can_run rres = cc.run(test_foo_code) have_foo = rres.compiled() and rres.returncode() == 0 else have_foo = meson.get_cross_property('have_foo', false) endif The default value may be overly conservative so we should review every property and explicitly set them as apppropriate. oe-core 669ddaf added a log message when the default value is used, so look for this message and emit a warning that the user will see. (From OE-Core rev: 91b74ee03ada5d4517a5d8ef3895cc60f87780aa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemu: Enable ppc64le support for qemu-usermodeKhem Raj2020-01-221-0/+3
| | | | | | | | | glibc defines minimum kernel needed to be 3.10.0 for LE ppc64 (From OE-Core rev: c1c296a42920af6725706bdea8e61b8c4f5f14a8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Disable dynamic linking on PPC64 LEKhem Raj2020-01-211-0/+2
| | | | | | | (From OE-Core rev: cbcaa7e4808d881e19bdefc9123232449d8a2cad) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: update to 3.8.1Alexander Kanavin2020-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Drop backports, rebase other patches. 0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch is removed as the use case (allowing python 2 and 3 to coexist in SDKs) is no longer relevant with Python 2.x reaching end of line and upstream has refactored the code making a rebase difficult. If needed, please re-add the patch to py2, rather than py3. Python 3.8 no longer adds "m" to "3.8" in paths, so adjust the recipes and classes accordingly. The manifest for the 3.8.0 version is updated; particularly pkgutil module is now packaged in -core (as other things in core need it); this also necessitates allowing empty -pkgutil package to avoid breakage across layers. (From OE-Core rev: e6ab9f16b92aa1abdae82c535c1a452a1341b0e2) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: Make BUILDNAME a weak default in reproducible_build_simpleAlex Kiernan2020-01-192-5/+1
| | | | | | | | | | | | | | | | | 11e45082ad00 ("rootfs-postcommands.bbclass: improve binary reproducibility") fixed binary reproducibility of /etc/version, but with the move to reproducibilty in all builds, setting /etc/version to anything other than the default fixed timestamp is tricky because rootfs_reproducible() runs very late. rootfs.py uses BUILDNAME if set for /etc/version, so introduce a weak default for BUILDNAME of "REPRODUCIBLE_TIMESTAMP_ROOTFS", when enabling reproducible builds hence allowing BUILDNAME to be overridden elsewhere. (From OE-Core rev: bbf28ea9100a4f86b052c5cd53c77f9e1c03fb09) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes, conf, lib: Add support for powerpc64leKhem Raj2020-01-192-1/+2
| | | | | | | | | | | | | | LE is default for modern powerpc64, power8+ PowerPC64 Little Endian Linux ABI specifies Power8 as the minimum ISA. The basic ABI can run on earlier versions of the 64 bit PowerPC ISA, but it was helpful to define a new, minimum instruction set for Linux distribution releases during the switch to Little Endian. (From OE-Core rev: b9c73fb6d1afb3367d871a3d6bf7d0d6a53968a9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Spawn warning for missing mime-xdg in inheritAndreas Müller2020-01-191-1/+30
| | | | | | | | | | If a package signals that it can open mime-types but does not inharit mime-xdg, a warning is created. (From OE-Core rev: 75b4a377d6e74456bbb4b9966725de7385c74b61) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mime-xdg.bbclass: initial addAndreas Müller2020-01-191-0/+74
| | | | | | | | | | | | | When opening files by file-browsers on fresh images, user has to choose the application to open from the pool af ALL known applications even those not designed to open the file selected. By inheriting this classs in recipes the assosiations in /usr/share/applications/mimeinfo.cache are build by calling update-desktop-database. (From OE-Core rev: 20208d6763e725cea211f933ec1c8e32733a10af) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: introduce a warning for mime missing in inheritAndreas Müller2020-01-191-0/+12
| | | | | | | | | | | | * looking through layers it looks that usage of mime.bbclass is somewhat orphaned * now that update-mime-database is called once only at image creation time, costs of mime.bbclass are limited (From OE-Core rev: 856ed1dc3b6e4a082546a487818eb4c6cde1c573) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mime.bbclass: reworkAndreas Müller2020-01-191-30/+32
| | | | | | | | | | | | | | | | | | * add a short descriptions of class' use case * remove checks for update-mime-database - it can be considered available: * at build time by PACKAGE_WRITE_DEPS * at package upgrade by RDEPENDS chain pkg -> shared-mime-info-data -> shared-mime-info * simplify (accelerate?) xml file extension detection * run update-mime-database once only at image creation to avoid expensive redundant operations * allow shared-mime-info to inherit mime.bbclass by avoiding circular dependencies (From OE-Core rev: 6467b7b98c9a55e27d1ab9f253ec48da2a722e77) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python: remove Python 2 and all supporting classesRoss Burton2020-01-195-126/+0
| | | | | | | | | | | | | | | | Python 2 ceased being maintained on the 1st January 2020. We've already removed all users of it from oe-core so the final step is to move the recipe and supporting classes to meta-python2. The following are removed in this commit: - python and python-native 2.7.17 - python-setuptools - The classes pythonnative, pythondir, distutils, setuptools (From OE-Core rev: 390f3edabfb1f68ed9766245291c5f44ea00cc38) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mips: Enable gnu-hash-style on glibcKhem Raj2020-01-191-3/+2
| | | | | | | | | | | | | | | latest glibc 2.31 [1] and binutils [2] has finally added the needed support for gnu hash-style, which brings mips into same fold as other architectures Fix check for MIPS specific section for gnu hash information [1] https://sourceware.org/ml/libc-alpha/2019-06/msg00456.html [2] https://sourceware.org/ml/binutils/2019-07/msg00098.html (From OE-Core rev: 9ff90bf04a4c422feaea25180155e4954648f68c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Improve move into place op and touch fileRichard Purdie2020-01-131-1/+5
| | | | | | | | | | | | | | | | | Depending on the kernel and coreutils version, mv operations test for existence of files and can potentially race. It also leads to the file always changing which leads to potential problems if using and NFS share and there are other readers. Using ln instead means we don't overwrite the file if it already exists meaning other readers aren't disrupted and should work more reliably on NFS which is used for sstate on the autobuilder. Since we're not overwriting files, touch the file to show activity as would have been done it it were reused from sstate. (From OE-Core rev: d8e9a22a4e23616ad01627c1e472296b1e26f13c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Correct pkgdatadir path in toaster_package_dumpdata()Peter Kjellerstedt2020-01-111-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 692b2046 (package: Fix race between do_package and do_packagedata), the path used for do_packagedata[sstate-inputdirs] was changed from "${PKGDESTWORK}" to "${WORKDIR}/pkgdata-pdata-input". This commit adapts the path used for pkgdatadir in toaster_package_dumpdata() accordingly to avoid setscene errors like: ERROR: libgcc-9.2.0-r0 do_packagedata_setscene: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:toaster_package_dumpdata(d) 0003: File: 'meta/classes/toaster.bbclass', lineno: 130, function: toaster_package_dumpdata 0126: lpkgdata = {} 0127: datadir = os.path.join(pkgdatadir, 'runtime') 0128: 0129: # scan and send data for each generated package *** 0130: for datafile in os.listdir(datadir): 0131: if not datafile.endswith('.packaged'): 0132: lpkgdata = _toaster_load_pkgdatafile(datadir, 0133: # Fire an event containing the pkg data 0134: bb.event.fire(bb.event.MetadataEvent( Exception: FileNotFoundError: [Errno 2] No such file or directory: 'tmp/work/mips32r2el-nf-poky-linux/libgcc/9.2.0-r0/pkgdata/runtime' (From OE-Core rev: 5a0f6f631b86f7107aa72453b6d23f32ba39f713) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: No longer needed to clean away conf/sanity_infoPeter Kjellerstedt2020-01-101-1/+1
| | | | | | | | | | | | Since the sanity_info file has moved from the conf directory to the cache directory, there is no longer any need to clean it away explicitly in clean_esdk_builddir() since the whole cache directory is already cleaned away anyway. (From OE-Core rev: 40c30990e1be72130819c040fe471e2bdc0c6e7d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Move sanity_info from conf to cachePeter Kjellerstedt2020-01-101-1/+1
| | | | | | | | | | | | | | Since this file is written during recipe parsing, having it in the ${BUILDDIR}/conf directory, which is covered by an inotify watcher, will trigger a re-parse the next time bitbake is run and the resident bitbake server is enabled. This causes the sanity_info file to be updated again, which triggers a new parse the next time bitbake is run ad infinitum. Moving it to ${BUILDDIR}/cache should avoid this. (From OE-Core rev: f98103b548aa7dba6b1be6c8e02ef41858a8e85c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Add new mirror archiver modePaul Barker2020-01-101-19/+117
| | | | | | | | | | | | | | | | | | | | | | | | We define a new method of populating a source mirror using the archiver bbclass instead of simply copying the contents of the downloads directory. This allows the archiver features such as copyleft license filtering and recipe type filtering to be used when preparing a source mirror. This new archiver mode is selected by setting `ARCHIVE_MODE[src]` to 'mirror'. The source mirror mode can either be 'split' (default) or 'combined', controlled by `ARCHIVER_MODE[mirror]`. Additionally, sources can be excluded as needed by setting `ARCHIVER_MIRROR_EXCLUDE` to a list of URI prefixes. These options are described in more detail in the new entries in the header of archiver.bbclass. New oeqa selftest cases are added to cover the mirror archiver mode. (From OE-Core rev: 2c8b31ae0ab95a8b100e8bade23f51574e273c9a) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Preserve intermediate filesPaul Barker2020-01-101-3/+4
| | | | | | | | | | | | | | | | | | | | When debugging issues or trying to add new features in wic it's useful to examine the intermediate files created by the tool such as images of the individual partitions. Previously these files were created in a subdirectory of IMGDEPLOYDIR and, deleted by wic itself and then the working subdirectory completely removed at the end of IMAGE_CMD_wic. Instead we should work in a staging directory named build-wic and leave behind intermediate files for analysis if necessary. This has the added benefit of allowing individual partition images to be preserved by adding commands to IMAGE_CMD_wic_append() in an image recipe if needed. This is useful where an update system requires exact sized and pre-formatted partition images for deployment. (From OE-Core rev: 07b6b284204e912b5d08bdd0ca51b766ab7dd9c1) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging.bbclass: correctly exclude ptest directoriesAlexander Kanavin2020-01-101-1/+1
| | | | | | | | | They were not excluded when multilib variants were being built. (From OE-Core rev: 11d053764338465adbec2d0c31bad0387e36405d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Avoid races over rewritten siginfo filesRichard Purdie2020-01-061-3/+10
| | | | | | | | | | | | | | Try and avoid errors like: Exception: bb.process.ExecutionError: Execution of 'build/tmp/work/x86_64-linux/libxslt-native/1.1.34-r0/temp/run.sstate_unpack_package.12343' failed with exit code 1: touch: setting times of 'build/sstate_devtool/80/4d/sstate:libxslt-native::1.1.34:r0::3:804d33f3f8d032b01ae92207669dd0a8f95a84917d563d122a77df19e786d73c_populate_lic.tgz.siginfo': Stale file handle WARNING: exit code 1 from a shell command. by not overwriting existing files. (From OE-Core rev: b2a389ad5111d587db3f95c6ce13fc2eafc22f27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Handle sstate filenames longer than 255 charactersRichard Purdie2020-01-061-1/+18
| | | | | | | | | | | | Many filesystems can't cope with filenames longer that 255 characters. Add code to detect this and truncate non-essential elements of the filename to stay within the limit. [YOCTO #13268] (From OE-Core rev: 90cc3d1ed1a12294a2d3ac97c1ba528ab315605d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Merge file name generation into single functionRichard Purdie2020-01-061-10/+12
| | | | | | | | | Move the task handling and extension handling into one common filename construction function. (From OE-Core rev: c0c158d38583648a801e959d91371f7b43a98da5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Improve SSTATE_PKG handlingRichard Purdie2020-01-061-10/+11
| | | | | | | | | | | Move the task handling code into the SSTATE_PKGNAME variable using a temporary variable. This makes the code more understandable as as well as allowing the length of the final sstate filename to be more easily accesses for following patches. (From OE-Core rev: be603dad6817948cfa09621d2311046631ec4ab2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add extra directory levelRichard Purdie2020-01-061-2/+2
| | | | | | | | | | | | | | | | | | We're having speed issues on the autobuilder due to the numbers of files in sstate directories. We previously split these by the first two characters of the hash. This change extends this to split by the next two characters as well, creating more layers of directories. This should signifiantly speed up eSDK builds on the autobuilder as the current sstate layout simply isn't scaling there but addresses a general complaint. gen-lockedsig-cache needed to be updated for the new split level sstate. Also update tests for new layout. (From OE-Core rev: d05bde16bdad761ed8f4c0a48de60c649aa33e85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Fix confusing failure messageRichard Purdie2020-01-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stack trace is horrible and obscurs the real failure message, avoid that. The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:copy_buildsystem(d) 0003: File: 'build/meta/classes/populate_sdk_ext.bbclass', lineno: 446, function: copy_buildsystem 0442: sdk_ext_type = d.getVar('SDK_EXT_TYPE') 0443: if (sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative) and not sdk_include_nativesdk: 0444: # Create the filtered task list used to generate the sstate cache shipped with the SDK 0445: tasklistfn = d.getVar('WORKDIR') + '/tasklist.txt' *** 0446: create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath) 0447: else: 0448: tasklistfn = None 0449: 0450: if os.path.exists(builddir + '/cache/bb_unihashes.dat'): File: 'build/meta/classes/populate_sdk_ext.bbclass', lineno: 182, function: create_filtered_tasklist 0178: # Clean out residue of running bitbake, which check_sstate_task_list() 0179: # will effectively do 0180: clean_esdk_builddir(d, sdkbasepath) 0181: finally: *** 0182: os.replace(sdkbasepath + '/conf/local.conf.bak', sdkbasepath + '/conf/local.conf') 0183: 0184:python copy_buildsystem () { 0185: import re 0186: import shutil Exception: FileNotFoundError: [Errno 2] No such file or directory: 'tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/sdk-ext/image//opt/poky/3.0/conf/local.conf.bak' -> 'tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/sdk-ext/image//opt/poky/3.0/conf/local.conf' (From OE-Core rev: 5115d2616b0847d521ccbecf1fbbf1f695a04fea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image_types_wic: Depend on do_image_complete tasksJoshua Watt2020-01-011-0/+1
| | | | | | | | | | | | | | | | | do_image_wic now depends on the do_image_complete tasks from all it's dependencies. This allows images recipes specified in WKS_FILE_DEPENDS (for example, if a machine wants to put a initrd into a boot partition) to correctly trigger rebuilds for the wic image. Note that recrdeptask can't be used as was done for do_deploy because this would cause circular task dependency errors. This shouldn't be necessary anyway if the dependencies specified in WKS_FILE_DEPENDS are complete. (From OE-Core rev: 4b93115a0c6f8686e7a21b992751626844c301d5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Fix for consistent whitespaceMartin Jansa2019-12-301-6/+6
| | | | | | | (From OE-Core rev: e874d067ace03774132ba3030a898678057c1304) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo: Recognize 64bit PPC LEKhem Raj2019-12-301-2/+5
| | | | | | | (From OE-Core rev: e62cdb9b88b575b5cfcdd65ca558edc237c43b2a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: Define LIB_SUFFIXKhem Raj2019-12-301-0/+1
| | | | | | | | | | | | | This variable is used in lot of cmake based packages to denote libdir in multilib environments, now a days there is a better way to include GNUInstallDirs module but thats upto these packages to adopt. Defining this helps compiling a bunch of recipes in extended layers when using multilibbed builds. (From OE-Core rev: 24f630ce36e803c54ad6cff00215abd0e7b77b77) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>