From: Ian Kelling Date: Tue, 13 May 2025 00:14:51 +0000 (-0400) Subject: mainly minor fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=c8de544e75c2eb771339fe8c50054880022e975f;p=automated-distro-installer mainly minor fixes --- diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes index cbe3456..8cc7928 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, ECNE_MISSING (some noble packages, probably not needed for FSF server packages). +# XENIAL_FREE, BIONIC, FOCAL, FLIDAS, ETIONA, NABIA, ARAMO, ECNE, ECNE_MISSING (some noble packages, probably not needed for FSF server packages. The most notable ). # # Note: if we find we need to add ubuntu repos from a trisquel install, # after adding the sources.list, run: diff --git a/fai/config/distro-install-common/install-mainline-kernel-debs b/fai/config/distro-install-common/install-mainline-kernel-debs index 82cd5f3..e0cafc6 100755 --- a/fai/config/distro-install-common/install-mainline-kernel-debs +++ b/fai/config/distro-install-common/install-mainline-kernel-debs @@ -58,7 +58,7 @@ cd $outertmp # We get 10 versions cuz maybe the latest directory (or few) get created but not populated. tmps=$(curl -s https://kernel.ubuntu.com/mainline/ | \ sed -rn 's,.*alt="\[DIR\]".*href="([^/]+).*,\1,p' | \ - grep -v -- -rc | sed 's/^v//' | grep "^$kernel_ver" | sort -Vr | head -n10) + grep -v -- -rc | sed 's/^v//' | grep "^$kernel_ver" | sort -Vr | head -n10 || [[ $? == 141 ]]) mapfile -t latest_versions <<<"$tmps" for va in "${latest_versions[@]}"; do diff --git a/fai/config/distro-install-common/new-btrfs-progs b/fai/config/distro-install-common/new-btrfs-progs index 0693fcd..086c25d 100644 --- a/fai/config/distro-install-common/new-btrfs-progs +++ b/fai/config/distro-install-common/new-btrfs-progs @@ -7,6 +7,9 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" +set -eE -o pipefail +trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR + if [[ ! -d $FAI_ROOT ]]; then export FAI_ROOT=/ fi @@ -19,9 +22,6 @@ 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 fi @@ -51,7 +51,7 @@ else bp_dirname=btrfs-progs-release # latest released version. pre=https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs - tarball=$(curl -s $pre/sha256sums.asc \ + tarball=$(wget -q -O- $pre/sha256sums.asc \ | awk '$2 ~ /^btrfs-progs-v/ { print $2 }' | grep -v -- -rc | grep "^btrfs-progs-v.*gz\$" | sort -V | tail -n1) url="$pre/$tarball" dir=${tarball%.tar.gz} @@ -121,7 +121,7 @@ cd /tmp/${tarball%.tar.gz} ./configure --prefix=/usr make make install -mv /usr/bin/{fsck,mkfs}.btrfs /usr/sbin/ +cp /usr/bin/{fsck,mkfs}.btrfs /usr/sbin/ EOF # If our desktop is HOST2, will we btrbk this latest bprogs to other # machines. diff --git a/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE b/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE index 7009cb0..34b7847 100644 --- a/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE +++ b/fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE @@ -2,13 +2,13 @@ # https://www.gnu.org/licenses/license-list.html#fdk ###### Ubuntu Main Repos -deb http://archive.ubuntu.com/ubuntu/ noble main universe multiverse restricted -deb-src http://archive.ubuntu.com/ubuntu/ noble main universe multiverse restricted +deb http://archive.ubuntu.com/ubuntu/ noble restricted +deb-src http://archive.ubuntu.com/ubuntu/ noble restricted ###### Ubuntu Update Repos -deb http://archive.ubuntu.com/ubuntu/ noble-security main universe multiverse restricted -deb http://archive.ubuntu.com/ubuntu/ noble-updates main universe multiverse restricted -deb http://archive.ubuntu.com/ubuntu/ noble-backports main universe multiverse restricted -deb-src http://archive.ubuntu.com/ubuntu/ noble-security main universe multiverse restricted -deb-src http://archive.ubuntu.com/ubuntu/ noble-updates main universe multiverse restricted -deb-src http://archive.ubuntu.com/ubuntu/ noble-backports main universe multiverse restricted +deb http://archive.ubuntu.com/ubuntu/ noble-security restricted +deb http://archive.ubuntu.com/ubuntu/ noble-updates restricted +deb http://archive.ubuntu.com/ubuntu/ noble-backports restricted +deb-src http://archive.ubuntu.com/ubuntu/ noble-security restricted +deb-src http://archive.ubuntu.com/ubuntu/ noble-updates restricted +deb-src http://archive.ubuntu.com/ubuntu/ noble-backports restricted diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index 3d64052..cc7ff9e 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -16,9 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # todo /boot/chboot needs update for lvm i think? -# -# todo: this is complicated enough that set -u is appropriate, but -# needs some changes in how we check for empty vars. PS4='+ $LINENO ' set -eE -o pipefail diff --git a/wrt-setup b/wrt-setup index 175d24c..76d72b8 100755 --- a/wrt-setup +++ b/wrt-setup @@ -73,7 +73,7 @@ fi echo "$0: h=$h" # todo: ecdsa key not working with dropbear cat ~/.ssh/{h,hrsa,home}.pub | ssh $h dd of=/etc/dropbear/authorized_keys -rsync /a/work/libremanage/libremanage /a/bin/fai/wrt-init /a/bin/fai/wrt-setup-local /a/bin/fai/dnsmasq-end-lease /a/bin/cedit/cedit $h:/usr/bin +rsync /f/libremanage/libremanage /a/bin/fai/wrt-init /a/bin/fai/wrt-setup-local /a/bin/fai/dnsmasq-end-lease /a/bin/cedit/cedit $h:/usr/bin # relay is built for openwrt 18.06.2, r7676-cddd7b4c77 #/a/opt/openwrt/source/bin/packages/mips_24kc/mypackages/relay_1.0-1_mips_24kc.ipk \ diff --git a/wrt-setup-local b/wrt-setup-local index 4ade1af..db19d6d 100755 --- a/wrt-setup-local +++ b/wrt-setup-local @@ -1037,7 +1037,7 @@ EOF # syw #access-control-view: 10.2.0.7/32 "youtube" -# bow +# bo access-control-view: 10.2.0.29/32 "youtube" # samsungtab access-control-view: 10.2.0.32/32 "youtube"