From: Ian Kelling Date: Tue, 3 Dec 2024 13:10:36 +0000 (-0500) Subject: fixes for fresh ecne install X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=06aa416e3bd9ce0d467b364d4c109c99a219f7a7;p=automated-distro-installer fixes for fresh ecne install --- diff --git a/fai-redep b/fai-redep index f893432..95991d0 100755 --- a/fai-redep +++ b/fai-redep @@ -127,7 +127,8 @@ else rsrv -rlpt /q/root/shadow /q/root/luks /fai/config/distro-install-common fi -rsrv -rlpt --delete /a/opt/btrfs-progs-release /a/opt/btrfs-progs /fai/config/distro-install-common +# note: if we need specific btrfs dev version, add/change source to /a/opt/btrfs-progs +rsrv -rlpt --delete /a/opt/btrfs-progs-release /fai/config/distro-install-common dirs=(/p/c/machine_specific/${target:-*}/filesystem/etc/ssh) if [[ -e ${dirs[0]} ]]; then diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes index 7fb3e64..a272d75 100755 --- a/fai/config/class/50-host-classes +++ b/fai/config/class/50-host-classes @@ -48,7 +48,7 @@ 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. +# XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, ARAMO, ECNE, ECNE_MISSING (some noble packages). # # It's all a little redundant in some cases, but it keeps things # simpler. diff --git a/fai/config/class/ECNE.var b/fai/config/class/ECNE.var deleted file mode 100644 index b5191c4..0000000 --- a/fai/config/class/ECNE.var +++ /dev/null @@ -1,5 +0,0 @@ -# note: at least on t12, if linux-libre is installed at the same time or -# before initramfs-tools, then it won't generate an initrd file, until -# you do dpkg-reconfigure - -kernelname=linux-libre diff --git a/fai/config/files/etc/apt/preferences.d/ecne-missing/ECNE b/fai/config/files/etc/apt/preferences.d/ecne-missing/ECNE_MISSING similarity index 100% rename from fai/config/files/etc/apt/preferences.d/ecne-missing/ECNE rename to fai/config/files/etc/apt/preferences.d/ecne-missing/ECNE_MISSING diff --git a/fai/config/files/etc/apt/sources.list.d/ecne-missing.list/ECNE b/fai/config/files/etc/apt/sources.list.d/ecne-missing.list/ECNE_MISSING similarity index 100% rename from fai/config/files/etc/apt/sources.list.d/ecne-missing.list/ECNE rename to fai/config/files/etc/apt/sources.list.d/ecne-missing.list/ECNE_MISSING diff --git a/fai/config/package_config/ECNE_EXTRA.gpg b/fai/config/package_config/MINT.gpg similarity index 100% rename from fai/config/package_config/ECNE_EXTRA.gpg rename to fai/config/package_config/MINT.gpg diff --git a/fai/config/scripts/IANK/11-iank b/fai/config/scripts/IANK/11-iank index 424b57d..a563874 100755 --- a/fai/config/scripts/IANK/11-iank +++ b/fai/config/scripts/IANK/11-iank @@ -54,7 +54,7 @@ if [[ ! -e $dst && -e $src ]]; then mount -o bind $src $dst fi -chmod 700 /mnt/root +chmod 700 $target/mnt/root $FAI/distro-install-common/end @@ -207,19 +207,6 @@ dns=systemd-resolved EOF - if [[ ! $FAI_WRAPPER || $SSH_CLIENT ]]; then - # for running from fai or remote connections, don't kill the internet - ethusb_arg=-c - fi - if [[ $(timeout 1 dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \ - && ip n show 10.2.0.1 | grep . &>/dev/null; then - # we are at_home - $FAI/distro-install-common/ethusb-static $ethusb_arg - else - $FAI/distro-install-common/ethusb-static off $ethusb_arg - fi - - else cat > $target/etc/network/interfaces <<-EOF # generated by FAI @@ -400,25 +387,23 @@ for f in $(dpkg-query -L btrfs-progs | grep '/man/|^/s?bin/|^/usr/lib/udev') ; d $ROOTCMD dpkg-divert --no-rename --local --add $f done -## using dev version for bug fix temporarily. when done, set this to false, -## and we can stop copying it in fai-redep. -static_ver=true +# 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 we need to use a dev version temporarily, this to true +## and copy it over in fai-redep. See comment there. +static_ver=false if $static_ver; then # The version with the bug fix is really some git version, but this is # what it outputs for --version. ver=6.10 bp_dirname=btrfs-progs - if grep -F 'VERSION_CODENAME="aramo"' /etc/os-release; then - bp_dirname=btrfs-progs-t11 - fi else - # 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 - python3-sphinx-rtd-theme bp_dirname=btrfs-progs-release # latest released version. pre=https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs @@ -438,8 +423,10 @@ fi last_built_ver=$($bp_dir/btrfs --version 2>/dev/null | head -n1 | awk '{print $2}') +# todo: this doesn't account for multiple distros versions that require +# their own builds. if [[ $ver != "$cur_ver" ]]; then - # Assume we've build the static_ver version. + # Assumes we've pre-built the static_ver version if we are using that. if $static_ver || [[ $ver == "$last_built_ver" ]]; then if ! $ROOTCMD dpkg -s -- build-essential 2>&1 | grep -Fx "Status: install ok installed" &>/dev/null; then $ROOTCMD apt-get -y install build-essential @@ -460,7 +447,7 @@ if [[ $ver != "$cur_ver" ]]; then $ROOTCMD bash -xe <