autoport: update with current production changes
This commit is contained in:
parent
ceea7ef522
commit
88643910fb
45
autoport
45
autoport
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# autoport -- batch cross-build tool based on autodist
|
||||
# Copyright (C) 2011-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2011-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
# Released under the terms of the GNU GPL release 3 license
|
||||
#
|
||||
@ -17,7 +17,7 @@ me=(${0##*/} $VERSION "Sat Mar 20 2011")
|
||||
function usage() {
|
||||
echo "\
|
||||
${me[0]} ${me[1]}
|
||||
"$"Copyright (C) 2011-2020 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Copyright (C) 2011-2023 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Released under the terms of the GNU GPL v3 license"
|
||||
echo "
|
||||
"$"Batch port and cross-build tool based on autodist.""
|
||||
@ -246,12 +246,14 @@ fetch_repfiles() {
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o $DATADIR/$PORT_REPOSITORY/srcpkglist ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
for a in ${AUTODIST_ARCHS[*]}; do
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o $DATADIR/$PORT_REPOSITORY/sources-${a} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o $DATADIR/$PORT_REPOSITORY/builds-${a}.sh ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
if [ "$a" == "${TARGET_ARCH}" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o $DATADIR/$PORT_REPOSITORY/sources-${a} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o $DATADIR/$PORT_REPOSITORY/builds-${a}.sh ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
fi
|
||||
done
|
||||
for u in ${AUTOPORT_UNSTAGE_ARCHS}; do
|
||||
[ "$u" = "$TARGET_ARCH" ] && {
|
||||
@ -473,6 +475,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
> $DATAARCHDIR/preparedjobs
|
||||
}
|
||||
|
||||
[ -e $DATAARCHDIR/updatedjobs ] || > $DATAARCHDIR/updatedjobs
|
||||
find $DATAARCHDIR/updatedjobs -ctime 1 >/dev/null && {
|
||||
> $DATAARCHDIR/updatedjobs
|
||||
}
|
||||
|
||||
sudo autoport-fix-environment $TARGET_ARCH
|
||||
|
||||
[ "$FIX_MODE" ] && exit 0
|
||||
@ -544,6 +551,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
|
||||
DONT_PREPARE_THIS=
|
||||
RELEASE_UPDATED=
|
||||
grep -q ^$JOB_CURRENT\$ $DATAARCHDIR/preparedjobs && RELEASE_UPDATED=1
|
||||
for p in ${JOB_CMDLINE[*]}; do
|
||||
[ "$p" = "${JOB_CURRENT}" -o "$DONT_PREPARE_ANY" ] || continue
|
||||
[ -e ${SPECDIR}/${JOB_CURRENT}.spec ] && DONT_PREPARE_THIS="$DONT_PREPARE"
|
||||
@ -555,8 +563,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
else
|
||||
REPOSITORY_STRICT_ADD=""
|
||||
fi
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS"
|
||||
LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
RES=`find_source_by_provide $PORT_REPOSITORY $JOB_CURRENT`
|
||||
@ -592,8 +600,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
changelogadd="`echo ${SCRIPT_ARGS} | sed "s|--buildreq|,|g;s| ||g;s|^,||g"`"
|
||||
REBUILD_CHANGELOG="rebuilt by autoport with build requirements: '${changelogadd}'"
|
||||
fi
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- \"$SCRIPT_ARGS\""
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- \"$SCRIPT_ARGS\""
|
||||
LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- $SCRIPT_ARGS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
echo "(FAILED) "
|
||||
@ -603,11 +611,12 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
||||
echo -n "(OK) "
|
||||
RELEASE_UPDATED=1
|
||||
echo $JOB_CURRENT >> $DATAARCHDIR/updatedjobs
|
||||
}
|
||||
elif [ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ]; then
|
||||
echo -n "update"
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\""
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\""
|
||||
LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\" --- $SCRIPT_ARGS &>$tmpfile
|
||||
cat $tmpfile >> $logfile
|
||||
[ $? -gt 0 ] && {
|
||||
@ -626,8 +635,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
continue
|
||||
}
|
||||
src_release_num=`echo $src_release | sed "s|\([0-9.]*\).*|\1|"`
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog \"$REBUILD_MILESTONE milestone rebuild\" $src_version $src_release_num${REBUILD_MILESTONE}"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog \"$REBUILD_MILESTONE milestone rebuild\" $src_version $src_release_num${REBUILD_MILESTONE}"
|
||||
# FIXME: should be implemented in autodist
|
||||
LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog "$REBUILD_MILESTONE milestone rebuild" $src_version $src_release_num${REBUILD_MILESTONE} &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
@ -665,8 +674,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
SEND_REPOSITORY=$src_repository
|
||||
fi
|
||||
[ ! "$DONT_PREPARE_THIS" -a ! "$RELEASE_UPDATED" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
||||
LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
if [ "$VERBOSE_MODE" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user