diff options
author | SoonKyu Park <sk7.park@samsung.com> | 2015-11-20 14:55:48 +0900 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2015-11-20 14:55:48 +0900 |
commit | dcf62acb62b558ac1ed15e8a7e3768499bd3726f (patch) | |
tree | 6ce8e77f2d810c339cf3a7a5910c771cb27193f7 | |
parent | edf906fa2e72b3f33e00a2262962be62e01df9db (diff) | |
download | rpm-dcf62acb62b558ac1ed15e8a7e3768499bd3726f.tar.gz rpm-dcf62acb62b558ac1ed15e8a7e3768499bd3726f.tar.bz2 rpm-dcf62acb62b558ac1ed15e8a7e3768499bd3726f.zip |
Perform 'strip' in rpm scripts
Change-Id: I69171d7c713da8be55fc269587caf974293f820b
-rw-r--r-- | packaging/rpm-tizen_macros | 21 | ||||
-rw-r--r-- | packaging/rpm.spec | 4 | ||||
-rw-r--r-- | scripts/find-debuginfo.sh | 17 |
3 files changed, 30 insertions, 12 deletions
diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros index 253f89c33..9fe761189 100644 --- a/packaging/rpm-tizen_macros +++ b/packaging/rpm-tizen_macros @@ -22,10 +22,23 @@ %kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel)) # this script calls all scripts in /usr/lib/rpm/brp-tizen.d -%__os_install_post \ - /usr/lib/rpm/brp-compress \ - /usr/lib/rpm/brp-tizen \ - %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \ +%__arch_install_post /usr/lib/rpm/check-buildroot + +%__os_install_post \ + /usr/lib/rpm//brp-compress \ + %{!?__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} \ + /usr/lib/rpm/brp-python-hardlink \ + %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \ +%{nil} + +# /usr/lib/rpm/tizen/brp-implant-ident-static + +%__spec_install_post\ + %{?__debug_package:%{__debug_install_post}}\ + %{__arch_install_post}\ + %{__os_install_post}\ %{nil} # macro: %configure_kernel_source diff --git a/packaging/rpm.spec b/packaging/rpm.spec index 9555fca7d..80c82c993 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -195,8 +195,8 @@ mkdir -p %{buildroot}%{rpmhome}/macros.d # remove some nonsense or non-working scripts for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ - brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ - rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile + vpkg-provides*.sh http.req sql.req tcl.req \ + rpmdb_* brp-sparc64-linux brp-java-gcjcompile do rm -f %{buildroot}%{rpmhome}/$f done diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index efcc72ed2..426805eb3 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -95,17 +95,22 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debug" strip_to_debug() { + local g= local r= $strip_r && r=--reloc-debug-sections + $strip_g && case "$(file -bi "$2")" in + application/x-sharedlib*) g=-g ;; + esac + case $2 in *.ko) - # don't attempt to create a minimal backtrace binary for - # kernel modules as this just causes the stripping process - # to be skipped entirely - eu-strip --remove-comment $r -f "$1" "$2" || exit - ;; + # don't attempt to create a minimal backtrace binary for + # kernel modules as this just causes the stripping process + # to be skipped entirely + eu-strip --remove-comment $r -f "$1" "$2" || exit + ;; *) - eu-strip --remove-comment -g -f "$1" "$2" || exit + eu-strip --remove-comment $g -f "$1" "$2" || exit esac chmod 444 "$1" || exit } |