]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
kbuild: rpm-pkg: keep spec file until make mrproper
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 30 Sep 2017 01:10:10 +0000 (10:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Feb 2018 09:19:46 +0000 (10:19 +0100)
commit af60e207087975d069858741c44ed4f450330ac4 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>
.gitignore
scripts/package/Makefile

index 6c119eab5d46921575fe606e9fe362ab5190791e..f6050b88e95b5b59e2c08dbef865d92049956e58 100644 (file)
@@ -55,6 +55,11 @@ modules.builtin
 /System.map
 /Module.markers
 
+#
+# RPM spec file (make rpm-pkg)
+#
+/*.spec
+
 #
 # Debian directory (make deb-pkg)
 #
index 34de8b953ecfc4a7b15a010a450a09bde006261f..348af5b20618eae037a46063a5068f2d9bfb9fd0 100644 (file)
@@ -50,7 +50,6 @@ rpm-pkg rpm: FORCE
        $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
        $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
        +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
-       rm $(KERNELPATH).tar.gz kernel.spec
 
 # binrpm-pkg
 # ---------------------------------------------------------------------------
@@ -59,7 +58,8 @@ binrpm-pkg: FORCE
        $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
        +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
                $(UTS_MACHINE) -bb $(objtree)/binkernel.spec
-       rm binkernel.spec
+
+clean-files += $(objtree)/*.spec
 
 # Deb target
 # ---------------------------------------------------------------------------