[debian-edu-commits] debian-edu/ 03/15: Use LTSP server architecture for LTSP chroot by default (no amd64 specials).

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sun Feb 4 11:37:18 UTC 2018


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository debian-edu-config.

commit ec209e31eb16f879dbcd40ed84941c80be36564a
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sun Feb 4 12:02:21 2018 +0100

    Use LTSP server architecture for LTSP chroot by default (no amd64 specials).
    
     Adjust various related files to use the new LTSP chroot default.
     - etc/debian-edu/pxeinstall.conf
     - sbin/debian-edu-pxeinstall
     - share/debian-edu-config/tools/ltsp-addfirmware
     - share/debian-edu-config/tools/subnet-change
     - share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
     - testsuite/ldap-client
---
 etc/debian-edu/pxeinstall.conf                     | 10 ++--
 sbin/debian-edu-pxeinstall                         |  2 +-
 share/debian-edu-config/tools/ltsp-addfirmware     | 13 +++---
 share/debian-edu-config/tools/subnet-change        |  2 +-
 .../Debian-custom/000-arch-detection               | 53 ++++++++++------------
 testsuite/ldap-client                              |  2 +-
 6 files changed, 39 insertions(+), 43 deletions(-)

diff --git a/etc/debian-edu/pxeinstall.conf b/etc/debian-edu/pxeinstall.conf
index 5cdd725..b6a1d31 100644
--- a/etc/debian-edu/pxeinstall.conf
+++ b/etc/debian-edu/pxeinstall.conf
@@ -1,14 +1,14 @@
 # Examples for local settings. Run 'debian-edu-pxeinstall' to regenerate
 # the PXE menu for any changes to take effect.
 
-# Default is 32-Bit-PC (aka arch i386) for the LTSP chroot.
-# Set to amd64 if 64-Bit-PC is used; needs appropriate LTSP chroot and
-#  changes in LDAP, see the manual for details.
-#ltsparch=amd64
+# Default LTSP chroot arch is like the server arch.
+# If set differently, an appropriate LTSP chroot and changes in LDAP are
+# needed; see the manual for details.
+#ltsparch=i386
 
 # If e.g. 'apt-cacher-ng' is running on the gateway.
 #http_proxy=http://10.0.0.1:3142
 #ftp_proxy=http://10.0.0.1:3142
 
 # Set a different desktop environment for new installations.
-#desktop=mate
+#desktop=xfce
diff --git a/sbin/debian-edu-pxeinstall b/sbin/debian-edu-pxeinstall
index 1fd9e68..773ae01 100755
--- a/sbin/debian-edu-pxeinstall
+++ b/sbin/debian-edu-pxeinstall
@@ -55,7 +55,7 @@ fi
 
 [ "$dist" ]      || dist=$(lsb_release -sc)
 [ "$archs" ]     || archs="i386 amd64"
-[ "$ltsparch" ]  || ltsparch="i386"
+[ "$ltsparch" ]  || ltsparch=$(dpkg --print-architecture)
 [ "$mirrorurl" ] || mirrorurl=http://deb.debian.org/debian
 [ "$hostname" ]  || hostname=pxeinstall
 [ "$domain" ]    || domain=intern
diff --git a/share/debian-edu-config/tools/ltsp-addfirmware b/share/debian-edu-config/tools/ltsp-addfirmware
index 74c501a..29be3a4 100755
--- a/share/debian-edu-config/tools/ltsp-addfirmware
+++ b/share/debian-edu-config/tools/ltsp-addfirmware
@@ -6,9 +6,9 @@
 
 set -e
 
-# usage 
-if [ "$1" = "-h" ] 
-then 
+# usage
+if [ "$1" = "-h" ]
+then
     cat <<EOF
 
 Usage information:
@@ -16,7 +16,8 @@ Execute: apt-get update && apt-cache search ^firmware-.*
 Decide which package has to be installed for the network card.
 Then call this script with the package name as parameter.  Or do not
 use any parameter and get all firmware packages installed in the LTSP
-chroot.
+chroot. Prepend arch=<non default arch> to the command if server arch and
+LTSP chroot arch differ.
 
 EOF
     exit 0
@@ -31,8 +32,8 @@ else
     debnames="$(apt-cache search ^firmware-.* | grep -v installer | cut -d" " -f1)"
 fi
 
-# do things in the ltsp chroot for arch i386
-arch=i386
+# do things in the ltsp chroot for the default arch.
+[ "$arch" ] || arch=$(dpkg --print-architecture)
 TMP= TMPDIR= ltsp-chroot -a $arch apt-get update
 TMP= TMPDIR= ltsp-chroot -d -a $arch apt-get -y -q install $debnames
 
diff --git a/share/debian-edu-config/tools/subnet-change b/share/debian-edu-config/tools/subnet-change
index bede2ff..4ac22d7 100755
--- a/share/debian-edu-config/tools/subnet-change
+++ b/share/debian-edu-config/tools/subnet-change
@@ -137,7 +137,7 @@ my $dnsupdate = "/usr/share/debian-edu-config/tools/gosa-sync-dns-nfs";
 print "info: Now running $dnsupdate\n";
 system($dnsupdate);
 
-my @rmfiles = qw(/opt/ltsp/i386/etc/ssh/ssh_known_hosts
+my @rmfiles = qw(/opt/ltsp/*/etc/ssh/ssh_known_hosts
                  /etc/debian-edu/xdebian-edu-firstboot);
 
 for my $file (@rmfiles) {
diff --git a/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection b/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
index 2d98768..8aba47b 100644
--- a/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
+++ b/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
@@ -1,37 +1,32 @@
 case $MODE in
   configure)
     ARCH=${ARCH:-"$(dpkg --print-architecture)"}
-    # force building an i386 environment on amd64 servers
-    if [ "$ARCH" = "amd64" ]; then
-	ARCH=i386
-
-	if [ -z "$option_dist_value" ] ; then
-	    option_dist_value=$(lsb_release -sc)
-	    echo "info: Missing LTSP dist value, setting to $option_dist_value"
-	fi
+    if [ -z "$option_dist_value" ] ; then
+	option_dist_value=$(lsb_release -sc)
+	echo "info: Missing LTSP dist value, setting to $option_dist_value"
+    fi
 
-	# Make sure to inherit proxy setting from host, inspired by
-	# ltsp-build-client/Debian/010-http-proxy in the ltsp-server
-	# package.  See also bug #766460.
-	if [ -z "$http_proxy" ]; then
-	    eval $(apt-config shell http_proxy acquire::http::proxy)
-	    [ "$http_proxy" = "false" ] && http_proxy=""
-	    export http_proxy
-	fi
+    # Make sure to inherit proxy setting from host, inspired by
+    # ltsp-build-client/Debian/010-http-proxy in the ltsp-server
+    # package.  See also bug #766460.
+    if [ -z "$http_proxy" ]; then
+	eval $(apt-config shell http_proxy acquire::http::proxy)
+	[ "$http_proxy" = "false" ] && http_proxy=""
+	export http_proxy
+    fi
 
-	# Force network APT source for the netinst CD, as the i386
-	# binaries are missing on the CD.
-	if [ file:///media/cdrom = "$option_mirror_value" ] ; then
-	    if grep -qi "^deb cdrom:.*i386" /etc/apt/sources.list; then
-		echo "info: Found i386 binaries on amd64 CD/DVD.  Keeping LTSP mirror as '$MIRROR'"
-	    else
-		NEWMIRROR=$(awk '/^deb (http|ftp):\/\/.* main/ { if (!first) { print $2; first=1 } }' < /etc/apt/sources.list)
-		echo "info: Changing LTSP mirror from '$option_mirror_value' to '$NEWMIRROR'"
-		option_mirror_value=$NEWMIRROR
-		if [ high = "$http_proxy" ]; then
-		    unset http_proxy
-		    echo "info: http_proxy was set to high, this seems to be a debconf bug, remove it"
-		fi
+    # Force network APT source for the netinst CD, as the i386
+    # binaries are missing on the CD.
+    if [ file:///media/cdrom = "$option_mirror_value" ] ; then
+	if grep -qi "^deb cdrom:.*i386" /etc/apt/sources.list; then
+	    echo "info: Found i386 binaries on amd64 CD/DVD.  Keeping LTSP mirror as '$MIRROR'"
+	else
+	    NEWMIRROR=$(awk '/^deb (http|ftp):\/\/.* main/ { if (!first) { print $2; first=1 } }' < /etc/apt/sources.list)
+	    echo "info: Changing LTSP mirror from '$option_mirror_value' to '$NEWMIRROR'"
+	    option_mirror_value=$NEWMIRROR
+	    if [ high = "$http_proxy" ]; then
+		unset http_proxy
+		echo "info: http_proxy was set to high, this seems to be a debconf bug, remove it"
 	    fi
 	fi
     fi
diff --git a/testsuite/ldap-client b/testsuite/ldap-client
index bfdbc8d..ecbe688 100755
--- a/testsuite/ldap-client
+++ b/testsuite/ldap-client
@@ -220,7 +220,7 @@ fi
 
 if echo "$PROFILE" | egrep -q 'LTSP-Server' ; then
     check_file_perm \
-	/opt/ltsp/i386/etc/ldap/ssl/ldap-server-pubkey.pem 644
+	/opt/ltsp/*/etc/ldap/ssl/ldap-server-pubkey.pem 644
 fi
 
 exit $RESULT

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list