Commit Graph

27 Commits

Author SHA1 Message Date
Peter Kjellerstedt 254bfb1071 recipes: Make use of the new bb.utils.filter() function
(From OE-Core rev: 0a1427bf9aeeda6bee2cc0af8da4ea5fd90aef6f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:45 +00:00
Richard Purdie 9107d6ca14 Switch to Recipe Specific Sysroots
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>
2017-01-23 12:05:17 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
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>
2016-12-16 10:23:23 +00:00
Jussi Kukkonen ac70747516 gtk+3: Upgrade 3.20.9 -> 3.22.1
Six-monthly feature release.

* Rebase the --disable-opengl patch.
* Remove a backported patch.
* Inherit gettext as that seems to have been missing.

(From OE-Core rev: d1dce7adbc649925bc9285798bf464b1e6f3d84d)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-01 10:05:46 +00:00
Alexander Kanavin 8bf4f5fb46 gtk+3: remove SGML stack dependency
Gtk3 hasn't had it for a long time.

(From OE-Core rev: 9a0283b69ebf183c1d10837afc0dc99607c5afd0)

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>
2016-10-28 16:15:19 +01:00
Alexander Kanavin ae773d6374 gtk+3: disable gtk-doc when x11 is not available
gtk-doc requires gdk/x11/gdkx.h which is not available if gdk x11 backend is disabled
(due to jku's patch).

(From OE-Core rev: d1e9927ba145036cb56d7512026df1a8c21a85dd)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09 12:12:22 +01:00
Jussi Kukkonen 33226ae5b3 gtk+3: Upgrade 3.18.8 -> 3.20.6
* Remove a patch that's no longer needed (as we don't
  have a problem with client side decorations anymore)
* Wayland build now depends on wayland-protocols:
  Use same WAYLAND_PROTOCOLS_SYSROOT_DIR trick as weston so
  protocols are found and multilib build does not break
* Add new binary gtk-query-settings to -dev package
* Rebase patches
* Modify 0003-Add-disable-opengl-configure-option.patch so
  that gdkx.h really is generated whenever it changes

* Depend on wayland-protocols in gtk+3-dev if Wayland is enabled as otherwise
  the pkg-config files can't be used - RB

(From OE-Core rev: b610145b1aadb093ced72a7958d8df00ef1250b6)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>

gtk+3: depend on wayland-protocols if wayland enabled
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:41 +01:00
Jussi Kukkonen 4799e1e89f gtk+3: Add patch for --disable-opengl
Patch is a bit nasty and not maintainer friendly, but it does
make Gtk+3 compile without libepoxy (which means without OpenGL
dev files).

(From OE-Core rev: 82bedec89a86902456e924a3ac2f233b6a069dea)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-17 11:17:21 +01:00
Jussi Kukkonen e501d6f4fd gtk+3: Add RRECOMMENDS to match gtk+
Rrecommend a similar set of packages as the gtk+ recipe.

Most importantly this actually makes icons render even when other
packages do not drag in the relevant gdkpixbuf loaders.

(From OE-Core rev: 0c686118fa74745571ff4ce6786fd415d39dbeb9)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:18 +01:00
Alexander Kanavin 0ec412b09d gtk+3: enable gobject-introspection
(From OE-Core rev: ee5a0066a9ff48b123aa1d8204847b78e5a1538e)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:44 +00:00
Richard Purdie b158d6c27f gtk3+: Add missing DEPENDS on wayland-native
configure needs wayland-scanner which comes from wayland-native, add missing
DEPENDS.

(From OE-Core rev: 44d780271a14e54d729335700bb53248b898217a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 11:55:37 +00:00
Richard Purdie f9266106db gtk+3: Tweak getVar to use True, not 1
Cosmetic change to use "True", not 1 as expand parameter for getVar.

(From OE-Core rev: 4c9d063c72cc021ee22472783f74d73078671813)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:00 +00:00
Richard Purdie 6ab50017e1 busybox/gtk/perl/base-passwd: Ensure data is correctly expanded
Where variables are used in python, we need to ensure they are expanded.
This happens to work at the moment but likely will not happen in future
and isn't good code practise.

Its mostly an issue around key values, since bitbake has already
performed key expansion when these functions are executed.

(From OE-Core rev: 6d1142b56948c048111c4f78d9909c1846ab225b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:00 +00:00
Richard Purdie e0890b662e meta: Drop now pointless manual -dbg packaging
With the autodebug package generation logic, specifically setting FILES_${PN}-dbg
isn't needed in most cases, we can remove them.

(From OE-Core rev: 3ab59d49dd7c18e194b58d1248b4b87709b5a738)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16 11:56:30 +00:00
Alexander Kanavin 642e92f2cd package_regex.inc: split entries with odd-even versioning into their own recipes
(From OE-Core rev: 5ddaba1fb833d0408cef5f58f786513b9293c30a)

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>
2015-12-08 10:20:51 +00:00
Jussi Kukkonen 060b482409 gtk+3: Upgrade 3.16.6 -> 3.18.2
* Package new development tool gtk-builder-tool.
* Disable colord support (for explicitness, no functional change)

(From OE-Core rev: 59498a8b4fa69a359e72225d14c554aae133571a)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-25 08:08:13 +00:00
Robert Yang 0ff3fc751f gtk+3: fix ALTERNATIVE_PRIORITY conflict with gtk+
(From OE-Core rev: 44b8ad12042eb4a1161c6f8359479f3dfa31eab9)

Signed-off-by: Ross Burton <ross.burton@intel.com>

Conflicts:
gtk+3 and gtk+ have the same priority 10 for gtk-update-icon-cache

Turn up gtk+3's priority to fix the conflict.

[YOCTO #8477]

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>
2015-11-16 11:39:28 +00:00
Jussi Kukkonen 48443ccd93 gtk+3: Do not try to initialize GL without libgl
Gdk initialization ends up calling epoxy GLX api, which calls exit()
if libGL.so.1 is not present. In practice this prevents all GTK+
applications from starting if GLX is not present.

If opengl and x11 distro features are set, make gtk+3 RDEPEND on libgl.
If opengl and x11 distro features are not set, use #ifdef to prevent
the GL initialization.

Remove libgl dependency from gtk3-demo: it can now run without
libgl (although trying to run the glarea demo will exit in that case).

[YOCTO #8529]

(From OE-Core rev: f9540f50ea661e260ec2b82436238cfb989e23c5)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:26 +00:00
Jussi Kukkonen 67d65008e8 gtk+3: gtk3-demo needs libgl
The demo app uses OpenGL (within a GtkGLArea): it needs a runtime
dependency on a GL library. Current GTK+ can only handle
full GL (libGL.so.1) so RDEPEND on libgl.

(From OE-Core rev: 3d95440b77bfe90d20c8b7a96e611b6cf2ffcb70)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-12 14:36:30 +01:00
Richard Purdie 5bfcd13c07 classes/meta: Add DISTRO_FEATURES check for gtk+/gtk3+
If you currently do a DISTRO_FEATURES_remove = "x11" with OE-Core, you
see failures due to dependency problems. The work in resolving this was
partially completed a while back. This adds in the markup mainly for
gtk/gtk3+ recipes and means "bitbake world" will work successfully.

Rather than code the gtk/gtk+ specific distro features into each recipe,
a shared variable is used.

(From OE-Core rev: ef967c70182eeccb59c7511d838a7ecb0b2315c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01 07:43:32 +01:00
Jussi Kukkonen 88ea874880 gtk+3: Upgrade to 3.16.4
* Drop --disable-gtk2-dependency and the patch for
  gtk/native/Makefile.am: gtk-update-icon-cache is no longer used at
  build time and as a result the option was removed.
* Add dependency to libepoxy
* Add dependency to virtual/mesa for wayland-egl
* Package new binaries gtk3-icon-browser and gtk-encode-symbolic-svg
* Add a backported patch that allows server side window decorations
  in all cases
* RRECOMMEND adwaita-icon-theme-symbolic: GTK+ widgets expect a
  symbolic theme to be installed

(From OE-Core rev: 8d34b4db648756d3474c809d2895b15299fc8a6a)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:17 +01:00
Richard Purdie 0eeba11754 gtk+3: Add missing MLPREFIX
Without this each tries to provide libgtk-3.0 which directly conflict when
using multilibs.

(From OE-Core rev: afc4412f9ff14dd45aba6a47bfc87e703f3c4763)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-02 00:42:43 +01:00
Marko Lindqvist 28500e5209 gtk+3: update to 3.12.2
fix-build-when-wayland-backend-enabled.patch removed as the issue
is fixed in upstream.

(From OE-Core rev: 59fe6f91b39c4aa67e7e1734c3731d49c7ea8376)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:23 +01:00
Otavio Salvador 4c14b09498 Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

(From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:19:19 +01:00
Christopher Larson 7034d50765 gtk+3: only set GTKIMMODULES_PACKAGES if we have immodules
(From OE-Core rev: 9191c8b08ea25641d228acc83f2d4ad6a14333fe)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:47 +01:00
Ross Burton 1f0a4d7bac gtk+3: clean up libtool link creation to avoid errors in configure log
(From OE-Core rev: 22c469fea28a9e1eb05374b362743545bdf28ec2)

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>
2013-06-17 16:45:34 +01:00
Ross Burton 7eab456a68 gtk+3: split into .bb/.inc
I plan on introducing a git master version for automatically testing upstream
development, so this split makes things a lot easier.

(From OE-Core rev: f245b1f37fc326c85d19a8a48784c44d15b08ea7)

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>
2013-06-17 16:45:34 +01:00