[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Adjust share/debian-edu-config/tools/{ltsp-addfirmware, pxe-addfirmware}

Wolfgang Schweer (@schweer-guest) gitlab at salsa.debian.org
Sun Oct 3 23:45:44 BST 2021



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
0adca525 by Wolfgang Schweer at 2021-10-04T00:41:21+02:00
Adjust share/debian-edu-config/tools/{ltsp-addfirmware,pxe-addfirmware}

ltsp-addfirmware: Adjust script to be usable with re-written LTSP and add it to
the binary package. Also, exclude firmware-microbit-micropython{-dl} and
packages requiring interactive EULA acceptance.

pxe-addfirmware: Exclude unusable package(s) firmware-microbit-micropython{-dl}.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


4 changed files:

- Makefile
- debian/changelog
- share/debian-edu-config/tools/ltsp-addfirmware
- share/debian-edu-config/tools/pxe-addfirmware


Changes:

=====================================
Makefile
=====================================
@@ -288,6 +288,7 @@ install: install-testsuite
 		share/debian-edu-config/tools/ldappasswd2 \
 		share/debian-edu-config/tools/locate-syslog-collector \
 		share/debian-edu-config/tools/logoutkill.sh \
+		share/debian-edu-config/tools/ltsp-addfirmware \
 		share/debian-edu-config/tools/missing-desktop-file \
 		share/debian-edu-config/tools/movehome \
 		share/debian-edu-config/tools/nightkill.sh \


=====================================
debian/changelog
=====================================
@@ -31,6 +31,12 @@ debian-edu-config (2.12.5) UNRELEASED; urgency=medium
   * sbin/debian-edu-ltsp-install:
     - Use last edit date to improve version information.
     - Minor fixes (typos and copy paste errors).
+  * share/debian-edu-config/tools/ltsp-addfirmware:
+    - Adjust script to be usable with re-written LTSP and add it to the binary
+      package. Also, exclude firmware-microbit-micropython{-dl} and packages
+      requiring interactive EULA acceptance.
+  * share/debian-edu-config/tools/pxe-addfirmware:
+    - Also exclude unusable package(s) firmware-microbit-micropython{-dl}.
 
  -- Mike Gabriel <sunweaver at debian.org>  Sun, 03 Oct 2021 10:13:28 +0200
 


=====================================
share/debian-edu-config/tools/ltsp-addfirmware
=====================================
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
-# Add non-free firmware to the chroot used by ltsp to enable certain
+# Adds non-free firmware to the chroot used by LTSP to enable certain
 # network cards (Intel, Broadcom, ...). Takes package name as param,
-# or add all firmware packages if no package name is given.
+# or adds all firmware packages if no package name is given.
 
 set -e
 
@@ -12,33 +12,45 @@ then
     cat <<EOF
 
 Usage information:
-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. Prepend arch=<non default arch> to the command if server arch and
-LTSP chroot arch differ.
+
+(1) Run apt-get update and apt-cache search ^firmware-.* in the LTSP chroot.
+    Example for the default diskless workstation chroot:
+    debian-edu-ltsp-chroot -b /srv/ltsp/dlw apt update
+    debian-edu-ltsp-chroot -b /srv/ltsp/dlw apt-cache search ^firmware-.*
+(2) Decide which package has to be installed for the network card.
+(3) Call this script with the package name as parameter.
+    If no parameter is used, all firmware packages will be installed in the default
+    LTSP chroot (/srv/ltsp/dlw) - not really recommended because the initrd gets bloated!
+
+Please note:
+Prepend BASE=<non default LTSP chroot> to the command in case such a chroot
+should be modified.
+Example: BASE=/srv/ltsp/x2go-display-amd64 ltsp-addfirmware firmware-linux
 
 EOF
     exit 0
 fi
+
+BASE=${BASE:-/srv/ltsp/dlw}
+
 if [ "$1" ] ; then
     debnames="$*"
 else
-    # Find files.  This require non-free to be enabled as APT
-    # repository.
-    # Skip installer debs, to avoid the b43 installers that conflict
-    # with each other.  FIXME review if this is needed after squeeze.
-    debnames="$(apt-cache search ^firmware-.* | grep -v installer | cut -d" " -f1)"
+    # Find files. This requires non-free to be enabled as APT repository.
+    # Skip installer debs to avoid the b43 installers that conflict
+    # with each other.
+    # For bookworm, also exclude firmware-microbit-micropython{-dl} and
+    # packages w/ EULA (firmware-{ivtv,ipw2x00}).
+    # FIXME Review if this is still needed after bookworm.
+    debnames="$(debian-edu-ltsp-chroot -b $BASE sh -c 'apt-cache search ^firmware-.* | grep -v installer | grep -v micropython | grep -v ivtv | grep -v ipw2x00 | cut -d" " -f1')"
 fi
 
-# 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
+# do things in the default LTSP chroot.
+debian-edu-ltsp-chroot -b $BASE apt-get update
+debian-edu-ltsp-chroot -m -b $BASE apt-get -y -q install $debnames
 
 # copy new initrd from chroot to the server tftpboot dir
-ltsp-update-kernels
+ALL_IMAGES=1 ltsp kernel
 
 cat <<EOF
 Done - if no error about an unlocateable package was reported.


=====================================
share/debian-edu-config/tools/pxe-addfirmware
=====================================
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
-# Add (non-free) firmware to the debian-installer initrd used by the
-# PXE installation, to make sure it work on more hardware out of the
+# Adds (non-free) firmware to the debian-installer initrd used by the
+# PXE installation to make sure it works on more hardware out of the
 # box.
 
 set -e
@@ -13,11 +13,13 @@ add_firmware_to_initrd() {
     cd $tmpdir
 
     echo Finding and downloading firmware .debs
-    # Find files.  This require non-free to be enabled as APT
+    # Find files. This requires non-free to be enabled as APT
     # repository.
-    # Skip installer debs, to avoid the b43 installers that conflict
-    # with each other.  FIXME review if this is needed after squeeze.
-    debnames="$(apt-cache search ^firmware-.* | grep -v installer | cut -d" " -f1)"
+    # Skip installer debs to avoid the b43 installers that conflict
+    # with each other.
+    # For bookworm, also exclude firmware-microbit-micropython{-dl}.
+    # FIXME Review if this is still needed after bookworm.
+    debnames="$(apt-cache search ^firmware-.* | grep -v installer | grep -v micropython | cut -d" " -f1)"
 
     # Allow caller to ask for extra debs using environment variable
     debnames="$debnames $FIRMWAREDEBNAMES"



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/0adca525c2baaf066cfaeae4bcb0e8210f61cdca

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/0adca525c2baaf066cfaeae4bcb0e8210f61cdca
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20211003/6d3cbb2e/attachment-0001.htm>


More information about the debian-edu-commits mailing list