diff options
| -rw-r--r-- | meta/classes-global/package.bbclass | 2 | ||||
| -rw-r--r-- | meta/lib/oe/package.py | 2 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/systemd.py | 21 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/minidebuginfo.py | 2 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd_254.4.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils_0.189.bb | 4 | ||||
| -rw-r--r-- | meta/recipes-devtools/gdb/gdb-common.inc | 4 |
7 files changed, 31 insertions, 5 deletions
diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass index 2ad820a81f..f56bca3542 100644 --- a/meta/classes-global/package.bbclass +++ b/meta/classes-global/package.bbclass | |||
| @@ -234,7 +234,7 @@ python () { | |||
| 234 | deps = "" | 234 | deps = "" |
| 235 | for dep in (d.getVar('PACKAGE_DEPENDS') or "").split(): | 235 | for dep in (d.getVar('PACKAGE_DEPENDS') or "").split(): |
| 236 | deps += " %s:do_populate_sysroot" % dep | 236 | deps += " %s:do_populate_sysroot" % dep |
| 237 | if d.getVar('PACKAGE_MINIDEBUGINFO') == '1': | 237 | if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True, False, d): |
| 238 | deps += ' xz-native:do_populate_sysroot' | 238 | deps += ' xz-native:do_populate_sysroot' |
| 239 | d.appendVarFlag('do_package', 'depends', deps) | 239 | d.appendVarFlag('do_package', 'depends', deps) |
| 240 | 240 | ||
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index f69bf9c353..9a465eaa09 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
| @@ -1239,7 +1239,7 @@ def process_split_and_strip_files(d): | |||
| 1239 | oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d) | 1239 | oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d) |
| 1240 | 1240 | ||
| 1241 | # Build "minidebuginfo" and reinject it back into the stripped binaries | 1241 | # Build "minidebuginfo" and reinject it back into the stripped binaries |
| 1242 | if d.getVar('PACKAGE_MINIDEBUGINFO') == '1': | 1242 | if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True, False, d): |
| 1243 | oe.utils.multiprocess_launch(inject_minidebuginfo, list(elffiles), d, | 1243 | oe.utils.multiprocess_launch(inject_minidebuginfo, list(elffiles), d, |
| 1244 | extraargs=(dvar, dv, d)) | 1244 | extraargs=(dvar, dv, d)) |
| 1245 | 1245 | ||
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py index 37f295492d..4c581ba396 100644 --- a/meta/lib/oeqa/runtime/cases/systemd.py +++ b/meta/lib/oeqa/runtime/cases/systemd.py | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | import re | 7 | import re |
| 8 | import threading | ||
| 8 | import time | 9 | import time |
| 9 | 10 | ||
| 10 | from oeqa.runtime.case import OERuntimeTestCase | 11 | from oeqa.runtime.case import OERuntimeTestCase |
| @@ -136,6 +137,26 @@ class SystemdServiceTests(SystemdTest): | |||
| 136 | status = self.target.run('mount -oro,remount /')[0] | 137 | status = self.target.run('mount -oro,remount /')[0] |
| 137 | self.assertTrue(status == 0, msg='Remounting / as r/o failed') | 138 | self.assertTrue(status == 0, msg='Remounting / as r/o failed') |
| 138 | 139 | ||
| 140 | @skipIfNotFeature('minidebuginfo', 'Test requires minidebuginfo to be in DISTRO_FEATURES') | ||
| 141 | @OEHasPackage(['busybox']) | ||
| 142 | def test_systemd_coredump_minidebuginfo(self): | ||
| 143 | """ | ||
| 144 | Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks, | ||
| 145 | extracted from the minidebuginfo metadata (.gnu_debugdata elf section). | ||
| 146 | """ | ||
| 147 | t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && sleep 1000",)) | ||
| 148 | t_thread.start() | ||
| 149 | time.sleep(1) | ||
| 150 | |||
| 151 | status, output = self.target.run('pidof sleep') | ||
| 152 | # cause segfault on purpose | ||
| 153 | self.target.run('kill -SEGV %s' % output) | ||
| 154 | self.assertEqual(status, 0, msg = 'Not able to find process that runs sleep, output : %s' % output) | ||
| 155 | |||
| 156 | (status, output) = self.target.run('coredumpctl info') | ||
| 157 | self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output) | ||
| 158 | self.assertEqual('sleep_for_duration (busybox.nosuid' in output, True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output) | ||
| 159 | |||
| 139 | class SystemdJournalTests(SystemdTest): | 160 | class SystemdJournalTests(SystemdTest): |
| 140 | 161 | ||
| 141 | @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) | 162 | @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) |
diff --git a/meta/lib/oeqa/selftest/cases/minidebuginfo.py b/meta/lib/oeqa/selftest/cases/minidebuginfo.py index aa1f9fa1f7..2919f07939 100644 --- a/meta/lib/oeqa/selftest/cases/minidebuginfo.py +++ b/meta/lib/oeqa/selftest/cases/minidebuginfo.py | |||
| @@ -21,7 +21,7 @@ class Minidebuginfo(OESelftestTestCase): | |||
| 21 | bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME', 'READELF'], image) | 21 | bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME', 'READELF'], image) |
| 22 | 22 | ||
| 23 | self.write_config(""" | 23 | self.write_config(""" |
| 24 | PACKAGE_MINIDEBUGINFO = "1" | 24 | DISTRO_FEATURES:append = " minidebuginfo" |
| 25 | IMAGE_FSTYPES = "tar.bz2" | 25 | IMAGE_FSTYPES = "tar.bz2" |
| 26 | """) | 26 | """) |
| 27 | bitbake("{} {}:do_addto_recipe_sysroot".format(image, binutils)) | 27 | bitbake("{} {}:do_addto_recipe_sysroot".format(image, binutils)) |
diff --git a/meta/recipes-core/systemd/systemd_254.4.bb b/meta/recipes-core/systemd/systemd_254.4.bb index 4d68a3266a..0c12926bef 100644 --- a/meta/recipes-core/systemd/systemd_254.4.bb +++ b/meta/recipes-core/systemd/systemd_254.4.bb | |||
| @@ -67,6 +67,7 @@ PAM_PLUGINS = " \ | |||
| 67 | 67 | ||
| 68 | PACKAGECONFIG ??= " \ | 68 | PACKAGECONFIG ??= " \ |
| 69 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ | 69 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ |
| 70 | ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \ | ||
| 70 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ | 71 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ |
| 71 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ | 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ |
| 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \ | 73 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \ |
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.189.bb b/meta/recipes-devtools/elfutils/elfutils_0.189.bb index d8bf82b022..d69828131e 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.189.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.189.bb | |||
| @@ -39,7 +39,9 @@ BUILD_CFLAGS += "-Wno-error=stringop-overflow" | |||
| 39 | DEPENDS_BZIP2 = "bzip2-replacement-native" | 39 | DEPENDS_BZIP2 = "bzip2-replacement-native" |
| 40 | DEPENDS_BZIP2:class-target = "bzip2" | 40 | DEPENDS_BZIP2:class-target = "bzip2" |
| 41 | 41 | ||
| 42 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}" | 42 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)} \ |
| 43 | ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \ | ||
| 44 | " | ||
| 43 | PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" | 45 | PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" |
| 44 | PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" | 46 | PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" |
| 45 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" | 47 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" |
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc index 3349719a6b..48dbb91463 100644 --- a/meta/recipes-devtools/gdb/gdb-common.inc +++ b/meta/recipes-devtools/gdb/gdb-common.inc | |||
| @@ -30,7 +30,9 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \ | |||
| 30 | --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ | 30 | --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ |
| 31 | " | 31 | " |
| 32 | 32 | ||
| 33 | PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python" | 33 | PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python \ |
| 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \ | ||
| 35 | " | ||
| 34 | # Use --without-system-readline to compile with readline 5. | 36 | # Use --without-system-readline to compile with readline 5. |
| 35 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" | 37 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" |
| 36 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs" | 38 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs" |
