From: Ian Kelling Date: Tue, 24 Oct 2017 03:59:25 +0000 (-0700) Subject: change stable to stretch, makes more sense X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=commitdiff_plain;h=bacafbabe07c9edc86eaa75c24887d6fac0c310a change stable to stretch, makes more sense --- diff --git a/fai/config/class/.#50-host-classes b/fai/config/class/.#50-host-classes new file mode 120000 index 0000000..78e3f15 --- /dev/null +++ b/fai/config/class/.#50-host-classes @@ -0,0 +1 @@ +ian@treetowl.11407:1508122283 \ No newline at end of file diff --git a/fai/config/class/50-host-classes b/fai/config/class/50-host-classes index 465a64f..74dd0c3 100755 --- a/fai/config/class/50-host-classes +++ b/fai/config/class/50-host-classes @@ -27,21 +27,21 @@ # It's code looks like this: # if [[ ! -e /a/bin/fai/fai-wrapper ]]; then # case $HOSTNAME in -# tp) DEBIAN STABLE VOL_STABLE STABLE_FREE;; +# tp) DEBIAN STRETCH VOL_STRETCH STRETCH_FREE;; # # add more multi-boot hostnames here # esac # fi # # Each host defines the base distro: UBUNTU or DEBIAN. # the disto version, also the basefile name if we aren't installing debian stable: -# STABLE, STRETCH64, XENIAL64, BELENOS64, FLIDAS64 +# STRETCH64, XENIAL64, BELENOS64, FLIDAS64 # the distro subvol name, we can add as many of these as we want: -# VOL_STABLE, VOL_STABLE_BOOTSTRAP, VOL_STRETCH, VOL_XENIAL, VOL_BELENOS, VOL_FLIDAS -# Using VOL_STABLE_BOOTSTRAP sets up the install to act like a pxe rom if +# VOL_TESTING, VOL_STRETCH, VOL_XENIAL, VOL_BELENOS, VOL_FLIDAS +# Using VOL_STRETCH_BOOTSTRAP sets up the install to act like a pxe rom if # grub sets a specific var. # and the class which defines the apt sources files we want, -# STABLE_FREE, STABLE_NONFREE, TESTING_FREE, TESTING_NONFREE, -# XENIAL_FREE (no XENIAL_NONFREE setup yet), BELENOS, FLIDAS, STABLE_LINODE. +# STRETCH_FREE, STRETCH_NONFREE, TESTING_FREE, TESTING_NONFREE, +# XENIAL_FREE (no XENIAL_NONFREE setup yet), BELENOS, FLIDAS, STRETCH_LINODE. # This is a little redundant in some cases, but it keeps things # simpler. # @@ -69,13 +69,13 @@ if [[ -e /a/bin/fai/fai-wrapper ]]; then echo "DEBIAN" fi if isdebian-stable; then - echo "STABLE" + echo "STRETCH" case $HOSTNAME in - li|lj) echo "STABLE_LINODE" ;; + li|lj) echo "STRETCH_LINODE" ;; *) # nonfree repo is not going away any time soon due to # gcc-doc being in nonfree - echo "STABLE_NONFREE" + echo "STRETCH_NONFREE" ;; esac elif isdebian-testing; then diff --git a/fai/config/debconf/UBUNTU b/fai/config/debconf/UBUNTU new file mode 120000 index 0000000..0a4e1e8 --- /dev/null +++ b/fai/config/debconf/UBUNTU @@ -0,0 +1 @@ +DEBIAN \ No newline at end of file diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index d10b949..0642cf3 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -17,7 +17,7 @@ if [[ -e $src && -e $dst ]]; then cp -rT $src $dst fi -if ifclass VOL_STABLE_BOOTSTRAP; then +if ifclass VOL_STRETCH_BOOTSTRAP; then exit 0 fi diff --git a/fai/config/files/etc/apt/apt.conf.d/force_confdef/UBUNTU b/fai/config/files/etc/apt/apt.conf.d/force_confdef/UBUNTU new file mode 120000 index 0000000..0a4e1e8 --- /dev/null +++ b/fai/config/files/etc/apt/apt.conf.d/force_confdef/UBUNTU @@ -0,0 +1 @@ +DEBIAN \ 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/stretch/STRETCH similarity index 71% rename from fai/config/files/etc/apt/preferences.d/stable/STABLE rename to fai/config/files/etc/apt/preferences.d/stretch/STRETCH index 662b957..c3b4f51 100644 --- a/fai/config/files/etc/apt/preferences.d/stable/STABLE +++ b/fai/config/files/etc/apt/preferences.d/stretch/STRETCH @@ -3,19 +3,19 @@ Explanation: kernel & btrfs-tools, because btrfs is getting a lot of active Explanation: dev, and their mailing list says better to use recent version Explanation: to avoid bugs. linux-base is needed for the kernel, Explanation: which you can find out by failing -Explanation: apt-get install linux-image-amd64/jessie-backports +Explanation: apt-get install linux-image-amd64/stretch-backports Explanation: And then trying aptitude -s install, or -Explanation: apt-get -t jessie-backports install linux-image-amd64 +Explanation: apt-get -t stretch-backports install linux-image-amd64 Explanation: Explanation: Package: tar linux-image-amd64 linux-base btrfs-tools -Pin: release a=jessie-backports +Pin: release a=stretch-backports Pin-Priority: 500 Package: * -Pin: release a=testing +Pin: release a=buster Pin-Priority: -10 Package: * -Pin: release a=testing-updates +Pin: release a=buster-updates Pin-Priority: -10 diff --git a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE b/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE deleted file mode 100644 index 0093b4f..0000000 --- a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE +++ /dev/null @@ -1,11 +0,0 @@ -deb http://http.us.debian.org/debian jessie main -deb-src http://http.us.debian.org/debian jessie main - -deb http://security.debian.org/ jessie/updates main -deb-src http://security.debian.org/ jessie/updates main - -deb http://http.us.debian.org/debian jessie-updates main -deb-src http://http.us.debian.org/debian jessie-updates main - -deb http://http.debian.net/debian jessie-backports main -deb-src http://http.debian.net/debian jessie-backports main diff --git a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_LINODE b/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_LINODE deleted file mode 100644 index 3e6e183..0000000 --- a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_LINODE +++ /dev/null @@ -1,24 +0,0 @@ -deb http://mirrors.linode.com/debian/ jessie main -deb-src http://mirrors.linode.com/debian/ jessie main - -deb http://security.debian.org/ jessie/updates main -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 - -deb http://mirrors.linode.com/debian testing main -deb-src http://mirrors.linode.com/debian testing main - -deb http://security.debian.org/ testing/updates main -deb-src http://security.debian.org/ testing/updates main - -deb http://mirrors.linode.com/debian testing-updates main -deb-src http://mirrors.linode.com/debian testing-updates main - -deb http://mirrors.linode.com/debian unstable main -deb-src http://mirrors.linode.com/debian unstable main diff --git a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_NONFREE b/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_NONFREE deleted file mode 100644 index d5cc0db..0000000 --- a/fai/config/files/etc/apt/sources.list.d/stable.list/STABLE_NONFREE +++ /dev/null @@ -1,11 +0,0 @@ -deb http://http.us.debian.org/debian jessie main contrib non-free -deb-src http://http.us.debian.org/debian jessie main contrib non-free - -deb http://security.debian.org/ jessie/updates main contrib non-free -deb-src http://security.debian.org/ jessie/updates main contrib non-free - -deb http://http.us.debian.org/debian jessie-updates main contrib non-free -deb-src http://http.us.debian.org/debian jessie-updates main contrib non-free - -deb http://http.debian.net/debian jessie-backports main contrib non-free -deb-src http://http.debian.net/debian jessie-backports main contrib non-free diff --git a/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH new file mode 100644 index 0000000..280fa0a --- /dev/null +++ b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH @@ -0,0 +1,11 @@ +deb http://http.us.debian.org/debian stretch main +deb-src http://http.us.debian.org/debian stretch main + +deb http://security.debian.org/ stretch/updates main +deb-src http://security.debian.org/ stretch/updates main + +deb http://http.us.debian.org/debian stretch-updates main +deb-src http://http.us.debian.org/debian stretch-updates main + +deb http://http.debian.net/debian stretch-backports main +deb-src http://http.debian.net/debian stretch-backports main diff --git a/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_LINODE b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_LINODE new file mode 100644 index 0000000..7c562d1 --- /dev/null +++ b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_LINODE @@ -0,0 +1,24 @@ +deb http://mirrors.linode.com/debian/ stretch main +deb-src http://mirrors.linode.com/debian/ stretch main + +deb http://security.debian.org/ stretch/updates main +deb-src http://security.debian.org/ stretch/updates main + +# stretch-updates, previously known as 'volatile' +deb http://mirrors.linode.com/debian/ stretch-updates main +deb-src http://mirrors.linode.com/debian/ stretch-updates main + +deb http://mirrors.linode.com/debian/ stretch-backports main +deb-src http://mirrors.linode.com/debian/ stretch-backports main + +deb http://mirrors.linode.com/debian stretch main +deb-src http://mirrors.linode.com/debian stretch main + +deb http://security.debian.org/ stretch/updates main +deb-src http://security.debian.org/ stretch/updates main + +deb http://mirrors.linode.com/debian stretch-updates main +deb-src http://mirrors.linode.com/debian stretch-updates main + +deb http://mirrors.linode.com/debian unstable main +deb-src http://mirrors.linode.com/debian unstable main diff --git a/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_NONFREE b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_NONFREE new file mode 100644 index 0000000..c022d31 --- /dev/null +++ b/fai/config/files/etc/apt/sources.list.d/stretch.list/STRETCH_NONFREE @@ -0,0 +1,11 @@ +deb http://http.us.debian.org/debian stretch main contrib non-free +deb-src http://http.us.debian.org/debian stretch main contrib non-free + +deb http://security.debian.org/ stretch/updates main contrib non-free +deb-src http://security.debian.org/ stretch/updates main contrib non-free + +deb http://http.us.debian.org/debian stretch-updates main contrib non-free +deb-src http://http.us.debian.org/debian stretch-updates main contrib non-free + +deb http://http.debian.net/debian stretch-backports main contrib non-free +deb-src http://http.debian.net/debian stretch-backports main contrib non-free diff --git a/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_FREE b/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_FREE deleted file mode 120000 index 586e320..0000000 --- a/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_FREE +++ /dev/null @@ -1 +0,0 @@ -TESTING_FREE \ No newline at end of file diff --git a/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_NONFREE b/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_NONFREE deleted file mode 120000 index b277a35..0000000 --- a/fai/config/files/etc/apt/sources.list.d/testing.list/STABLE_NONFREE +++ /dev/null @@ -1 +0,0 @@ -TESTING_NONFREE \ No newline at end of file diff --git a/fai/config/files/etc/systemd/system/fai_check.service/VOL_STABLE_BOOTSTRAP b/fai/config/files/etc/systemd/system/fai_check.service/VOL_STRETCH_BOOTSTRAP similarity index 100% rename from fai/config/files/etc/systemd/system/fai_check.service/VOL_STABLE_BOOTSTRAP rename to fai/config/files/etc/systemd/system/fai_check.service/VOL_STRETCH_BOOTSTRAP diff --git a/fai/config/files/root/fai-check/VOL_STABLE_BOOTSTRAP b/fai/config/files/root/fai-check/VOL_STRETCH_BOOTSTRAP similarity index 100% rename from fai/config/files/root/fai-check/VOL_STABLE_BOOTSTRAP rename to fai/config/files/root/fai-check/VOL_STRETCH_BOOTSTRAP diff --git a/fai/config/hooks/instsoft.DEFAULT b/fai/config/hooks/instsoft.DEFAULT index 6d7f4c0..a2a6100 100755 --- a/fai/config/hooks/instsoft.DEFAULT +++ b/fai/config/hooks/instsoft.DEFAULT @@ -1,7 +1,7 @@ #!/bin/bash # exit for any vm which is not our test vm -if ifclass VM && ! ifclass demohost || ifclass VOL_STABLE_BOOTSTRAP; then +if ifclass VM && ! ifclass demohost || ifclass VOL_STRETCH_BOOTSTRAP; then exit 0 fi diff --git a/fai/config/hooks/instsoft.UBUNTU b/fai/config/hooks/instsoft.UBUNTU new file mode 120000 index 0000000..910ae52 --- /dev/null +++ b/fai/config/hooks/instsoft.UBUNTU @@ -0,0 +1 @@ +instsoft.DEBIAN \ No newline at end of file diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index ed12111..fdcfe6d 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -195,12 +195,10 @@ fi if [[ ! $DISTRO ]]; then - if ifclass VOL_STABLE_BOOTSTRAP; then - DISTRO=debianstable_bootstrap + if ifclass VOL_STRETCH_BOOTSTRAP; then + DISTRO=stretch_bootstrap elif ifclass VOL_STRETCH; then - DISTRO=debiantesting - elif ifclass VOL_STABLE; then - DISTRO=debianstable + DISTRO=debianstretch elif ifclass VOL_XENIAL; then DISTRO=ubuntuxenial elif ifclass VOL_BELENOS; then @@ -365,7 +363,7 @@ else fi -if [[ $DISTRO != debianstable_bootstrap ]]; then +if [[ $DISTRO != stretch_bootstrap ]]; then # bootstrap distro doesn't use separate encrypted root. mount -o subvolid=0 $first_root_crypt /mnt # systemd creates subvolumes we want to delete. @@ -403,7 +401,7 @@ btrfs subvolume set-default 0 /mnt # already default, just ensuring it. mkdir -p /mnt/grub2 cp $FAI/distro-install-common/libreboot_grub.cfg /mnt/grub2 -if [[ $DISTRO == debianstable_bootstrap ]]; then +if [[ $DISTRO == stretch_bootstrap ]]; then # this is just convenience for the libreboot_grub config # so we can glob the other ones easier. boot_vol=$DISTRO @@ -422,7 +420,7 @@ grub-editenv /mnt/grubenv set did_fai_check=true grub-editenv /mnt/grubenv set last_boot=/$boot_vol umount /mnt -if [[ $DISTRO == debianstable_bootstrap ]]; then +if [[ $DISTRO == stretch_bootstrap ]]; then cat > /tmp/fai/fstab <