autoport: use all archs as base arch to find packages to port
This commit is contained in:
parent
dab56b358f
commit
7dcd16b2ca
40
autoport
40
autoport
@ -17,7 +17,7 @@ me=(${0##*/} $VERSION "Sat Mar 20 2011")
|
|||||||
function usage() {
|
function usage() {
|
||||||
echo "\
|
echo "\
|
||||||
${me[0]} ${me[1]}
|
${me[0]} ${me[1]}
|
||||||
"$"Copyright (C) 2011-2016 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
"$"Copyright (C) 2011-2020 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||||
"$"Released under the terms of the GNU GPL v3 license"
|
"$"Released under the terms of the GNU GPL v3 license"
|
||||||
echo "
|
echo "
|
||||||
"$"Batch port and cross-build tool based on autodist.""
|
"$"Batch port and cross-build tool based on autodist.""
|
||||||
@ -125,7 +125,7 @@ function get_pkg_buildinfo() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
pkg_archs=();
|
pkg_archs=();
|
||||||
for a in ${archs[*]}; do
|
for a in ${AUTODIST_ARCHS[*]}; do
|
||||||
[ "$a" = "${local_arch}" ] && continue
|
[ "$a" = "${local_arch}" ] && continue
|
||||||
pkg_header=();
|
pkg_header=();
|
||||||
DISTROMATIC_BUILD_FILE=$local_distromatic/builds-$a.sh
|
DISTROMATIC_BUILD_FILE=$local_distromatic/builds-$a.sh
|
||||||
@ -184,7 +184,7 @@ _EOF
|
|||||||
|
|
||||||
function find_source_by_provide() {
|
function find_source_by_provide() {
|
||||||
local pkg=`echo $2 | sed "s|(|\\\\\[|g;s|)|\\\\\]|g;s|:|_|g"`
|
local pkg=`echo $2 | sed "s|(|\\\\\[|g;s|)|\\\\\]|g;s|:|_|g"`
|
||||||
grep "^$pkg:" $DATADIR/$1/sources-{$BASE_ARCH,$TARGET_ARCH} | \
|
grep "^$pkg:" $DATADIR/$1/sources-* | \
|
||||||
awk '{ $1=""; print $0 }' | \
|
awk '{ $1=""; print $0 }' | \
|
||||||
sed "s|[[:space:]]_| |g"
|
sed "s|[[:space:]]_| |g"
|
||||||
}
|
}
|
||||||
@ -244,15 +244,14 @@ fetch_repfiles() {
|
|||||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o $DATADIR/$PORT_REPOSITORY/srcpkglist ||
|
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"
|
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH"
|
for a in ${AUTODIST_ARCHS[*]}; do
|
||||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$BASE_ARCH ||
|
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH"
|
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o $DATADIR/$PORT_REPOSITORY/sources-${a} ||
|
||||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH"
|
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$TARGET_ARCH ||
|
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_ARCH"
|
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o $DATADIR/$PORT_REPOSITORY/builds-${a}.sh ||
|
||||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh"
|
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh -o $DATADIR/$PORT_REPOSITORY/builds-$TARGET_ARCH.sh ||
|
done
|
||||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh"
|
|
||||||
for u in ${AUTOPORT_UNSTAGE_ARCHS}; do
|
for u in ${AUTOPORT_UNSTAGE_ARCHS}; do
|
||||||
[ "$u" = "$TARGET_ARCH" ] && {
|
[ "$u" = "$TARGET_ARCH" ] && {
|
||||||
rm -f $DATADIR/$PORT_REPOSITORY/unstage.$TARGET_ARCH
|
rm -f $DATADIR/$PORT_REPOSITORY/unstage.$TARGET_ARCH
|
||||||
@ -266,10 +265,10 @@ fetch_repfiles() {
|
|||||||
|
|
||||||
[ $# -gt 0 ] || { usage ; exit 1; }
|
[ $# -gt 0 ] || { usage ; exit 1; }
|
||||||
|
|
||||||
BUILD_ARCH=`uname -m`
|
[ "$BUILD_ARCH" ] || BUILD_ARCH=`uname -m`
|
||||||
|
|
||||||
case $BUILD_ARCH in
|
case $BUILD_ARCH in
|
||||||
i386|i486|i686) BUILD_ARCH=i586; BASE_ARCH=x86_64 ;;
|
i386|i486|i686) BUILD_ARCH=i586 ;;
|
||||||
arm*) BUILD_ARCH=arm ;;
|
arm*) BUILD_ARCH=arm ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -332,12 +331,6 @@ done
|
|||||||
|
|
||||||
for TARGET_ARCH in ${TARGET_ARCHS}; do
|
for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||||
|
|
||||||
[ "$BASE_ARCH" = "$TARGET_ARCH" -a "$PORT_REPOSITRY" = "$DEST_REPOSITORY" ] && {
|
|
||||||
echo "Error: base and target arch ($BASE_ARCH) are the same as well as port and release repositories ($PORT_REPOSITORY); skipping."
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
archs=($BASE_ARCH $TARGET_ARCH)
|
|
||||||
JOBS_SKIPPED=()
|
JOBS_SKIPPED=()
|
||||||
JOBS_CANTPREPARE=()
|
JOBS_CANTPREPARE=()
|
||||||
JOBS_CANTINSTALL=()
|
JOBS_CANTINSTALL=()
|
||||||
@ -378,8 +371,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
echo "Release repository is $DEST_REPOSITORY"
|
echo "Release repository is $DEST_REPOSITORY"
|
||||||
|
|
||||||
# old files cleanup
|
# old files cleanup
|
||||||
rm -f $DATADIR/$PORT_REPOSITORY/sources-$TARGET_CPU
|
rm -f $DATADIR/$PORT_REPOSITORY/sources-*
|
||||||
rm -f $DATADIR/$PORT_REPOSITORY/builds-$BASE_ARCH.sh
|
rm -f $DATADIR/$PORT_REPOSITORY/builds-*.sh
|
||||||
|
|
||||||
fetch_repfiles
|
fetch_repfiles
|
||||||
|
|
||||||
@ -423,8 +416,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
# old files cleanup
|
# old files cleanup
|
||||||
rm -f $DATADIR/$BASE_REPOSITORY/builds-$BASE_ARCH.sh
|
rm -f $DATADIR/$BASE_REPOSITORY/builds-*.sh
|
||||||
rm -f $DATADIR/$BASE_REPOSITORY/builds-$TARGET_ARCH.sh
|
|
||||||
|
|
||||||
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH
|
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH
|
||||||
port_pkg_list=${pkg_list[*]}
|
port_pkg_list=${pkg_list[*]}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Global configuration file for autodist
|
# Global configuration file for autodist
|
||||||
#
|
#
|
||||||
AUTODIST_ARCHS=(i586 x86_64 arm aarch64)
|
AUTODIST_ARCHS=(i586 x86_64 arm aarch64)
|
||||||
SITE_BASE_URL=http://www.openmamba.org
|
SITE_BASE_URL=https:/openmamba.org
|
||||||
REPS_BASE_URL=${SITE_BASE_URL}/pub/openmamba
|
REPS_BASE_URL=${SITE_BASE_URL}/pub/openmamba
|
||||||
LOCAL_REPS_BASE_DIR=/var/ftp/pub/openmamba
|
LOCAL_REPS_BASE_DIR=/var/ftp/pub/openmamba
|
||||||
SEND_SERVER=devel-autodist
|
SEND_SERVER=devel-autodist
|
||||||
|
Loading…
Reference in New Issue
Block a user