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?
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:
# 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.