Document how to fix BASE-IS-OLD
[mirror/dsa-wiki.git] / input / howto / upgrade-to-jessie.mdwn
index f2e9c7d..309798a 100644 (file)
@@ -1,4 +1,4 @@
-# Upgrade from squeeze to wheezy
+# Upgrade from wheezy to jessie
 
 Make sure to coordinate with whoever uses the host, be it the buildd
 operator, the QA team, the ftp team or just announce it if it's a
 
 Make sure to coordinate with whoever uses the host, be it the buildd
 operator, the QA team, the ftp team or just announce it if it's a
@@ -18,16 +18,18 @@ commands:
        sed -i "s#wheezy#jessie#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
        dpkg --clear-avail &&
        if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
        sed -i "s#wheezy#jessie#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list &&
        dpkg --clear-avail &&
        if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then
-               sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/buildd.debian.org.list
+               sed -i "s#wheezy#jessie#g" /etc/apt/sources.list.d/buildd.debian.org.list
        fi &&
        apt-get update &&
        fi &&
        apt-get update &&
-       apt-get install dpkg apt samhain &&
+       apt-get install dpkg apt samhain pinentry-curses &&
        service samhain stop &&
        apt-get dist-upgrade &&
        rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
        samhain --foreground -t init -p none -s none -l none -m none &&
        (puppet agent -t || true) &&
        service samhain stop &&
        apt-get dist-upgrade &&
        rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
        samhain --foreground -t init -p none -s none -l none -m none &&
        (puppet agent -t || true) &&
+       apt-get update &&
        apt-get dist-upgrade &&
        apt-get dist-upgrade &&
+       apt-get purge ruby1.8 libffi5:amd64 emacs23-nox libruby1.9.1 libfilesystem-ruby1.9.1 libruby1.8 emacs23-common ruby1.9.1 emacs23-bin-common &&
        apt-get --purge autoremove &&
        while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
        dpkg --clear-avail &&
        apt-get --purge autoremove &&
        while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done &&
        dpkg --clear-avail &&
@@ -43,20 +45,49 @@ purge removed packages
 more clean ups:
 
        /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
 more clean ups:
 
        /usr/lib/nagios/plugins/dsa-check-packages | tr -d ,
+
        (apt-get purge them)
        (apt-get purge them)
-       apt-get --purge autoremove
 
 
-re-init samhain
+       apt-get --purge autoremove &&
+       while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done
 
 
-       (puppet agent -t || true) &&
-       (puppet agent -t || true) &&
-       samhain --foreground -t init -p none -s none -l none -m none
+       (puppet agent -t || true) && (puppet agent -t || true)
+
+nfs kernel module fu:
+       grep '^nfs$' /etc/modules && ! grep '^nfsv4$' /etc/modules && echo nfsv4 | tee -a /etc/modules
+
+apache cleanup:
+
+       mkdir /etc/apache2/conf.d.WHEEZY &&
+       cd /etc/apache2/conf.d &&
+         for i in *; do
+           diff -u $i ../conf-enabled/$i.conf && mv -v $i ../conf.d.WHEEZY/
+         done &&
+         cd .. &&
+         rmdir conf.d
+
+       per vhost:
+         move sites-available file to foo.conf,
+          if they exist: move sites-available/RCS and sites-staging files to foo.conf,v and foo.conf
+         remove dangling symlink in sites-enabled,
+         a2ensite foo
+         replace all order allow,deny, allow from all with
+           Require all granted
 
 Add the new ed25519 ssh host key:
 
 Add the new ed25519 ssh host key:
+
        run
        run
-         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
+
+         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
+
        and paste it on draghi.
        
 update dsa-nagios.git (add host to jessie hostgroup)
 
        and paste it on draghi.
        
 update dsa-nagios.git (add host to jessie hostgroup)
 
-reboot.
+re-init samhain and finish with a reboot
+
+       (puppet agent -t || true) &&
+       (puppet agent -t || true) &&
+       (puppet agent -t || true) &&
+       samhain --foreground -t update -p none -s none -l none -m none &&
+       /sbin/reboot