From 989faa98f6b95e7bcda5d0c2b7fb9f071f39a0bf Mon Sep 17 00:00:00 2001 From: Zenithal Date: Tue, 3 May 2022 22:28:25 +0800 Subject: [PATCH] remove eol repo Ref to https://mirrors.tuna.tsinghua.edu.cn/news/remove-eol-repo/ --- ELK.sh | 44 --------------------------------------- adoptium.py | 4 ++-- apt-sync.py | 4 ++-- chef.sh | 4 ++-- elastic.sh | 4 ++-- erlang.sh | 2 +- gitlab-ce.sh | 6 +++--- gitlab-ci-multi-runner.sh | 6 +++--- gitlab-runner.sh | 2 +- influxdata.sh | 2 +- llvm-apt.sh | 2 +- mongodb.sh | 8 +++---- mysql.sh | 8 +++---- openmediavault.sh | 4 ++-- proxmox.sh | 2 +- rudder.sh | 2 +- virtualbox.sh | 2 +- yum-sync.py | 2 +- 18 files changed, 32 insertions(+), 76 deletions(-) delete mode 100755 ELK.sh diff --git a/ELK.sh b/ELK.sh deleted file mode 100755 index a106818..0000000 --- a/ELK.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -e -set -o pipefail - -_here=`dirname $(realpath $0)` -apt_sync="${_here}/apt-sync.py" -yum_sync="${_here}/yum-sync.py" - -BASE_PATH="${TUNASYNC_WORKING_DIR}" -BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://packages.elastic.co"} - -YUM_PATH="${BASE_PATH}/yum" -APT_PATH="${BASE_PATH}/apt" - -export REPO_SIZE_FILE=/tmp/reposize.$RANDOM - -declare -A REPO_VERSIONS=( - ["elasticsearch"]="2.x" - ["logstash"]="2.3 2.4 5.0" - ["kibana"]="4.5 4.6" -) - -# =================== APT repos =============================== - -for repo in "${!REPO_VERSIONS[@]}"; do - # magic here, don't quote ${REPO_VERSIONS[$repo][@]} - # so that bash loops over space-sperated tokens - for version in ${REPO_VERSIONS[$repo]}; do - echo $repo-$version - apt_url="${BASE_URL}/${repo}/${version}/debian" - dest_path="${APT_PATH}/${repo}/${version}" - "$apt_sync" --delete-dry-run "$apt_url" stable main amd64,i386 "$dest_path" - done -done - -# ================ YUM/DNF repos =============================== - -for repo in "${!REPO_VERSIONS[@]}"; do - versions=${REPO_VERSIONS[$repo]} - components=${versions// /,} - "$yum_sync" "${BASE_URL}/${repo}/@{comp}/centos/" 7 "$components" x86_64 "${repo}-@{comp}" "$YUM_PATH" -done - -"${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm \ No newline at end of file diff --git a/adoptium.py b/adoptium.py index 3b65c15..1634d4e 100755 --- a/adoptium.py +++ b/adoptium.py @@ -119,11 +119,11 @@ def delete_old_files(ver: int, alive_files: Set[str]): check=True) print("APT finished", flush=True) # =================== YUM repos ========================== - # "$yum_sync" "${BASE_URL}/rpm/centos/@{os_ver}/@{arch}" 7-8 Adopitum x86_64,aarch64 "centos@{os_ver}-@{arch}" "$BASE_PATH/rpm" + # "$yum_sync" "${BASE_URL}/rpm/centos/@{os_ver}/@{arch}" 7 Adopitum x86_64,aarch64 "centos@{os_ver}-@{arch}" "$BASE_PATH/rpm" sp.run([str(here/"yum-sync.py"), BASE_URL+'/rpm/centos/@{os_ver}/@{arch}', "--download-repodata", - '7-8', + '7', 'Adoptium', 'x86_64,aarch64', "centos@{os_ver}-@{arch}", diff --git a/apt-sync.py b/apt-sync.py index 90b0306..c4e0fb6 100755 --- a/apt-sync.py +++ b/apt-sync.py @@ -23,8 +23,8 @@ requests.utils.default_user_agent = lambda: APT_SYNC_USER_AGENT OS_TEMPLATE = { - 'ubuntu-lts': ["xenial", "bionic", "focal"], - 'debian-current': ["jessie", "stretch", "buster", "bullseye"], + 'ubuntu-lts': ["bionic", "focal", "jammy"], + 'debian-current': ["buster", "bullseye", "bookworm"], 'debian-latest2': ["buster", "bullseye"], 'debian-latest': ["bullseye"], } diff --git a/chef.sh b/chef.sh index f9b58d2..51ab110 100755 --- a/chef.sh +++ b/chef.sh @@ -13,10 +13,10 @@ YUM_PATH="${BASE_PATH}/yum/stable" APT_PATH="${BASE_PATH}/apt/stable" export REPO_SIZE_FILE=/tmp/reposize.$RANDOM -"$yum_sync" "${UPSTREAM}/yum/stable/el/@{os_ver}/@{arch}" 6-8 chef x86_64 "stable-el@{os_ver}-@{arch}" "$YUM_PATH" +"$yum_sync" "${UPSTREAM}/yum/stable/el/@{os_ver}/@{arch}" 7 chef x86_64 "stable-el@{os_ver}-@{arch}" "$YUM_PATH" echo "YUM finished" -"$apt_sync" --delete-dry-run "${UPSTREAM}/apt/stable" @ubuntu-lts,@debian-current main amd64,i386,aarch64 "$APT_PATH" +"$apt_sync" --delete "${UPSTREAM}/apt/stable" @ubuntu-lts,@debian-current main amd64,i386,aarch64 "$APT_PATH" echo "APT finished" "${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm diff --git a/elastic.sh b/elastic.sh index c19882b..4d65e0c 100755 --- a/elastic.sh +++ b/elastic.sh @@ -11,7 +11,7 @@ BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://artifacts.elastic.co"} BASE_PATH="${TUNASYNC_WORKING_DIR%/}" BASE_URL="${BASE_URL%/}" -ELASTIC_VERSION=("5.x" "6.x" "7.x" "8.x") +ELASTIC_VERSION=("6.x" "7.x" "8.x") YUM_PATH="${BASE_PATH}/yum" APT_PATH="${BASE_PATH}/apt" @@ -20,7 +20,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM # =================== APT repos =============================== for elsver in "${ELASTIC_VERSION[@]}"; do - "$apt_sync" --delete-dry-run "${BASE_URL}/packages/${elsver}/apt" stable main amd64,i386 "${APT_PATH}/${elsver}" + "$apt_sync" --delete "${BASE_URL}/packages/${elsver}/apt" stable main amd64,i386 "${APT_PATH}/${elsver}" (cd ${BASE_PATH}/${elsver}; ln -sfn ../apt/${elsver} apt) done diff --git a/erlang.sh b/erlang.sh index f249d9d..4acf092 100755 --- a/erlang.sh +++ b/erlang.sh @@ -21,7 +21,7 @@ echo "Ubuntu finished" echo "Debian finished" # =================== YUM repos =============================== -"$yum_sync" "${BASE_URL}/rpm/centos/@{os_ver}/@{arch}" 6-8 erlang x86_64 "@{os_ver}" "$YUM_PATH" +"$yum_sync" "${BASE_URL}/rpm/centos/@{os_ver}/@{arch}" 7 erlang x86_64 "@{os_ver}" "$YUM_PATH" echo "YUM finished" "${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm diff --git a/gitlab-ce.sh b/gitlab-ce.sh index eb1c44b..11060d0 100755 --- a/gitlab-ce.sh +++ b/gitlab-ce.sh @@ -15,12 +15,12 @@ UBUNTU_PATH="${BASE_PATH}/ubuntu/" DEBIAN_PATH="${BASE_PATH}/debian/" export REPO_SIZE_FILE=/tmp/reposize.$RANDOM -"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}/" 6-8 "gitlab" x86_64 "el@{os_ver}" "$YUM_PATH" +"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}/" 7 "gitlab" x86_64 "el@{os_ver}" "$YUM_PATH" echo "YUM finished" -"$apt_sync" --delete-dry-run "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH" +"$apt_sync" --delete "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH" echo "Ubuntu finished" -"$apt_sync" --delete-dry-run "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH" +"$apt_sync" --delete "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH" echo "Debian finished" "${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm diff --git a/gitlab-ci-multi-runner.sh b/gitlab-ci-multi-runner.sh index 5a12851..d56ba17 100755 --- a/gitlab-ci-multi-runner.sh +++ b/gitlab-ci-multi-runner.sh @@ -14,12 +14,12 @@ YUM_PATH="${BASE_PATH}/yum" UBUNTU_PATH="${BASE_PATH}/ubuntu/" DEBIAN_PATH="${BASE_PATH}/debian/" -"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 6-7 gitlab-ci-multi-runner x86_64 "el@{os_ver}" "$YUM_PATH" +"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 7 gitlab-ci-multi-runner x86_64 "el@{os_ver}" "$YUM_PATH" echo "YUM finished" -"$apt_sync" --delete-dry-run "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH" +"$apt_sync" --delete "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH" echo "Ubuntu finished" -"$apt_sync" --delete-dry-run "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH" +"$apt_sync" --delete "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH" echo "Debian finished" diff --git a/gitlab-runner.sh b/gitlab-runner.sh index c43cb56..f823d08 100755 --- a/gitlab-runner.sh +++ b/gitlab-runner.sh @@ -15,7 +15,7 @@ UBUNTU_PATH="${BASE_PATH}/ubuntu/" DEBIAN_PATH="${BASE_PATH}/debian/" export REPO_SIZE_FILE=/tmp/reposize.$RANDOM -"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 6-8 gitlab-runner x86_64,aarch64 "el@{os_ver}-@{arch}" "$YUM_PATH" +"$yum_sync" "${UPSTREAM}/el/@{os_ver}/@{arch}" 7 gitlab-runner x86_64,aarch64 "el@{os_ver}-@{arch}" "$YUM_PATH" echo "YUM finished" "$apt_sync" --delete "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386,arm64 "$UBUNTU_PATH" diff --git a/influxdata.sh b/influxdata.sh index d75d4d1..d874666 100755 --- a/influxdata.sh +++ b/influxdata.sh @@ -26,7 +26,7 @@ echo "Debian finished" # =================== YUM/DNF repos ========================== -"$yum_sync" "${BASE_URL}/rhel/@{os_ver}/@{arch}/stable/" 6-8 influxdata x86_64 "el@{os_ver}-@{arch}" "$YUM_PATH" +"$yum_sync" "${BASE_URL}/rhel/@{os_ver}/@{arch}/stable/" 7 influxdata x86_64 "el@{os_ver}-@{arch}" "$YUM_PATH" echo "YUM finished" "${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm diff --git a/llvm-apt.sh b/llvm-apt.sh index 5151729..e8bf375 100755 --- a/llvm-apt.sh +++ b/llvm-apt.sh @@ -10,7 +10,7 @@ BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://apt.llvm.org"} export REPO_SIZE_FILE=/tmp/reposize.$RANDOM -for os in "xenial" "bionic" "focal" "stretch" "buster" "bullseye"; do +for os in "bionic" "focal" "jammy" "buster" "bullseye" "bookworm"; do prefix=llvm-toolchain-$os "$apt_sync" --delete "$BASE_URL/$os" $prefix,$prefix-9,$prefix-10,$prefix-11,$prefix-12,$prefix-13,$prefix-14 main amd64 "$BASE_PATH/$os" done diff --git a/mongodb.sh b/mongodb.sh index 235e004..4f2710c 100755 --- a/mongodb.sh +++ b/mongodb.sh @@ -8,7 +8,7 @@ yum_sync="${_here}/yum-sync.py" BASE_PATH="${TUNASYNC_WORKING_DIR}" BASE_URL=${TUNASYNC_UPSTREAM_URL:-"http://repo.mongodb.org"} -MONGO_VERSIONS=("5.0" "4.4" "4.2" "4.0" "3.6") +MONGO_VERSIONS=("5.0" "4.4" "4.2") STABLE_VERSION="5.0" YUM_PATH="${BASE_PATH}/yum" @@ -19,7 +19,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM components=$(printf ",%s" "${MONGO_VERSIONS[@]}") components=${components:1} -"$yum_sync" "${BASE_URL}/yum/redhat/@{os_ver}/mongodb-org/@{comp}/@{arch}/" 6-8 "$components" x86_64 "el@{os_ver}-@{comp}" "$YUM_PATH" +"$yum_sync" "${BASE_URL}/yum/redhat/@{os_ver}/mongodb-org/@{comp}/@{arch}/" 7 "$components" x86_64 "el@{os_ver}-@{comp}" "$YUM_PATH" pushd "${YUM_PATH}" for stable in el*-${STABLE_VERSION}; do # e.g. "el8" -> "el8-4.2" @@ -29,9 +29,9 @@ popd echo "YUM finished" components=$(printf ",@{ubuntu-lts}/mongodb-org/%s" "${MONGO_VERSIONS[@]}") -"$apt_sync" --delete-dry-run "$BASE_URL/apt/ubuntu" "${components:1}" multiverse amd64,i386,arm64 "$UBUNTU_PATH" +"$apt_sync" --delete "$BASE_URL/apt/ubuntu" "${components:1}" multiverse amd64,i386,arm64 "$UBUNTU_PATH" components=$(printf ",@{debian-current}/mongodb-org/%s" "${MONGO_VERSIONS[@]}") -"$apt_sync" --delete-dry-run "$BASE_URL/apt/debian" "${components:1}" main amd64,i386 "$DEBIAN_PATH" +"$apt_sync" --delete "$BASE_URL/apt/debian" "${components:1}" main amd64,i386 "$DEBIAN_PATH" for dist in "$BASE_URL"/apt/*/dists/*/mongodb-org/; do stable=${STABLE_VERSION} diff --git a/mysql.sh b/mysql.sh index ec1be1d..9f5a6d2 100755 --- a/mysql.sh +++ b/mysql.sh @@ -34,15 +34,15 @@ if [[ -z ${DRY_RUN:-} ]]; then fi # =================== APT repos =============================== -MYSQL_APT_REPOS="mysql-5.6,mysql-5.7,mysql-tools,connector-python-2.1,mysql-8.0" -"$apt_sync" --delete "${BASE_URL}/apt/ubuntu" trusty,@ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}" +MYSQL_APT_REPOS="mysql-5.7,mysql-tools,connector-python-2.1,mysql-8.0" +"$apt_sync" --delete "${BASE_URL}/apt/ubuntu" @ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}" echo "Ubuntu finished" "$apt_sync" --delete "${BASE_URL}/apt/debian" @debian-current $MYSQL_APT_REPOS amd64,i386 "${DEBIAN_PATH}" echo "Debian finished" # =================== YUM/DNF repos ========================== -COMPONENTS="mysql-connectors-community,mysql-tools-community,mysql-8.0-community,mysql-5.6-community,mysql-5.7-community" -"$yum_sync" "${BASE_URL}/yum/@{comp}/el/@{os_ver}/@{arch}/" 6-8 "$COMPONENTS" x86_64,aarch64 "@{comp}-el@{os_ver}-@{arch}" "$YUM_PATH" +COMPONENTS="mysql-connectors-community,mysql-tools-community,mysql-8.0-community,mysql-5.7-community" +"$yum_sync" "${BASE_URL}/yum/@{comp}/el/@{os_ver}/@{arch}/" 7 "$COMPONENTS" x86_64,aarch64 "@{comp}-el@{os_ver}-@{arch}" "$YUM_PATH" echo "YUM finished" "${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm diff --git a/openmediavault.sh b/openmediavault.sh index a414c2c..d350f2e 100755 --- a/openmediavault.sh +++ b/openmediavault.sh @@ -8,8 +8,8 @@ apt_sync="${_here}/apt-sync.py" BASE_PATH="${TUNASYNC_WORKING_DIR}" BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://packages.openmediavault.org/public"} -DISTS=shaitan-proposed,shaitan,arrakis-proposed,arrakis,usul-proposed,usul -EXTRA_DISTS=shaitan-beta,shaitan-testing,shaitan,arrakis-docker,arrakis-plex,arrakis-sync,arrakis-teamviewer,arrakis,usul-beta,usul-extras,usul-testing,usul +DISTS=shaitan-proposed,shaitan,usul-proposed,usul +EXTRA_DISTS=shaitan-beta,shaitan-testing,shaitan,usul-beta,usul-extras,usul-testing,usul ARCHS=amd64,i386,arm64,armel,armhf export REPO_SIZE_FILE=/tmp/reposize.$RANDOM diff --git a/proxmox.sh b/proxmox.sh index fab0176..22dbfdb 100755 --- a/proxmox.sh +++ b/proxmox.sh @@ -13,7 +13,7 @@ APT_PATH="${BASE_PATH}/debian" # === download deb packages ==== -"$apt_sync" --delete-dry-run "${BASE_URL}/debian" @debian-current pve-no-subscription,pvetest amd64 "$APT_PATH" +"$apt_sync" --delete "${BASE_URL}/debian" @debian-current pve-no-subscription,pvetest amd64 "$APT_PATH" echo "Debian finished" # === download standalone files ==== diff --git a/rudder.sh b/rudder.sh index 3d0a9f6..8409396 100755 --- a/rudder.sh +++ b/rudder.sh @@ -16,7 +16,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM components=$(printf ",%s" "${RUDDER_VERS[@]}") components=${components:1} -"$yum_sync" "${UPSTREAM}/rpm/@{comp}/RHEL_@{os_ver}/" 6-8 $components x86_64 "rudder@{comp}-RHEL_@{os_ver}" "$YUM_PATH" +"$yum_sync" "${UPSTREAM}/rpm/@{comp}/RHEL_@{os_ver}/" 7 $components x86_64 "rudder@{comp}-RHEL_@{os_ver}" "$YUM_PATH" echo "YUM finished" for ver in ${RUDDER_VERS[@]}; do diff --git a/virtualbox.sh b/virtualbox.sh index 435499b..2a6b95f 100755 --- a/virtualbox.sh +++ b/virtualbox.sh @@ -19,7 +19,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM # === download rhel packages ==== -"$yum_sync" "${BASE_URL}/rpm/el/@{os_ver}/@{arch}" 5-8 VirtualBox x86_64 "el@{os_ver}" "$YUM_PATH" +"$yum_sync" "${BASE_URL}/rpm/el/@{os_ver}/@{arch}" 7 VirtualBox x86_64 "el@{os_ver}" "$YUM_PATH" echo "YUM finished" # === download deb packages ==== diff --git a/yum-sync.py b/yum-sync.py index 280d3ac..4dc00fb 100755 --- a/yum-sync.py +++ b/yum-sync.py @@ -144,7 +144,7 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument("base_url", type=str, help="base URL") - parser.add_argument("os_version", type=str, help="e.g. 6-8") + parser.add_argument("os_version", type=str, help="e.g. 7-8") parser.add_argument("component", type=str, help="e.g. mysql56-community,mysql57-community") parser.add_argument("arch", type=str, help="e.g. x86_64") parser.add_argument("repo_name", type=str, help="e.g. @{comp}-el@{os_ver}")