[citemplates/abderrahim/post-process: 3/3] add debuginfo extraction commands
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [citemplates/abderrahim/post-process: 3/3] add debuginfo extraction commands
- Date: Thu, 25 Jul 2019 07:21:25 +0000 (UTC)
commit 1c192b8e177da52f8661c4976dd3a041d42edab0
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Mon Jul 22 20:48:09 2019 +0100
add debuginfo extraction commands
based on the commands used by the runtime
flatpak/flatpak_ci_initiative.yml | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
---
diff --git a/flatpak/flatpak_ci_initiative.yml b/flatpak/flatpak_ci_initiative.yml
index afdd5e6..9cbbabc 100644
--- a/flatpak/flatpak_ci_initiative.yml
+++ b/flatpak/flatpak_ci_initiative.yml
@@ -16,6 +16,44 @@
mv /app/share/locale/${lang} /app/share/runtime/locale/${ll}/share/; \
ln -s ../../share/runtime/locale/${ll}/share/${lang} /app/share/locale; \
done'
+ - |
+ flatpak build flatpak_app bash -c \
+ "find /app -type f '(' -perm -111 -o -name '*.so*' ')' -print0 | while read -r -d $'\\0' file; do \
+ read -n4 hdr < \${file} || continue; \
+ if [ \$hdr != \$(printf \\\\x7fELF) ]; then \
+ continue; \
+ fi; \
+ if objdump -j .gnu_debuglink -s \${file} &> /dev/null; then \
+ continue; \
+ fi; \
+ case \${file} in /app/lib/debug/*) \
+ continue ;; \
+ esac; \
+ debugedit -i --list-file=source-files.part --base-dir=\${PWD}
--dest-dir=/app/lib/debug/source//${FLATPAK_MODULE} \${file} &> /dev/null; \
+ cat source-files.part >> source-files; \
+ realpath=\$(realpath -s --relative-to=/app \${file}); \
+ debugfile=/app/lib/debug/\${realpath}.debug; \
+ mkdir -p \$(dirname \${debugfile}); \
+ objcopy --only-keep-debug --compress-debug-sections \${file} \${debugfile}; \
+ chmod 644 \${debugfile}; \
+ mode=\$(stat -c 0%a \${file}); \
+ [ -w \${file} ] || chmod +w \${file}; \
+ strip --remove-section=.comment --remove-section=.note --strip-unneeded
--remove-section=.gnu_debugaltlink \${file}; \
+ objcopy --add-gnu-debuglink \${debugfile} \${file}; \
+ chmod \${mode} \${file}; \
+ done; \
+ sort -zu < source-files | while read -r -d \$'\\0' source; do \
+ dst=/app/lib/debug/source/${FLATPAK_MODULE}/\${source}; \
+ src=\${source}; \
+ echo \${src} \${dst}; \
+ if [ -d \${src} ]; then \
+ install -m0755 -d \${dst}; \
+ continue; \
+ fi; \
+ [ -f \${src} ] || continue; \
+ install -m0644 -D \${src} \${dst}; \
+ done"
+
- flatpak-builder --finish-only --repo=repo ${BRANCH:+--default-branch=$BRANCH} flatpak_app
${MANIFEST_PATH}
# Run automatic tests inside the Flatpak env
- >
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]