From 3689626622516dec6f76b9b4dab05a7544ab583d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sun, 24 Jan 2021 11:33:40 +0000 Subject: Reimplements Git repository mirroring because Git is a special snowflake. etc/{README.md,pkgtool.usage}: updated. groups/221.native_packages_dev.group:cparser:${PKG_DISABLED}: disabled due to repository unavailability. groups/251.native_packages_lib.group:libfirm:${PKG_DISABLED}: disabled due to repository unavailability. midipix.env:${DEFAULT_BUILD_VARS}: adds MIRRORS_GIT. midipix.env:${DEFAULT_MIRRORS{,_GIT}}: split; mirror Git repositories via https://midipix.lucioillanes.de/repos_git/. pkgtool.sh:pkgtoolp_mirror_fetch(): call rtl_fetch_mirror_urls_git() vs. rtl_fetch_urls_git(). pkgtool.sh:pkgtoolp_mirror_fetch(): symlink instead of downloading given package w/ parent package. pkgtool.sh:pkgtoolp_mirror{,_fetch}(): split archives vs. Git repositories directory name. subr.rtl/rtl_fetch.subr: factor out ${DEFAULT_GIT_ARGS}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): initial implementation. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): always return on failure. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): correctly attempt to git-clone(1) from ${PKG_URL} and then via ${PKG_MIRRORS}. subr.rtl/rtl_fetch.subr:{rtlp_fetch_url_git,rtl_fetch_urls_git}(): cleanup. {subr/pkg_fetch_download.subr,vars/{gcc,python[23]{,_host}}.vars}: call rtl_fetch_urls_git() w/ ${PKG_NAME} and ${PKG_MIRRORS_GIT:-}. --- vars/gcc.vars | 11 +++++++++-- vars/python2.vars | 2 +- vars/python2_host.vars | 2 +- vars/python3.vars | 2 +- vars/python3_host.vars | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) (limited to 'vars') diff --git a/vars/gcc.vars b/vars/gcc.vars index 92a56202..c7e094a9 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -122,7 +122,10 @@ pkgp_gcc_stage1_all() { return 1; fi; if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}" "${PKG_MIRRORS:-}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; + rtl_fetch_urls_git \ + "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}" \ + "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" \ + "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; pkgp_gcc_state_set "fetch" -"patch"; fi; if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then @@ -210,7 +213,11 @@ pkg_gcc_full_all() { export MAKE="make LIBTOOL=slibtool ${_vis_hide}"; pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native; if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}" "${PKG_MIRRORS:-}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; + rtl_fetch_urls_git \ + "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" \ + "${PKG_BASE_DIR}" "${PKG_NAME}" \ + "${PKG_MIRRORS_GIT:-}" \ + "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; pkgp_gcc_state_set "fetch" -"patch"; fi; if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then diff --git a/vars/python2.vars b/vars/python2.vars index 047b0bbc..7bdcd205 100644 --- a/vars/python2.vars +++ b/vars/python2.vars @@ -5,7 +5,7 @@ pkg_python2_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then return 1; fi; diff --git a/vars/python2_host.vars b/vars/python2_host.vars index b4fa01bd..0cb83e2a 100644 --- a/vars/python2_host.vars +++ b/vars/python2_host.vars @@ -5,7 +5,7 @@ pkg_python2_host_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ || ! rtl_fileop cp "../sbpython2/project/config/cfgdefs.sh" "../sbpython2/project/config/cfgdefs.sh.orig"\ || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython2/project/config/cfgdefs.sh\ || ! sed -i"" -e'108a\ diff --git a/vars/python3.vars b/vars/python3.vars index c21d3a01..a58325c1 100644 --- a/vars/python3.vars +++ b/vars/python3.vars @@ -5,7 +5,7 @@ pkg_python3_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then return 1; fi; diff --git a/vars/python3_host.vars b/vars/python3_host.vars index dac0f5de..05b58e2b 100644 --- a/vars/python3_host.vars +++ b/vars/python3_host.vars @@ -5,7 +5,7 @@ pkg_python3_host_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ || ! rtl_fileop cp "../sbpython3/project/config/cfgdefs.sh" "../sbpython3/project/config/cfgdefs.sh.orig"\ || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" "../sbpython3/project/config/cfgdefs.sh"\ || ! sed -i"" -e'108a\ -- cgit v1.2.3