fix demohost, fix tar acl bug
authorIan Kelling <ian@iankelling.org>
Fri, 28 Oct 2016 06:12:27 +0000 (23:12 -0700)
committerIan Kelling <ian@iankelling.org>
Mon, 6 Feb 2017 06:21:41 +0000 (22:21 -0800)
fai-redep
fai/config/files/etc/apt/preferences.d/stable/LINODESTABLE [new symlink]
fai/config/files/etc/apt/preferences.d/stable/STABLE [new file with mode: 0644]
fai/config/files/etc/apt/sources.list.d/linodestable.list/LINODESTABLE
fai/config/package_config/DEBIAN
fai/config/package_config/UBUNTU
fai/config/scripts/GRUB_PC/11-ian
faiserver-setup
pxe-server
wrt-setup

index 2f59ef7ff728f11be9f12a9b2afdcfab2c7f257b..df867086c5809f962070188bf408b04888cd2c58 100755 (executable)
--- a/fai-redep
+++ b/fai-redep
@@ -32,20 +32,21 @@ faiserver_host=$(chost faiserver) || faiserver_host=faiserver
 
 shopt -s extglob
 ssh root@$faiserver_host rm -rf /srv/fai/config/!(basefiles)
-scp -r fai/config root@$faiserver_host:/srv/fai
+scp -qr fai/config root@$faiserver_host:/srv/fai
 
 
-scp ~/.ssh/id_rsa.pub \
+scp -q ~/.ssh/id_rsa.pub \
     root@$faiserver_host:/srv/fai/config/files/root/.ssh/authorized_keys/GRUB_PC
 # todo: automatically disable faiserver after a period so
 # these files are not exposed.
-s scp -r /q/root/luks /q/root/shadow \
+s scp -qr /q/root/luks /q/root/shadow \
   root@$faiserver_host:/srv/fai/config/distro-install-common
-scp /a/bin/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
-# built this with mk-basefile -J BELENOS64. it's stored in it's own repo which
-# is published alongside this one called fai-basefiles due
-# to being a large binary file.
-scp /a/bin/fai-basefiles/BELENOS64.tar.xz root@$faiserver_host:/srv/fai/config/basefiles
+scp -q /a/bin/devbyid root@$faiserver_host:/srv/fai/nfsroot/usr/local/bin
+
+# built BELANOS basefile with mk-basefile -J BELENOS64. it's stored in
+# it's own repo which is published alongside this one called
+# fai-basefiles due to being a large binary file.
+scp -q /a/bin/fai-basefiles/*.tar.xz root@$faiserver_host:/srv/fai/config/basefiles
 ssh root@$faiserver_host bash <<'EOF'
 set -eE -o pipefail
 set -x
diff --git a/fai/config/files/etc/apt/preferences.d/stable/LINODESTABLE b/fai/config/files/etc/apt/preferences.d/stable/LINODESTABLE
new file mode 120000 (symlink)
index 0000000..31109f8
--- /dev/null
@@ -0,0 +1 @@
+STABLE
\ No newline at end of file
diff --git a/fai/config/files/etc/apt/preferences.d/stable/STABLE b/fai/config/files/etc/apt/preferences.d/stable/STABLE
new file mode 100644 (file)
index 0000000..7f2e29f
--- /dev/null
@@ -0,0 +1,4 @@
+Explanation: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819978
+Package: tar
+Pin: release a=jessie-backports
+Pin-Priority: 500
index 056de00270f8c3737c956c7f3f21cee9f1edb398..3e04cd4387969aa4358d429787295413cf34a4fc 100644 (file)
@@ -7,3 +7,6 @@ deb-src http://security.debian.org/ jessie/updates main
 # jessie-updates, previously known as 'volatile'
 deb http://mirrors.linode.com/debian/ jessie-updates main
 deb-src http://mirrors.linode.com/debian/ jessie-updates main
+
+deb http://mirrors.linode.com/debian/ jessie-backports main
+deb-src http://mirrors.linode.com/debian/ jessie-backports main
index 58c8d09f5cff98ba4f7650f27819d7683d8a7464..1402c4f831cf36ccbd81ba6bb2ab3c7920ce11b4 100644 (file)
@@ -14,7 +14,7 @@ PACKAGES install DHCPC
 isc-dhcp-client
 
 PACKAGES install GRUB_PC
-grub-pc cryptsetup btrfs-tools sudo bridge-utils grub-legacy- lilo-
+grub-pc cryptsetup btrfs-tools sudo bridge-utils netcat-openbsd grub-legacy- lilo-
 
 PACKAGES install LVM
 lvm2
index 4a5a976f5348df8a627e14eb29d01ec19f040868..697224d8b7cd539154af75740ae3138430fdcda2 100644 (file)
@@ -13,7 +13,7 @@ PACKAGES install DHCPC
 isc-dhcp-client
 
 PACKAGES install GRUB_PC
-grub-pc cryptsetup btrfs-tools bridge-utils
+grub-pc cryptsetup btrfs-tools bridge-utils netcat-openbsd
 
 PACKAGES aptitude-r XORG
 ubuntu-desktop
index 199e4f860745ac55c1eb4ac23fc3509d08cfcb58..f4f1b7c87823afe24ea42ba7c87e4613d95ae0e2 100755 (executable)
@@ -8,7 +8,6 @@ if [[ $EUID != 0 ]]; then
   exit 1
 fi
 
-
 if ! type -t fcopy &>/dev/null; then
   sudo apt-get -y install fai-client
 fi
index e43d0192f79eed094432471a95f52da8bb5c5dd5..96485a5634ea1c34db1210207107124517ecb51c 100755 (executable)
@@ -38,8 +38,8 @@ sed="sed -ri --follow-symlinks"
 
 
 if [[ $base == jessie ]]; then
-    wget -O - http://fai-project.org/download/074BCDE4.asc | apt-key add -
-    cat >/etc/apt/sources.list.d/fai.list <<'EOF'
+  wget -O - http://fai-project.org/download/074BCDE4.asc | apt-key add -
+  cat >/etc/apt/sources.list.d/fai.list <<'EOF'
 deb http://fai-project.org/download jessie koeln
 EOF
 else
@@ -52,11 +52,37 @@ fi
 
 # for debian:
 
+r=http://http.us.debian.org/debian
+# like default, but scrap httpredir, and nonfree.
+# All my systems should be able to get along without nonfree
+# for a base working system afaik.
+dd of=/etc/fai/apt/sources.list <<EOF
+deb $r $base main contrib
+deb http://security.debian.org/debian-security $base/updates main contrib
+EOF
+
+if [[ $base == jessie ]]; then
+  tee -a /etc/fai/apt/sources.list <<'EOF'
+# uncommenting this from the defaults. it's got bug fixes.
+# repository that may contain newer fai packages for jessie
+deb http://fai-project.org/download jessie koeln
+# fix tar https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819978
+deb http://ftp.debian.org/debian jessie-backports main
+EOF
+
+  # note, fai doesn't look at /etc/fai/apt/preferences.d
+  cat >/etc/fai/apt/preferences <<'EOF'
+Package: tar
+Pin: release a=jessie-backports
+Pin-Priority: 500
+EOF
+fi
+
 apt-get update
 # all the dependencies except the dhcp server
 deps="$(apt-cache show fai-quickstart | grep ^Depends: |head -n 1|\
               sed -r 's/^Depends:|,|\|[^,]+|isc-dhcp-server//g')"
-to_install=()
+to_install=(tar)
 for pkg in $deps; do
     dpkg -s $pkg &>/dev/null && continue ||:
     to_install+=($pkg)
@@ -64,21 +90,9 @@ for pkg in $deps; do
     echo `date` $pkg >>/var/log/fai-manually-installed-packages.log
 done
 if [[ $to_install ]]; then
-    apt-get -y install ${to_install[@]}
+  apt-get -y install ${to_install[@]}
 fi
 
-r=http://http.us.debian.org/debian
-# like default, but scrap httpredir and add suggested newer pkgs in fai-project.org
-dd of=/etc/fai/apt/sources.list <<EOF
-deb $r $base main contrib non-free
-deb http://security.debian.org/debian-security $base/updates main contrib non-free
-EOF
-
-if [[ $base == jessie ]]; then
-    tee -a /etc/fai/apt/sources.list <<'EOF'
-deb http://fai-project.org/download jessie koeln
-EOF
-fi
 
 # tried out a stretch base, doesn't work yet.
 $sed -f - /etc/fai/nfsroot.conf <<EOF
@@ -91,12 +105,12 @@ $sed 's/#LOGUSER/LOGUSER/' /etc/fai/fai.conf
 
 
 if ! grep cryptsetup /etc/fai/NFSROOT &>/dev/null; then
-    $sed '/^PACKAGES install$/a cryptsetup' /etc/fai/NFSROOT
+  $sed '/^PACKAGES install$/a cryptsetup' /etc/fai/NFSROOT
 fi
 e fai-setup -vf
 { head -n 1 /srv/fai/nfsroot/root/.ssh/known_hosts | awk '{print $1}' \
-      | tr '\n' ' '; ssh-keyscan localhost | grep -o "ecdsa-sha2-nistp256.*"; \
-    } >>/srv/fai/nfsroot/root/.ssh/known_hosts
+    | tr '\n' ' '; ssh-keyscan localhost | grep -o "ecdsa-sha2-nistp256.*"; \
+  } >>/srv/fai/nfsroot/root/.ssh/known_hosts
 
 # initially did the basic fai-chboot -Iv $std_arg default
 # but found in console that it wanted to mount nfsroot
index 66bc4ff4129da671c713082138ae091c40834e81..bac22c115658917f8c402849e014bee395111cf1 100755 (executable)
@@ -139,12 +139,12 @@ $([[ $type == arch ]] && echo arch-pxe-mount)"
 if $set; then
     set-pxe
     if [[ $type == fai ]]; then
-        myfai-chboot $host
+        myfai-chboot $host
         if $redep; then
-            fai-redep
+            fai-redep
         fi
     else
-        myfai-chboot
+        myfai-chboot
     fi
 fi
 
index 410c7a0a5b5e4cfa7ca636f4e9b59f1612bcc728..8293e9d1325fa961e2a894f0c3df71da6dd69032 100755 (executable)
--- a/wrt-setup
+++ b/wrt-setup
@@ -232,7 +232,7 @@ v cedit /etc/hosts <<EOF || dnsmasq_restart=true
 192.168.1.3 frodo
 192.168.1.4 htpc
 192.168.1.5 x2
-192.168.1.6 testvm
+192.168.1.6 demohost
 192.168.1.7 faiserver
 192.168.1.8 tp
 72.14.176.105 li