Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
pakfire/pakfire.nm | 4 +-
...e-sections-when-extracting-debuginfo.patch | 46 +++++++++++++++++++
2 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 pakfire/patches/0002-Add-option-to-keep-or-remove-sections-when-extracting-debuginfo.patch
diff --git a/pakfire/pakfire.nm b/pakfire/pakfire.nm
index b16f07918..6b16b0b39 100644
--- a/pakfire/pakfire.nm
+++ b/pakfire/pakfire.nm
@@ -5,7 +5,7 @@
name = pakfire
version = 0.9.27
-release = 2
+release = 3
maintainer = Michael Tremer <michael.tremer(a)ipfire.org>
groups = System/Packaging
@@ -93,7 +93,7 @@ packages
%{name} = %{thisver}
quality-agent = %{thisver}
cpio
- elfutils
+ elfutils >= 0.170
end
provides = pakfire-build = %{thisver}
obsoletes = pakfire-build < %{thisver}
diff --git a/pakfire/patches/0002-Add-option-to-keep-or-remove-sections-when-extracting-debuginfo.patch b/pakfire/patches/0002-Add-option-to-keep-or-remove-sections-when-extracting-debuginfo.patch
new file mode 100644
index 000000000..675e4e856
--- /dev/null
+++ b/pakfire/patches/0002-Add-option-to-keep-or-remove-sections-when-extracting-debuginfo.patch
@@ -0,0 +1,46 @@
+diff --git a/src/scripts/extract-debuginfo.in b/src/scripts/extract-debuginfo.in
+index c258ed1..c43cae4 100644
+--- a/src/scripts/extract-debuginfo.in
++++ b/src/scripts/extract-debuginfo.in
+@@ -2,6 +2,7 @@
+ # extract-debuginfo.sh - automagically generate debug info
+ #
+ # Usage: extract-debuginfo.sh [--strict-build-id] [-g] [-r]
++# [--keep-section SECTION] [--remove-section SECTION]
+ # [builddir]
+ #
+ # The -g flag says to use strip -g instead of full strip on DSOs.
+@@ -25,6 +26,9 @@ strip_r=false
+ # Barf on missing build IDs.
+ strict=false
+
++# keep or remove arguments to eu-strip.
++keep_remove_args=
++
+ BUILDDIR=.
+ while [ $# -gt 0 ]; do
+ case "${1}" in
+@@ -43,6 +47,14 @@ while [ $# -gt 0 ]; do
+ -r)
+ strip_r=true
+ ;;
++ --keep-section)
++ keep_remove_args="${keep_remove_args} --keep-section $2"
++ shift
++ ;;
++ --remove-section)
++ keep_remove_args="${keep_remove_args} --remove-section $2"
++ shift
++ ;;
+ *)
+ BUILDDIR=${1}
+ shift
+@@ -68,7 +80,7 @@ strip_to_debug() {
+ ;;
+ esac
+
+- eu-strip --remove-comment ${r} ${g} -f "${1}" "${2}" || exit
++ eu-strip --remove-comment ${r} ${g} ${keep_remove_args} -f "${1}" "${2}" || exit
+ chmod 444 "${1}" || exit
+ }
+
--
2.20.1