diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-15 04:20:26 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-26 09:18:47 +0300 |
commit | 6fc91752d7c4706f1036838544b1ef5d9f41c058 (patch) | |
tree | 1bb3b1ec73c3384965f94c7ac0dc5e3534b8c1fc /scripts/package | |
parent | 1ec9bb704faf50c48727b5daa33bc42e7334db60 (diff) | |
download | linux-6fc91752d7c4706f1036838544b1ef5d9f41c058.tar.xz |
kbuild: srcrpm-pkg: create source package without cleaning
If you run 'make (src)rpm-pkg', all objects are lost due to 'make clean',
which makes the incremental builds impossible.
Instead of cleaning, pass the exclude list to tar's --exclude-from
option.
Previously, the .config was contained in the source tarball.
With this commit, the source rpm consists of separate linux.tar.gz
and .config.
Remove stale comments. Now, 'make (src)rpm-pkg' works with O= option.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/package')
-rwxr-xr-x | scripts/package/mkspec | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 108c0cb95436..83a64d9d7372 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -47,7 +47,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF Group: System Environment/Kernel Vendor: The Linux Community URL: https://www.kernel.org -$S Source: kernel-$__KERNELRELEASE.tar.gz +$S Source0: linux.tar.gz +$S Source1: .config Provides: $PROVIDES $S BuildRequires: bc binutils bison dwarves $S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex @@ -83,9 +84,8 @@ $S$M This package provides kernel headers and makefiles sufficient to build modu $S$M against the $__KERNELRELEASE kernel package. $S$M $S %prep -$S %setup -q -$S rm -f scripts/basic/fixdep scripts/kconfig/conf -$S rm -f tools/objtool/{fixdep,objtool} +$S %setup -q -n linux +$S cp %{SOURCE1} . $S $S %build $S $MAKE %{?_smp_mflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release} |