diff --git a/lib/functions/rootfs/rootfs-create.sh b/lib/functions/rootfs/rootfs-create.sh index a4d0c9433e..1a74a3212e 100644 --- a/lib/functions/rootfs/rootfs-create.sh +++ b/lib/functions/rootfs/rootfs-create.sh @@ -100,35 +100,38 @@ function create_new_rootfs_cache_via_debootstrap() { case "${DISTRIBUTION}" in Ubuntu) if [[ "${LEGACY_DEBOOTSTRAP,,}" == "yes" ]]; then - export GIT_FIXED_WORKDIR="debootstrap-ubuntu-devel" - fetch_from_repo "https://git.launchpad.net/ubuntu/+source/debootstrap" "debootstrap-ubuntu-devel" "tag:import/1.0.118ubuntu1.13" - debootstrap_wanted_dir="${SRC}/cache/sources/${GIT_FIXED_WORKDIR}" + declare debootstrap_name="debootstrap-ubuntu-devel" + GIT_FIXED_WORKDIR="${debootstrap_name}" \ + fetch_from_repo "https://git.launchpad.net/ubuntu/+source/debootstrap" "${debootstrap_name}" "tag:import/1.0.118ubuntu1.13" + debootstrap_wanted_dir="${SRC}/cache/sources/${debootstrap_name}" debootstrap_default_script="gutsy" debootstrap_version="$(sed 's/.*(\(.*\)).*/\1/; q' "${debootstrap_wanted_dir}/debian/changelog")" debootstrap_bin="${debootstrap_wanted_dir}/debootstrap" else - export GIT_FIXED_WORKDIR="mmdebstrap-ubuntu-devel" + declare debootstrap_name="mmdebstrap-ubuntu-devel" #FIXME: branch should be a variable eventually - fetch_from_repo "https://git.launchpad.net/ubuntu/+source/mmdebstrap" "${GIT_FIXED_WORKDIR}" "branch:ubuntu/noble" - debootstrap_wanted_dir="${SRC}/cache/sources/${GIT_FIXED_WORKDIR}" + GIT_FIXED_WORKDIR="${debootstrap_name}" \ + fetch_from_repo "https://git.launchpad.net/ubuntu/+source/mmdebstrap" "${debootstrap_name}" "branch:ubuntu/noble" + debootstrap_wanted_dir="${SRC}/cache/sources/${debootstrap_name}" debootstrap_version="$(sed 's/.*(\(.*\)).*/\1/; q' "${debootstrap_wanted_dir}/debian/changelog")" debootstrap_bin="${debootstrap_wanted_dir}/mmdebstrap" fi ;; Debian) if [[ "${LEGACY_DEBOOTSTRAP,,}" == "yes" ]]; then - export GIT_FIXED_WORKDIR="debootstrap-debian-devel" - fetch_from_repo "https://salsa.debian.org/installer-team/debootstrap.git" "debootstrap-debian-devel" "branch:master" - debootstrap_wanted_dir="${SRC}/cache/sources/${GIT_FIXED_WORKDIR}" + declare debootstrap_name="debootstrap-debian-devel" + GIT_FIXED_WORKDIR="${debootstrap_name}" \ + fetch_from_repo "https://salsa.debian.org/installer-team/debootstrap.git" "${debootstrap_name}" "branch:master" + debootstrap_wanted_dir="${SRC}/cache/sources/${debootstrap_name}" debootstrap_default_script="sid" debootstrap_version="$(sed 's/.*(\(.*\)).*/\1/; q' "${debootstrap_wanted_dir}/debian/changelog")" debootstrap_bin="${debootstrap_wanted_dir}/debootstrap" else - export GIT_FIXED_WORKDIR="mmdebstrap-debian-devel" + declare debootstrap_name="mmdebstrap-debian-devel" #FIXME: branch should be a variable eventually - fetch_from_repo "https://gitlab.mister-muffin.de/josch/mmdebstrap" "${GIT_FIXED_WORKDIR}" "branch:main" - debootstrap_wanted_dir="${SRC}/cache/sources/${GIT_FIXED_WORKDIR}" - debootstrap_default_script="sid" + GIT_FIXED_WORKDIR="${debootstrap_name}" \ + fetch_from_repo "https://gitlab.mister-muffin.de/josch/mmdebstrap" "${debootstrap_name}" "branch:main" + debootstrap_wanted_dir="${SRC}/cache/sources/${debootstrap_name}" debootstrap_version="$(sed 's/^## \[\([^]]*\)\].*/\1/; q' "${debootstrap_wanted_dir}/CHANGELOG.md")" debootstrap_bin="${debootstrap_wanted_dir}/mmdebstrap" fi