lmi-commits
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]