Tinderbox
Gentoo Linux build bot
Install / Use
/learn @toralf/TinderboxREADME
tinderbox
Goal
The goal is to detect build issues/conflicts of Gentoo Linux packages. For that about a dozen sandbox'ed Gentoo images are running in parallel. Each image is setup from a recent stage3 tarball as an arbitrary combination of ~amd64 + profile + USE flag set. Within each image all Gentoo packages are scheduled for installation, in a randomized order for each image.
Usage
The kick off of new images is done by setup_img.sh. Watch their status:
whatsup.sh -dcp
whatsup.sh -otl
The file ~tinderbox/tb/findings/ALREADY_CAUGHT holds reported findings. A new finding is send via email to the user specified in ./sdata/mailto. The Gentoo bug tracker can be searched (again) by check_bgo.sh. If not yet reported then the finding can be filed by bgo.sh.
Installation
Create the user tinderbox, which :
- must not be allowed to edit files under /opt/tb/
- needs to be granted to read/execute the scripts under /opt/tb/bin/
- must have read/write permissions for files under ~tinderbox/tb/
- must not be allowed to read the file under /opt/tb/sdata/.
Create in its HOME the directories: ./distfiles/, ./img/, ./logs/, ./run/ and ./tb/. Clone this Git repository or unpack a release artefact. Move ./conf, ./data and ./patches to ~tinderbox/tb/. Move ./bin and ./sdata to /opt/tb/ and set ownership to root. Edit the MTA config files in /opt/tb/sdata/*.sample and strip away the suffix .sample. Grant sudo rights to the user tinderbox:
tinderbox ALL=(ALL) NOPASSWD: /opt/tb/bin/bwrap.sh,/opt/tb/bin/collect_data.sh,/opt/tb/bin/debug_img.sh,/opt/tb/bin/house_keeping.sh,/opt/tb/bin/kill_img.sh,/opt/tb/bin/retest.sh,/opt/tb/bin/setup_img.sh,/usr/sbin/emaint
Adapt the values desired_count, cgroup memory and jobs for your machine size.
Example for a startup file:
#!/bin/bash
# set -x
set -eu
export LANG=C.utf8
export PATH=/usr/sbin:/usr/bin:/sbin/:/bin
rm -f ~tinderbox/run/*/var/tmp/tb/STOP
/opt/tb/bin/start_img.sh
/opt/tb/bin/index.sh
nice /opt/fuzz-utils/bwrap.sh /opt/fuzz-utils/simple-http-server.py --address 65.21.94.49 --port 54321 --directory ~tinderbox/img/ &>/tmp/web-tinderbox.log &
Why bash ?!?
I started this project with as a tiny 100+ lines Bash script. And then I missed the Point of no Return to switch to some other language.
