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-3-t.boehler@kunbus.com>
Date: Thu, 31 Oct 2024 14:26:29 +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 2/3] package: debian: add missing Depends to linux-headers

The linux-headers package is missing a dependency to libc. Lintian
complains about this as well:

    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: undeclared-elf-prerequisites (libc.so.6) [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/asn1_compiler]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: undeclared-elf-prerequisites (libc.so.6) [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/basic/fixdep]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: undeclared-elf-prerequisites (libc.so.6) [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/kallsyms]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: undeclared-elf-prerequisites (libc.so.6) [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/mod/modpost]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: undeclared-elf-prerequisites (libc.so.6) [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/sorttable]

Fix this by introducing "dh_shlibdeps" into the build process. It
calculates shared library dependencies for packages and creates a
substvar entry for them, making them usable in "debian/control" by
specifying "${shlibs:Depends}" in the "Depends" field.

"dh_shlibdeps" detects the dependency on libc for the linux-headers
package and by specifying the substvar for the linux-headers package in
"debian/control" this dependency is correctly declared and lintian won't
complain about it anymore.

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

diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index 0c75319acae1..2a51564128ff 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -52,6 +52,7 @@ define binary
 	$(Q)dh_installchangelogs $(DH_OPTIONS)
 	$(Q)dh_compress $(DH_OPTIONS)
 	$(Q)dh_fixperms $(DH_OPTIONS)
+	$(Q)dh_shlibdeps $(DH_OPTIONS)
 	$(Q)dh_gencontrol $(DH_OPTIONS) -- -f$(call mk-files,$@)
 	$(Q)dh_md5sums $(DH_OPTIONS)
 	$(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS))
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 10637d403777..5d96cb0d0bf8 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -224,6 +224,7 @@ cat <<EOF >> debian/control
 
 Package: linux-headers-$version
 Architecture: $debarch
+Depends: \${shlibs:Depends}
 Description: Linux kernel headers for $version on $debarch
  This package provides kernel header files for $version on $debarch
  .
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ