rootfs_ipk.bbclass: add missing --force_postinstall option

The force_postinstall option was missing and some packages were
configured on target rather than on host at rootfs time.

(From OE-Core rev: dfadfaa0b38678029ffebe14f15e2dbc148cb1fb)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
image.bbclass: run postinst scripts once, at rootfs time

This patch will allow the repeating postinst scriptlets to be run
only once, on host, at do_rootfs time. This will lower the time for
rootfs generation and, also, instead of running some time consuming
scriptlets at target's first boot, we will do on the host.

(From OE-Core rev: 0d239328b1c6b9e4afadad75972d359181fbe1a5)

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>
rootfs generation: export two new variables to postinst scriptlets

In order for the postinst scriptlets to be able to run once we need to
export the location of the intercept scripts and also the location of
native sysrootfs. The gdk-pixbuf binaries will need the latter because
in order to generate the loaders.cache it will need to scan some shared
libraries that must be native. Even though the output is a text file.

(From OE-Core rev: 927fabf549bb79cc179d2cb0a953dcd515acf464)

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>
gtk-icon-cache: run the icon generation at rootfs time

This change will allow for the icon cache generation at rootfs time and
only once, at the end. So, even though there will be many packages
depending on gtk+, the icon cache generation will be done once.
Hopefully, this will lower the target's first boot time significantly
by using the power of the host machine to generate the cache.

(From OE-Core rev: 74e34f6828771095a25d2c2de89f468b33e359f7)

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>
gdk-pixbuf: generate the pixbuf loader's cache ar rootfs time

This will generate the loaders.cache file for pixbuf, at rootfs time.

(From OE-Core rev: 5ba420bc0e282a1cbf000ce32034ad7ab15c01d5)

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>
gconf.bbclass: run postinstalls at rootfs time

(From OE-Core rev: 50b7f625cc2c4b9224726b11b6d4bd192209cc6e)

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>
gdk-pixbuf: handle postinstall errors differently

Apparently gdk-pixbuf-query-loaders always returns 0 but writes any
errors to stderr. So, the conditional exit at the end of the command was
useless. Write the errors to a file and exit only if the file size is
greater than 0.

(From OE-Core rev: 901fbfac48918db7bf809ded3df533504141c5ca)

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>
avahi: use useradd.bbclass to add avahi-autoipd user

This is needed for the postinstalls to be run at do_rootfs time.

[YOCTO #3605]

(From OE-Core rev: 878cb7b76b19b03c51aa368b0bc037647c844a21)

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>
distcc: use useradd.bbclass to add the distcc user

This is needed for the postinstalls to run at do_rootfs time.

[YOCTO #3601]

(From OE-Core rev: c42ca31e34ffa3eed17407245a51322f2700e630)

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>
gconf: add gconftool-2 native wrapper

This is needed when sstate cache is fetched from another build server.
In this case, the postinstall will fail because the backend libraries
path will be from the build server.

(From OE-Core rev: bba414bc9d14eb2d29b54c68259d13ddbe6567fa)

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>
gtk+-native: add gtk-update-icon-cache wrapper

This is needed in order to point where the pixbuf loaders.cache is
located and avoid warnings like the one below that appear when the
sstate is fetched from a remote machine:

(gtk-update-icon-cache:8913): GdkPixbuf-WARNING **: Cannot open pixbuf
loader module file '/REMOTE/MACHINE/PATH/loaders.cache': No such file or directory

(From OE-Core rev: 6665a41c6506039e6ba6cfdbaa941369e42d682f)

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>
matchbox-session-sato: use a proper schema file

Also, inheriting gconf.bbclass will allow for the schema registration to
be done at do_rootfs time.

[YOCTO #3603]

(From OE-Core rev: a19592b684d482a7c011495f1c761f38c316319a)

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>
pango: have postinstalls run at do_rootfs time

Since pango-native is built anyway and all the modules are in the native
sysroot, create the cache file by scanning those files instead of the
target files. The latter will fail because the shared objects wouldn't
be from the same ELF class.

[YOCTO #3600]

(From OE-Core rev: 75334cbee1f064b38f167269917e333989802e7d)

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>
gtk-immodules-cache: Add initial class to update gtk inputmethod module cache

This is used by:
openembedded-core/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
meta-openembedded/meta-oe/recipes-support/maliit/maliit-framework_git.bb

(From OE-Core rev: c67f64e5846bb2a6774e61a4f3719c5f82fc3bd8)

Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemu.bbclass: add qemu_run_binary() function

[YOCTO #3602]

(From OE-Core rev: 2cfbe0bd9d02ab8c054e5bc879a2181c6a7e3719)

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>
gtk-immodules-cache.bbclass: allow for offline cache generation

In order to support a RO rootfs, the cache generation during postinstall
has to be done on host. However, gtk-query-immodules application will
only be able to parse shared objects from the same ELF class.
In order not to have a native package for all the recipes providing
an input method, so we can generate the cache file natively, run
gtk-query-immodules through qemu emulator.

[YOCTO #3602]

(From OE-Core rev: 78281edfe2342dccd7f598277464a3dd05ac4c0e)

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>
matchbox-keyboard: use the gtk-immodules-cache.bbclass

Since the class was already present, use it. Also, this will have the
postinstalls run on host, at do_rootfs time.

[YOCTO #3602]

(From OE-Core rev: 2e6c202c000cfd0edbc024468c9f6c4b8b7eb816)

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>
gtk-immodules-cache.bbclass:fix support postrm at image creation time

Let postrm use the same logic as the postinst to run on both build machine
and target

[YOCTO #3633]

(From OE-Core rev: dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_ipk, rootfs_ipk: remove the "set -x"

Comment the "set -x" lines since these will add a lot of extra, not
always necessary, debug messages in the log.do_rootfs.

[YOCTO #2599]

(From OE-Core rev: 5d8119f3d749073e355351e0e15f2703fad738f2)

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>