StartIn the
first part, I introduced the new binary package building service for the Midnight Commander file manager for Debian / Ubuntu. The comments rightly pointed out the lack of a technical description of the medium itself, and I promised that I would lay out the details as soon as the code was brought into a divine form. Two weeks passed, a little time appeared to stabilize the functionality and brush the code (it is still terrible, but it seems to work as intended), so it's time to fulfill the promise.
I don't specifically include source codes in the topic, there are a lot of them, and in my opinion the article is overloaded. Who cares , can download them with googlecode .')
Assembly environment
The build environment consists of several shell scripts:
- contrib / mc-release-builds.sh is a script that runs as a CRON task and manages the assembly of new releases, or reassembly of already released ones.
- contrib / mc-nightly-builds.sh is a script that is also a CRON task and builds night slices.
- contrib / prepare-environment.sh - a script that initializes environment variables specific to my server (in particular, environment variables are exported for SSH and GPG agents)
- The contrib / local-repo-update script, with which I update my repository, is now thinking of abandoning apt-ftparchive and trying reprepro.
- contrib / pbuilder - configs for assembly purposes, one of them (contrib / pbuilder / buildbot) is used to prepare a package from source or GIT.
- contrib / apt-ftparchive - my settings for running apt-ftparchive (maybe someone will come in handy)
Next come the scripts that make up the build environment itself:
- build-mc-from-git.sh - build a package from source or VCS (system kernel)
- buildbot.sh is a wrapper over the previous script, which is an intermediate link between the crown tasks, the user and the kernel of the build environment.
- initial-build.sh is an anachronism that has remained due to my natural laziness. Adds a separate buildbot user to the pbuilder (buildbot) build target.
build-mc-from-git.sh
As I mentioned earlier, this is the most important part of the build environment. Performs two types of operations: build / reassemble releases and build night slices from GIT. If the release build was chosen, then the script:
Building the night slice differs only in that the sources are generated from the GIT repository and the incrementing code is different. If the script detects that there were no changes in the master branch of the repository, the assembly is interrupted.
buildbot.sh
This script calls build-mc-from-git.sh and in case of successful completion it does an additional check of the binary package in piuparts and if there are no errors, it starts the process of building the targets (squeeze-i386, squeeze-amd64, natty-i386, etc. .). After each successful build, the repository temporary structure is updated. If all the targets are collected successfully and buildbot.sh was called by one of the CRON tasks (mc-release-builds.sh or mc-nightly-builds.sh), then the update script of my repository is launched. At this point, the APT service information is updated, the Release files are signed, and the server copy is updated.
Now the full cycle of assembling 8 targets takes a little over an hour. In the future, I will probably expand the targates on rpm-based distros (as far as I understand, upstream has not restored the normal operation of the previous buildbot). Additional info or support is available on the
project page .