Upgrading Devuan from Jessie to ASCII

I jumped the Debian steamship on 2017-01-11 and made off in the Devuan lifeboat towards init freedom. Jessie was still beta at the time (it was announced stable on 2017-05-25) but installed without a hitch and it has been smooth sailing from there for me. Progress on ASCII appears to be going fine and seeing the call for upgrade path testing I figured I would start off 2018 on ASCII.

Target System

The machine I have updated is a Libreboot T400 with 8GB of memory. It has two 240GB SSDs in an encrypted RAID1 setup. On top of that LVM manages /, /home, /var/lib/docker and swap in four separate volumes. Note that there is no separate, unencrypted /boot partition because libreboot supports full disk encryption.

I use this laptop for all of my private computing needs (except when I need a VM because hardware virtualization without blobs does not work). It uses Xfce for the desktop environment, is used in wired and wireless environments, connects to an aging EPSON PM-A750 for my printing and scanning needs and my Suunto Ambit sportswatch.

I keep my /etc under version control with etckeeper so I have a full record of any changes there. I've tweaked it a bit so it always records package changes, even if there are no changes below /etc, so I have a persistent record of all package changes as well. The logs in /var/log/apt/history.log* will eventually (after a year in the default setup) be rotated into oblivion.

A full list of the packages I had installed before the upgrade can be found here.

The Upgrade

I made sure that my jessie system was up-to-date like so

$ sed '/^$/d; /^#/d' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
deb http://auto.mirror.devuan.org/merged/ jessie-security  main
deb http://auto.mirror.devuan.org/merged/ jessie-updates   main
deb http://auto.mirror.devuan.org/merged/ jessie           main
deb http://auto.mirror.devuan.org/merged/ jessie-backports main
deb https://download.docker.com/linux/debian jessie edge
$ sudo apt-get update
[...]
$ sudo apt-get dist-upgrade
[...]
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Then I changed my APT sources to

$ sed '/^$/d; /^#/d' /etc/apt/sources.list /etc/apt/sources.list.d/*.list
deb http://pkgmaster.devuan.org/merged/ ascii-security  main
deb http://pkgmaster.devuan.org/merged/ ascii-updates   main
deb http://pkgmaster.devuan.org/merged/ ascii           main
deb https://download.docker.com/linux/debian stretch edge

As you can see, I dropped the backports section and also bumped the Docker sources to use the Debian release that most closely corresponds to Devuan's ASCII.

After that it is basically just a matter of running

sudo apt-get update
sudo apt-get dist-upgrade

and answering any prompts you get. I opted to restart any services during the installation when needed but defaulted everything else.

However, before hitting the Enter key on the dist-upgrade, I first checked what would be necessary in terms of disk space and which packages would be removed (purged in my setup). The upgrade needed to download 1GB of packages and would use an additional 714MB of disk space. Seeing that I did not have enough free space in / to accommodate that, I moved APT's package cache temporarily.

sudo mv /var/cache/apt /home
sudo ln -s /home/apt /var/cache/apt

In terms of packages to be removed I only "salvaged" ifupdown. I had this marked automatically installed and my APT setup gleefully purges any such packages unless needed by something else. It seems that changed dependencies have made it "optional".

The upgrade itself was uneventful and everything appears to be working just fine for me. For the record, I have included the full upgrade log (redacted for readability) as well as a list of the packages installed immediately after the upgrade. Seeing that some packages had become unnecessary after the upgrade, I ran

sudo apt-get autoremove
sudo apt-get clean             # zap 1GB of downloads
sudo rm /var/cache/apt
sudo mv /home/apt /var/cache

to finish things up and put APT's cache back in its original place.

Conffile Cleanup

During the upgrade, I was asked what to do with changed configuration files for etckeeper. This happened because I've made a few tweaks of my own to some of those files. I'd opted to keep the files as is but after the upgrade I intergrated most of the changes manually. The files can be found with

sudo find /etc -name '*.dpkg*'

This not only turned up the etckeeper files but also a file for a SANE backend that is no longer provided. The removal of the v4l is mentioned in the apt-listchanges output during the upgrade. I never used it and etckeeper has a copy of the file in its repository anyway so

sudo rm /etc/sane.d/v4l.conf.dpkg-remove

Two more files turned up in the find output and these seem to be the result of issues with the way the Devuan Purpy theme is handled. I've moved those files to what I think is their intended location.

for name in \
    /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
    /etc/xdg/xfce4/panel/default.xml; do
    mv $name.dpkg-new $name-xfce4
done