JamiKettunen / void-bootstrap

Easily customize & create Void Linux rootfs images
BSD 2-Clause "Simplified" License
6 stars 3 forks source link

VoidBootstrap

Customize & create Void Linux rootfs images.

Supported architectures

Binary repositories for both glibc & musl:

Binary repositories for glibc only:

No binary repositories with existing xbps-src build targets (more or less unsupported here too):

Building

Create a config.custom.sh, in it tweak options defined in config.sh as you please & simply run the mkrootfs.sh script:

$ ./mkrootfs.sh

After this ./deploy.sh can be ran to deploy the rootfs to an Android device.

A config.local.sh is also sourced in case it exists to utilize e.g. a local-only distcc setup.

Usage

mkrootfs.sh

Builds the OS image.

Optional arguments:

Optional arguments:

Optional scripts

The following scripts can be created to be sourced by mkrootfs.sh if they exist:

Custom tweaks to void-packages

See packages/README.md for more details.

External repos

Standalone external repositories can use void-bootstrap as a base to avoid forking or extra maintenance burden of the core script with a setup similar to the following:

cat <<'EOF' > mkrootfs.sh
#!/usr/bin/env bash
set -e
cd "$(readlink -f "$(dirname "$0")")"
if [ -d void-bootstrap ]; then
    : ${VBS_PULL_THRESHOLD_MINS:=240}
    if [[ $VBS_PULL_THRESHOLD_MINS -gt -1 && \
          "$(git -C void-bootstrap remote -v 2>/dev/null)" && \
          "$(find void-bootstrap/.git -maxdepth 0 -mmin +$VBS_PULL_THRESHOLD_MINS)" ]]; then
        git -C void-bootstrap pull --ff-only
    fi
else
    git clone https://github.com/JamiKettunen/void-bootstrap
fi
void-bootstrap/"${0##*/}" -p "$PWD" "$@"
EOF
chmod +x mkrootfs.sh
ln -s mkrootfs.sh deploy.sh
ln -s mkrootfs.sh tethering.sh

Afterwards feel free to setup a packages structure or add extra overlays to this new repo.

By the end your external repo layout could look like:

external-void-bootstrap
├── overlays
│   └── example
│       └── deploy.sh
├── packages
│   ├── mypkg
│   │   └── template
│   ├── mypkg-devel -> mypkg
│   ├── patches
│   │   └── example.patch
│   └── custom-shlibs
├── config.custom.sh
├── deploy.sh -> mkrootfs.sh
├── mkrootfs.sh
└── tethering.sh -> mkrootfs.sh

DST Root CA X3 certificate verification failed

This can happen while starting to build extra packages in case your host system has broken certificates (e.g. Arch).

It can be fixed by importing the ISRG Root X1 cert and deleting the expired DST Root CA X3 one like so:

curl -LO https://letsencrypt.org/certs/isrgrootx1.pem
sudo trust anchor --store isrgrootx1.pem
sudo rm isrgrootx1.pem /etc/ssl/certs/2e5ac55d.0

License

All code in this repository is licensed under a BSD-2-Clause license.