classes/archive*.bbclass: remove archive-*-source.bbclass

Nearly all of the codes in the following 3 files are the same, we can
move the code to archiver.bbclass and remove them:

  archive-configured-source.bbclass
  archive-original-source.bbclass
  archive-patched-source.bbclass

[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
archiver.bbclass: refactor it

The archiver didn't work, and there were a few problems, for example:
1) There was no src_dir.org (or orig), but the diff command still use it
2) There were a few duplicated code
3) It didn't archive the source for the native or gcc
4) The work flow is not very well
5) The "subprocess.call('fakeroot cp xxxx'" should be removed
6) And others ...

So that we have to refactor it, the benefits are:
1) Fix the problems and make it work well.
2) Reduce more than 300 lines
3) Make it easy to use.

Hre are the explanation about the bbclass:
This bbclass is used for creating archive for:
1) original (or unpacked) source: ARCHIVER_MODE[src] = "original"
2) patched source: ARCHIVER_MODE[src] = "patched" (default)
3) configured source: ARCHIVER_MODE[src] = "configured"
4) The patches between do_unpack and do_patch:
   ARCHIVER_MODE[diff] = "1"
   And you can set the one that you'd like to exclude from the diff:
   ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
5) The environment data, similar to 'bitbake -e recipe':
   ARCHIVER_MODE[dumpdata] = "1"
6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1"

All of the above can be packed into a .src.rpm package: (when PACKAGES
!= "")
ARCHIVER_MODE[srpm] = "1"

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
package_rpm.bbclass: archive the source to srpm package

The archiver.bbclass will put the sources to ARCHIVER_OUTDIR according
to configuration, then the rpmbuild -bs will create the srpm.

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
archiver.bbclass: move a few code to copyleft_compliance.bbclass

Move the code which is only used by copyleft_compliance.bbclass from
archiver.bbclassc, and remove the "inherit archiver" from
copyleft_compliance.bbclass.

The archiver.bbclass is used for archiving various types of sources, but
the copyleft_compliance.bbclass is used for analysing the license, they
don't have much relationships.

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
local.conf.sample.extended: update for the archiver

Updated it since we have refactored the archiver.bbclass.

[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
classes/image: disable pam nullok_secure with debug-tweaks

If you want passwordless logins to work with pam enabled, then you can't
have "nullok_secure" enabled on pam_unix entries. Add some
postprocessing to change these to "nullok" when debug-tweaks is in
IMAGE_FEATURES, in order to make passwordless logins with PAM work
again.

Fixes [YOCTO #5973].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk-engines: removed gnome inheritance

Remove gconf class (via gnome) to fix WARN-QA message regarding
--disable-install-schemas option.  Add missing intltool-native build dependency
that previously came through gnome.bbclass.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/kernel: move module postinst commands to kernel-base

Since kernel-base is the package that contains the files that depmod
needs to run, we should be running depmod from the kernel-base
postinstall rather than kernel-image.

Fixes [YOCTO #5392].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/image: ignore modules.* changing during multilib image construction

Since we now run depmod when building images (as the postinst that does
this is now on kernel-base instead of kernel-image) it is possible to
have module file differences between the two halves of the multilib image,
and the code that checks for such differences detects this and fails.
Whitelist this file to avoid the failure.

Specifically, modules.alias, modules.dep and modules.symbol can differ
along with their .bin counterparts.

Related to fix for [YOCTO #5392].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
busybox: disable fsck.minix and mkfs.minix

The MINIX and MINIX 2 filesystems are not really used anymore.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
acl: fix the order of expected output of getfacl

The result of getfacl is sorted by user id.
In Centos or RHEL, bin user id is 1 and daemon user id is 2.
But in our image, bin user id is 2 and daemon user id is 1.
The patch fixes this issue to make ptest pass.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libsoup-2.4: fix compiling failed while mips-gcc optimization enabled

There was an error about mips-gcc optimization while compiling
libsoup-2.4 2.45.3 with DEBUG_OPTIMIZATION enabled.

The test code of libsoup-2.4 2.45.3 triggered gcc assert which located
in gcc/dwarf2out.c:20810:
...
20806       gcc_assert (prev
20807                   && (CALL_P (prev)
20808                       || (NONJUMP_INSN_P (prev)
20809                           && GET_CODE (PATTERN (prev)) == SEQUENCE
20810                           && CALL_P (XVECEXP (PATTERN (prev), 0, 0)))));
...

The issue test code is the C function 'do_qvalue_tests' located in
tests/header-parsing.c.

The 2.45.92 have refactored the test code and this issue has been fixed.
So backport the fix to 2.45.3.

[YOCTO #5512]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
connman: upgrade to 1.22

Highlights:
- If VPN is split routed and not the default service, then allow
  DNS queries also to be sent to VPN DNS server.
- Session API fixes
- Memory leak fixes
- Crash fixes
- NTP kiss-of-death packet support
- Support for full USB gadget networking. Now USB gadget network can
  be used without tethering.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
util-linux: build setpriv requires libcap-ng

There might a failure when build util-linux with the meta-selinux layer:

[snip]
sys-utils/setpriv.c:21:20: fatal error: cap-ng.h: No such file or directory
 #include <cap-ng.h>
                    ^
compilation terminated.
[snip]

Use PACKAGECONFIG to fix the problem.

[YOCTO #6026]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk-engines: don't inherit gtk-icon-cache

This was accidently left in and can be removed.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk-engines: move engine schemas to a dedicated package

The GTK+ engine schemas are not insignicant in size but also mostly useless.
Put them in a sub-package instead of PN so they only get installed when
explicitly required.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
archiver.bbclass: make it can filter the license

* Filter the license (default: no), the recipe whose license in
  COPYLEFT_LICENSE_INCLUDE will be included, and in
  COPYLEFT_LICENSE_EXCLUDE will be excluded.

* The user can set the recipe type that would be archived (native,
  target, and so on), deafult to all.

The copyleft_filter.bbclass is come from copyleft_compliance.bbclass,
which is used by both copyleft_compliance.bbclass and archiver.bbclass.

[YOCTO #5740]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
archiver.bbclass: emit patch series files for original src

Emit patch series files for original src so that the user knows how to
apply the patch orderly.

[YOCTO #5113]

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
staging: Save out provider information into the sysroot

This patch saves out provider information into the sysroot for all providers
except those in MULTI_PROVIDER_WHITELIST. This means that we will start seeing
warnings when two providers for the same thing are installed into the sysroot.

In the future those warnings can be turned into errors.

Partially addresses [YOCTO #4102]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
buildstats: use TaskBase time for elapsed time

To avoid any further inconsistencies between buildstats and buildinfohelper
from toaster, buildstats will measure task duration using the time field
from within the TaskBase events: TaskStarted and TaskSucceeded/TaskFailed.

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>