Changes

Jump to: navigation, search

ReleaseEngineering/PuppetAgain/HowTo/Build RPMs

1,610 bytes added, 13:40, 19 August 2014
Build a .src.rpm
Use a machine configured to build RPMs, with the toplevel::server::pkgbuilder class. In moco, see [[ReleaseEngineering/How_To/Start_RPM_Ubuntu_Packager_Instances]]
The build infrastructure uses two types of rpm's: vanilla and customized for mozilla.Let's clarify the terminology: a "vanilla package" is a package which is publicly available and is used by mozilla without applying any customization. An example of this is the jdk package used for Android builds. A "mozilla custom" package is a package rebuilt with some mozilla-related customization in the spec file defining how it is built. An example of this is the mercurial package deployed on slaves across the infrastructure.Vanilla packages just need to be made available in our repositories, while mozilla-custom ones need to be rebuilt. The procedure described here applies to mozilla-custom packages. If you're upgrading or modifying an existing mozilla-custom package, you will need the following spec files: * old vanilla spec file: this is the spec file used to build the old version of the package before applying mozilla customizations* new vanilla spec file: this is the spec file used to build the new version of the package before applying mozilla customizations* old mozilla-custom spec file: the spec file used to build the previous mozilla-custom version of the package .spec files can be obtained from source rpm's as described below. === How to extract .spec files from source rpm's === download the source RPM of the old version of the custom package you'd like to build from puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public and unpack it:
$ mkdir foopkg && cd foopkg
$ rpm2cpio $srpm | cpio -ivd
You should see a .spec file appear. Check  === What to do with these spec files? === Now that it is you have the old vanilla, new vanilla, and old custom, you should create a new spec file (to be used to build the new version of the package), by merging the diff between old vanilla and old custom (.i.e.: the mozilla customization) into the new vanilla spec file. Spec files used to build packages used in the infrastructure should be identical to the one ones in http://hg.mozilla.org/build/puppet under modules/packages/manifests/mozilla e.g., with an md5 hash. If not, figure out what the differences are, and which corresponds to the running version of the package.
If you're starting a fresh package, make yourself a new .spec file and download any Source files to the current directory.
Confirm
107
edits

Navigation menu