Commit d2fba6f8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbsh: drop REMOTEBUILD support

parent d1745622
......@@ -441,8 +441,7 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
fatal "Commit error. You are still in $MDISTR branch with modified and uncommitted spec"
fi
[ -n "$NOBUILD" ] && BUILDCOMMAND="$ETERBUILDBIN/rpmbs $GIRARHOST"
echo "Run $BUILDCOMMAND"
docmd $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $REMOTEBUILD $DISTRARG $SPEC || { git checkout $CURBRANCH ; fatal "Can't build" ; }
docmd $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $DISTRARG $SPEC || { git checkout $CURBRANCH ; fatal "Can't build" ; }
docmd git checkout $CURBRANCH
exit $?
fi
......@@ -467,7 +466,7 @@ for i in $LISTBUILT ; do
test -f "$SPECNAME" || fatal "Spec $SPECNAME is not found"
docmd altspec_to_local $SPECNAME
docmd $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't build"
docmd $BUILDCOMMAND $LISTRPMARGS $UPLOADARG $DISTRARG $SPECNAME || fatal "Can't build"
uni_rpmrm $SPECNAME || true
done
......@@ -37,13 +37,11 @@ phelp()
echog " -s sign (and move to dir ETERDESTSRPM if defined) after build"
echog " -t make temporary commit before build (rpmbb like behavior)"
echog " -l lazy cleanup (clean before build, not after)"
# echog " -r remote build (on $BUILDSERVER host)"
}
while getopts :hrulsimt opt; do
while getopts :hulsimt opt; do
case $opt in
h) phelp; exit 0;;
r) REMOTEBUILD=1 ;;
t) COMMIT="--commit" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
......@@ -82,35 +80,15 @@ if echo "$LISTNAMES" | grep -q spec ; then
set_specdir $LISTNAMES
fi
if [ -n "$REMOTEBUILD" ] ; then
check_ssh_key
test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file"
# FIXME - get via etersoft-build-utils
REMOTERPMDIR=`ssh $BUILDSERVER echo $HOME`/RPM
LISTSRPM="$(echo $LISTBUILT | xargs -n1 basename)"
echo
echog "############ Build at build server '$BUILDSERVER' (with $LISTRPMARGS options) ############"
echo
echog "==== Copying to build server ====="
docmd rsync -vay --partial --progress --checksum \
-e ssh $LISTBUILT $BUILDSERVER:$REMOTERPMDIR/SRPMS/ || fatal "Error with rsync"
# TODO: remove after build
ssh -t $BUILDSERVER "cd $REMOTERPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTSRPM"
RESULT=$?
date
echo "-------------------------------"
test "$RESULT" = "0" && echog "It was remote build at $BUILDSERVER" || echog "There is error during remote build at $BUILDSERVER"
else
docmd time $ETERBUILDBIN/myhsh $MENVARG $LISTRPMARGS $LISTBUILT
RESULT=$?
# remove generated src.rpm
for i in $LISTBUILT ; do
echo $LISTNAMES | grep -q $i || rm -f $i
done
date
echo "-------------------------------"
fi
docmd time $ETERBUILDBIN/myhsh $MENVARG $LISTRPMARGS $LISTBUILT
RESULT=$?
# remove generated src.rpm
for i in $LISTBUILT ; do
estrlist has $i $LISTNAMES || rm -f $i
done
date
echo "-------------------------------"
# make src.rpm if build OK and we have options for rpmbs
......
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