diff options
author | crupest <crupest@outlook.com> | 2024-08-15 00:08:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-08-15 00:08:43 +0800 |
commit | 909c5e8aa53017eaffd4171835b3c66949c64f7f (patch) | |
tree | 09504e7755b7803e518baaa11d255f35ed6c9817 /docker/debian-dev/bootstrap | |
parent | 1bca7471d864bf859a6189a87adf92856729ec97 (diff) | |
parent | d50545a36323e7a9775ab933021a94a9d98058f4 (diff) | |
download | crupest-909c5e8aa53017eaffd4171835b3c66949c64f7f.tar.gz crupest-909c5e8aa53017eaffd4171835b3c66949c64f7f.tar.bz2 crupest-909c5e8aa53017eaffd4171835b3c66949c64f7f.zip |
Merge branch 'debian-dev'
Diffstat (limited to 'docker/debian-dev/bootstrap')
20 files changed, 0 insertions, 188 deletions
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 3821ffc..0000000 --- a/docker/debian-dev/bootstrap/apt-source/china-source.txt +++ /dev/null @@ -1 +0,0 @@ -mirrors.ustc.edu.cn diff --git a/docker/debian-dev/bootstrap/apt-source/get-domain.bash b/docker/debian-dev/bootstrap/apt-source/get-domain.bash deleted file mode 100755 index d44ea65..0000000 --- a/docker/debian-dev/bootstrap/apt-source/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/install-apt-https.bash b/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash deleted file mode 100755 index 05d372b..0000000 --- a/docker/debian-dev/bootstrap/apt-source/install-apt-https.bash +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env bash - -set -e - -echo "Install apt https transport." -apt-get update -apt-get install -y apt-transport-https ca-certificates diff --git a/docker/debian-dev/bootstrap/apt-source/replace-domain.bash b/docker/debian-dev/bootstrap/apt-source/replace-domain.bash deleted file mode 100755 index 86e88dc..0000000 --- a/docker/debian-dev/bootstrap/apt-source/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/replace-http.bash b/docker/debian-dev/bootstrap/apt-source/replace-http.bash deleted file mode 100755 index fae082a..0000000 --- a/docker/debian-dev/bootstrap/apt-source/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/setup.bash b/docker/debian-dev/bootstrap/apt-source/setup.bash deleted file mode 100755 index 60e635b..0000000 --- a/docker/debian-dev/bootstrap/apt-source/setup.bash +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env bash - -set -e - -dir=$(dirname "$0") - -if [[ -n $IN_CHINA ]]; then - "$dir/replace-domain.bash" "$(cat "$dir/china-source.txt")" -fi - -"$dir/install-apt-https.bash" -"$dir/replace-http.bash" diff --git a/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash b/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash deleted file mode 100644 index f230cb1..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash +++ /dev/null @@ -1,2 +0,0 @@ -echo "Start apt-cacher-ng if it does not start..." -pgrep apt-cacher-ng || apt-cacher-ng diff --git a/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash b/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash deleted file mode 100644 index 75f8333..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/bash-completion.bash +++ /dev/null @@ -1,4 +0,0 @@ -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - diff --git a/docker/debian-dev/bootstrap/bash-profile/dev.bash b/docker/debian-dev/bootstrap/bash-profile/dev.bash deleted file mode 100644 index c49dc35..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/dev.bash +++ /dev/null @@ -1 +0,0 @@ -alias cp-no-git="rsync -a --exclude='**/.git'" diff --git a/docker/debian-dev/bootstrap/bash-profile/dquilt.bash b/docker/debian-dev/bootstrap/bash-profile/dquilt.bash deleted file mode 100644 index 96a4eb2..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/dquilt.bash +++ /dev/null @@ -1,4 +0,0 @@ -alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg" -. /usr/share/bash-completion/completions/quilt -complete -F _quilt_completion $_quilt_complete_opt dquilt - diff --git a/docker/debian-dev/bootstrap/func.bash b/docker/debian-dev/bootstrap/func.bash deleted file mode 100644 index fb2ee77..0000000 --- a/docker/debian-dev/bootstrap/func.bash +++ /dev/null @@ -1,15 +0,0 @@ -is_true() { - if [[ "$1" =~ 1|on|true ]]; then - return 0 - else - return 1 - fi -} - -append-bash-profile() { - cat "/bootstrap/bash-profile/$1" >> /root/.bash_profile -} - -copy-home-dot-file() { - cp "/bootstrap/home-dot/$1" "/root/.$1" -} diff --git a/docker/debian-dev/bootstrap/home-dot/devscripts b/docker/debian-dev/bootstrap/home-dot/devscripts deleted file mode 100644 index a15b041..0000000 --- a/docker/debian-dev/bootstrap/home-dot/devscripts +++ /dev/null @@ -1 +0,0 @@ -export DGET_VERIFY=no
\ No newline at end of file diff --git a/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg b/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg deleted file mode 100644 index e8fc3c5..0000000 --- a/docker/debian-dev/bootstrap/home-dot/quiltrc-dpkg +++ /dev/null @@ -1,13 +0,0 @@ -d=. -while [ ! -d $d/debian -a `readlink -e $d` != / ]; - do d=$d/..; done -if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then - # if in Debian packaging tree with unset $QUILT_PATCHES - QUILT_PATCHES="debian/patches" - QUILT_PATCH_OPTS="--reject-format=unified" - QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto" - QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" - QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:" - QUILT_COLORS="${QUILT_COLORS}diff_ctx=35:diff_cctx=33" - if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi -fi diff --git a/docker/debian-dev/bootstrap/home-dot/sbuildrc b/docker/debian-dev/bootstrap/home-dot/sbuildrc deleted file mode 100644 index b04ff83..0000000 --- a/docker/debian-dev/bootstrap/home-dot/sbuildrc +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# PACKAGE BUILD RELATED (additionally produce _source.changes) -############################################################################## -$distribution = 'bullseye'; - -$build_source = 0; - -#$source_only_changes = 1; -#$verbose = 1; -#$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=5'; -############################################################################## -# POST-BUILD RELATED (turn off functionality by setting variables to 0) -############################################################################## -$run_lintian = 0; -# $lintian_opts = ['-i', '-I']; -$run_piuparts = 0; -# $piuparts_opts = ['--schroot', '%r-%a-sbuild', '--no-eatmydata']; -$run_autopkgtest = 0; -# $autopkgtest_root_args = ''; -# $autopkgtest_opts = [ '--', 'schroot', '%r-%a-sbuild' ]; - -############################################################################## -# PERL MAGIC -############################################################################## -1; diff --git a/docker/debian-dev/bootstrap/sbuild/setup-amd64.bash b/docker/debian-dev/bootstrap/sbuild/setup-amd64.bash deleted file mode 100755 index 2c05e40..0000000 --- a/docker/debian-dev/bootstrap/sbuild/setup-amd64.bash +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env bash - -set -e - -SBUILD_ARCH="amd64" - -sbuild-createchroot --include=eatmydata --command-prefix=eatmydata --arch=${SBUILD_ARCH} ${SBUILD_DIST} /srv/chroot/${SBUILD_DIST}-${SBUILD_ARCH}-sbuild "${SBUILD_MIRROR}" diff --git a/docker/debian-dev/bootstrap/sbuild/setup.bash b/docker/debian-dev/bootstrap/sbuild/setup.bash deleted file mode 100755 index 5180db6..0000000 --- a/docker/debian-dev/bootstrap/sbuild/setup.bash +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env bash - -set -e - -dir=$(dirname $0) - -. /bootstrap/func.bash - -apt-get install -y sbuild schroot debootstrap - -copy-home-dot-file sbuildrc - -# setup apt-cacher-ng -apt-get install -y apt-cacher-ng -append-bash-profile auto-start-apt-cacher.bash -apt-cacher-ng -export SBUILD_MIRROR="http://127.0.0.1:3142/$(/bootstrap/apt-source/get-domain.bash)/debian" - -export SBUILD_DIST="bullseye" - -"$dir/setup-amd64.bash" - -if [[ "$BUILD_FOR_ARCH" == "arm64" ]]; then - "$dir/setup-arm64.bash" -fi diff --git a/docker/debian-dev/bootstrap/setup-base.bash b/docker/debian-dev/bootstrap/setup-base.bash deleted file mode 100755 index dda9e42..0000000 --- a/docker/debian-dev/bootstrap/setup-base.bash +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/env bash - -set -e - -. /bootstrap/func.bash - -apt-get update -apt-get install -y vim less man curl bash-completion rsync - -append-bash-profile bash-completion.bash diff --git a/docker/debian-dev/bootstrap/setup-dev.bash b/docker/debian-dev/bootstrap/setup-dev.bash deleted file mode 100755 index 2e69da7..0000000 --- a/docker/debian-dev/bootstrap/setup-dev.bash +++ /dev/null @@ -1,13 +0,0 @@ -#! /usr/bin/env bash - -set -e - -. /bootstrap/func.bash - -apt-get install -y build-essential git devscripts debhelper quilt \ - cpio kmod bc python bison flex rsync libelf-dev libssl-dev libncurses-dev dwarves - -append-bash-profile dev.bash -append-bash-profile dquilt.bash -copy-home-dot-file devscripts -copy-home-dot-file quiltrc-dpkg diff --git a/docker/debian-dev/bootstrap/setup-user.bash b/docker/debian-dev/bootstrap/setup-user.bash deleted file mode 100755 index 0eccde4..0000000 --- a/docker/debian-dev/bootstrap/setup-user.bash +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env bash - -set -e - -apt-get install -y sudo - -sed -i.bak 's|%sudo[[:space:]]\+ALL=(ALL:ALL)[[:space:]]\+ALL|%sudo ALL=(ALL:ALL) NOPASSWD: ALL|' /etc/sudoers - -useradd -m -G sudo -s /usr/bin/bash "$USERNAME" diff --git a/docker/debian-dev/bootstrap/setup.bash b/docker/debian-dev/bootstrap/setup.bash deleted file mode 100755 index c72db87..0000000 --- a/docker/debian-dev/bootstrap/setup.bash +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env bash - -set -e - -export DEBIAN_FRONTEND=noninteractive - -/bootstrap/apt-source/setup.bash -/bootstrap/setup-user.bash -/bootstrap/setup-base.bash -/bootstrap/setup-dev.bash - -. /bootstrap/func.bash - -if is_true "$SETUP_SBUILD"; then - echo "Setup sbuild..." - /bootstrap/sbuild/setup.bash -else - echo "Sbuild is disabled. Skipped." -fi - |