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