Personal tools
     DOCUMENTATION

rPath Linux:Installer Customization/anaconda-custom

From rPath Wiki

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

Contents

Use an anaconda-custom package in an rBuilder project to modify any portion of Anaconda and some of its dependencies. This package applies customized files to a directory structure under /usr/share/anaconda, which rBuilder uses to generate the product.img file for an installable ISO image. The product.img image file includes changes to Anaconda for the appliance.

The packaged directory structure in anaconda-custom must reflect the Anaconda source directory structure. Entire files must be included in the package.

Creating an anaconda-custom Package

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

  1. Check out an Anaconda source trove as a reference in creating anaconda-custom. For example, use this command to check out the source from rPath Linux version 1:
    cvc co anaconda=conary.rpath.com@rpl:1
  2. Modify and add files necessary to customize Anaconda. If you are not familiar with what files should be modified for a particular customization, see rPath's documentation on common customizations. You cannot use custom packages to delete files.
  3. Create a new anaconda-custom package. (Do not shadow from rPath Linux)
  4. Create the supporting directory structure needed for the modified and new files for anaconda-custom.
  5. Copy the modified and new files to the new directory structure.
  6. Package the directory structure with the modified and new files. See the sample recipe provided.
  7. Commit the package to the rBuilder project repository where it will be used, and cook the package in the repository.

Updating the Package

Update anaconda-custom with the same process as other packages in an rBuilder project. However, you cannot use Conary to merge updates from original Anaconda source files. Incorporate such changes by manually by checking out the source, differentiating each file packaged in anaconda-custom with the corresponding file in the source, and modifying the packaged files again to incorporate changes as desired.

Sample anaconda-custom Recipe

The following anaconda-custom package recipe is used to call an custom install class (custom.py) and to add a group of images. The custom install class changes the steps in the Anaconda installer.

 
#
# Copyright (c) 2005 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 AnacondaCustom(PackageRecipe):
    name = 'anaconda-custom'
    version = '0.1'
 
    def setup(r):
        r.addSource('custom.py', dir = '/usr/share/anaconda/installclasses/')
        r.addArchive('pixmaps.tar.gz', dir = '/usr/share/anaconda/')