minor fixes and improvements master
authorIan Kelling <iank@fsf.org>
Mon, 23 Sep 2024 23:34:47 +0000 (19:34 -0400)
committerIan Kelling <iank@fsf.org>
Mon, 23 Sep 2024 23:34:47 +0000 (19:34 -0400)
fai/config/class/50-host-classes
fai/config/distro-install-common/devbyid
fai/config/distro-install-common/end
fai/config/distro-install-common/ethusb-static
fai/config/files/etc/apt/sources.list.d/noble.list/ARAMO_EXTRA
fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_FREE [moved from fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE with 93% similarity]
fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_NONFREE [new file with mode: 0644]
fai/config/package_config/STANDARD
fai/config/scripts/IANK/11-iank
faiserver-setup
wrt-setup-local

index 5116aa2c6684b1968347918364d095add380e094..949c8c4245cdb2643fb8c7cea3a68623d4a274d4 100755 (executable)
@@ -164,8 +164,8 @@ if [[ ! -e /a/bin/fai/fai-wrapper || $FAI_ACTION == dirinstall ]]; then
     _) echo UBUNTU FOCAL64 VOL_FOCAL FOCAL ;;
     # jammy
     _) echo UBUNTU JAMMY64 VOL_JAMMY JAMMY ;;
-    # NOBLE
-    _) echo UBUNTU NOBLE64 VOL_NOBLE NOBLE ;;
+    # NOBLE # there also exists NOBLE_NONFREE
+    _) echo UBUNTU NOBLE64 VOL_NOBLE NOBLE NOBLE_FREE;;
   esac
 fi
 ###### end Template for 51-multi-boot ######
index 733b8401e86dd092df93cc878e1f5fa78cb1cd3d..445fd7516cc7c72823d5c738e79921dcf557ebc4 100755 (executable)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-# input eg: /dev/sda1 or /dev/sda
-# output: /dev/disk/by-id/model+serial, or if no link exists, the same as input
+# input: /dev/DISK[PARTITION]...
+# eg: /dev/sdb1 /dev/sda
+# output example:
+# /dev/disk/by-id/model+serial-part1
+# /dev/disk/by-id/model+serial
+#
+# If no symlink exists, output is the same as input.
 
 short_dev=$1
 if [[ ! -e $short_dev ]]; then
index 2455ece011a46266e2ce65e86abfbdf099e8bed2..a3c4bb41da8f19babaaedc7bbf096ddd5232c730 100755 (executable)
@@ -52,9 +52,10 @@ if [[ -e $root_pw_f ]]; then
 fi
 
 au user2
-if ifclass frodo; then
-  sed 's/^/user2:/' /q/root/shadow/user2 | $ROOTCMD chpasswd -e
-fi
+# dont have any active user2 atm.
+# if ifclass frodo; then
+#   sed 's/^/user2:/' /q/root/shadow/user2 | $ROOTCMD chpasswd -e
+# fi
 # comparing iank's groups to user2, I see none she should join on arch
 $ROOTCMD usermod -a -G user2 iank
 
index 5ca8b933b3afc2843e6f545920624b9bf69ea402..ce804240443437e5192ec58840f56d330b08f1e9 100755 (executable)
@@ -186,6 +186,14 @@ shopt -s nullglob
 wiredx=1
 declare -a args
 
+if ! type -p ethtool &>/dev/null; then
+  apt-get -y install ethtool
+fi
+
+if ! type -p dig &>/dev/null; then
+  apt-get -y install dig
+fi
+
 # device that has an eth0, but we aren't using it because it is
 # broken. We could just hardcode a mac comparison with `cat
 # /sys/class/net/eth0/address` but this is cooler.
@@ -214,15 +222,6 @@ if ! nmcli con | grep -q "^$nm_con " &>/dev/null; then
 fi
 
 
-if ! type -p dig &>/dev/null; then
-  apt-get -y install dig
-fi
-
-if ! type -p ethtool &>/dev/null; then
-  apt-get -y install ethtool
-fi
-
-
 get-cur
 ## end common setup / detection ##
 
index fdba7004686fd358c2ae881b30a919fb88b44a99..8c9d379aa854f1b233533c3fe0bd42a927df9675 120000 (symlink)
@@ -1 +1 @@
-NOBLE
\ No newline at end of file
+NOBLE_FREE
\ No newline at end of file
similarity index 93%
rename from fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE
rename to fai/config/files/etc/apt/sources.list.d/noble.list/NOBLE_FREE
index 140df90d51b75b533ee381e725481c9e8185b701..cda7d9cac915304bb41e7374e3d6faf75c2199dd 100644 (file)
@@ -12,4 +12,3 @@ deb http://archive.ubuntu.com/ubuntu/ noble-backports main universe
 deb-src http://archive.ubuntu.com/ubuntu/ noble-security main universe multiverse
 deb-src http://archive.ubuntu.com/ubuntu/ noble-updates main universe multiverse
 deb-src http://archive.ubuntu.com/ubuntu/ noble-backports main universe
-deb http://packages.linuxmint.com wilma upstream
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
new file mode 100644 (file)
index 0000000..9579b1a
--- /dev/null
@@ -0,0 +1,14 @@
+# multiverse needed for libfdk-aac1, which is actually free
+# 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
+
+###### 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 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 restricted
index afbefab814527dd02e6642ab418f64f48d0531f9..46d7eb894d1144de8f4629cda60a04611610f2f2 100644 (file)
@@ -69,6 +69,8 @@ zstd
 iw
 # for the fai partitioning script
 parted dosfstools
+# for pee
+moreutils
 
 # iank, copied from DEBIAN so it goes into ubuntu too
 PACKAGES install GRUB_PC
index a10a5bba10dcd8f53cd6a837ed51f87942c5bd0e..a6cfe671d7efa846c357ac92fd977f5d2890fd8d 100755 (executable)
@@ -54,7 +54,7 @@ if [[ ! -e $dst && -e $src ]]; then
   mount -o bind $src $dst
 fi
 
-
+chmod 700 /mnt/root
 
 $FAI/distro-install-common/end
 
@@ -158,7 +158,7 @@ esac
 # https://nouveau.freedesktop.org/InstallNouveau.html
 # And now in t11, things got worse with a newer card also not loading
 # nouveau when it did in t10.
-if lspci|grep -q 'VGA compatible controller: NVIDIA'; then
+if [[ $HOSTNAME != frodo ]] && lspci|grep -q 'VGA compatible controller: NVIDIA'; then
   mkdir -p $target/etc/X11/xorg.conf.d/
   cat >$target/etc/X11/xorg.conf.d/10-nouveau.conf <<'EOF'
 Section "Device"
@@ -390,7 +390,7 @@ esac
 # /usr/share/initramfs-tools/hooks/btrfs
 # /usr/share/initramfs-tools/scripts/local-premount/btrfs
 # everything else, seems better to take from upstream package.
-for f in $(dpkg-query -L btrfs-progs | gr '/man/|^/s?bin/|^/usr/lib/udev') ; do
+for f in $(dpkg-query -L btrfs-progs | grep '/man/|^/s?bin/|^/usr/lib/udev') ; do
   if [[ ! -f $f ]]; then
     continue
   fi
@@ -411,6 +411,13 @@ if $static_ver; 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
@@ -440,7 +447,7 @@ if [[ $ver != "$cur_ver" ]]; then
     if [[ $FAI_ROOT == / ]]; then
       cd $bp_dir
       make install
-      mv /usr/bin/{fsck,mkfs}.btfs /usr/sbin/
+      mv /usr/bin/{fsck,mkfs}.btrfs /usr/sbin/
     else
       mkdir -p $target/tmp/bprogs
       mount -o bind $bp_dir $target/tmp/bprogs
index b2d8bc7dadb9cff9d376be9a28de6a4a439f5c04..4ecff541053758408d3974aefb7c643557e622fd 100755 (executable)
@@ -178,21 +178,14 @@ cat >>/etc/fai/apt/sources.list <<EOF
 # use fai repo. it's commented in the defaults. it's got bug fixes.
 # and may contain newer packages.
 deb http://fai-project.org/download $base koeln
+deb http://ftp.debian.org/debian $base-backports main contrib
 EOF
 
-## Get latest kernel and btrfs for dealing with btrfs issues.
-# if [[ $base == buster ]]; then
-#   cat >>/etc/fai/apt/sources.list <<'EOF'
-# deb http://ftp.debian.org/debian buster-backports main
-# EOF
-#   # note, fai doesn\'t look at /etc/fai/apt/preferences.d
-#   cat >/etc/fai/apt/preferences <<'EOF'
-# Package: linux-* firmware-linux-free btrfs-progs
-# Pin: release a=buster-backports
-# Pin-Priority: 500
-# EOF
-# fi
-
+cat >/etc/fai/apt/preferences <<EOF
+Package: *
+Pin: release n=$base-backports
+Pin-Priority: 500
+EOF
 
 if [[ -s /q/root/shadow/standard ]]; then
   $sed -f - /etc/fai/nfsroot.conf <<EOF
index 0eb3e79de08455596dc4c371c6d7d786bf7bef1d..a7ddc077cc7090fb9bb98263f20324de9ce8aa5b 100755 (executable)
@@ -629,7 +629,7 @@ config redirect
  option src              wan
  option src_dport        80
  option dest             lan
- option dest_ip          $l.$http_ip
+ option dest_ip          $http_ip
  option proto            tcp
 config rule
  option src              wan
@@ -642,7 +642,7 @@ config redirect
  option src              wan
  option src_dport        443
  option dest             lan
- option dest_ip          $l.$http_ip
+ option dest_ip          $http_ip
  option proto            tcp
 config rule
  option src              wan
@@ -732,6 +732,8 @@ config rule
  option target           ACCEPT
  option dest_port        9091
 
+
+
 # was working on an openvpn server, didn't finish
 # config redirect
 #  option name vpnkd