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: <20230215012034.403356-12-masahiroy@kernel.org>
Date:   Wed, 15 Feb 2023 10:20:34 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, Ben Hutchings <ben@...adent.org.uk>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>
Subject: [PATCH v6 12/12] kbuild: add srcdeb-pkg target

This new target builds only the debian source package.

Factor similar code out to the 'build-deb-pkg' variable.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---

Changes in v6:
  - New patch

 scripts/Makefile.package | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index b941e6341b36..8650d9432c26 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -100,6 +100,9 @@ binrpm-pkg:
 	+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
 		$(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec
 
+# deb-pkg srcdeb-pkg bindeb-pkg
+# ---------------------------------------------------------------------------
+
 quiet_cmd_debianize = GEN     $@
       cmd_debianize = $(srctree)/scripts/package/mkdebian
 
@@ -117,14 +120,27 @@ debian-orig: linux.tar.gz debian
 		cp $< ../$(orig-name); \
 	fi
 
+build-deb-pkg = \
+        dpkg-buildpackage \
+        --build=$(build-type) --no-pre-clean --unsigned-changes \
+        $(if $(findstring source, $(build-type)), --unsigned-source) \
+        $(if $(findstring binary, $(build-type)), -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch)) \
+        $(DPKG_FLAGS)
+
 PHONY += deb-pkg
+deb-pkg: private build-type := source,binary
 deb-pkg: debian-orig
-	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
-		--build=source,binary -nc -us -uc
+	+$(build-deb-pkg)
+
+PHONY += srcdeb-pkg
+srcdeb-pkg: private build-type := source
+srcdeb-pkg: debian-orig
+	+$(build-deb-pkg)
 
 PHONY += bindeb-pkg
+bindeb-pkg: private build-type := binary
 bindeb-pkg: debian
-	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
+	+$(build-deb-pkg)
 
 PHONY += intdeb-pkg
 intdeb-pkg:
@@ -225,6 +241,7 @@ help:
 	@echo '  srcrpm-pkg          - Build only the source kernel RPM package'
 	@echo '  binrpm-pkg          - Build only the binary kernel RPM package'
 	@echo '  deb-pkg             - Build both source and binary deb kernel packages'
+	@echo '  binsrc-pkg          - Build only the source kernel deb package'
 	@echo '  bindeb-pkg          - Build only the binary kernel deb package'
 	@echo '  snap-pkg            - Build only the binary kernel snap package'
 	@echo '                        (will connect to external hosts)'
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ