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