From: Ian Kelling <iank@fsf.org>
Date: Tue, 11 Mar 2025 14:25:59 +0000 (-0400)
Subject: minor fixes
X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=902fce2e2b7812f662fc366573cebd230c3d3331;p=automated-distro-installer

minor fixes
---

diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes
index a272d75..cbe3456 100755
--- a/fai/config/class/50-host-classes
+++ b/fai/config/class/50-host-classes
@@ -48,7 +48,12 @@ echo FAIBASE STANDARD DEBIAN
 # BULLSEYE_FREE, BULLSEYE_NONFREE
 # BOOKWORM_FREE, BOOKWORM_NONFREE
 # TESTING_FREE, TESTING_NONFREE,
-# XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, ARAMO, ECNE, ECNE_MISSING (some noble packages).
+# XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, ARAMO, ECNE, ECNE_MISSING (some noble packages, probably not needed for FSF server packages).
+#
+# Note: if we find we need to add ubuntu repos from a trisquel install,
+# after adding the sources.list, run:
+# apt-get -o Acquire::AllowInsecureRepositories=true update
+# apt-get -o Acquire::AllowInsecureRepositories=true install ubuntu-keyring
 #
 # It's all a little redundant in some cases, but it keeps things
 # simpler.
diff --git a/fai/config/distro-install-common/new-btrfs-progs b/fai/config/distro-install-common/new-btrfs-progs
index f492a66..0693fcd 100644
--- a/fai/config/distro-install-common/new-btrfs-progs
+++ b/fai/config/distro-install-common/new-btrfs-progs
@@ -11,30 +11,31 @@ if [[ ! -d $FAI_ROOT ]]; then
   export FAI_ROOT=/
 fi
 
+
 ### dependencies
-{
-  for f in $(dpkg-query -L btrfs-progs | grep '/man/|^/s?bin/|^/usr/lib/udev') ; do
-    if [[ ! -f $f ]]; then
-      continue
-    fi
-    # use --no-rename so that I don't need to track whether this was the first
-    # btrfs-progs install.
-    $ROOTCMD dpkg-divert --no-rename --local --add $f
-  done
-
-  # from packages listed in .github/workflows/devel.yml
-  # The dumb makefile makes us build docs even if they were already built.
-  if ! type -p sphinx-build &>/dev/null; then
-    $ROOTCMD apt-get -y install python3-sphinx-rtd-theme
-  fi
+# from packages listed in .github/workflows/devel.yml
+# The dumb makefile makes us build docs even if they were already built.
+if ! type -p sphinx-build &>/dev/null; then
+  $ROOTCMD apt-get -y install python3-sphinx-rtd-theme
+fi
 
-  if ! type -p curl &>/dev/null; then
-    $ROOTCMD apt-get -y install curl
-  fi
-  if ! type -p wget &>/dev/null; then
-    $ROOTCMD apt-get -y install wget
+if ! type -p curl &>/dev/null; then
+  $ROOTCMD apt-get -y install curl
+fi
+if ! type -p wget &>/dev/null; then
+  $ROOTCMD apt-get -y install wget
+fi
+
+
+$ROOTCMD apt-get -y install btrfs-progs
+for f in $(dpkg-query -L btrfs-progs | grep -E '/man/|^/s?bin/|^/usr/lib/udev') ; do
+  if [[ ! -f $f ]]; then
+    continue
   fi
-}
+  # use --no-rename so that I don't need to track whether this was the first
+  # btrfs-progs install.
+  $ROOTCMD dpkg-divert --no-rename --local --add $f
+done
 
 
 ## If we need to use a dev version temporarily, this to true
diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT
index 95006f1..3d64052 100755
--- a/fai/config/hooks/partition.DEFAULT
+++ b/fai/config/hooks/partition.DEFAULT
@@ -367,7 +367,7 @@ $first_boot_dev  /mnt/boot  btrfs    nofail,$fstabstd,noatime,subvolid=0  0 0
 EOF
   if ! fsf; then
     cat >> /tmp/fai/fstab <<EOF
-/dev/mapper/crypt-${vgs[0]}-o  /mnt/o  btrfs       nofail,$fstabstd,noatime,subvolid=0$mopts  0 0
+/dev/mapper/crypt-${vgs[0]}-o  /mnt/o  btrfs       nofail,$fstabstd,noatime,subvolid=0$mopts_o  0 0
 EOF
   fi
   rm -f /tmp/fai/crypttab
@@ -607,6 +607,9 @@ fi
 
 if [[ $HOSTNAME == x[23] ]]; then
   mopts=,nodiscard,flushoncommit
+  mopts_o=$mopts,compress=zstd
+else
+  mopts_o=$mopts
 fi
 
 declare -A disk_excludes
diff --git a/fai/config/scripts/IANK/11-iank b/fai/config/scripts/IANK/11-iank
index b3e1b69..4254f48 100755
--- a/fai/config/scripts/IANK/11-iank
+++ b/fai/config/scripts/IANK/11-iank
@@ -372,9 +372,6 @@ case $HOSTNAME in
 esac
 
 
-#### begin btrfs-progs
+. $FAI/distro-install-common/new-btrfs-progs
 
 ## end get new kernel and btrfs-progs ##
-
-
-. $FAI/distro-install-common/new-btrfs-progs
diff --git a/lk b/lk
index 117e8d4..13f90c7 100755
--- a/lk
+++ b/lk
@@ -29,7 +29,7 @@ You can copy this to a http server, then wget -O- url|sudo bash
 curl is sometimes not preinstalled on a live cd.
 
 Alternative to http server:
-1. on install machine nc -l 1234 | sudo bash
+1. on install machine nc -l 1234 | sudo bash. (note: the other nc is: nc -l -p 1234)
 2. On another machine nc INSTALL_MACHINE 1234 <live-kexec
 Obviously beware that anyone on your network could send commands to the install machine.