Repositories
KIWI NG installs the packages of an image from the repositories of the
image description, at least one repository is required. Each repository
is a repository element with a source child element, which holds
the location of the repository in its path attribute:
<image schemaversion="8.5" name="kiwi-test-image-some">
<!-- snip -->
<repository type="rpm-md" alias="kiwi" priority="1">
<source path="obs://Virtualization:Appliances:Builder/openSUSE_Leap_16.0"/>
</repository>
<repository type="rpm-md" alias="OS" imageinclude="true">
<source path="obs://openSUSE:Leap:16.0/standard"/>
</repository>
</image>
The example adds the KIWI NG repository and the repository of the operating system, both from the Open Build Service. The repository of the operating system is also configured in the resulting image.
The repository element supports the following optional attributes:
Attribute |
Description |
|---|---|
|
The name of the repository, shown for example by |
|
The priority of the repository if a package is available in more
than one repository. zypper and dnf prefer the lower value, apt
prefers the higher value, see |
|
|
|
|
|
|
|
|
|
The distribution components of a |
|
The distribution name of a |
|
The profiles the repository is used for, see Profiles. |
|
A script which modifies the repository files KIWI NG creates, for settings the schema does not support. It is called with the path of each repository file. A relative path is looked up in the image description directory. |
For example, a customize script which adds the module_hotfixes
option to a dnf repository file:
repo_file=$1
echo 'module_hotfixes = 1' >> ${repo_file}
Repository Paths
The path attribute of the source element supports the following
locations:
Path |
Location |
|---|---|
|
A repository on a server. |
|
The repository |
|
For builds in the Open Build Service only: the repositories of the project which holds the image. This sets up the repositories in the Open Build Service instead of in the image description. |
|
A local directory or file on the build host. |