Mail archive

[alpine-devel] new build server

From: Natanael Copa <>
Date: Thu, 29 Oct 2009 08:24:35 +0100


We have got a new build server. I have spent last days on setting it up.
The idea is that we want a git hook to trigger building updated packages
and uploading them to master mirror. Since git server and build server
are 2 different we could have solved it with a cron job. Not good enough
I thought...

So, what we do is we create a fifo for each git branch on the git
server. Then we have a git hook that writes to the fifo when someone
pushes changes.

Then on build server, we run a daemon that ssh to the git server and
read from the fifo. For each read line, it rebuilds and uploads new
packages. That way we avoid race conditions when 2 different developers
pushes stuff at the same time and we avoid the delays we would have when
using cron jobs.

Then I wanted this to run as a daemon, that starts/stops from an init.d
script so it starts up automatically after a reboot. Having it start was
easy. I wrote a daemon in shell for that. Having it stop was not so
easy, since when the daeomn was killed the ssh process was left running.
I could not solve that in shell, so i rewrite it in lua. Lua lacks
signal handling so I ended up rewrite it in C. After a bug that
forkbombed my vserver host to death (!!?) and a bug that killed all the
packages on main mirror we are finally back and things are working.

The new build server have 8 horses that kicks so if a developer wants a
build environment for kernel hacking or similar, just let me know.


Received on Thu Oct 29 2009 - 08:24:35 UTC