Skip to content

Commit 806d61d

Browse files
masahir0ygregkh
authored andcommitted
kbuild: rpm-pkg: keep spec file until make mrproper
commit af60e20 upstream. If build fails during (bin)rpm-pkg, the spec file is not cleaned by anyone until the next successful build of the package. We do not have to immediately delete the spec file in case somebody may want to take a look at it. Instead, make them ignored by git, and cleaned up by make mrproper. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent abc5896 commit 806d61d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ modules.builtin
5555
/System.map
5656
/Module.markers
5757

58+
#
59+
# RPM spec file (make rpm-pkg)
60+
#
61+
/*.spec
62+
5863
#
5964
# Debian directory (make deb-pkg)
6065
#

scripts/package/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ rpm-pkg rpm: FORCE
5050
$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
5151
$(call cmd,src_tar,$(KERNELPATH),kernel.spec)
5252
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
53-
rm $(KERNELPATH).tar.gz kernel.spec
5453

5554
# binrpm-pkg
5655
# ---------------------------------------------------------------------------
@@ -59,7 +58,8 @@ binrpm-pkg: FORCE
5958
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
6059
+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
6160
$(UTS_MACHINE) -bb $(objtree)/binkernel.spec
62-
rm binkernel.spec
61+
62+
clean-files += $(objtree)/*.spec
6363

6464
# Deb target
6565
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)