diff options
authorJason Gunthorpe <>2018-03-23 11:59:36 -0600
committerMasahiro Yamada <>2018-03-28 01:42:17 +0900
commit8a6105c4818cdc4a5c6b8a99c98ab7cc43be1ba8 (patch)
parentf8437520704cfd9cc442a99d73ed708a3cdadaf9 (diff)
kbuild: rpm-pkg: Support GNU tar >= 1.29
There is a change in how command line parsing is done in this version. Excludes and includes are now ordered with the file list. Since the spec file puts the file list before the exclude list it means newer tar ignores the excludes and packs all the build output into the kernel-devel RPM resulting in a huge package. Simple argument re-ordering fixes the problem. Signed-off-by: Jason Gunthorpe <> Signed-off-by: Masahiro Yamada <>
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 280027fad991..61427c6f2209 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -98,7 +98,7 @@ $M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_instal
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source
$S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE
-$S$M tar cf - . $EXCLUDES | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
+$S$M tar cf - $EXCLUDES . | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
$S$M cd %{buildroot}/lib/modules/$KERNELRELEASE
$S$M ln -sf /usr/src/kernels/$KERNELRELEASE build
$S$M ln -sf /usr/src/kernels/$KERNELRELEASE source