]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 14 Nov 2017 14:19:01 +0000 (23:19 +0900)
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>
.gitignore
scripts/package/Makefile

index 0c39aa20b6ba8d2afbc69670636b9223b3bf23fa..4f034b853d7d53e090fbf7b9197f92d17c679e79 100644 (file)
@@ -53,6 +53,11 @@ Module.symvers
 /System.map
 /Module.markers
 
+#
+# RPM spec file (make rpm-pkg)
+#
+/*.spec
+
 #
 # Debian directory (make deb-pkg)
 #
index b559671d28ca234c21546a093af0d2491f222337..70eea1ed8c9c061d1d3f25348eaeae1d2a1193c8 100644 (file)
@@ -51,7 +51,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
 # ---------------------------------------------------------------------------
@@ -60,7 +59,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
 # ---------------------------------------------------------------------------