From 5c825231aaf28abd3f1fd020bcb1ebaebc4e7f9b Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 13 Feb 2022 15:42:33 +0100 Subject: build: debian: always build against same source file this will avoid problems with debian source repositories. --- build-aux/build-debian.sh | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/build-aux/build-debian.sh b/build-aux/build-debian.sh index 048912a..f96336e 100755 --- a/build-aux/build-debian.sh +++ b/build-aux/build-debian.sh @@ -50,6 +50,36 @@ download_pbuilder_chroot() { popd > /dev/null } +download_orig() { + local i=0 + local out=0 + local url="https://distfiles.rgm.io/${PN}/${P}/${P}.tar.xz" + + while [[ $i -lt 20 ]]; do + set +ex + ((i++)) + echo "waiting for ${P}.tar.xz: $i/20" + wget -q --spider --tries 1 "${url}" + out=$? + set -ex + + if [[ $out -eq 0 ]]; then + wget -c "${url}" + mv "${P}.tar.xz" "${BUILDDIR}/${MY_P}.orig.tar.xz" + return + fi + + if [[ $out -ne 8 ]]; then + exit $out + fi + + sleep 30 + done + + echo "failed to find orig distfile. please check if that task succeeded." + exit 1 +} + create_reprepro_conf() { echo "Origin: blogc" echo "Label: blogc" @@ -60,11 +90,7 @@ create_reprepro_conf() { echo } -${MAKE_CMD:-make} dist-xz - -MY_P="${PN}_${PV}" - -mv ${P}.tar.xz "${BUILDDIR}/${MY_P}.orig.tar.xz" +download_orig rm -rf "${BUILDDIR}/${P}" tar -xf "${BUILDDIR}/${MY_P}.orig.tar.xz" -C "${BUILDDIR}" -- cgit v1.2.3-18-g5258