start upgrade-to-stretch list
[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         sed -i "s#jessie#stretch#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
17         dpkg --clear-avail &&
18         if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
19                 sed -i "s#jessie#stretch#g" /etc/apt/sources.list.d/buildd.debian.org.list
20         fi &&
21         apt-get update &&
22         service samhain stop &&
23         apt-get install dpkg apt samhain &&
24         service samhain stop &&
25         apt-get dist-upgrade &&
26         rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
27         samhain --foreground -t init -p none -s none -l none -m none &&
28         (puppet agent -t || true) &&
29         apt-get update &&
30         apt-get dist-upgrade &&
31         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
32         apt-get --purge autoremove &&
33         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
34         dpkg --clear-avail &&
35         apt-get clean
36
37 purge removed packages
38
39         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
40         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
41         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
42
43 more clean ups:
44
45         /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
46
47         (apt-get purge them)
48
49         apt-get --purge autoremove &&
50         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done
51
52         (puppet agent -t || true) && (puppet agent -t || true)
53
54 update dsa-nagios.git (add host to jessie hostgroup)
55
56 re-init samhain and finish with a reboot
57
58         (puppet agent -t || true) &&
59         (puppet agent -t || true) &&
60         (puppet agent -t || true) &&
61         samhain --foreground -t update -p none -s none -l none -m none &&
62         /sbin/reboot