Results 1 to 5 of 5

Thread: I can build rpm, but they have debug symbols, how to handle this?

  1. #1

    Default I can build rpm, but they have debug symbols, how to handle this?

    Hi,
    did my first rpm building, and it works.

    but the problem is that the binaries/libraries in the package contain debug symbols,
    this happens also with original openSUSE packages which I rebuild, (did this just for test and to see)

    my question is therefore, how do I handle this?
    I think it is not the right way to make a install-/strip or similar in the build script,
    so the better way would possible be building an extra debug rpm.
    but how does this work?

  2. #2

    Default Re: I can build rpm, but they have debug symbols, how to handle this?

    Add the following to your spec file after the header:
    Code:
    %debug_package
    This will add the necessary stuff to build extra debugsource/debuginfo packages.

  3. #3

    Default Re: I can build rpm, but they have debug symbols, how to handle this?

    Quote Originally Posted by wolfi323 View Post
    Add the following to your spec file after the header:
    Code:
    %debug_package
    This will add the necessary stuff to build extra debugsource/debuginfo packages.
    this works, great, thank you!

    for later,
    is there a way to pass this to rpmbuild?
    if I test packages local, and when it works,
    I submit them to obs build service, the may not contain the debug_macro in the spec file.
    or am I wrong?

  4. #4

    Default Re: I can build rpm, but they have debug symbols, how to handle this?

    Quote Originally Posted by a4z View Post
    for later,
    is there a way to pass this to rpmbuild?
    if I test packages local, and when it works,
    I submit them to obs build service, the may not contain the debug_macro in the spec file.
    or am I wrong?
    No.
    It is a macro that gets expanded to a package description, file list and so on, see /usr/lib/rpm/macros:
    Code:
    #       Template for debug information sub-package.%debug_package \
    %global __debug_package 1\
    %package debugsource\
    Summary: Debug sources for package %{name}\
    Group: Development/Debug\
    AutoReqProv: 0\
    %description debugsource\
    This package provides debug sources for package %{name}.\
    Debug sources are useful when developing applications that use this\
    package or when debugging this package.\
    %files debugsource -f debugsources.list\
    %defattr(-,root,root)\
    %{nil}
    But this should work on OBS as well.
    If it is present, manually enabling/disabling the debug package build (in the WebUI in "Repositories" f.e.) doesn't work of course, that is always enabled then.
    You could enclose the macro inside in %if...%endif though if you want to.

  5. #5

    Default Re: I can build rpm, but they have debug symbols, how to handle this?

    great info thanks again!
    I will test this
    Quote Originally Posted by wolfi323 View Post
    You could enclose the macro inside in %if...%endif though if you want to.
    when I have more praxis with the macros, sounds very useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •