distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

Non-hermetic builds appear to be broken #55

Open the-maldridge opened 4 years ago

the-maldridge commented 4 years ago

Attempting to do a complete bootstrap build fails due to not being able to use host tools to run the build. The steps I took are as follows:

maldridge@theGibson:~/Documents/distri (master)$ export DISTRIROOT=$PWD
maldridge@theGibson:~/Documents/distri (master)$ distri build -hermetic=false -pkg=gmp
2019/12/22 01:22:32 building gmp-amd64-6.1.2-3
2019/12/22 01:22:32 downloading https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2 to gmp-6.1.2.tar.bz2
2019/12/22 01:22:38 verifying gmp-6.1.2.tar.bz2
build: build: builddeps: package "bash" not found (pattern /home/maldridge/Documents/distri/build/distri/pkg/bash-amd64-*.meta.textproto)

The host has void's base-devel package available, which includes these packages:

stapelberg commented 4 years ago

The order is important, so bash will need to be one of the first ones you’ll build.

That said, I can reproduce the issue even when trying to build bash:

% distri build -pkg=bash -hermetic=false
2019/12/25 20:02:19 building bash-amd64-4.4.18-3
build: build: builddeps: package "bash" not found (pattern /root/distri/build/distri/pkg/bash-amd64-*.meta.textproto)

I think this might be a regression from when we introduced version globbing.

stapelberg commented 4 years ago

Added a few commits which get rid of the most glaring issues. I can build bash and make in non-hermetic mode now.

On Void linux, you’ll also need the musl-bootstrap package for musl-gcc, which distri uses for its wrapper programs (entrypoints into the hermetically-built packages).

Let me know if you hit another road block. I’ll try a full bootstrap run from non-hermetic into hermetic when I get around to it (unless you race me to it :)