[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4a7d356 12/18: Extract marked blocks into sub
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 4a7d356 12/18: Extract marked blocks into sub-scripts #11 |
Date: |
Thu, 21 May 2020 19:43:12 -0400 (EDT) |
branch: master
commit 4a7d356cb1f7cce7a8543884441f793eb23f4dd5
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Extract marked blocks into sub-scripts #11
Deleted two large blocks that were all contained in 'lmi_setup_11.sh',
replacing them with calls to that sub-script.
---
install_centos_1.sh | 46 +---------------------------------------------
install_redhat.sh | 48 +-----------------------------------------------
2 files changed, 2 insertions(+), 92 deletions(-)
diff --git a/install_centos_1.sh b/install_centos_1.sh
index 956ffa0..418af78 100755
--- a/install_centos_1.sh
+++ b/install_centos_1.sh
@@ -37,48 +37,4 @@ assert_not_chrooted
yum --assumeyes install debootstrap schroot
# END ./lmi_setup_10.sh
-# BEGIN ./lmi_setup_11.sh
-# Cache apt archives for the chroot's debian release, to save a great
-# deal of bandwidth if multiple chroots are created with the same
-# release. Do this:
-# - before invoking 'debootstrap' (or 'apt-get' in the chroot),
-# so that all packages are cached; and
-# - while not chrooted, so that the host filesystem is accessible.
-# The alternative of rbind-mounting parent directory var/cache/apt
-# might be investigated.
-CACHEDIR=/var/cache/"${CODENAME}"
-mkdir -p "${CACHEDIR}"
-
-# Bootstrap a minimal debian system. Options:
-# --include=zsh, because of "shell=/bin/zsh" below
-# --variant=minbase, as explained here:
-# https://lists.nongnu.org/archive/html/lmi/2020-05/msg00026.html
-mkdir -p /srv/chroot/"${CHRTNAME}"
-debootstrap --arch=amd64 --cache-dir="${CACHEDIR}" \
- --variant=minbase --include=zsh \
- "${CODENAME}" /srv/chroot/"${CHRTNAME}" >"${CHRTNAME}"-debootstrap-log 2>&1
-
-# This command should produce no output:
-grep --invert-match '^I:' "${CHRTNAME}"-debootstrap-log
-
-cat >/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
-[${CHRTNAME}]
-aliases=lmi
-description=debian ${CODENAME} cross build ${CHRTVER}
-directory=/srv/chroot/${CHRTNAME}
-users=${CHROOT_USERS}
-groups=${NORMAL_GROUP}
-root-groups=root
-shell=/bin/zsh
-type=plain
-EOF
-
-# Experimentally show whether anything's already here:
-du -sb /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-# Bind-mount apt archives for the chroot's debian release. Do this:
-# - after invoking 'debootstrap', so the chroot's /var exists; and
-# - before invoking 'apt-get' in the chroot, to save bandwidth; and
-# - while not chrooted, so that the host filesystem is accessible.
-mount --bind "${CACHEDIR}" /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-echo Installed debian "${CODENAME}" chroot.
-# END ./lmi_setup_11.sh
+./lmi_setup_11.sh
diff --git a/install_redhat.sh b/install_redhat.sh
index 8b629e6..aa44869 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -94,53 +94,7 @@ yum --assumeyes install debootstrap schroot
# END ./lmi_setup_10.sh
# ./lmi_setup_10.sh
-# BEGIN ./lmi_setup_11.sh
-# Cache apt archives for the chroot's debian release, to save a great
-# deal of bandwidth if multiple chroots are created with the same
-# release. Do this:
-# - before invoking 'debootstrap' (or 'apt-get' in the chroot),
-# so that all packages are cached; and
-# - while not chrooted, so that the host filesystem is accessible.
-# The alternative of rbind-mounting parent directory var/cache/apt
-# might be investigated.
-CACHEDIR=/var/cache/"${CODENAME}"
-mkdir -p "${CACHEDIR}"
-
-# Bootstrap a minimal debian system. Options:
-# --include=zsh, because of "shell=/bin/zsh" below
-# --variant=minbase, as explained here:
-# https://lists.nongnu.org/archive/html/lmi/2020-05/msg00026.html
-mkdir -p /srv/chroot/"${CHRTNAME}"
-debootstrap --arch=amd64 --cache-dir="${CACHEDIR}" \
- --variant=minbase --include=zsh \
- "${CODENAME}" /srv/chroot/"${CHRTNAME}" >"${CHRTNAME}"-debootstrap-log 2>&1
-
-# This command should produce no output:
-grep --invert-match '^I:' "${CHRTNAME}"-debootstrap-log
-
-cat >/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
-[${CHRTNAME}]
-aliases=lmi
-description=debian ${CODENAME} cross build ${CHRTVER}
-directory=/srv/chroot/${CHRTNAME}
-users=${CHROOT_USERS}
-groups=${NORMAL_GROUP}
-root-groups=root
-shell=/bin/zsh
-type=plain
-EOF
-
-# Experimentally show whether anything's already here:
-du -sb /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-# Bind-mount apt archives for the chroot's debian release. Do this:
-# - after invoking 'debootstrap', so the chroot's /var exists; and
-# - before invoking 'apt-get' in the chroot, to save bandwidth; and
-# - while not chrooted, so that the host filesystem is accessible.
-mount --bind "${CACHEDIR}" /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-
-echo Installed debian "${CODENAME}" chroot.
-# END ./lmi_setup_11.sh
-# ./lmi_setup_11.sh
+./lmi_setup_11.sh
# BEGIN ./lmi_setup_13.sh
mkdir -p /srv/cache_for_lmi
- [lmi-commits] [lmi] master 8d2c26b 03/18: Fold unborn chroot step #12 into step #20, (continued)
- [lmi-commits] [lmi] master 8d2c26b 03/18: Fold unborn chroot step #12 into step #20, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 90411ba 06/18: Use a variable to reduce literal repetition, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 8054eeb 09/18: Don't create chroot's own /var before running debootstrap, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 2b00752 10/18: Note some questions for later investigation, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 7f0f5fa 04/18: Announce the installation of each chroot, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 5134131 02/18: Rearrange some independent script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master a779e6f 05/18: Give all group users access to chroot, on debian host, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master bfd3dae 07/18: Regularize debootstrap invocations, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 0d9cf29 08/18: Clarify documentation, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 455d59e 11/18: Rearrange some script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 4a7d356 12/18: Extract marked blocks into sub-scripts #11,
Greg Chicares <=
- [lmi-commits] [lmi] master 294b7bb 13/18: Let certain commands fail for the moment, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master d496c75 15/18: Move some more script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master dc2ccdb 14/18: Rearrange independent script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master af65430 16/18: Remove a redundant block, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 3776d3f 17/18: Move one script's contents into another, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 8bc4085 18/18: Remove a script that is no longer wanted, Greg Chicares, 2020/05/21