summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoonKyu Park <sk7.park@samsung.com>2015-11-24 18:28:31 +0900
committerSoonKyu Park <sk7.park@samsung.com>2015-11-24 18:28:31 +0900
commit1ba20648b6c4b6d3f39ece20366c36cc706d3347 (patch)
tree2ffa03ae31d5be5f239da197f12a6e55f23b7b0c
parentbae39fa2f30e84eaf1567efd7a23d2a68be0160b (diff)
downloadrpm-1ba20648b6c4b6d3f39ece20366c36cc706d3347.tar.gz
rpm-1ba20648b6c4b6d3f39ece20366c36cc706d3347.tar.bz2
rpm-1ba20648b6c4b6d3f39ece20366c36cc706d3347.zip
add '_rpm_strip_disable' option to project config.
Change-Id: Ibd75b85348fec7e0ff9d313c7511b3b7786fdb6b
-rw-r--r--macros.in3
-rw-r--r--packaging/rpm-tizen_macros8
-rw-r--r--packaging/rpm.spec2
-rw-r--r--scripts/find-debuginfo.sh16
4 files changed, 25 insertions, 4 deletions
diff --git a/macros.in b/macros.in
index e285ce16a..fdb6d99f5 100644
--- a/macros.in
+++ b/macros.in
@@ -179,6 +179,9 @@
# A spec file can %%define _find_debuginfo_opts to pass options to
# the script. See the script for details.
#
+
+%_find_debuginfo_opts %{?_rpm_strip_disable:--strip-disable}
+
%__debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros
index 9fe761189..30b499da4 100644
--- a/packaging/rpm-tizen_macros
+++ b/packaging/rpm-tizen_macros
@@ -24,11 +24,15 @@
# this script calls all scripts in /usr/lib/rpm/brp-tizen.d
%__arch_install_post /usr/lib/rpm/check-buildroot
-%__os_install_post \
- /usr/lib/rpm//brp-compress \
+%__strip_install_post \
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
/usr/lib/rpm/brp-strip-static-archive %{__strip} \
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
+%{nil}
+
+%__os_install_post \
+ /usr/lib/rpm//brp-compress \
+ %{!?_rpm_strip_disable:%{__strip_install_post}}\
/usr/lib/rpm/brp-python-hardlink \
%{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
%{nil}
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index 9d0665fde..80c82c993 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -5,7 +5,7 @@ Name: rpm
Summary: The Package Manager
License: GPL-2.0+
Group: Base/Package Management
-Version: 4.11.0.2
+Version: 4.11.0.1
Release: 0
Url: http://www.rpm.org
BuildRequires: binutils
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 426805eb3..480e63f9a 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -2,7 +2,7 @@
#find-debuginfo.sh - automagically generate debug info and file list
#for inclusion in an rpm spec file.
#
-# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r]
+# Usage: find-debuginfo.sh [--strict-build-id] [--strip-disable] [-g] [-r]
# [-o debugfiles.list]
# [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
# [builddir]
@@ -32,6 +32,9 @@ strip_r=false
# Barf on missing build IDs.
strict=false
+# With --strip-disable arg, no strip
+strip_disable=false
+
BUILDDIR=.
out=debugfiles.list
nout=0
@@ -40,6 +43,9 @@ while [ $# -gt 0 ]; do
--strict-build-id)
strict=true
;;
+ --strip-disable)
+ strip_disable=true
+ ;;
-g)
strip_g=true
;;
@@ -97,6 +103,11 @@ strip_to_debug()
{
local g=
local r=
+
+ if test "$strip_disable" = true ; then
+ exit
+ fi
+
$strip_r && r=--reloc-debug-sections
$strip_g && case "$(file -bi "$2")" in
application/x-sharedlib*) g=-g ;;
@@ -318,6 +329,9 @@ while read nlinks inum f; do
if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
strip_option=
fi
+ if test "$strip_disable" = true ; then
+ strip_option=
+ fi
objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f
chmod $mode $f
) || :