lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241031132630.24667-2-t.boehler@kunbus.com>
Date: Thu, 31 Oct 2024 14:26:28 +0100
From: Thomas Böhler <t.boehler@...bus.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas@...sle.eu>,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Philipp Rosenberger <p.rosenberger@...bus.com>,
	Lino Sanfilippo <l.sanfilippo@...bus.com>,
	Thomas Böhler <t.boehler@...bus.com>
Subject: [PATCH 1/3] package: debian: strip headers package

The linux-headers package contains unstripped binaries. Lintian
complains about this:

    E: linux-headers-6.12.0-rc4-g7e04fcfc6195: unstripped-binary-or-object [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/asn1_compiler]
    E: linux-headers-6.12.0-rc4-g7e04fcfc6195: unstripped-binary-or-object [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/basic/fixdep]
    E: linux-headers-6.12.0-rc4-g7e04fcfc6195: unstripped-binary-or-object [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/kallsyms]
    E: linux-headers-6.12.0-rc4-g7e04fcfc6195: unstripped-binary-or-object [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/mod/modpost]
    E: linux-headers-6.12.0-rc4-g7e04fcfc6195: unstripped-binary-or-object [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/sorttable]

It's not possible to outright strip every package built with
"debian/rules" as, for instance, the "binary-image" target shouldn't be
stripped because it contains debug information that the
"binary-image-dbg" target will make use of.

Thus conditionally use "dh_strip" on the "binary-headers" target after
using "dh_builddeb" to strip only the contents of the package lintian
complains about. Also pass the "--no-automatic-dbgsym" option to make
sure no headers-dbgsym package is created.

Signed-off-by: Thomas Böhler <t.boehler@...bus.com>
---
 scripts/package/debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index ca07243bd5cd..0c75319acae1 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -46,6 +46,8 @@ define binary
 	$(Q)dh_testroot $(DH_OPTIONS)
 	$(Q)dh_prep $(DH_OPTIONS)
 	$(Q)+$(MAKE) $(make-opts) run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb $(package)'
+	$(if $(filter $(headers-package),$(package)),\
+		$(Q)dh_strip $(DH_OPTIONS) --no-automatic-dbgsym)
 	$(Q)dh_installdocs $(DH_OPTIONS)
 	$(Q)dh_installchangelogs $(DH_OPTIONS)
 	$(Q)dh_compress $(DH_OPTIONS)
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ