History

kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/

kernel.spec is the last piece that resides outside the rpmbuild/ directory. Move all the RPM-related files to rpmbuild/ consistently.

Masahiro Yamada committed 3 years ago

Commit ffa46bb1 parent 40745325 files · +12 −7Browse files

Unified · Split

5 files
  1. .gitignore +0 −1
  2. Makefile +1 −1
  3. scripts/Makefile.package +4 −4
  4. scripts/package/mkspec +6 −0
  5. scripts/remove-stale-files +1 −1
.gitignore+0−1
@@ -74,7 +74,6 @@ modules.order · 73 unmodified lines
7474 #
7575 # RPM spec file (make rpm-pkg)
7676 #
77−/kernel.spec
7877 /rpmbuild/
7978
8079 #
Makefile+1−1
@@ -1486,7 +1486,7 @@ MRPROPER_FILES += include/config include/generated \ · 1485 unmodified lines
14861486 certs/signing_key.pem \
14871487 certs/x509.genkey \
14881488 vmlinux-gdb.py \
1489− kernel.spec rpmbuild \
1489+ rpmbuild \
14901490 rust/libmacros.so
14911491
14921492 # clean - Delete most, but leave enough to build external modules
scripts/Makefile.package+4−4
@@ -69,9 +69,9 @@ $(linux-tarballs): .tmp_HEAD FORCE · 68 unmodified lines
6969 # ---------------------------------------------------------------------------
7070
7171 quiet_cmd_mkspec = GEN $@
72− cmd_mkspec = $(srctree)/scripts/package/mkspec > $@
72+ cmd_mkspec = $(srctree)/scripts/package/mkspec $@
7373
74−kernel.spec: FORCE
74+rpmbuild/SPECS/kernel.spec: FORCE
7575 $(call cmd,mkspec)
7676
7777 PHONY += rpm-sources
@@ -88,8 +88,8 @@ srcrpm-pkg: private build-type := s · 10 unmodified lines
8888 binrpm-pkg: private build-type := b
8989
9090 rpm-pkg srcrpm-pkg: rpm-sources
91−rpm-pkg srcrpm-pkg binrpm-pkg: kernel.spec
92− +$(strip rpmbuild -b$(build-type) kernel.spec \
91+rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
92+ +$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \
9393 --define='_topdir $(abspath rpmbuild)' \
9494 $(if $(filter a b, $(build-type)), \
9595 --target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \
scripts/package/mkspec+6−0
@@ -9,6 +9,12 @@ · 8 unmodified lines
99 # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
1010 #
1111
12+output=$1
13+
14+mkdir -p "$(dirname "${output}")"
15+
16+exec >"${output}"
17+
1218 if grep -q CONFIG_MODULES=y include/config/auto.conf; then
1319 echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}'
1420 else
scripts/remove-stale-files+1−1
@@ -38,4 +38,4 @@ rm -rf include/ksym · 37 unmodified lines
3838
3939 find . -name '*.usyms' | xargs rm -f
4040
41−rm -f binkernel.spec
41+rm -f *.spec