[Dev] How to turn off debug packages for local gbs build?

Tomasz Olszak olszak.tomasz at gmail.com
Wed Dec 11 11:20:43 GMT 2013

2013/12/11 Raphael Kubo da Costa <raphael.kubo.da.costa at intel.com>

> l.stelmach at samsung.com (Łukasz Stelmach) writes:
> >> As far as I know, two possible ways to disable debug packages.
> >> 1.  insert "%define debug_package %{nil}" in the spec files.
> >> 2. set "%debug_package %{nil}" in /etc/rpm/macros, which is supplied by
> package "rpm".
> >
> > The former is probably what you are looking for if you build data-only
> > packages. The latter is somewhat cumbersom as /etc/rpm/macros in the
> > chroot will be removed every now and then.
> This is something that has also bugged me for a while. Alternatively, I
> wonder if it makes sense to revisit
> https://review.tizen.org/gerrit/gitweb?p=tools/depanneur.git;a=commit;h=3d420e05f320200bd186b90b594b2ccb392082ce
> and make it possible to disable the creation of debug packages by
> passing a new argument to gbs (that would be later passed on to
> depanneur).
> _______________________________________________
> Dev mailing list
> Dev at lists.tizen.org
> https://lists.tizen.org/listinfo/dev

Thank you all for the hints. I tried something like:

%if 0%{!?create_debug_packages: 1}
%define create_debug_packages 1

%if ! %{create_debug_packages}
%global debug_package %{nil}
%global __debug_install_post %{nil}

And it works:
gbs build --define "create_debug_packages 0"

Of course it would be very convenient to not add this code to every spec
file. :)
Perhaps *__without_debug_packages *option could turn off *debug_package*and
*__debug_install_post* in some global rpm (if such exists).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/dev/attachments/20131211/c9834b0b/attachment-0001.html>

More information about the Dev mailing list