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