From dfa50afcf0645fa697e304bdee3fbe5a78703420 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 1 Nov 2023 20:58:53 +0800 Subject: (docker:debian-dev) Add more setups(sbuild). --- .../bootstrap/bash-profile-bash-completion.bash | 4 ++++ docker/debian-dev/bootstrap/replace-mirrors.bash | 15 +++++++++++++++ docker/debian-dev/bootstrap/replace-mirrors.sh | 13 ------------- docker/debian-dev/bootstrap/setup-base.bash | 8 ++++++++ docker/debian-dev/bootstrap/setup-dev-tools.bash | 6 ++++++ docker/debian-dev/bootstrap/setup-sbuild.bash | 11 +++++++++++ docker/debian-dev/bootstrap/tuna-source-link.txt | 1 + 7 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 docker/debian-dev/bootstrap/bash-profile-bash-completion.bash create mode 100755 docker/debian-dev/bootstrap/replace-mirrors.bash delete mode 100755 docker/debian-dev/bootstrap/replace-mirrors.sh create mode 100755 docker/debian-dev/bootstrap/setup-base.bash create mode 100755 docker/debian-dev/bootstrap/setup-dev-tools.bash create mode 100755 docker/debian-dev/bootstrap/setup-sbuild.bash create mode 100644 docker/debian-dev/bootstrap/tuna-source-link.txt (limited to 'docker/debian-dev') diff --git a/docker/debian-dev/bootstrap/bash-profile-bash-completion.bash b/docker/debian-dev/bootstrap/bash-profile-bash-completion.bash new file mode 100644 index 0000000..75f8333 --- /dev/null +++ b/docker/debian-dev/bootstrap/bash-profile-bash-completion.bash @@ -0,0 +1,4 @@ +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + diff --git a/docker/debian-dev/bootstrap/replace-mirrors.bash b/docker/debian-dev/bootstrap/replace-mirrors.bash new file mode 100755 index 0000000..4fc07d0 --- /dev/null +++ b/docker/debian-dev/bootstrap/replace-mirrors.bash @@ -0,0 +1,15 @@ +#! /usr/bin/env bash + +set -e + +cp /etc/apt/sources.list /etc/apt/sources.list.bak + +cp /bootstrap/tuna-source-http.txt /etc/apt/sources.list +apt-get update +apt-get install -y apt-transport-https ca-certificates + +cp /bootstrap/tuna-source-https.txt /etc/apt/sources.list +apt-get update + +cp /bootstrap/tuna-source-link.txt /etc/crupest-apt-source + diff --git a/docker/debian-dev/bootstrap/replace-mirrors.sh b/docker/debian-dev/bootstrap/replace-mirrors.sh deleted file mode 100755 index fb797b9..0000000 --- a/docker/debian-dev/bootstrap/replace-mirrors.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /usr/bin/env bash - -set -e - -cp /etc/apt/sources.list /etc/apt/sources.list.bak - -cp /bootstrap/tuna-source-http.txt /etc/apt/sources.list -apt-get update -apt-get install -y apt-transport-https ca-certificates - -cp /bootstrap/tuna-source-https.txt /etc/apt/sources.list -apt-get update - diff --git a/docker/debian-dev/bootstrap/setup-base.bash b/docker/debian-dev/bootstrap/setup-base.bash new file mode 100755 index 0000000..59ad70e --- /dev/null +++ b/docker/debian-dev/bootstrap/setup-base.bash @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +set -e + +apt-get install vim less man bash-completion + +cat /bootstrap/bash-profile-bash-completion.bash > /root/.bash_profile + diff --git a/docker/debian-dev/bootstrap/setup-dev-tools.bash b/docker/debian-dev/bootstrap/setup-dev-tools.bash new file mode 100755 index 0000000..3d1985d --- /dev/null +++ b/docker/debian-dev/bootstrap/setup-dev-tools.bash @@ -0,0 +1,6 @@ +#! /usr/bin/env bash + +set -e + +apt-get install build-essential + diff --git a/docker/debian-dev/bootstrap/setup-sbuild.bash b/docker/debian-dev/bootstrap/setup-sbuild.bash new file mode 100755 index 0000000..30c1af9 --- /dev/null +++ b/docker/debian-dev/bootstrap/setup-sbuild.bash @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +set -e + +if [[ -f /etc/crupest-apt-source ]]; then + CRUPEST_DEB_MIRROR=$(cat /etc/crupest-apt-source) +fi + +apt-get install -y sbuild schroot debootstrap +sbuild-createchroot bullseye /srv/chroot/bullseye-amd64-sbuild ${CRUPEST_DEB_MIRROR} + diff --git a/docker/debian-dev/bootstrap/tuna-source-link.txt b/docker/debian-dev/bootstrap/tuna-source-link.txt new file mode 100644 index 0000000..1a36b19 --- /dev/null +++ b/docker/debian-dev/bootstrap/tuna-source-link.txt @@ -0,0 +1 @@ +https://mirrors.tuna.tsinghua.edu.cn/debian -- cgit v1.2.3