Skip to content

Commit

Permalink
Support OBS Debuginfo build flag for Red Hat variants
Browse files Browse the repository at this point in the history
By undefing %_enable_debug_packages, debuginfo package will not be
created by rpmbuild on Red Hat variant Linux.

Signed-off-by: Kai Liu <kai.liu@suse.com>
  • Loading branch information
Kai Liu committed Jan 28, 2022
1 parent 0cc23e5 commit d2fb6cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build-recipe-spec
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ recipe_build_spec() {
rpmbopts[${#rpmbopts[@]}]='--define'
rpmbopts[${#rpmbopts[@]}]="_build_create_debug 1"
fi
# OBS Debuginfo flag support for Red Hat family
if test -z "$BUILD_DEBUG" ; then
rpmbopts[${#rpmbopts[@]}]='--undefine'
rpmbopts[${#rpmbopts[@]}]="_enable_debug_packages"
fi
if test -n "$DISTURL" ; then
rpmbopts[${#rpmbopts[@]}]='--define'
rpmbopts[${#rpmbopts[@]}]="disturl $DISTURL"
Expand Down

0 comments on commit d2fb6cb

Please sign in to comment.