Conary:RPM Package Recipe
From rPath Wiki
Conary packagers can write a package recipe to incorporate software provided for RPM package management. The recipe inherits from AutoPackageRecipe and from RPMPackageRecipe defined in the rpmpackage recipe defined in conary.rpath.com@rpl:devel. The RPMPackageRecipe class is designed to use source code and patch files contained within RPM files with source code (SRPMs).
The following is an example of a Conary recipe inheriting from the RPMPackageRecipe class:
loadSuperClass('rpmpackage') class Hesiod(RPMPackageRecipe, AutoPackageRecipe): name = 'hesiod' version = '3.1.0' rpmRelease = '4' rpmPatches = [ 'hesiod-3.0.2-env.patch', ]
Use the class for a recipe by adding the loadSuperClass line before the class definition, then inheriting from the RPMPackageRecipe class as in the example:
loadSuperClass('rpmpackage=conary.rpath.com@rpl:devel') class ExampleApp(RPMPackageRecipe, AutoPackageRecipe):
The following are real-world examples of recipes using RPMPackageRecipe from conary.rpath.com@rpl:devel:
The following variables can be leveraged in the recipe to alter the behavior of the class:
- externalArchive: (string) Can be set if you want to pull patches or sources from the RPM, but want the upstream archive to come from a different location
- tarballName: (string) Used if rpmpackage cannot determine the correct archive name contained within the RPM file
- distroVersion: (string) The version of Red Hat Enterprise Linux (RHEL) or Fedora Core to use for fetching the RPM; defaults to development for Fedora Core and to 4 for RHEL *
- rpmRelease: (string) RPM release string (occurring after the dash and before the dot)
- isRHEL: (boolean) RHEL sources are used if this variable is true, Fedora sources are used otherwise.
- rpmPatches: (list of strings) Patches to apply from the RPM
- rpmSources: (list of strings) Sources to add from the RPM
- rpmUpVer: (string) The upstream package version; defaults to the recipe's upstream version
- rpmName: (string) The upstream package name; defaults to the recipe's upstream name
Check out the rpmpackage recipe if desired to further examine the inherited code:
$cvc co rpmpackage=conary.rpath.com@rpl:devel
* Red Hat, Enterprise Linux, and Fedora are trademarks of Red Hat, Inc.
Categories: Conary | Packaging | Recipe
