Skip to content

Commit

Permalink
support rpmlint on non-SUSE systems
Browse files Browse the repository at this point in the history
checking for /usr/bin/rpmlint as fallback for OBS-70
  • Loading branch information
adrianschroeter committed Aug 28, 2020
1 parent 078a540 commit 1139134
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build-recipe-spec
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,14 @@ recipe_check_file_owners() {
}

recipe_run_rpmlint() {
if ! test -x "$BUILD_ROOT/opt/testing/bin/rpmlint" ; then
# SUSE builds are using a special rpmlint binary which is not
# pulling in additional dependencies
local rpmlint="/opt/testing/bin/rpmlint"
if ! test -x "$BUILD_ROOT$rpmlint" ; then
# default rpmlint place as fallback
rpmlint="/usr/bin/rpmlint"
fi
if ! test -x "$BUILD_ROOT$rpmlint" ; then
return
fi
LINT_RPM_FILE_LIST=($(find $BUILD_ROOT/$TOPDIR/RPMS \
Expand All @@ -267,7 +274,7 @@ recipe_run_rpmlint() {
rpmlint_logfile=$TOPDIR/OTHER/rpmlint.log
rm -f "$BUILD_ROOT$rpmlint_logfile"
ret=0
chroot $BUILD_ROOT su -s /opt/testing/bin/rpmlint "$BUILD_USER" -- \
chroot $BUILD_ROOT su -s $rpmlint "$BUILD_USER" -- \
--info ${LINT_RPM_FILE_LIST[*]#$BUILD_ROOT} \
${SRPM_FILE_LIST[*]#$BUILD_ROOT} > >(tee "$BUILD_ROOT$rpmlint_logfile") 2>&1 || ret=1
echo
Expand Down

0 comments on commit 1139134

Please sign in to comment.