Last active
March 19, 2019 14:31
-
-
Save major/1ba03471a7eb22846b7e8e3ed45bd51a to your computer and use it in GitHub Desktop.
Proposed source RPM build patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1282efe390e43a208e33ad83faefde2e58ce0ed7 Mon Sep 17 00:00:00 2001 | |
From: Major Hayden <[email protected]> | |
Date: Tue, 19 Mar 2019 09:27:29 -0500 | |
Subject: [PATCH] Add source RPM package build | |
Some developers use build systems, such as Koji, that accept source RPMs | |
and compile those packages. This patch adds a quick way for a developer | |
to generate a basic source RPM from a kernel tree. | |
Signed-off-by: Major Hayden <[email protected]> | |
--- | |
scripts/package/Makefile | 9 +++++++++ | |
1 file changed, 9 insertions(+) | |
diff --git a/scripts/package/Makefile b/scripts/package/Makefile | |
index 2c6de21e5152..8329d6dfe3d8 100644 | |
--- a/scripts/package/Makefile | |
+++ b/scripts/package/Makefile | |
@@ -47,6 +47,14 @@ tar -cz $(RCS_TAR_IGNORE) -f $(2).tar.gz \ | |
--transform 's:^:$(2)/:S' $(TAR_CONTENT) $(3); \ | |
rm -f $(objtree)/.scmversion | |
+# srpm-pkg | |
+# --------------------------------------------------------------------------- | |
+srpm-pkg: FORCE | |
+ $(MAKE) clean | |
+ $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec | |
+ $(call cmd,src_tar,$(KERNELPATH),kernel.spec) | |
+ +rpmbuild $(RPMOPTS) -ts $(KERNELPATH).tar.gz | |
+ | |
# rpm-pkg | |
# --------------------------------------------------------------------------- | |
rpm-pkg: FORCE | |
@@ -140,6 +148,7 @@ perf-%pkg: FORCE | |
help: FORCE | |
@echo ' rpm-pkg - Build both source and binary RPM kernel packages' | |
@echo ' binrpm-pkg - Build only the binary kernel RPM package' | |
+ @echo ' srpm-pkg - Build only the source kernel RPM package' | |
@echo ' deb-pkg - Build both source and binary deb kernel packages' | |
@echo ' bindeb-pkg - Build only the binary kernel deb package' | |
@echo ' snap-pkg - Build only the binary kernel snap package (will connect to external hosts)' | |
-- | |
2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment