Commit 875f4450 authored by Vitaly Lipatov's avatar Vitaly Lipatov

myhsh: enable error if there are unpackaged files int the build, add…

myhsh: enable error if there are unpackaged files int the build, add NOSTRICT_UNPACKAGED param in config for disable new behaviour
parent e2f0991f
...@@ -78,27 +78,33 @@ fi ...@@ -78,27 +78,33 @@ fi
# export OURAPTCONF with temp. file contains correct path to sources.list # export OURAPTCONF with temp. file contains correct path to sources.list
prepare_aptconfig prepare_aptconfig
# FIXME: we override config value here?
# TODO: for add $LISTRPMARGS we need skip function for delete "our" params # TODO: for add $LISTRPMARGS we need skip function for delete "our" params
# we do not need check cases for mount points, thanks ldv@
HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$OURAPTCONF --target $DEFAULTARCH $HASHERARG" HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$OURAPTCONF --target $DEFAULTARCH $HASHERARG"
HASHERARG="--mountpoints=/proc,/dev/pts $HASHERARG"
BUILDARGS=""
# FIXME: cleanup MENV using
BUILDARGS="--define 'backport_distro ${MENV}'"
if [ "$MENV" != "SS" ] && [ "$MENV" != "DD" ]; then if [ "$MENV" != "SS" ] && [ "$MENV" != "DD" ]; then
HASHERARG="--build-args \"--with=build_$MENV\" --build-args \"--with=build_backport\" $HASHERARG" BUILDARGS="--with=build_$MENV --with=build_backport $BUILDARGS"
fi
if [ -z "$NOSTRICT_UNPACKAGED" ] ; then
BUILDARGS="$BUILDARGS --define '_unpackaged_files_terminate_build 1'"
fi fi
LISTBUILTSH="" LISTBUILTSH=""
for i in $LISTNAMES for i in $LISTNAMES
do do
# !
# --nprocs=2
# Note: hasher is already use renice for low priority
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log" LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo "Build in hasher ($MENV) in $HASHERDIR dir" >$LOGFILE echo "Build in hasher ($MENV) in $HASHERDIR dir" >$LOGFILE
rm -f $LOGFILE.failed rm -f $LOGFILE.failed
# enable /proc support only if require it echog "Build in hasher: $i (arg: $HASHERARG --build-args \"$BUILDARGS\", distro: $MENV, hasherdir: $HASHERDIR)"
#rpm --requires -p $i | grep "/proc" && ARG="$HASHERARG --mountpoints=/proc" || ARG="$HASHERARG"
# we do not need check cases for mount points, thanks ldv@
ARG="$HASHERARG --mountpoints=/proc,/dev/pts"
echog "Build in hasher: $i (arg: $ARG, distro: $MENV, hasherdir: $HASHERDIR)"
($HSH $ARG --build-args "--define 'backport_distro ${MENV}'" -- $HASHERDIR $i 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE # Note: hasher is already use renice for low priority
($HSH $HASHERARG --build-args "$BUILDARGS" -- $HASHERDIR $i 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/ test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/
if [ -f $LOGFILE.failed ] ; then if [ -f $LOGFILE.failed ] ; then
RESULT=1 RESULT=1
......
...@@ -73,3 +73,6 @@ ...@@ -73,3 +73,6 @@
# username on $GIRARHOST host # username on $GIRARHOST host
# GIRAR_USER=lav # GIRAR_USER=lav
# Skip error if there are unpackaged files in the build
#NOSTRICT_UNPACKAGED=1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment