jessie upgrade checklist
[mirror/dsa-wiki.git] / input / howto / upgrade-to-jessie.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 * say no to other other questions.
19
20 commands:
21
22         sed -i "s#wheezy#jessie#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
23         dpkg --clear-avail &&
24         if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
25                 sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/buildd.debian.org.list
26         fi &&
27         apt-get update &&
28         apt-get install dpkg apt samhain &&
29         service samhain stop &&
30         apt-get dist-upgrade &&
31         rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
32         samhain --foreground -t init -p none -s none -l none -m none &&
33         (puppet agent -t || true) &&
34         apt-get dist-upgrade &&
35         apt-get --purge autoremove &&
36         while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
37         dpkg --clear-avail &&
38         apt-get clean
39
40
41 purge removed packages
42
43         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
44         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
45         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
46
47 more clean ups:
48
49         /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
50         (apt-get purge them)
51         apt-get --purge autoremove
52
53 re-init samhain
54
55         (puppet agent -t || true) &&
56         (puppet agent -t || true) &&
57         samhain --foreground -t init -p none -s none -l none -m none
58
59 Add the new ed25519 ssh host key:
60         run
61           echo; echo "cat << EOF | ldapmodify -ZZ -x -D uid="\$USER",ou=users,dc=debian,dc=org -W -h db.debian.org"; echo "dn: host=`hostname`,ou=hosts,dc=debian,dc=org"; echo "changetype: modify"; echo "add: sshRSAHostKey"; echo "sshRSAHostKey: `cat /etc/ssh/ssh_host_ed25519_key.pub `"; echo; echo "EOF"; echo
62         and paste it on draghi.
63         
64 update dsa-nagios.git (add host to jessie hostgroup)
65
66 reboot.