mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
![Masahiro Yamada](/assets/img/avatar_default.png)
Since commitfe66b5d2ae
("kbuild: refactor kernel-devel RPM package and linux-headers Deb package"), the kernel-devel RPM package and linux-headers Deb package are broken. I double-quoted the $(find ... -type d), which resulted in newlines being included in the argument to the outer find comment. find: 'arch/arm64/include\narch/arm64/kvm/hyp/include': No such file or directory The outer find command is unneeded. Fixes:fe66b5d2ae
("kbuild: refactor kernel-devel RPM package and linux-headers Deb package") Reported-by: Karolis M <k4rolis@protonmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
39 lines
900 B
Bash
Executable file
39 lines
900 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
set -e
|
|
|
|
destdir=${1}
|
|
|
|
test -n "${srctree}"
|
|
test -n "${SRCARCH}"
|
|
|
|
is_enabled() {
|
|
grep -q "^$1=y" include/config/auto.conf
|
|
}
|
|
|
|
mkdir -p "${destdir}"
|
|
|
|
(
|
|
cd "${srctree}"
|
|
echo Makefile
|
|
find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
|
|
find include scripts -type f -o -type l
|
|
find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform
|
|
find "arch/${SRCARCH}" -name include -o -name scripts -type d
|
|
) | tar -c -f - -C "${srctree}" -T - | tar -xf - -C "${destdir}"
|
|
|
|
{
|
|
if is_enabled CONFIG_OBJTOOL; then
|
|
echo tools/objtool/objtool
|
|
fi
|
|
|
|
find "arch/${SRCARCH}/include" Module.symvers include scripts -type f
|
|
|
|
if is_enabled CONFIG_GCC_PLUGINS; then
|
|
find scripts/gcc-plugins -name '*.so'
|
|
fi
|
|
} | tar -c -f - -T - | tar -xf - -C "${destdir}"
|
|
|
|
# copy .config manually to be where it's expected to be
|
|
cp "${KCONFIG_CONFIG}" "${destdir}/.config"
|