Confirmed users
107
edits
m (→Build a .src.rpm: tweak to make more copy/paste friendly) |
|||
| Line 6: | Line 6: | ||
Use a machine configured to build RPMs, with the toplevel::server::pkgbuilder class. In moco, see [[ReleaseEngineering/How_To/Start_RPM_Ubuntu_Packager_Instances]] | Use a machine configured to build RPMs, with the toplevel::server::pkgbuilder class. In moco, see [[ReleaseEngineering/How_To/Start_RPM_Ubuntu_Packager_Instances]] | ||
If you're upgrading or modifying an existing package, download the source RPM of the old version of the package you'd like to build from puppetagain.pub.build.mozilla.org/data/repos/yum/releng/public and unpack it: | 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 | $ mkdir foopkg && cd foopkg | ||
$ rpm2cpio $srpm | cpio -ivd | $ rpm2cpio $srpm | cpio -ivd | ||
You should see a .spec file appear. | You should see a .spec file appear. | ||
=== What to do with these spec files? === | |||
Now that 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 ones in http://hg.mozilla.org/build/puppet under modules/packages/manifests/mozilla. 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. | If you're starting a fresh package, make yourself a new .spec file and download any Source files to the current directory. | ||