Welcome back! If you’ve been following our PureOS Crimson milestones, you’ll see that the few remaining tasks relate to providing ready-to-flash images for the Librem 5:
Once we get Crimson images built and published, with a method to use them to test, and finish that one task for gnome-control-center, this milestone will be complete!
We had an early image available back in January, but it was certainly not complete. Building the image required some patches to debos to work around unresolved issues. That brings us to this month’s focus – fixing the root issues in the Crimson image build, so we can build up to date images automatically.
How do you build an operating system image? First, you “bootstrap” a working installation of that operating system into a directory on your computer. Then, you pack it up into an image file that can boot on the target computer.
“Bootstrapping” the installation requires laying down a minimal set of files so that the OS’s package manager can work. Then, you use the OS package manager itself to install anything else you want.
On Debian, the most common bootstrapping tool is debootstrap. It knows how to lay down just enough files so that dpkg and apt will work. debootstrap doesn’t support every feature of apt, but it doesn’t need to. It just needs to set up enough for apt to take over.
Debootstrap is so simple, with minimal dependencies, that it is even packaged for other distributions. You can even bootstrap an OS installation for another CPU architecture, either by emulating it or by moving the partially-bootstrapped installation over to the target system to complete setup.
However, if you tried to bootstrap an arm64 installation of PureOS Crimson from an amd64 host, it didn’t work. (It did work for Debian Bookworm and PureOS Byzantium.) The bootstrap seemed to think that some important packages weren’t there, like usr-is-merged (it’s there) and cron-daemon-common (that’s there too). It’d finally give up saying that it couldn’t set up cron, because it needed cron-daemon-common as a prerequisite, and it couldn’t find cron-daemon-common. These are all important system packages, we can’t set up a system without them.
PureOS Byzantium worked, but cron-daemon-common didn’t exist yet in Byzantium (it was first introduced in Debian Bookworm, the upstream for PureOS Crimson). So this was not a very helpful comparison.
Debian Bookworm worked, even though it had the same relationship between cron and cron-daemon-common. PureOS doesn’t have any relevant patches to any of this software. We do carry some patches on debootstrap, but this was reproducible on the upstream debootstrap as well. Something was different, but it wasn’t in the packages themselves or in the tools we were using to install them.
The difference was in archive’s package lists.
Whenever you install a piece of software, say apt install firefox-esr
, apt figures out what to install. That includes finding a specific version of firefox-esr to install as well as all of its dependencies, direct and indirect. To do that, it has to know what packages are available and where to get them.
Debian and PureOS each provide a big list of all the packages currently available for your CPU architecture. That’s how apt finds the packages you ask it to install.
Both Debian and PureOS provide this big list, but if you take a look in it for cron-daemon-common, it’s not present in the PureOS list for arm64. Debian has it.
That’s because PureOS is using a newer archive format supported by apt. cron-daemon-common isn’t an architecture-specific package – it doesn’t contain any compiled code – so there’s just one version of it for ‘all’ architectures. Debian still lists all of the ‘all’ packages in each architecture’s package list, but PureOS does not. PureOS provides a separate ‘all’ list.
Like we said earlier, debootstrap doesn’t use apt or dpkg. This means it needs to understand the archive features essential to bootstrap a system. This already happened – Matthias already added architecture all to debootstrap – but it wasn’t quite complete. The problem we saw now wouldn’t have occurred back in 2016, because it only occurred for an architecture ‘all’ pre-dependency of a bootstrap package. This did not happen until cron-daemon-common was introduced in Debian Bookworm, and consequently PureOS Crimson.
With the problem now known, we proposed a fix for debootstrap and sent it upstream for the maintainer’s input.
Now that the images build reliably, we continued iterating on the images. We have both encrypted and plain images, the images are sized correctly, and Librem 5 images will now greet you with a Phosh greeter.
While this was going on, we also fixed a number of issues in individual packages to make the Crimson images suitable for testing.
GNOME Clocks and Authenticator were each brought up to parity with Byzantium. We brought back patches we carry on Clocks. Authenticator is not present in Debian Bookworm at all (a new version will be in Trixie), so we brought the prior version forward to Crimson.
Nautilus no longer pops a context menu when scrolling with touch. We fixed rendering issues in GNOME Console and web browsers.
As usual, some changes reached Byzantium as well – the kernel updates from April have been released, and Squeekboard was updated to fix issues in Chromium-based browsers.
If you’d like to try building your own image, have a look at the updated instructions in the l5 branch! Let us know about your experience on the merge request.
The next target is to build these in CI with Laniakea, so they will update automatically. We’ll have more on that in the next update!