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