1 # Upgrade from stretch to buster:
3 Make sure to coordinate with whoever uses the host, be it the buildd
4 operator, the QA team, the ftp team or just announce it on IRC if it's a
9 * answer question to libc6 "Restart services automaticaly" with "yes"
10 * say no to other other questions.
12 first re-enable module loading, as new modules are needed to restart ferm (due to nftables):
13 sed -i "s#echo 1#echo 0#" /etc/rc.local &&
18 sed -i "s#stretch#buster#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
19 sed -i "/backports/d" /etc/apt/sources.list.d/debian.list &&
22 service samhain stop &&
23 rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
24 apt-get install dpkg apt samhain linux-image-amd64 &&
25 service samhain stop &&
26 apt-get dist-upgrade &&
27 rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
28 samhain --foreground -t init -p none -s none -l none -m none &&
29 (puppet agent -t || true) &&
30 : sometimes puppet resets our sources back to stretch. insist &&
31 sed -i "s#stretch#buster#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
33 apt-get dist-upgrade &&
34 apt-get --purge autoremove &&
35 while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
39 on amd64, install kernel:
41 apt-get install linux-image-amd64
43 purge removed packages
45 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
46 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
47 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
52 /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
56 apt-get --purge autoremove &&
57 while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done
59 (puppet agent -t || true) && (puppet agent -t || true)
61 update dsa-nagios.git (add host to buster hostgroup)
63 re-init samhain and finish with a reboot
65 (puppet agent -t || true) &&
66 (puppet agent -t || true) &&
67 (puppet agent -t || true) &&
68 samhain --foreground -t update -p none -s none -l none -m none &&
69 dsa-update-apt-status -f &&
75 (puppet agent -t || true) &&
76 samhain --foreground -t update -p none -s none -l none -m none &&
77 dsa-update-apt-status -f