Arch Linux minimal container userland 100% reproducible - now what?

kpcyrd kpcyrd at
Wed Mar 20 12:42:29 UTC 2024


in last week's email to the reproducible-builds email list[1] about 
reproducible Arch Linux I mentioned there's only one unreproducible 
package left in


Due to amazing work by dvzrv and Foxboron this package is now also 

  INFO  arch_repro_status > All packages are reproducible!
  INFO  arch_repro_status > Your system is 100.00% reproducible.

To try for yourself use:

podman run --rm -t archlinux sh -c 'pacman -Suy arch-repro-status 
--noconfirm && arch-repro-status'


Where do we go from here? It would be cool if the OCI container image 
itself could also be reproduced (bit-for-bit), but I'm not sure if 
there's any prior work (specifically for images listed as 'official' on 
Docker Hub)?

Specifically what I mean - given a line like this:

archlinux at sha256:2dbd72d1e5510e047db7f441bf9069e9c53391b87e04e5bee3f379cd03cec060

I want to reproduce the artifact(s) that are pulled in by this, with the 
packages our Arch Linux rebuilders have reproduced from source code. 
 From what I understand this hash points to a json manifest that is not 
contained in the container image itself and was generated by the 
registry (should we archive them?), and this manifest then points to the 
sha256 of the tar containing the filesystem (I'm possibly missing an 
indirection here).

Hopefully one of the many SBOM formats can help with this. :P

I know the container image is built from these two repositories but I 
don't have any in-depth knowledge:


The only work towards reproducible container images I'm aware of is by 
Akihiro Suda:

I'm suspecting the current scripts used by Arch Linux would still be 
prone to mirror changes[2] though, meaning new package uploads would end 
up in our reproduced artifacts (causing mismatches) and the container 
image could only be reproduced for a short amount of time.


I'm also not sure if there's a missing puzzle piece with reproducible 
containers in regards to this manifest json that is generated by the 
registry. The image digest being unpredictable has also been mentioned 
in a cosign github issue[3].


Input much appreciated!

## Caveats

Probably worth mentioning, at the time of writing there's no consensus 
across multiple orgs yet, the 
instance reports this status, two other rebuilders don't report the full 
100% yet.

$ arch-repro-status -r
  INFO  arch_repro_status > 3/118 packages are not reproducible.
  INFO  arch_repro_status > Your system is 97.46% reproducible.

$ arch-repro-status -r
  INFO  arch_repro_status > 3/118 packages are not reproducible.
  INFO  arch_repro_status > Your system is 97.46% reproducible.

The packages in question are part of this rebuild todo (specifically 
gcc-libs, glibc, ncurses):

Meaning there's currently some luck involved for these 3 packages, e.g. 
using btrfs currently increases your chances to get an exact match 
(after a few tries). We're obviously trying to get rid of this caveat 


If you appreciate this flavor of supply-chain security you may be 
interested in repro-env[4] that I'm currently trying to land[5] in 
ubuntu 24.04 LTS, but is blocked by Debian's libnettle[6].



More information about the rb-general mailing list