Missing packages `ca-certificates` and `pureos-archive-keyring` when trying to build the QEMU image on an Arch Linux host

Continuing the discussion from The current state of the Librem 5 is… actually pretty good?:

When I read that, I got a bit jealous and thought I’d try out PureOS in QEMU, too, while waiting for my phone to arrive.

I started out at PureOS’s documentation but quickly got stuck there. Looks like the build jobs for the QEMU image have been failing for a while.

Where I got stuck

I then checked out Image Builder myself, hoping it’d let me build the QEMU image on my own machine. But it says:

$ ./build-image -b qemu-x86_64 -d byzantium
Building qemu-x86_64.img (arch: x86_64, byzantium)
[…]
ERROR: command failed: ['debootstrap', '--arch=amd64', '--include=acpid,linux-image-amd64,grub-pc,sudo', 'byzantium', '/tmp/tmpog7x89sj', 'https://repo.pureos.net/pureos']
b"W: Cannot check Release signature; keyring file not available /usr/share/keyrings/pureos-archive-keyring.gpg\nI: Retrieving InRelease \nI: Retrieving Packages \nI: Validating Packages \nI: Resolving dependencies of required packages...\nI: Resolving dependencies of base packages...\nI: Checking component main on https://repo.pureos.net/pureos...\nE: Couldn't find these debs: ca-certificates pureos-archive-keyring\n"

The error message is here:

Couldn’t find these debs: ca-certificates pureos-archive-keyring

I’m not quite sure where (host? guest?) and how I’m supposed to install those.

Steps to reproduce

  1. Install shunit2 from the AUR.
  2. Install distro-info-data from the AUR (patched to latest version 0.58).
  3. Install distro-info from the AUR (patched to latest version 1.5).
  4. Install debootstrap-pureos from the AUR. (I uploaded that PKGBUILD myself, derived from debootstrap.)
  5. Install vmdebootstrap-pureos from the AUR. (Uploaded that myself, too, derived from vmdebootstrap.)
  6. Check out Image Builder from source.puri.sm.
  7. Run ./build-image -b qemu-x86_64 -d byzantium as suggested in README.md.

I think I might figure out a way to get my hands on the missing ca-certificates and pureos-archive-keyring packages (example).
But where and how do I install those in order to make Image Builder actually use them?

Pinging @dos, who might know one thing or two about Arch and the Image Builder.

You need to patch debootstrap on host with this: https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/92

The easiest way would probably be to run image-builder inside a PureOS container, as its debootstrap is already patched there.

(that’s a recent requirement since PureOS archive has been migrated to a newer infrastructure this week and the new version of laniakea got rid of some legacy stuff - but it turned out that while apt has supported that for ages, debootstrap still did not)

I have looked closer at the steps you described and, well done, you have pretty much figured all the right things out by yourself! However, the debootstrap version you took from our git repo is an old one that does not include the required patch. Matthias forgot to push the tag while updating the package, but I pinged him and he did so now, so you can update your debootstrap-pureos package and it should work :slight_smile:

(you can also use the upstream sources and simply apply the MR I linked to above on top, that will work too)

3 Likes