aboutsummaryrefslogtreecommitdiff
path: root/docker/debian-dev/bootstrap/apt-source
diff options
context:
space:
mode:
Diffstat (limited to 'docker/debian-dev/bootstrap/apt-source')
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/11/add-deb-src.bash14
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/11/get-domain.bash5
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/11/replace-domain.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/11/replace-http.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/12/add-deb-src.bash22
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/12/get-domain.bash6
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/12/replace-domain.bash7
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/12/replace-http.bash7
-rw-r--r--docker/debian-dev/bootstrap/apt-source/china-source.txt1
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/install-apt-https.bash8
-rwxr-xr-xdocker/debian-dev/bootstrap/apt-source/setup.bash34
11 files changed, 0 insertions, 118 deletions
diff --git a/docker/debian-dev/bootstrap/apt-source/11/add-deb-src.bash b/docker/debian-dev/bootstrap/apt-source/11/add-deb-src.bash
deleted file mode 100755
index e134a00..0000000
--- a/docker/debian-dev/bootstrap/apt-source/11/add-deb-src.bash
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-dir=$(dirname "$0")
-domain=$("$dir/get-domain.bash")
-
-cat <<EOF >> /etc/apt/sources.list
-
-deb-src https://$domain/debian/ bullseye main
-deb-src https://$domain/debian-security/ bullseye-security main
-deb-src https://$domain/debian-updates/ bullseye-updates main
-
-EOF
diff --git a/docker/debian-dev/bootstrap/apt-source/11/get-domain.bash b/docker/debian-dev/bootstrap/apt-source/11/get-domain.bash
deleted file mode 100755
index d44ea65..0000000
--- a/docker/debian-dev/bootstrap/apt-source/11/get-domain.bash
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-sed "s|.*https\?://\([-_.a-zA-Z0-9]\+\)/.*|\\1|;q" /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/11/replace-domain.bash b/docker/debian-dev/bootstrap/apt-source/11/replace-domain.bash
deleted file mode 100755
index 86e88dc..0000000
--- a/docker/debian-dev/bootstrap/apt-source/11/replace-domain.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.bak."
-echo "Replace source domain in /etc/apt/sources.list to $1."
-sed -i.bak "s|\(https\?://\)[-_.a-zA-Z0-9]\+/|\\1$1/|" /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/11/replace-http.bash b/docker/debian-dev/bootstrap/apt-source/11/replace-http.bash
deleted file mode 100755
index fae082a..0000000
--- a/docker/debian-dev/bootstrap/apt-source/11/replace-http.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.bak."
-echo "Replace http to https in /etc/apt/sources.list."
-sed -i.bak 's/https\?/https/' /etc/apt/sources.list
diff --git a/docker/debian-dev/bootstrap/apt-source/12/add-deb-src.bash b/docker/debian-dev/bootstrap/apt-source/12/add-deb-src.bash
deleted file mode 100755
index cf741d6..0000000
--- a/docker/debian-dev/bootstrap/apt-source/12/add-deb-src.bash
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-dir=$(dirname "$0")
-domain=$("$dir/get-domain.bash")
-
-cat <<EOF >> /etc/apt/sources.list.d/debian.sources
-
-Types: deb-src
-URIs: https://$domain/debian
-Suites: bookworm bookworm-updates
-Components: main
-Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
-
-Types: deb-src
-URIs: https://$domain/debian-security
-Suites: bookworm-security
-Components: main
-Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
-
-EOF \ No newline at end of file
diff --git a/docker/debian-dev/bootstrap/apt-source/12/get-domain.bash b/docker/debian-dev/bootstrap/apt-source/12/get-domain.bash
deleted file mode 100755
index a24538c..0000000
--- a/docker/debian-dev/bootstrap/apt-source/12/get-domain.bash
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-grep -e 'URIs:' /etc/apt/sources.list.d/debian.sources | \
- sed -E 's|URIs:\s*https?://([-_.a-zA-Z0-9]+)/.*|\1|;q'
diff --git a/docker/debian-dev/bootstrap/apt-source/12/replace-domain.bash b/docker/debian-dev/bootstrap/apt-source/12/replace-domain.bash
deleted file mode 100755
index d55307c..0000000
--- a/docker/debian-dev/bootstrap/apt-source/12/replace-domain.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list.d/debian.sources to /etc/apt/sources.list.d/debian.sources.bak."
-echo "Replace source domain in /etc/apt/sources.list.d/debian.sources to $1."
-sed -i.bak -E "s|(URIs:\\s*https?://)[-_.a-zA-Z0-9]+(/.*)|\\1$1\\2|" /etc/apt/sources.list.d/debian.sources
diff --git a/docker/debian-dev/bootstrap/apt-source/12/replace-http.bash b/docker/debian-dev/bootstrap/apt-source/12/replace-http.bash
deleted file mode 100755
index ed4391d..0000000
--- a/docker/debian-dev/bootstrap/apt-source/12/replace-http.bash
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.d/debian.sources.bak."
-echo "Replace http to https in /etc/apt/sources.list.d/debian.sources."
-sed -i.bak -E "s|(URIs:\\s*)https?(://[-_.a-zA-Z0-9]+/.*)|\\1https\\2|" /etc/apt/sources.list.d/debian.sources
diff --git a/docker/debian-dev/bootstrap/apt-source/china-source.txt b/docker/debian-dev/bootstrap/apt-source/china-source.txt
deleted file mode 100644
index 4312686..0000000
--- a/docker/debian-dev/bootstrap/apt-source/china-source.txt
+++ /dev/null
@@ -1 +0,0 @@
-mirrors.tuna.tsinghua.edu.cn \ No newline at end of file
diff --git a/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash b/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash
deleted file mode 100755
index 70fb371..0000000
--- a/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-echo "Install apt https transport."
-apt-get update
-apt-get install -y apt-utils
-apt-get install -y apt-transport-https ca-certificates
diff --git a/docker/debian-dev/bootstrap/apt-source/setup.bash b/docker/debian-dev/bootstrap/apt-source/setup.bash
deleted file mode 100755
index cdf68af..0000000
--- a/docker/debian-dev/bootstrap/apt-source/setup.bash
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env bash
-
-set -e
-
-dir=/bootstrap/apt-source
-
-echo "Getting debian version..."
-debian_version=$("$dir/../get-debian-version.bash")
-
-if [[ -z $debian_version ]]; then
- echo "Debian version not found."
- exit 1
-else
- echo "Debian version: $debian_version"
-fi
-
-if [[ $debian_version -ge 12 ]]; then
- setup_dir=$dir/12
-else
- setup_dir=$dir/11
-fi
-
-echo "Setting up apt source..."
-
-if [[ -n $CRUPEST_DEBIAN_DEV_IN_CHINA ]]; then
- echo "In China, using China source..."
- "$setup_dir/replace-domain.bash" "$(cat "$dir/china-source.txt")"
-fi
-
-"$dir/install-apt-https.bash"
-"$setup_dir/replace-http.bash"
-"$setup_dir/add-deb-src.bash"
-
-echo "Setting up apt source done."