Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Keg Reference Guide / Command Line

3 Command Line

3.1 keg

3.1.1 SYNOPSIS

keg [options] <source>

3.1.2 DESCRIPTION

keg is a tool which helps to create and manage image descriptions suitable for the KIWI appliance builder. While keg can be used to manage a single image definition the tool provides no considerable advantage in such a use case. The primary use case for keg are situations where many image descriptions must be managed and the image descriptions have considerable overlap with respect to content and setup.

keg requires source data called recipes which provides all information necessary for keg to create KIWI image descriptions. See Chapter 4, Recipes basics for more information about recipes.

The recipes used for generating SUSE Public Cloud image descriptions can be found in the Public Cloud Keg Recipes repository.

3.1.3 ARGUMENTS

source

Path to image source under RECIPES_ROOT/images

3.1.4 OPTIONS

-r --recipes-root

Root directory of keg recipes. Can be used more than once. Elements from later roots may overwrite earlier one.

-d --dest-dir

Destination directory for generated description [default: .]

--disable-multibuild

Option to disable creation of OBS _multibuild file (for image definitions with multiple profiles). [default: false]

--disable-root-tar

Option to disable the creation of root.tar.gz in destination directory. If present, an overlay tree will be created instead. [default: false]

--dump-dict

Dump generated data dictionary to stdout instead of generating an image description. Useful for debugging.

-l --list-recipes

List available images that can be created with the current recipes

-f --force

Force mode (ignore errors, overwrite files)

--format-yaml

Format/Update Keg written image description to installed KIWI schema and write the result description in YAML markup

Note
Note

Currently no translation of comment blocks from the Keg generated KIWI description to the YAML markup will be performed.

--format-xml

Format/Update Keg written image description to installed KIWI schema and write the result description in XML markup

Note
Note

Currently only top-level header comments from the Keg written image description will be preserved into the formatted/updated KIWI XML file. Inline comments will not be preserved.

-i --image-version

Set image version

-a

Generate image description for architecture ARCH (can be used multiple times)

-s --write-source-info

Write a file per profile containing a list of all used source locations. The files can used to generate a change log from the recipes repository commit log.

-v --verbose

Enable verbose output

--version

Print version

3.1.5 EXAMPLE

git clone https://github.com/SUSE-Enceladus/keg-recipes.git

keg --recipes-root keg-recipes --dest-dir leap_description leap/jeos/15.2

3.2 generate_recipes_changelog

3.2.1 SYNOPSIS

generate_recipes_changelog [options] <logfile>

3.2.2 DESCRIPTION

generate_recipes_changelog generates a change log from the git commit history of one or more keg-recipes repositories. The input file is a source info log that is generated by keg when run with source tracking enabled (-s command line switch).

The exit status is 0 in case a change log was generated successfully, 1 in case an error occurred, or 2 in case no error occurred but generated change log is empty.

3.2.3 ARGUMENTS

logfile

A source info log file produced by keg.

3.2.4 OPTIONS

-o

Write output to OUTPUT_FILE (stdout if omitted)

-r PATH:REV

Set git revision range to REV for repo at PATH

Note
Note

This limits the applicable set of commits to the given revision spec. This can be used to select only newer changes from a previous change log generator run. See EXAMPLE below.

-f

Output format, ‘text’ or ‘yaml’ [default: yaml]

-m

Format spec for commit messages (see ‘format:<string>’ in ‘man git-log’) [default: - %s] (only used with text format)

-t

Use ROOT_TAG for yaml output (e.g. image version)

3.2.5 EXAMPLE

generate_recipes_changelog -r /path/to/repo:12345678.. -t 1.1.8 log_sources

This will produce a YAML change log, namespaced with 1.1.8, intended as a version number, only considering commits after hash 12345678. If 12345678 was the hash of the HEAD commit in the checked out branch at /path/to/repo at the previous run of generate_recipes_changelog on the same data set, this would limit the change log to only contain newer changes. This method can be used to produce incremental change logs.

The change log will have the following format:

1.1.8:
  - change: git message subject
    date: git commit UTC timestamp
    details: |-
      git message body
  ...