The fourth alpha, and installing after an upgrade
J1-7.3.1-0.2.2-alpha4 fixes dave refusing every install and upgrade after a system's first upgrade, and lets anyone run dave status.
J1-7.3.1-0.2.2-alpha4 is the fourth alpha. dave goes to 0.2.2; the rest of the system is as it was in the third alpha. An installed system gets all of it with sudo dave upgrade and a restart, after the repair below if it needs one.
Installing after an upgrade
After its first upgrade, a joe system refused every dave install, dave remove and dave upgrade:
dave: the root contains nested btrfs subvolumes, which a snapshot would not include; move them under /var or /home
An upgrade runs the packages’ triggers in the new system before it has started. There, /var was only the empty directory that the shared /var is later mounted on, so systemd-tmpfiles made two btrfs subvolumes in it: /var/lib/machines and /var/lib/portables. Once the new system was running, the real /var covered them, and dave will not snapshot a root with subvolumes inside it.
dave 0.2.2 gives triggers an empty, temporary /var and /home, so nothing they write is left behind under the shared ones. It removes what dave 0.2.1 left there, and when it does refuse a snapshot it names the subvolumes in the way.
If your system already refuses
dave 0.2.1 also refuses the upgrade that would bring 0.2.2, so remove the two subvolumes first. sudo dave status says which deployment is running; for deployment 2:
$ sudo dave status
$ sudo btrfs subvolume list -o /run/dave/top/joe/deploy/2
$ sudo btrfs subvolume delete /run/dave/top/joe/deploy/2/var/lib/machines /run/dave/top/joe/deploy/2/var/lib/portables
$ sudo dave upgrade
Then restart. That upgrade is still made by dave 0.2.1, so the new system starts with the same two subvolumes, and dave 0.2.2 removes them while it checks its first boot.
Or go back instead: sudo dave rollback and a restart return to the system as it was before the upgrade, and sudo dave upgrade works from there. Configuration changed since then stays behind in the newer system.
dave status without sudo
dave status, dave deployments, dave search, dave info and dave list work without sudo, as Using dave already said they did. Maja (c-ludenberg), who tested the third alpha in a virtual machine for the hardware list, found that dave status asked for sudo. Thank you. What dave status shows comes from the EFI system partition and from parts of the disk only root may read, so dave publishes a copy at every boot and after every change it makes. dave search searches the index fetched last.
Old deployments are root’s
Every deployment lives under /run/dave/top, where dave mounts the top of the btrfs file system. Any user could enter it, and run the set-uid programs of an older deployment, including versions that have since been fixed. Only root may enter it now, and set-uid programs do not run from it.