Signed-off-by: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org>
---
 make_source_tarball.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/make_source_tarball.sh b/make_source_tarball.sh
index ec8b290..41b8195 100755
--- a/make_source_tarball.sh
+++ b/make_source_tarball.sh
@@ -29,6 +29,10 @@ outdir="$2"
 replicant_dir="${outdir}/${tag}"
 repo_branch="refs/tags/${tag}"
 
+version="$(echo ${tag} | sed 's/replicant-//')"
+major_version="$(echo ${version} | sed 's/-.*//')"
+minor_version="$(echo ${version} | sed 's/.*-//')"
+
 if [ $# -ne 2 ] ; then
        usage
 fi
@@ -42,8 +46,23 @@ if [ ! -d .repo ] ; then
                --depth=1 || rm -rf .repo/
 fi
 
+# We have an issue with all the Replicant releases before Replicant 6.0-0001:
+# All the manifests use git://, however over the time we moved several git
+# repositories and wrote some apache redirect rules to handle that.
+# Due to that, only http:// and https:// work fine.
+# This should be fixed in all the replicant-<version>-dev branches, however
+# we cannot use that here as we are making tarballs of former releases.
+if [ $(echo ${major_version} | sed 's/\..*//') -lt 6 ] ; then
+       sed 's#git://#https://#g' -i \
+           .repo/manifests/default.xml
+fi
+
 repo sync
 
+if [ $(echo $major_version | sed 's/\..*//') -lt 6 ] ; then
+       git -C .repo/manifests reset --hard
+fi
+
 cd ..
 tarball="${tag}.tar"
 if [ ! -f "${tarball}" ] && [ ! -f "${tarball}.xz" ] ; then
-- 
2.30.2

_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to