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):
14 sed -i "s#echo 1#echo 0#" /etc/rc.local &&
19 sed -i "s#stretch#buster#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.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 &&
25 service samhain stop &&
26 apt-get dist-upgrade &&
27 service samhain stop &&
28 rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
29 samhain --foreground -t init -p none -s none -l none -m none &&
30 (puppet agent -t || true) &&
31 : sometimes puppet resets our sources back to stretch. insist &&
32 sed -i "s#stretch#buster#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
34 apt-get dist-upgrade &&
35 apt-get --purge autoremove &&
36 while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
40 purge removed packages
42 dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
43 echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
44 echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
49 /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
53 apt-get --purge autoremove &&
54 while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done
56 (puppet agent -t || true) && (puppet agent -t || true)
58 update dsa-nagios.git (add host to buster hostgroup)
60 re-init samhain and finish with a reboot
62 (puppet agent -t || true) &&
63 (puppet agent -t || true) &&
64 (puppet agent -t || true) &&
65 samhain --foreground -t update -p none -s none -l none -m none &&
66 dsa-update-apt-status -f &&
72 (puppet agent -t || true) &&
73 samhain --foreground -t update -p none -s none -l none -m none &&
74 dsa-update-apt-status -f