summaryrefslogtreecommitdiffstats
path: root/meta/classes/pixbufcache.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. (From OE-Core rev: d10fd6ae3fe46290c6e3a5250878966d9f12ca3f) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache.bbclass: update postinst script nameMaxin B. John2017-04-191-1/+1
| | | | | | | | | | | | | The name of postinst scripts created by pixbufcache class contains "useradd" in it. Remove it to avoid confusion. As suggested by RP. (From OE-Core rev: 2b939cd143549a3a6fc640c7c512c4ac5c246bff) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Switch to Recipe Specific SysrootsRichard Purdie2017-01-231-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is comparatively large and invasive. It does only do one thing, switching the system to build using recipe specific sysroots and where changes could be isolated from it, that has been done. With the current single sysroot approach, its possible for software to find things which aren't in their dependencies. This leads to a determinism problem and is a growing issue in several of the market segments where OE makes sense. The way to solve this problem for OE is to have seperate sysroots for each recipe and these will only contain the dependencies for that recipe. Its worth noting that this is not task specific sysroots and that OE's dependencies do vary enormously by task. This did result in some implementation challenges. There is nothing stopping the implementation of task specific sysroots at some later point based on this work but that as deemed a bridge too far right now. Implementation details: * Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in TMPDIR/sysroot-components/PACKAGE_ARCH/PN. * WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE. * This construction is primarily done by a new do_prepare_recipe_sysroot task which runs before do_configure and consists of a call to the extend_recipe_sysroot function. * Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot dependencies. * We have to do a search/replace 'fixme' operation on the files installed into the sysroot to change hardcoded paths into the correct ones. We create a fixmepath file in the component directory which lists the files which need this operation. * Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each time a new loader is added. These are handled by adding files in bindir with the name prefixed by "postinst-" and are run in each sysroot as its created if they're present. This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them. * Since a recipe can have multiple tasks and these tasks can run against each other at the same time we have to have a lock when we perform write operations against the sysroot. We also have to maintain manifests of what we install against a task checksum of the dependency. If the checksum changes, we remove its files and then add the new ones. * The autotools logic for filtering the view of m4 files is no longer needed (and was the model for the way extend_recipe_sysroot works). * For autotools, we used to build a combined m4 macros directory which had both the native and target m4 files. We can no longer do this so we use the target sysroot as the default and add the native sysroot as an extra backup include path. If we don't do this, we'd have to build target pkg-config before we could built anything using pkg-config for example (ditto gettext). Such dependencies would be painful so we haven't required that. * PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy for each machine. The paths therefore changed, the behaviour did not. * The ccache class had to be reworked to function with rss. * The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal recipe name therefore remains a bad idea. * The logic in insane needed tweaks to deal with the new path layout, as did the debug source file extraction code in package.bbclass. * The logic in sstate.bbclass had to be rewritten since it previously only performed search and replace on extracted sstate and we now need this to happen even if the compiled path was "correct". This in theory could cause a mild performance issue but since the sysroot data was the main data that needed this and we'd have to do it there regardless with rss, I've opted just to change the way the class for everything. The built output used to build the sstate output is now retained and installed rather than deleted. * The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold up against testing. This has been rewritten too. There are some assumptions made about paths, we save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is here works but is a little hardcoded and an area for future improvement. * In order to work with eSDK we need a way to build something that looks like the old style sysroot. "bitbake build-sysroots" will construct such a sysroot based on everything in the components directory that matches the current MACHINE. It will allow transition of external tools and can built target or native variants or both. It also supports a clean task. I'd suggest not relying on this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have to have built that in a previous bitbake invocation. * pseudo is run out of its components directory. This is fine as its statically linked. * The hacks for wayland to see allarch dependencies in the multilib case are no longer needed and can be dropped. * wic needed more extensive changes to work with rss and the fixes are in a separate commit series * Various oe-selftest tweaks were needed since tests did assume the location to binaries and the combined sysroot in several cases. * Most missing dependencies this work found have been sent out as separate patches as they were found but a few tweaks are still included here. * A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my hand. That implementation can probably be neater but this is on the list of things to cleanup later at this point. In summary, the impact people will likely see after this change: * Recipes may fail with missing dependencies, particularly native tools like gettext-native, glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors * Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst * There was a separate patch series dealing with roots postinst native dependency issues. Any postinst which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS. There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean we've found all the issues. Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the task logfiles, not the console so I've intentionally left this like that for now. We can turn it down easily enough in due course. (From OE-Core rev: 809746f56df4b91af014bf6a3f28997d6698ac78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: Add PACKAGE_WRITE_DEPS for postinstRichard Purdie2017-01-201-0/+2
| | | | | | | | The postinstall needs qemu-native and gdk-pixbuf-native, mark these dependencies (From OE-Core rev: 334a12bb25770dfcd999a7def3612db4b6cd762a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-5/+5
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: handle gdk-pixbuf not being presentRoss Burton2016-10-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | It's possible - albeit unlikely - that gdk-pixbuf isn't present in the sysroot when a recipe inheriting this class is and the sysroot is finalised. One example would be if the sstate archive has librsvg but not gdk-pixbuf: librsvg will be extracted from the sstate but gdk-pixbuf will be built to "fill in the gap". In this situation the setscene completion hook installed by pixbufcache.bbclass will attempt to execute gdk-pixbuf-query-loaders, but that binary hasn't been installed by gdk-pixbuf yet. Also add gdk-pixbuf-native to DEPENDS in native builds to ensure that the binaries we expect will be present, as it's possible to build loaders without linking to GdkPixbuf. [ YOCTO #10420 ] (From OE-Core rev: 03cdb3366ded46cd760656e4cda0be37c1f82109) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache/pixbufcache: don't set GDK_PIXBUF_MODULEDIRRoss Burton2015-09-281-1/+1
| | | | | | | | | | In normal use gdk-pixbuf knows where to find its own loaders and explicitly stating this will cause work in the future if the ABI version changes. (From OE-Core rev: 87eea290a799be0e852d8b3c357879680abedb77) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gdk-pixbuf: move gdk-pixbuf-query-loaders to $libdir for multilib safetyRoss Burton2015-09-281-2/+2
| | | | | | | | | | | | | | | If for example gdk-pixbuf and lib32-gdk-pixbuf are in an image then only one ${bindir}/gdk-pixbuf-query-loaders will be installed, so only one variant will actually be usable. Solve this by moving gdk-pixbuf-query-loaders into ${libdir} as it's intimately tied to the library and rarely directly invoked by the user, and update the callers to use the right path. (From OE-Core rev: 69df75f268e2b3d5874f05e2b5a6125f6d990a03) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: Use sceneQueueComplete event to simplify usageRichard Purdie2015-07-311-19/+9
| | | | | | | | | | | | | | | | Ensuring the native pixbuf cache is correct after new loaders have been installed is tricky. This needs to be done without races and work regardless of whether the build is from sstate or freshly built for one or more modules. This adds a hook into base.bbclass which is then triggered by the code from pixbufcache. This patch is an improved version which means base.bbclass has no pixbuf knowledge and the mechanism can be reused in other cases. (From OE-Core rev: b411085fefc8582d24c172db5f6610705eb44c2f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache.bbclass: add harfbuzz-native to PIXBUFCACHE_SYSROOT_DEPRobert Yang2015-03-161-1/+6
| | | | | | | | | | | | Fixed: DEBUG: Executing shell function pixbufcache_sstate_postinst g_module_open() failed for sysroots/x86_64-linux/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: libharfbuzz.so.0: cannot open shared object file: No such file or directory (From OE-Core rev: 892c8d80e7cf36b3a45dca248969d49ce78c0cbf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: add error exit in pixbufcache_sstate_postinstJoe Slater2014-04-241-2/+4
| | | | | | | | | | | In order to attempt recovery of a failed populate_sysroot_setscene, we need to explicitly error exit an SSTATEPOSTINSTFUNC. So, we test the return value of gdk-pixbuf-query-loaders. (From OE-Core rev: 17bdb2538e6b723e11afb1079c71363603dba63d) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gdk-pixbuf: pass GDK_PIXBUF_FATAL_LOADER where relevantRoss Burton2014-04-011-1/+1
| | | | | | | | | | Pass GDK_PIXBUF_FATAL_LOADER to the sstate postinst and intercept so that any problems are flagged as errors instead of being silently ignored. (From OE-Core rev: 0a97b1571821848af11d8651c7145ed9592f9e31) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: Fix librsvg-native buildRichard Purdie2014-03-181-0/+1
| | | | | | | | | | | | | | | bitbake librsvg-native would fail with an error about missing icu-native. The reason is that bitbake doesn't directly parse setscene dependencies. This change ensures bitbake does see the dependencies and avoids the error. Ideally we'd teach bitbake about those but that is a significant and complex change so this resolves the problem for now. [YOCTO #5926] (From OE-Core rev: 33fa7c8f28d343ecec354a551d45f23643becd59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache.bbclass: gdk-pixbuf-query-loaders depends on libzKonrad Scherer2013-10-301-1/+1
| | | | | | | | | | | | | | ldd sysroots/x86_64-linux/usr/bin/gdk-pixbuf-query-loaders.real <snip> libz.so.1 => /sysroots/x86_64-linux/usr/bin/../../usr/lib/libz.so.1 (0x00007fab55393000) If zlib-native has not been unpacked, host libz is used which can fail. (From OE-Core rev: 8422c759ae674856aaaee176eab5a395a620443c) Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: add more documentationRoss Burton2013-05-301-0/+3
| | | | | | | | | | | Add some more documentation to the PIXBUFCACHE_SYSROOT_DEPS variable to clarify the usage. (From OE-Core rev: b2f2d6a2b166b3c79cc5a0d386ee1dda2d4fa010) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: update the loader cache when installing nativelyRoss Burton2013-05-241-0/+20
| | | | | | | | | | | Register a sstate postinst function so that when installing a native package, the gdk-pixbuf loader cache is updated. (From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Pass the mlprefix to postinst_intercept scriptLaurentiu Palcu2013-04-291-1/+1
| | | | | | | | | | This is needed in order to have separate multilib intercept hooks. (From OE-Core rev: 44eae13c164ca6e15a6013eafeab3eb44f24c8e0) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache.bbclass: do not exit 1 after installing intercept hookLaurentiu Palcu2013-04-221-17/+12
| | | | | | | | | This will allow to register, in a single postinstall, multiple hooks. (From OE-Core rev: b396138ee081c8f5dddbaab0e374787ba2e31029) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* postinst-intercepts, qemu.bbclass: fix segfaults in postinstallsLaurentiu Palcu2013-04-101-1/+2
| | | | | | | | | | | | | | | | Postinstalls that use qemu are throwing a segmentation fault when building for qemux86-64 on a 64bit host (it might also happen for qemux86 if building on a 32bit host but I didn't test). It looks like qemu looks for ld.so.cache which is not found because it is generated after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load libraries from the default paths (which are the host's). In order to avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic loader. (From OE-Core rev: 48e8b613b3f5c7b1d917bf3147606d44072ce49e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add pixbufcache classLaurentiu Palcu2013-02-131-0/+50
All packages exporting pixbuf loaders should inherit this class in order to generate the correct postinst/postrm scriptlets. [YOCTO #3852] (From OE-Core rev: 61afa98f96f5c62473cb2db383b48d3d23c5d7ac) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>