reset upstream subtrees to yocto 2.6

Reset the following subtrees on thud HEAD:

  poky: 87e3a9739d
  meta-openembedded: 6094ae18c8
  meta-security: 31dc4e7532
  meta-raspberrypi: a48743dc36
  meta-xilinx: c42016e2e6

Also re-apply backports that didn't make it into thud:
  poky:
    17726d0 systemd-systemctl-native: handle Install wildcards

  meta-openembedded:
    4321a5d libtinyxml2: update to 7.0.1
    042f0a3 libcereal: Add native and nativesdk classes
    e23284f libcereal: Allow empty package
    030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
    179a1b9 gtest: update to 1.8.1

Squashed OpenBMC subtree compatibility updates:
  meta-aspeed:
    Brad Bishop (1):
          aspeed: add yocto 2.6 compatibility

  meta-ibm:
    Brad Bishop (1):
          ibm: prepare for yocto 2.6

  meta-ingrasys:
    Brad Bishop (1):
          ingrasys: set layer compatibility to yocto 2.6

  meta-openpower:
    Brad Bishop (1):
          openpower: set layer compatibility to yocto 2.6

  meta-phosphor:
    Brad Bishop (3):
          phosphor: set layer compatibility to thud
          phosphor: libgpg-error: drop patches
          phosphor: react to fitimage artifact rename

    Ed Tanous (4):
          Dropbear: upgrade options for latest upgrade
          yocto2.6: update openssl options
          busybox: remove upstream watchdog patch
          systemd: Rebase CONFIG_CGROUP_BPF patch

Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/poky/meta/lib/oeqa/selftest/cases/package.py b/poky/meta/lib/oeqa/selftest/cases/package.py
index 169698f..0a88dc2 100644
--- a/poky/meta/lib/oeqa/selftest/cases/package.py
+++ b/poky/meta/lib/oeqa/selftest/cases/package.py
@@ -1,6 +1,7 @@
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.core.decorator.oeid import OETestID
-from oeqa.utils.commands import bitbake, get_bb_vars
+from oeqa.utils.commands import bitbake, get_bb_vars, get_bb_var, runqemu
+import stat
 import subprocess, os
 import oe.path
 
@@ -29,7 +30,7 @@
         cls.bindir = oe.path.join(cls.staging, vars["bindir_native"])
         cls.libdir = oe.path.join(cls.staging, vars["libdir_native"])
 
-    def setUp(self):
+    def setUpLocal(self):
         # Just for convenience
         self.staging = type(self).staging
         self.bindir = type(self).bindir
@@ -84,3 +85,65 @@
             status = subprocess.call(command, env=env)
             self.assertIn(status, (99, 100, 101))
             self.assertEqual(status - 100, sort, "%s %s (%d) failed" % (ver1, ver2, sort))
+
+class PackageTests(OESelftestTestCase):
+    # Verify that a recipe which sets up hardlink files has those preserved into split packages
+    # Also test file sparseness is preserved
+    def test_preserve_sparse_hardlinks(self):
+        bitbake("selftest-hardlink -c package")
+
+        dest = get_bb_var('PKGDEST', 'selftest-hardlink')
+        bindir = get_bb_var('bindir', 'selftest-hardlink')
+
+        def checkfiles():
+            # Recipe creates 4 hardlinked files, there is a copy in package/ and a copy in packages-split/
+            # so expect 8 in total.
+            self.assertEqual(os.stat(dest + "/selftest-hardlink" + bindir + "/hello1").st_nlink, 8)
+
+            # Test a sparse file remains sparse
+            sparsestat = os.stat(dest + "/selftest-hardlink" + bindir + "/sparsetest")
+            self.assertEqual(sparsestat.st_blocks, 0)
+            self.assertEqual(sparsestat.st_size, 1048576)
+
+        checkfiles()
+
+        # Clean and reinstall so its now definitely from sstate, then retest.
+        bitbake("selftest-hardlink -c clean")
+        bitbake("selftest-hardlink -c package")
+
+        checkfiles()
+
+    # Verify gdb to read symbols from separated debug hardlink file correctly
+    def test_gdb_hardlink_debug(self):
+        features = 'IMAGE_INSTALL_append = " selftest-hardlink"\n'
+        features += 'IMAGE_INSTALL_append = " selftest-hardlink-dbg"\n'
+        features += 'IMAGE_INSTALL_append = " selftest-hardlink-gdb"\n'
+        self.write_config(features)
+        bitbake("core-image-minimal")
+
+        def gdbtest(qemu, binary):
+            """
+            Check that gdb ``binary`` to read symbols from separated debug file
+            """
+            self.logger.info("gdbtest %s" % binary)
+            status, output = qemu.run_serial('/usr/bin/gdb.sh %s' % binary, timeout=60)
+            for l in output.split('\n'):
+                # Check debugging symbols exists
+                if '(no debugging symbols found)' in l:
+                    self.logger.error("No debugging symbols found. GDB result:\n%s" % output)
+                    return False
+
+                # Check debugging symbols works correctly
+                elif "Breakpoint 1, main () at hello.c:4" in l:
+                    return True
+
+            self.logger.error("GDB result:\n%s: %s" % output)
+            return False
+
+        with runqemu('core-image-minimal') as qemu:
+            for binary in ['/usr/bin/hello1',
+                           '/usr/bin/hello2',
+                           '/usr/libexec/hello3',
+                           '/usr/libexec/hello4']:
+                if not gdbtest(qemu, binary):
+                    self.fail('GDB %s failed' % binary)