From d0e8379b20eeb4155281b51d5b3657c3f1041dc4ac907354bfdf48ab5071ba83 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 16 Jan 2013 17:04:26 +0000 Subject: [PATCH] - disable strip and /usr/lib/rpm/find-debuginfo.sh for non-opt builds it destroys bytecode binaries OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=184 --- libguestfs.changes | 6 ++++++ libguestfs.spec | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libguestfs.changes b/libguestfs.changes index 908952f..4687230 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 16 16:40:46 CET 2013 - ohering@suse.de + +- disable strip and /usr/lib/rpm/find-debuginfo.sh for non-opt builds + it destroys bytecode binaries + ------------------------------------------------------------------- Thu Jan 3 14:01:47 CET 2013 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index b598314..41d42c4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -16,6 +16,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%if !%opt +# get rid of /usr/lib/rpm/find-debuginfo.sh +# strip kills the bytecode part of ELF binaries +# see also NO_BRP_STRIP_DEBUG in install section +%undefine _build_create_debug +%endif %define with_ocaml_tools 1 %define with_ocaml_bindings 1 @@ -468,6 +475,11 @@ make \ %{?jobs:-j%jobs} %install +%if !%opt +# get rid of /usr/lib/rpm/brp-strip-debug +# strip kills the bytecode part of ELF binaries +export NO_BRP_STRIP_DEBUG=true +%endif %makeinstall #remove ocaml bindings files if they are disable via rpm macro %if !%{with_ocaml_bindings} @@ -660,8 +672,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/guestfs %{_libdir}/ocaml/guestfs/*.a +%if %opt %{_libdir}/ocaml/guestfs/*.cmx %{_libdir}/ocaml/guestfs/*.cmxa +%endif %{_libdir}/ocaml/guestfs/*.mli %endif #