New comment by sgn on void-packages repository https://github.com/void-linux/void-packages/issues/25604#issuecomment-709349377 Comment: > Wonder if this is still relevant in light of your comment. ahesford said: > When bootstrapping from source, it takes a few iterations to remove host artifacts from the masterdir. Yes, it's still relevant, a few iterations includes *stage0*, *stage1*, *stage2*, and final masterdir > Could you please provide a sequence of commands to achieve this? ```sh $ # make sure we start from nothing $ rm -rf /path/to/hostdir /path/to/masterdir $ # build stage0 $ ./xbps-src -N -H /path/to/hostdir -m /path/to/masterdir bootstrap $ # L165: use the resulting stage 0 container to rebuild all `bootstrap` packages again $ rm -rf /path/to/hostdir/binpkgs $ ./xbps-src -N -H /path/to/hostdir -m /path/to/masterdir pkg base-chroot $ # L166: then use `binary-bootstrap` (stage 1) $ rm -rf /path/to/masterdir $ ./xbps-src -N -H /path/to/hostdir -m /path/to/masterdir binary-bootstrap $ # L166: and rebuild the `bootstrap` packages once more $ rm -rf /path/to/hostdir/binpkgs $ ./xbps-src -N -H /path/to/hostdir -m /path/to/masterdir pkg base-chroot $ # L167: then use `binary-bootstrap` again $ rm -rf /path/to/masterdir $ ./xbps-src -N -H /path/to/hostdir -m /path/to/masterdir binary-bootstrap ```