srh/rethinkdb-package-builder
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
RethinkDB Mass Package Builder
This repo has tools for building RethinkDB on a crapload of
platforms. It uses Docker because that's a way to get operating
system images and run stuff on them.
Right now, you could run:
# Mac
ruby setup.rb
# Linux
sudo ruby setup.rb
Sudo is only necessary if your docker installation needs it.
This supports kicking off a mass package build for a given
rethinkdb git commit. It also supports kicking off an individual
package build for a particular (rethinkdb git commit, platform)
pair.
EXAMPLE USAGE:
./setup.rb --help
# build packages, test installation, and copy packages for resolute
./setup.rb -c v2.4.5 --v245support --packages --test-pkgs --copy-pkgs --distro resolute
# view rethinkdb_2.4.5~0resolute_amd64.deb
ls artifacts/pkgs
# Try to make an arm build (but encounter an error in re2?).
./setup.rb -c v2.4.5 --v245support --packages --test-pkgs --copy-pkgs --distro resolute --platform arm64
BUILD REQUIREMENTS:
You need Ruby and Docker.
To make ARM builds on an x86 system, you will need Docker to
support running under ARM. You might need to run something like
these commands -- or, if these are out of date, search online for
instructions.
sudo apt-get install qemu-system binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Should print "aarch64"
docker run --platform=linux/arm64/v8 --rm -t ubuntu uname -m
REPRODUCIBILITY:
These builds are not perfectly reproducible. They run "apt-get
update", for example, and fetch unversioned and un-checksummed
dependencies from their apt sources. Sometimes package sources
disappear, or change URLs, causing the Dockerfiles to break.
DIRECTORY STRUCTURE:
- rdbcheckout - clones rethinkdb and fetches the biggest external
dependencies. We have this here so we don't have to re-clone and
fetch for every platform (a zillion times over).
Keeps the checkout in /rdb
- artifacts - output directory (created by setup.rb) for packages,
dist files, etc.
- dist, build - common docker recipes that are identical on most
of their applicable platforms.
- bionic, buster, stretch, centos8, et al - dockerfiles for building
on specific platforms
Copies /rdb from rdbcheckout to /platform, then does its work.
NOTES:
- The creator of this (Sam Hughes <sam@samuelhughes.com>) is a
Docker n00b, so feel free to second-guess his decisions.