Source: ltsp Version: 5.18.04-2 Severity: normal Hi,
while testing Debian Edu buster, I noticed that the DIST value might not be available via 'lsb_release -sc' (due to related module missing). Using /etc/debian_version seems to work reliably. Please check. Wolfgang
From 82c0bc3703e4d67da4d4951cce61b316ccf8be80 Mon Sep 17 00:00:00 2001 From: Wolfgang Schweer <[email protected]> Date: Tue, 24 Jul 2018 18:17:02 +0200 Subject: [PATCH 1/3] Add option '--default-nfs' to ltsp-build-client. If called with this param, LTSP-NFS is used as default (instead of LTSP-NBD). Also, setting DEFAULT_NFS to 'True' in custom scripts will do the same. --- .../ltsp-build-client/Debian/095-squashfs-image | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image index 7c5223c9..4448b1c0 100644 --- a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image +++ b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image @@ -1,7 +1,8 @@ case "$MODE" in commandline) add_option "squashfs-image" "`eval_gettext "create squashfs image for use with NBD"`" "advanced" "false" - add_option "no-squashfs-image" "`eval_gettext "skip squashfs image creation"`" "advanced" "false" + add_option "no-squashfs-image" "`eval_gettext "skip squashfs image creation"`" "advanced" "false" + add_option "default-nfs" "`eval_gettext "use NFS instead of NBD as default"`" "advanced" "false" ;; configure) if [ -n "$option_squashfs_image_value" ]; then @@ -12,9 +13,18 @@ case "$MODE" in # set an environment variable we can pick up later SQUASHFS_IMAGE="False" fi + if [ -n "$option_default_nfs_value" ]; then + # set an environment variable we can pick up later + DEFAULT_NFS="True" + fi if [ -z "$SQUASHFS_IMAGE" ]; then - SQUASHFS_IMAGE="True" - fi + SQUASHFS_IMAGE="True" + fi + ;; + after-install) + if [ "True" = "$DEFAULT_NFS" ]; then + sed -i 's#NBD AOE NFS#NFS NBD AOE#' $ROOT/etc/ltsp/update-kernels.conf + fi ;; finalization) if [ "True" = "$SQUASHFS_IMAGE" ]; then -- 2.19.1 From 9cff4059a1aca3c3fde78d911655481441e80ab7 Mon Sep 17 00:00:00 2001 From: Wolfgang Schweer <[email protected]> Date: Fri, 19 Oct 2018 11:44:29 +0200 Subject: [PATCH 2/3] Adjust server/Debian/share/ltsp/ltsp-build-client-functions to be apt compliant. Due to security concerns, file:/// repositories are no longer considered to be trusted by default. If a complete ISO image is used to install LTSP in offline mode, such a repository is actually present. Adding [trusted=yes] enables it. --- server/Debian/share/ltsp/ltsp-build-client-functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/Debian/share/ltsp/ltsp-build-client-functions b/server/Debian/share/ltsp/ltsp-build-client-functions index b338847c..28421b82 100644 --- a/server/Debian/share/ltsp/ltsp-build-client-functions +++ b/server/Debian/share/ltsp/ltsp-build-client-functions @@ -18,7 +18,9 @@ add_mirrors() { echo "deb $mirror $dist $components" >> $ROOT/etc/apt/sources.list case $mirror in - file:///*) dir=$(echo "$mirror" | sed -e 's,^file://,,g') + file:///*) + sed -i 's/deb/deb [trusted=yes]/' $ROOT/etc/apt/sources.list + dir=$(echo "$mirror" | sed -e 's,^file://,,g') mkdir -p $ROOT/$dir chroot_mount $dir $dir --bind ;; -- 2.19.1 From 9f9bb6723181af1ca14ef9be1bab51c3332b52bd Mon Sep 17 00:00:00 2001 From: Wolfgang Schweer <[email protected]> Date: Fri, 19 Oct 2018 11:54:41 +0200 Subject: [PATCH 3/3] Make 'ltsp-build-client/Debian/000-basic-configuration' more robust. The DIST value set via 'lsb_release -s -c' might be 'n/a' in case of offline installations. Rather fetch the information from /etc/debian_version (shipped with 'base-files'). --- .../plugins/ltsp-build-client/Debian/000-basic-configuration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/share/ltsp/plugins/ltsp-build-client/Debian/000-basic-configuration b/server/share/ltsp/plugins/ltsp-build-client/Debian/000-basic-configuration index 983605f4..30d04dcf 100644 --- a/server/share/ltsp/plugins/ltsp-build-client/Debian/000-basic-configuration +++ b/server/share/ltsp/plugins/ltsp-build-client/Debian/000-basic-configuration @@ -2,7 +2,7 @@ case "$MODE" in configure) ARCH=${ARCH:-"$(dpkg --print-architecture)"} APT_GET_OPTS=${APT_GET_OPTS:-"-y"} - DIST=${DIST:-"$(lsb_release -s -c)"} + DIST=${DIST:-"$(cat /etc/debian_version | cut -d'/' -f1)"} MIRROR=${MIRROR:-"http://deb.debian.org/debian"} COMPONENTS=${COMPONENTS:-"main"} EARLY_PACKAGES=${EARLY_PACKAGES:-"ltsp-client"} -- 2.19.1
signature.asc
Description: PGP signature

