diff options
author | Laura Abbott <labbott@redhat.com> | 2018-03-16 13:35:29 -0700 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2018-03-20 14:36:00 -0700 |
commit | 842f170f35de359b0c58707f8afca29d63ff631e (patch) | |
tree | 0dae8ef2a9006529ac2a674d05cfdb5eab2e93f4 /kernel.spec | |
parent | 654e58958a7f577ce16744edc1ebd2f16ccfe778 (diff) | |
download | kernel-842f170f35de359b0c58707f8afca29d63ff631e.tar.gz kernel-842f170f35de359b0c58707f8afca29d63ff631e.tar.xz kernel-842f170f35de359b0c58707f8afca29d63ff631e.zip |
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.
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/kernel.spec b/kernel.spec index 8754e72b5..60720e9a3 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1333,8 +1333,57 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include cp .config $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 - cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/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 $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/ # also more than necessary but it's not that many more files 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/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents tools/lib/subcmd/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ |