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: <20230313171036.268407-2-bage@linutronix.de>
Date:   Mon, 13 Mar 2023 18:10:36 +0100
From:   Bastian Germann <bage@...utronix.de>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Bastian Germann <bage@...utronix.de>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] kbuild: deb-pkg: Allow parallel build

Currently, the only way to build the deb-pkg generated package parallely
is adding -jN to the MAKEFLAGS environment variable. The package ignores
the usual parallel build option that is described in Debian Policy ยง4.9.1.

Derive make's -j parameter from the DEB_BUILD_OPTIONS environment variable
that ends up being set by Debian's build tools.

Link: https://www.debian.org/doc/debian-policy/ch-source.html
Signed-off-by: Bastian Germann <bage@...utronix.de>
---
 scripts/package/deb-build-option | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option
index b079b0d121d4..dd170e2b3018 100755
--- a/scripts/package/deb-build-option
+++ b/scripts/package/deb-build-option
@@ -7,6 +7,12 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
 	echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}-
 fi
 
+for build_opt in $DEB_BUILD_OPTIONS; do
+	if [ "${build_opt#parallel=}" != "$build_opt" ]; then
+		echo -j${build_opt#parallel=}
+	fi
+done
+
 version=$(dpkg-parsechangelog -S Version)
 version_upstream="${version%-*}"
 debian_revision="${version#${version_upstream}}"
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ