Personal tools
     DOCUMENTATION

Appliance Development:Recipes

From rPath Wiki

Jump to: navigation, search
Image:Rpath-color-16x16-1bitalpha.png  APPLIANCE DEVELOPMENT

Contents

A recipe is a set of instructions that directs Conary how to build a package or group. One recipe can be used to create one or more packages or groups. Recipes are written in the Python programming language and follow particular conventions and structure. Use your preferred text editor to create and modify recipe files during the packaging process.

Recipe Conventions

The following guidelines summarize some key conventions for package and group recipes used in appliances:

  • A recipe file must match the package or group name plus .recipe at the end, such as in glibc.recipe and group-example.recipe.
  • Packagers can start a new recipe from an existing recipe file or from one of the recipe templates provided in rPath documentation.
  • Each recipe is actually a Python class definition. Packagers can also construct custom super-classes from with other recipes can inherit.
  • Each recipe class instance has the name r (instead of the common Python convention self).

Recipe Structure

Recipes typically include the following:

  • Class definitions
  • Class variables: name, version, and buildRequires
  • Build requirements, though inherited build requirements are often sufficient (Conary's messages during a recipe cook will indicate if additional requirements are needed in a package recipe)
  • Macros
  • Processing actions, which include:
    • Source actions used to prepare the source
    • Build actions used to control compiling the source and installing the software
    • Policy actions used when necessary to modify Conary's default behaviors

Recipe References to Bookmark

Bookmark Conary:Recipe which provides reference links for recipe conventions, structure, templates, and the package and group recipe classes. Use this segment of rPath documentation as an ongoing reference for recipe writing. The next sections step through applying these resources when selecting a recipe template and developing a recipe.


<< PREVIOUS: Appliance Development main page NEXT: Building Packages >>