From 902fce2e2b7812f662fc366573cebd230c3d3331 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 11 Mar 2025 10:25:59 -0400 Subject: [PATCH] minor fixes --- fai/config/class/50-host-classes | 7 ++- .../distro-install-common/new-btrfs-progs | 43 ++++++++++--------- fai/config/hooks/partition.DEFAULT | 5 ++- fai/config/scripts/IANK/11-iank | 5 +-- lk | 2 +- 5 files changed, 34 insertions(+), 28 deletions(-) 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 <