Mention that the NIC name changes on ppc64el
[mirror/dsa-wiki.git] / input / howto / upgrade-to-stretch.mdwn
1 # Upgrade from jessie to stretch:
2
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
5 general developer box.
6
7 upgrade stuff:
8
9 * answer question to libc6 "Restart services automaticaly" with "yes"
10 * say no to other other questions.
11
12 todo:
13   at least on lindsay samhain failed to configure after upgrading the package.  figure out details.
14
15 commands:
16
17         sed -i "s#jessie#stretch#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
18         dpkg --clear-avail &&
19         if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
20                 sed -i "s#jessie#stretch#g" /etc/apt/sources.list.d/buildd.debian.org.list
21         fi &&
22         apt-get update &&
23         service samhain stop &&
24         apt-get install dpkg apt samhain &&
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         apt-get update &&
31         apt-get dist-upgrade &&
32         apt-get purge libssl1.0.0:amd64 gcc-4.9-base:amd64 gcc-4.8-base:amd64 libapt-pkg4.12:amd64 libreadline6:amd64  libprocps3:amd64 sp libsp1c2 libaugeas-ruby1.8
33         apt-get --purge autoremove &&
34         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
35         dpkg --clear-avail &&
36         apt-get clean
37
38 purge removed packages
39
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}'
43
44 more clean ups:
45
46         /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
47
48         (apt-get purge them)
49
50         apt-get --purge autoremove &&
51         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done
52
53         (puppet agent -t || true) && (puppet agent -t || true)
54
55 On ppc64el (only VMs?) the network interface has been renamed from ethX to ibmvethX. Change /etc/network/interfaces accordingly.
56
57 update dsa-nagios.git (add host to jessie hostgroup)
58
59 re-init samhain and finish with a reboot
60
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         /sbin/reboot