nilxam / installation-images

openSUSE Installation Images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1. Overview
===========

To build a new image, you have to:

 - be root
 - put the installation-images directory on a *local* file system (ie. not NFS)

Then you can run 'make' to build all parts.

The images are stored in the 'image' directory, the contents of the images
is in the 'tmp' directory.

'make install' will gather the images an put them into the 'instsys' dir.

For testing purposes there is a make target 'cd1' that builds a complete
tree as it's used on our media.


2. Format of *.file_list files
==============================

o Lines starting with '#' are comments, empty lines are ignored.

    example:

    # some comment

o You can include other files:

    include FILE

    FILE is relative to the data/*/ tree.

o   if/elsif/else/endif

  - if EXPRESSION

    EXPRESSION is more or less a valid perl expression except that
    variables don't have a starting '$' and are implicitly environment
    variables. The only exceptions to this are 'abuild' and 'arch'.

    Also, you can use 'exists(PACKAGE)' to test for a specific package.

    example:

    if arch eq 'ppc' && theme eq 'SLES'
    # ...
    elsif arch eq 'sparc'
    # ...
    else
    # ...
    endif 

o PACKAGE_NAME: [ignore|nodeps|requires]

  Unpack the selected package into a temporary directory.

  You can add tags (comma-separated) after the colon. The following tags
  are supported:
    - requires: create a file PACKAGE_NAME.requires in the image root
    - nodeps: ignore package dependencies when solving
    - ignore: ignore package ('BuildIgnore')

  PACKAGE_NAME may be empty which can be used to tell the parser that
  subsequent lines do not belong to any package.

  PACKAGE_NAME can contain '*'s. In that case the latest package version
  is used. If PACKAGE_NAME ends in '~' the last but one version is used.

  If PACKAGE_NAME starts with a '?', the package is optional.
  This is a handy shortcut if you'd otherwise use an 'if' with exists().

  Examples:
  
    ?grub:
    glibc:
    systemd: ignore

o <action> <arg1> <arg2> ...

  Do the specified action. <action> is one of these:

  - add the file/directory tree to the image:

      <args>
    ^ there's a space!

  - add a file/directory with a different name

    m <old_name> <new_name>

  - same as 'm', but link files

    L <old_name> <new_name>

  - same as 'm', but follows symlinks

    a <old_name> <new_name>

  - add optional files (e.g. some modules in initrd)

    M <old_name> <new_name>

  - add and gunzip files

    g <src> <dst>

  - remove a file/directory tree

    r <args>

  - create directories:

    d <args>

  - create a namped pipe:

    n <name>

  - touch a file

    t <args>

  - strip

    S <args>

  - hard link (<args> as for the ln command)

    l <args>

  - symlink

    s <args>

  - apply a patch from the data/*/ tree
    (The patch *must not* contain absolute path names!)

    p <patch>

  - chown/chmod files

    c <perm> <owner> <group> <args>

  - make block device

    b <major> <minor> <name>

  - make char device

    C <major> <minor> <name>

  - add some extra files (That is, add files not from packages but from
    the data/*/ directory.)

    x <src> <dst>

  - append <src> to <dst>; <src> is from the data/*/ directory.

    A <src> <dst>

  - execute a program/rpm-script
    <program/script> is run from within the 'base' environment. $PWD will
    be at the root of the filesystem which is currently built

    e <program> <arg1> <arg2> ...
    e <script>

  - execute a program/rpm-script (with chroot)
    <program/script> is run within a chroot env. <script> must be one of the
    scripts given after the package name

    E <program> <arg1> <arg2> ...
    E <script>

  - apply a perl regexp in a sed-like fashion to a file, <regexp> may contain
    white space but not <file>

    R <regexp> <file>

    Note: if the this is a multi line regexp (ends with /s) it is applied to
    the whole file. Else the regexp is applied to each line.

  - search for a file <name> below <dir> and copy it to <dst>
    (<dst> may be omitted)

    f <dir> <name> <dst>

  - search for a file <name> (in the local system!) below <dir> and copy it
    to <dst> (<dst> may be omitted)

    F <dir> <name> <dst>

  - add files from the local system (This should be used only for
    testing!)

    X <src> <dst>

  - allow dangling symlink
    Sometimes a symlink is ok because it points to a different image which
    can't be verified automatically.

    D <from> <to>


Extensions:

  - You can specify templates that are applied to groups of packages
    automatically unless there is already some other valid entry for that
    package. E.g.

  TEMPLATE rubygem-.*:
    /usr/*/ruby/gems/*/gems/*/lib
    /usr/*/ruby/gems/*/specifications

    The argument after TEMPLATE is a perl regexp matched agaist package names. If
    the regexp is empty the TEMPLATE matches every package. This can be used
    to formulate a default action for packages. E.g.

    TEMPLATE:
      /

    The package is matched against all templates in the order they appear in
    the file list and the first match is used.

    Note that the template should contain some action (it should not be
    empty) because otherwise the matching will continue. If you don't need
    any action use something inconspicuous, e.g. 'd .'.

  AUTODEPS:

  - You can resolve dependencies and add the missing packages with the
    AUTODEPS placeholder. The solver is run only if there is an AUTODEPS entry
    somewhere.
    Note: if you don't specify any actions in AUTODEPS, templates are appied to
    each individual package. E.g.

About

openSUSE Installation Images


Languages

Language:Perl 67.0%Language:Shell 15.0%Language:Assembly 10.2%Language:Makefile 3.2%Language:ApacheConf 2.7%Language:C 1.2%Language:Diff 0.6%Language:TeX 0.0%Language:Gettext Catalog 0.0%Language:NSIS 0.0%