Test commit
[mirror/dsa-wiki.git] / input / howto / upgrade-to-wheezy.mdwn
1 # Upgrade from squeeze to wheezy
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 if it's a
5 general developer box.
6
7 on buildds:
8
9         cd ~buildd
10         sudo su - buildd
11         touch NO-DAEMON-PLEASE EXIT-DAEMON-PLEASE && exit
12
13         now wait for the buildd to quit
14
15 upgrade stuff:
16
17 * answer question to libc6 "Restart services automaticaly" with "yes"
18 * answer "Yes" to changes of /etc/default/rcS, [BR#694928](http://bugs.debian.org/694928)
19 * and change "FSCKFIX=yes" afterwards, at least on hardware without remote access (like arm*)
20 * say no to other other questions.
21
22 commands:
23
24         sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
25         dpkg --clear-avail &&
26         rm -f /etc/apt/preferences.d/dsa-bacula-client &&
27         if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
28                 rm -f /etc/apt/preferences.d/buildd &&
29                 sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/buildd.debian.org.list
30         fi &&
31         apt-get update &&
32         apt-get install dpkg apt samhain &&
33         service samhain stop &&
34         apt-get dist-upgrade &&
35         rm /var/state/samhain/samhain_file &&
36         samhain --foreground -t init -p none -s none -l none -m none &&
37         (puppet agent -t || true) &&
38         apt-get dist-upgrade &&
39         c_rehash /etc/ssl/debian/certs &&
40         c_rehash /etc/exim4/ssl &&
41         apt-get --purge autoremove &&
42         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
43         apt-get purge liblzma2 lzma &&
44         dpkg --clear-avail &&
45         apt-get clean
46
47
48 if /etc/apache2/apache2.conf was not changed, remove the include for httpd.conf.
49
50 purge removed packages
51
52         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
53         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
54         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
55
56 more clean ups:
57
58         apt-get purge arrayprobe
59         /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
60         apt-get --purge autoremove
61
62 maybe
63         apt-get install firmware-linux
64
65 update dsa-nagios.git (add host to wheezy hostgroup)
66
67 reboot
68
69 verify ipv6 routing still works.
70
71 re-init samhain
72
73         samhain --foreground -t update -p none -s none -l none -m none