Cleanup some binaries for kernel-devel (rhbz 1550152)
As part of building the kernel, the scripts directory contains some binaries. Most of these binaries don't have debuginfo (because they don't need it) which throws off the packaging. Since these are binaries and we have the source files, just remove them from the buildroot.
This commit is contained in:
parent
654e58958a
commit
842f170f35
54
kernel.spec
54
kernel.spec
@ -1333,8 +1333,57 @@ BuildKernel() {
|
|||||||
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
|
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
|
||||||
cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
||||||
cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
||||||
|
# the full copy of scripts also copies a bunch of binaries which ends
|
||||||
|
# up screwing the debuginfo. It's just easier to remove them.
|
||||||
|
if [ -f scripts/asn1_compiler ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/asn1_compiler
|
||||||
|
fi
|
||||||
|
if [ -f scripts/sign-file ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/sign-file
|
||||||
|
fi
|
||||||
|
if [ -f scripts/extract-cert ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/extract-cert
|
||||||
|
fi
|
||||||
|
if [ -f scripts/pnmtologo ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/pnmtologo
|
||||||
|
fi
|
||||||
|
if [ -f scripts/unifdef ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/unifdef
|
||||||
|
fi
|
||||||
|
if [ -f scripts/sortextable ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/sortextable
|
||||||
|
fi
|
||||||
|
if [ -f scripts/basic/fixdep ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/basic/fixdep
|
||||||
|
fi
|
||||||
|
if [ -f scripts/recordmcount ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/recordmcount
|
||||||
|
fi
|
||||||
|
if [ -f scripts/conmakehash ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/conmakehash
|
||||||
|
fi
|
||||||
|
if [ -f scripts/kallsyms ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/kallsyms
|
||||||
|
fi
|
||||||
|
if [ -f scripts/basic/bin2c ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/basic/bin2c
|
||||||
|
fi
|
||||||
|
if [ -f scripts/mod/mk_elfconfig ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/mod/mk_elfconfig
|
||||||
|
fi
|
||||||
|
if [ -f scripts/mod/modpost ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/mod/modpost
|
||||||
|
fi
|
||||||
|
if [ -f scripts/kconfig/conf ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/kconfig/conf
|
||||||
|
fi
|
||||||
|
if [ -f scripts/selinux/mdp/mdp ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/selinux/mdp/mdp
|
||||||
|
fi
|
||||||
|
if [ -f scripts/selinux/genheaders/genheaders ]; then
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/selinux/genheaders/genheaders
|
||||||
|
fi
|
||||||
if [ -f tools/objtool/objtool ]; then
|
if [ -f tools/objtool/objtool ]; then
|
||||||
cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || :
|
|
||||||
# these are a few files associated with objtool
|
# these are a few files associated with objtool
|
||||||
cp -a --parents tools/build/Build.include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/build/Build.include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
cp -a --parents tools/build/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/build/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
@ -1342,6 +1391,9 @@ BuildKernel() {
|
|||||||
cp -a --parents tools/scripts/utilities.mak $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/scripts/utilities.mak $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
# also more than necessary but it's not that many more files
|
# also more than necessary but it's not that many more files
|
||||||
cp -a --parents tools/objtool/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/objtool/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
|
# these can be rebuilt
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/fixdep
|
||||||
|
rm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/objtool
|
||||||
cp -a --parents tools/lib/str_error_r.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/lib/str_error_r.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
cp -a --parents tools/lib/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/lib/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
cp -a --parents tools/lib/subcmd/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
cp -a --parents tools/lib/subcmd/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
|
||||||
|
Loading…
Reference in New Issue
Block a user