From 9fe724d67dfa4755911354f21d9d30270648b728 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Oct 2017 01:39:32 +0100 Subject: [PATCH] linux-image-dbg: Override lintian errors for vDSOs It currently reports errors binary-from-other-architecture and shlib-without-PT_GNU_STACK-section, which are false positives. --- debian/bin/gencontrol.py | 6 ++++-- debian/changelog | 2 ++ debian/templates/image-dbg.lintian-overrides.in | 13 +++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 52ef6736e..9e7a27342 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -499,9 +499,11 @@ class Gencontrol(Base): self._substitute_file('image.%s' % name, vars, 'debian/%s.%s' % (image_main['Package'], name)) if build_debug: - self._substitute_file('image-dbg.lintian-overrides', vars, - 'debian/linux-image-%s%s-dbg.lintian-overrides' % + debug_lintian_over = ('debian/linux-image-%s%s-dbg.lintian-overrides' % (vars['abiname'], vars['localversion'])) + self._substitute_file('image-dbg.lintian-overrides', vars, + debug_lintian_over) + os.chmod(debug_lintian_over, 0o755) def process_changelog(self): act_upstream = self.changelog[0].version.upstream diff --git a/debian/changelog b/debian/changelog index 1e02b50a8..67dde4c92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ linux (4.13.4-1~exp1) UNRELEASED; urgency=medium * debian/control: Remove obsolete workarounds and alternate build deps * usbip: Stop building broken libusbip-dev package * Rename lintian-overrides template files to be consistent + * linux-image-dbg: Override lintian errors binary-from-other-architecture and + shlib-without-PT_GNU_STACK-section for vDSOs [ Uwe Kleine-König ] * [arm64] really enable NET_DSA_MV88E6XXX for Espressobin diff --git a/debian/templates/image-dbg.lintian-overrides.in b/debian/templates/image-dbg.lintian-overrides.in index 3e1849d74..4290c1566 100644 --- a/debian/templates/image-dbg.lintian-overrides.in +++ b/debian/templates/image-dbg.lintian-overrides.in @@ -1,2 +1,15 @@ +#!/usr/bin/dh-exec + # Kernel dbg packages contain a full image with debug data linux-image-@abiname@@localversion@-dbg: dbg-package-missing-depends + +# glibc doesn't seem to check for a PT_GNU_STACK section in vDSOs, so +# it's OK that they don't have it +[arm64 armhf] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso.so +[amd64 i386 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso32.so +[amd64 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso64.so +[amd64] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdsox32.so + +# It is intended that 64-bit kernels provide vDSOs for 32-bit executables +[amd64 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: binary-from-other-architecture usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso32.so +[amd64] linux-image-@abiname@@localversion@-dbg: binary-from-other-architecture usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdsox32.so