Commit 5f1445dd authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Vitaly Lipatov

switch to use git.alt build srpm instead rsync to Incoming

parent b68d809a
......@@ -136,9 +136,12 @@ function release_check()
done
}
set_incoming $MENV
#set_incoming $MENV
set_binaryrepo $MENV
if [ -n "${DELETENOW}" ]; then
echog "Removing did not realized yet"
exit 1
echog "Removing from '$RSYNCINCOMING/$INCOMING/'"
check_key
for i in $LISTBUILT ; do
......@@ -205,19 +208,28 @@ if [ -n "$SIGN" ]; then
if [ "$RET" = "0" ]
then
if [ -n "${UPLOADNOW}" ] ; then
echog "Uploading to '$RSYNCINCOMING/$INCOMING/'"
echog "Uploading to $GIRARHOST"
check_key
# TODO: rsync foo.src.rpm git.alt: && ssh git.alt build srpm foo.src.rpm
# git.alt build -b 4.0 srpm foo.src.rpm
rsync -vay --partial --progress $CHECKSUM \
-e ssh $LISTBUILT $RSYNCINCOMING/$INCOMING/ && \
-e ssh $LISTBUILT $GIRARHOST: && \
echo "---------------------" && \
echog "All files synced" || fatal "Error during rsync"
TASKLIST=""
for i in $LISTBUILT ; do
TASKLIST="$TASKLIST srpm $(basename $i)"
done
echo "Create task for $TASKLIST"
ssh $GIRARHOST build -b $BINARYREPO $TASKLIST
for i in $LISTBUILT ; do
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo >>$LOGFILE
date >>$LOGFILE
echo "uploaded">>$LOGFILE
echo "$i uploaded to Incoming/$INCOMING ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log
echo "$(basename $i) uploaded to $GIRARHOST ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log
done
else
......
......@@ -15,7 +15,7 @@ load_mod hasher
make_ordinalbox()
{
mkdir -p $ORDINALWORKDIR
echo "Build aptbox in $ORDINALWORKDIR ..."
echo "Build aptbox from ordinal repo in $ORDINALWORKDIR ..."
#rm -rf $ORDINALWORKDIR
mkaptbox -f --apt-config=$ORDINALAPTCONF $ORDINALWORKDIR
}
......@@ -23,7 +23,7 @@ make_ordinalbox()
make_testingbox()
{
mkdir -p $TESTINGWORKDIR
echo "Build aptbox in $TESTINGWORKDIR ..."
echo "Build aptbox from testing repo in $TESTINGWORKDIR ..."
#rm -rf $TESTINGWORKDIR
mkaptbox -f --apt-config=$TESTINGAPTCONF $TESTINGWORKDIR
}
......
......@@ -25,11 +25,6 @@ set_target_type()
return 1;
}
get_distr_version()
{
echo $1 | sed -e "s|M\([0-9]\)\([0-9]\)|\1\.\2|g" | sed -e "s|SS|Sisyphus|g" | sed -e "s|DD|Daedalus|g"
}
set_incoming()
{
INCOMING="Sisyphus"
......@@ -43,10 +38,44 @@ set_incoming()
;;
*)
if [ -n "$UPDATES" ] ; then
INCOMING="updates/`get_distr_version $1`"
INCOMING="updates/`get_altdistr_version $1`"
else
INCOMING="backports/`get_altdistr_version $1`"
fi
;;
esac
}
set_binaryrepo()
{
BINARYREPO="sisyphus"
test -z "$1" && return
case "$1" in
("DD")
BINARYREPO="daedalus"
;;
("SS")
BINARYREPO="sisyphus"
;;
*)
# TODO
if [ -n "$UPDATES" ] ; then
BINARYREPO="`get_altdistr_version $1`"
else
INCOMING="backports/`get_distr_version $1`"
BINARYREPO="`get_altdistr_version $1`"
fi
;;
esac
}
# M50 -> 5.0
get_altdistr_version()
{
echo "$1" | sed -e "s|M\([0-9]\)\([0-9]\)|\1\.\2|g" | sed -e "s|SS|Sisyphus|g" | sed -e "s|DD|Daedalus|g"
}
# 5.0 -> M50
get_altdistr_mod()
{
echo "$1" | sed -e "s|\([0-9]\)\.\([0-9]\)|M\1\2|g" | sed -e "s|Sisyphus|SS|g"
}
......@@ -100,7 +100,7 @@ VENDOR=`distr_vendor -s`
if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then
[ -n "$APTCONF" ] || APTCONF=${APTCONFBASE/.SS}.$MENV
[ -n "$VERBOSE" ] && echog "Target ALT Linux system: `get_distr_version $MENV`, use \$APTCONF"
[ -n "$VERBOSE" ] && echog "Target ALT Linux system: `get_altdistr_version $MENV`, use \$APTCONF"
MENVARG="-$MENV"
else
# FIXME: echog breakes vars
......@@ -165,14 +165,3 @@ make_temp_file()
fi
}
# M50 -> 5.0
get_altdistr_version()
{
echo "$1" | sed -e "s|M\([0-9]\)\([0-9]\)|\1\.\2|g" | sed -e "s|SS|Sisyphus|g"
}
# 5.0 -> M50
get_altdistr_mod()
{
echo "$1" | sed -e "s|\([0-9]\)\.\([0-9]\)|M\1\2|g" | sed -e "s|Sisyphus|SS|g"
}
......@@ -39,8 +39,10 @@ HASHERARG="--eager-cleanup"
[ -n "$DEBUG" ] && HASHERARG="-v $HASHERARG"
RSYNCSISYPHUS=rsync.altlinux.org::ALTLinux/Sisyphus
# obsoleted
RSYNCINCOMING=devel:/incoming
#SSH_KEYFILE=~/.ssh/id_dsa
GIRARHOST=git.alt
BUILDSERVER=
#BUILDSERVERPATH="$HASHERDIR/repo/i586/RPMS.hasher"
......
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