Today I finished developing/converting the build system we us in iPrint from building in static chrooted build environments to building in a similar yet “created on-demand” chrooted build system developed at SuSE called autobuild. The process I’ve worked on is a complete integration with our internal CVS repositories. A project is checked out from CVS which contains the spec file which is modified to contain the correct version, which in the case of iPrint, includes the date. This makes versioning nice since the major version, say 5.0 is the first part of the RPM version, the date stamp (YYYYMMDD) is the second part. The RPM release in our case is the number of times we build on that day. So, for the server RPM, we might have novell-iprint-server-5.0.20050620-1.i586.rpm for the first RPM built on June 20 of 2005 and so on. This system of versioning makes dealing with RPM releases very easy as we know immediately when an RPM was made just by looking at it. Also, keeping the date in the version rather than the release field satisfies autobuild’s need to set the release itself.
The iPrint build system automates the process of checking the project out from CVS, modifying the appropriate files for version information (including the spec file), preping the source (creating a tar file along with the spec in a directory), running autobuild to produce both debug and production versions of the RPMs on multiple architectures (currently i586 and x86_64), copying the built RPMs to the test lab staging area, creating links in a directory pointing to the latest RPMs available for print testing and then there’s a host of scripts that we use in testing to install RPMs (latest, latest debug, matching debug or revert to the originaly installed RPMs).
The build infrastructure is fairly strait forward but took a while to get working right. One of the more tricky RPMs was novell-iprint-xclient (the iPrint client for Linux). This was because we produce an RPM for both i586 and x86_64 however, the Firefox browser in the SuSE x86_64 distribution is a 32bit binary for various reasons including the fact that most third-party browser plugins like are acroread and flash are only 32bit and will not run in the 64bit browsers. To accomodate that I have a shared NFS partition between the different architecture build machines where the 32bit plugin and libraries from the i586 RPMs are extracted using rpm2cpio and placed. These are then included as sources, dealt with in the install section and file section via %ifarch directives in the for the x86_64 build in the spec file. It works rather nicely. 8^)
With this shared NFS partition, it’s possible to run something like this to create the RPMs on both architectures:
ssh i586_build_machine "make_xclient -ad" && ssh x86_64_build_machine "make_xclient -adn"
the make_<project> scripts take the following arguments:
-a Build autobuild (production) RPMs -d Build debug RPMs -t Build a tarfile suitable for submission to the official autobuild -n Don't increment the release field
The shared partition also holds the release field information so that muliple builds accross architectures won’t increment the release number for a certain build. This is important so that the above ssh commands do not each increment the release.
The purpose of the scipts is to integrate the development process with the testing process in a way that is least intrusive on either group. Currently it works very well in our group of developers and testers. By running a simple command, both “production” and debug RPMs are ready for testing in a mater of minutes. With this project mostly taken care of, I’ll be working on getting patch RPM support ready for iPrint RPMs.
Related posts:
- How to build RPMs for SuSE 9.2 x86_64There’s been some interest in both email and comments on...
- Bash scripting tip: Convert IP address to HEXI was working on a project at work to make...
- Happy System Administrator’s DayHere’s wishing you and your’s the happiest System Administrator’s Day...
- May 21, 2008 SLLUG meeting: OpenSuse Build ServiceI’ll be presenting tomorrow night (Wed. May 21, 2008) on...
- PlanetN daut org“…they found me, I don’t know how but they found...
Comments
Leave a comment