From ad155fd545d18d3745c12d1090c359333f4c7ebd Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Fri, 28 Mar 2025 14:55:17 -0300 Subject: [PATCH] build/linux: Do not include .debug symbols Shipping .debug symbols is not a common practice on Linux distros. Also, backtrace() API seems to not be able to read them separetely. So, there is no use for them. Who wants top tier debugging can set: export DEBUGINFOD_URLS="https://debuginfod.debian.net" --- build/linux/appimage/3_dist-gimp-goappimage.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build/linux/appimage/3_dist-gimp-goappimage.sh b/build/linux/appimage/3_dist-gimp-goappimage.sh index 0c5fb70692..99fdca313c 100644 --- a/build/linux/appimage/3_dist-gimp-goappimage.sh +++ b/build/linux/appimage/3_dist-gimp-goappimage.sh @@ -389,15 +389,15 @@ done #cd .. ## Debug symbols -if [ "$GITLAB_CI" ]; then - export DEBUGINFOD_URLS="https://debuginfod.debian.net" -fi -bin_array=($(find "$USR_DIR/bin" "$USR_DIR/$LIB_DIR" "$(dirname $APP_DIR/$LD_LINUX)" ! -iname "*.dumb*" -type f -exec head -c 4 {} \; -exec echo " {}" \; | grep ^.ELF)) -for bin in "${bin_array[@]}"; do - if [[ ! "$bin" =~ 'ELF' ]] && [[ ! "$bin" =~ '.debug' ]]; then - grep -a -q '.gnu_debuglink' $bin && echo "(INFO): bundling $bin debug symbols to $(dirname $bin)" && cp -f $(debuginfod-find debuginfo $bin) "$(dirname $bin)/$(readelf --string-dump=.gnu_debuglink $bin | sed -n '/]/{s/.* //;p;q}')" || $true - fi -done +#if [ "$GITLAB_CI" ]; then +# export DEBUGINFOD_URLS="https://debuginfod.debian.net" +#fi +#bin_array=($(find "$USR_DIR/bin" "$USR_DIR/$LIB_DIR" "$(dirname $APP_DIR/$LD_LINUX)" ! -iname "*.dumb*" -type f -exec head -c 4 {} \; -exec echo " {}" \; | grep ^.ELF)) +#for bin in "${bin_array[@]}"; do +# if [[ ! "$bin" =~ 'ELF' ]] && [[ ! "$bin" =~ '.debug' ]]; then +# grep -a -q '.gnu_debuglink' $bin && echo "(INFO): bundling $bin debug symbols to $(dirname $bin)" && cp -f $(debuginfod-find debuginfo $bin) "$(dirname $bin)/$(readelf --string-dump=.gnu_debuglink $bin | sed -n '/]/{s/.* //;p;q}')" || $true +# fi +#done ## Files unnecessarily created or bundled by go-appimagetool mv build/linux/appimage/AppRun $APP_DIR