remove eol repo

Ref to https://mirrors.tuna.tsinghua.edu.cn/news/remove-eol-repo/
This commit is contained in:
Zenithal 2022-05-03 22:28:25 +08:00
parent 80e1221e67
commit 989faa98f6
18 changed files with 32 additions and 76 deletions

44
ELK.sh
View File

@ -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

View File

@ -119,11 +119,11 @@ if __name__ == "__main__":
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}",

View File

@ -23,8 +23,8 @@ APT_SYNC_USER_AGENT = os.getenv("APT_SYNC_USER_AGENT", "APT-Mirror-Tool/1.0")
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"],
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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 ====

View File

@ -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

View File

@ -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 ====

View File

@ -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}")