Did you ever want to rebuild the archive, but setting up this whole wanna-build/sbuild/buildd stuff somewhat scared you? Then this small script might be for you. All you need is cowbuilder, the rights to build inside a cowbuilder environment and this script.
When you call it with a list of packages as argument it will build every package in a clean cowbuilder environment, saving the buildlog (succeeded-\$package or failed-\$package) and cleaning up the rest afterwards.
To speed up things you can run several instances of this script concurrently — lockfiles will prevent the script from building the same package more than once.
It is even safe to kill the script and restart it later. It will automatically skip all packages where a logfile (succeded|failed)-\$package already exists. All you have to do after you killed the script is to remove the lockfile in the LOGDIR and the \$package-directory in the BUILDDIR.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
I know my bash scripting skills are shitty, so please send patches after you laughed ;)
I’m currently running two instances concurrently for 3 days on my Pentium 2,4GHz HT box and have rebuilt \~70% of the testing archive so far.
It would be cool to distribute the rebuilt across a few computers via ssh, so that they’re all building on the same list but using their own cowbuilders. It should be sufficient if all computers shared the same LOGDIR across the network, but I’m not sure how to do this. NFS does not the trick since it cannot guarantee the atomicity of the ln-command.