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]
Date:   Mon,  4 Dec 2017 17:48:08 +0100
From:   Henning Schild <henning.schild@...mens.com>
To:     Ben Hutchings <ben@...adent.org.uk>, linux-kernel@...r.kernel.org,
        linux-kbuild@...r.kernel.org
Cc:     Konrad Schwarz <konrad.schwarz@...mens.com>,
        Henning Schild <henning.schild@...mens.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Jim Davis <jim.epost@...il.com>
Subject: [PATCH v2] scripts: builddeb: allow customization of "Depends:" fields

The debian packages coming out of "make *deb-pkg" lack the "Depends:"
field. If one tries to install a fresh system with such a "linux-image"
debootstrap or multistrap might try to install the kernel before its
deps and the package hooks will fail.

Different debian-based distros use different values for the missing
fields. And the values differ between distro versions as well. So
hardcoding is not possible.

This patch introduces an option variable for every debian package built
by builddeb. That allows advanced users to specify additional
dependencies for all packages. All the new variables are optional.

Signed-off-by: Henning Schild <henning.schild@...mens.com>
---
 scripts/package/builddeb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b4f0f2b3f8d2..079bd4c4aea9 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -288,6 +288,7 @@ if [ "$ARCH" = "um" ]; then
 
 Package: $packagename
 Architecture: any
+Depends: $KDEB_DEP_IMAGE
 Description: User Mode Linux kernel, version $version
  User-mode Linux is a port of the Linux kernel to its own system call
  interface.  It provides a kind of virtual machine, which runs Linux
@@ -304,6 +305,7 @@ else
 
 Package: $packagename
 Architecture: any
+Depends: $KDEB_DEP_IMAGE
 Description: Linux kernel, version $version
  This package contains the Linux kernel, modules and corresponding other
  files, version: $version.
@@ -335,6 +337,7 @@ cat <<EOF >> debian/control
 
 Package: $kernel_headers_packagename
 Architecture: any
+Depends: $KDEB_DEP_IMAGE_HEADERS
 Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
  This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
  .
@@ -347,6 +350,7 @@ Package: $libc_headers_packagename
 Section: devel
 Provides: linux-kernel-headers
 Architecture: any
+Depends: $KDEB_DEP_LIBC_HEADERS
 Description: Linux support headers for userspace development
  This package provides userspaces headers from the Linux kernel.  These headers
  are used by the installed headers for GNU glibc and other system libraries.
@@ -375,6 +379,7 @@ if [ -n "$BUILD_DEBUG" ] ; then
 
 Package: $dbg_packagename
 Section: debug
+Depends: $KDEB_DEP_IMAGE_DBG
 Architecture: any
 Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ