aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-09 11:58:56 +0200
committerSven Gothel <[email protected]>2021-07-09 11:58:56 +0200
commit1ea95658da01357b189c90e8734edcbb9ee56105 (patch)
treeac8a4a33314d4c906daaadc60f0bc33d4192e826
parentb405e26ef4d6465d1ae42e6d10a75d4635205637 (diff)
Drop recommended packages if using reduced footprint or not explicitly selected (default); Disable apt-cache for all configurations
-rw-r--r--README.md12
-rwxr-xr-xbuild.sh3
-rwxr-xr-xstage0/00-configure-apt/00-run.sh9
3 files changed, 20 insertions, 4 deletions
diff --git a/README.md b/README.md
index 8fb6644..f883383 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,15 @@ The following environment variables are supported:
the ssh host keys are retained while `regenerate_ssh_host_keys` is disabled
and the final `/boot/config.txt` has `splash` disabled (no rainbow).
+* `INSTALL_RECOMMENDS` (Default: unset)
+
+ If set to one, i.e. `INSTALL_RECOMMENDS=1`,
+ installation process will install recommended packages.
+ Otherwise (default):
+ * apt selection without recommended and suggested
+
+ Note: `apt cache` is disabled for all target configurations.
+
* `REDUCED_FOOTPRINT` (Default: unset)
If set to one, i.e. `REDUCED_FOOTPRINT=1`,
@@ -76,7 +85,6 @@ The following environment variables are supported:
This is intended for small devices, perhaps in addition to `ROOTFS_RO=1`.
The following efforts are made:
* apt selection without recommended and suggested
- * apt cache removed
* [Reduced Disk Footprint (Ubuntu)](https://wiki.ubuntu.com/ReducingDiskFootprint#Documentation) for
most `/usr/share/doc` and most `locale`s but [ `en*`, `da*`, `de*`, `es*`, `fi*`, `fr*`, `is*`, `nb*`, `ru*`, `sv*`, `zh*` ],
i.e. includes [`locale`](https://www.localeplanet.com/icu/) for
@@ -100,6 +108,8 @@ The following environment variables are supported:
*stage3b* contains a full *lightdm*, *lxde* and *desktop-base*
+ Note: `apt cache` is disabled for all target configurations.
+
* `BASE_QCOW2_SIZE` (Default: 15200M)
Size of the virtual qcow2 disk given in multiples of 1024, i.e. KiB, MiB or GiB.
diff --git a/build.sh b/build.sh
index 750ed6e..20f3167 100755
--- a/build.sh
+++ b/build.sh
@@ -48,9 +48,10 @@ EOF
if [ -n "$PACKAGES" ]; then
on_chroot << EOF
echo "Installing ${packfile} '${PACKAGES}'"
-if [ "${REDUCED_FOOTPRINT}" = "1" ]; then
+if [ "${INSTALL_RECOMMENDS}" != "1" -o "${REDUCED_FOOTPRINT}" = "1" ]; then
apt-get -o APT::Acquire::Retries=3 install --no-install-recommends -y $PACKAGES
else
+ # "${INSTALL_RECOMMENDS}" = "1" -a "${REDUCED_FOOTPRINT}" != "1"
apt-get -o APT::Acquire::Retries=3 install -y $PACKAGES
fi
EOF
diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh
index 1bad286..07fd76e 100755
--- a/stage0/00-configure-apt/00-run.sh
+++ b/stage0/00-configure-apt/00-run.sh
@@ -16,10 +16,15 @@ else
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
fi
-if [ "${REDUCED_FOOTPRINT}" = "1" ]; then
+# Disable apt caching in general
+install -m 644 files/02nocache "${ROOTFS_DIR}/etc/apt/apt.conf.d/02nocache"
+
+if [ "${INSTALL_RECOMMENDS}" != "1" -o "${REDUCED_FOOTPRINT}" = "1" ]; then
+ # Drop recommended packages if using reduced footprint or not explicitly selected
install -m 644 files/00default-selection "${ROOTFS_DIR}/etc/apt/apt.conf.d/00default-selection"
- install -m 644 files/02nocache "${ROOTFS_DIR}/etc/apt/apt.conf.d/02nocache"
+fi
+if [ "${REDUCED_FOOTPRINT}" = "1" ]; then
install -m 644 files/01_nodoc "${ROOTFS_DIR}/etc/dpkg/dpkg.cfg.d/01_nodoc"
fi