Personal tools
     DOCUMENTATION

rPath Linux:Installer Customization/anaconda-templates

From rPath Wiki

Jump to: navigation, search
rPath Linux --> Installer --> Customization --> anaconda-templates

Contents

rPath Linux uses anaconda-templates to customize the Anaconda installer. Create a custom version of anaconda-templates to make project-specific modifications for an rBuilder project.

Creating a custom version of this package is not typically necessary as most installer customizations can be made using anaconda-custom. Customizations that require a custom anaconda-templates include modifying kernel modules for Anaconda in place of using driver disks for this purpose.

Creating a Custom anaconda-templates Package

Use the following steps to create a custom anaconda-templates package for an rBuilder project. These instructions assume you are familiar with packaging for Conary:

  1. Shadow an existing anaconda-templates package from another project to your project repository:
    cvc shadow example.rpath.org@rpl:devel anaconda-templates:source=conary.rpath.com@rpl:1
  2. Check out the package from your project repository:
    cvc co anaconda-templates
  3. Modify template.conf to fit your project requirements. For example, if you want to change the name of the distribution to Example Linux, modify the distroname line to:
    distroname="Example Linux"
    See rPath's documentation on common customizations for case-specific modifications.
  4. Use installlabel in template.conf to specify additional install label paths for custom components. Append these additional labels to the line, and leave the default labels intact because they reference other necessary Anaconda runtime components.
  5. Cook the anaconda-templates recipe. Expect the cook logs to display numerous missing trove errors, and verify a successful local cook by examining the size of the resulting changeset file. The file should be approximately 220 MB.
  6. Commit the package to the rBuilder project repository where it will be used, and cook the package in the repository.
Image:Bulbgraph.png   Creating a custom anaconda-templates is relatively time-consuming and can require several hours to complete.

Testing anaconda-templates

Test anaconda-templates by creating an installable ISO build in rBuilder and running a test installation using that ISO.

Maintaining anaconda-templates

Update the custom anaconda-templates with the same process as other packages in an rBuilder project. To stop using a custom anaconda-templates package, use the instructions in Redirecting anaconda-templates to change the package recipe to redirect to rBuilder's default source, rPath Linux version 1: anaconda-templates@conary.rpath.com@rpl:1

Redirecting anaconda-templates

Use redirect recipes in a custom anaconda-templates to apply the anaconda-templates package from another project's repository. The redirect recipe allows developers to use a single anaconda-templates package for multiple projects while only maintaining the package on one project.

Also use the redirect recipe to revert to using rBuilder's default anaconda-templates package after previously committing a custom anaconda-templates. To do this, replace the previous package recipe with a redirect recipe:

 
# Copyright (c) 2006 rPath, Inc.
# This file is distributed under the terms of the MIT License.
# A copy is available at http://www.rpath.com/permanent/mit-license.html
#
 
class AnacondaTemplates(RedirectRecipe):
    name = 'anaconda-templates'
    version = '0'
    def setup(r):
        r.addRedirect('anaconda-templates', 'conary.rpath.com@rpl:1')

Commit the package and cook it in the repository to establish the redirect.