2025-02-19
Updated: 2025-03-28
Well it's [Stagex] and it's one year old! It is the full-source bootstrapped, and reproducible toolchain that is going to be turned in a full OS in the future.
Although my background is completely different to Information Security, or Computer Science and I am not a dev1 (at least not yet - skill issues as primeagean would say -), my gut feeling says that I should contribute to this project as much as I can, with whatever skills I have, as this is going to be the future of the global infrastructure.
Well I started -trying- to reproduce [Stagex] on my laptop when it was at it's 3~4 months old? Something like that. At that time were a bit less storage demanding (in 27-02-2025 it needs at least a 1.5 TB to work, for docker cache, but this is going to change soonTM). At that time I was able to reproduce it and add some packages to it.
So when you want to reproduce [Stagex], use a freshly installed VM. Do not run an LXC container, just use proper VMs or even on bare metal. Otherwise, as currently we use the Docker engine to reproduce it will eventually fail (as it did for me, 2025/02/25 ).
Well I have a vm which I use to build stagex nowdays. I installed debian
on it, git
and docker
. Checked with src/setup-debian-12
that eveything is installed properly and then run make
. Aaaand after 2 days I got everything built. And after git diff
ed and got different digests. Oh well, let's find what is the problem.
But in order to see fast a digest check:
jq -r '.manifests[].digest' < out/core-rust/index.json
Yeah, well if you don't know well the ins and outs of docker
, buildx
, and how to get shell
in it sometimes, try --entrypoint=/usr/bin/sh
like:
docker run -it --entrypoint /usr/bin/bash stagex/bootstrap-stage1:latest
Good luck with that ^, there's isn't always sh
in some images :P.
So noob level 1 passed.
Alright, let's do this!Leeeeeeeroyyyy Jenkins
When building from repo then we need to change the Containerfile and get shell. so in the Containerfile just before the crash add:
RUN /usr/bin/sh
and the run with
docker buildx build -f ./Containerfile -t local/zig:01 --platform linux/amd64 -o type=tar,dest=../../../zig_test.tar -o type=docker --load .
Next we need to check if our current build is using the same docker version as the devs/maintainers use. The most important package that should always be reproducible is stagex/boostrap-stage0
So we stick with that, if we solve that we will make a full build after. So run
docker version
and compare it with the devs, or between your machines. If everything is the same it is time to compare the resulted tars.
In which we just use diffscope
I'm not a developer, but I play one on TV xD, at least not yet –currently on the 'trial and error' plan, with a focus on error :P.
It's okay to not have all the answers, and it's okay to feel uncertain. It's all part of the process, and it's where some of the best learning and growth happens.