| 1 |
kiwi-ng system prepare |
| 2 |
====================== |
| 3 |
|
| 4 |
.. _db_kiwi_system_prepare_synopsis: |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
-------- |
| 8 |
|
| 9 |
.. code:: bash |
| 10 |
|
| 11 |
kiwi-ng [global options] service <command> [<args>] |
| 12 |
|
| 13 |
kiwi-ng system prepare --help |
| 14 |
kiwi-ng system prepare --description=<directory> --root=<directory> |
| 15 |
[--allow-existing-root] |
| 16 |
[--clear-cache] |
| 17 |
[--ignore-repos] |
| 18 |
[--ignore-repos-used-for-build] |
| 19 |
[--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] |
| 20 |
[--set-repo-credentials=<user:pass_or_filename>] |
| 21 |
[--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] |
| 22 |
[--add-repo-credentials=<user:pass_or_filename>...] |
| 23 |
[--add-package=<name>...] |
| 24 |
[--add-bootstrap-package=<name>...] |
| 25 |
[--ca-cert=<cert-file>...] |
| 26 |
[--ca-target-distribution=<suse,redhat,debian,archlinux>] |
| 27 |
[--delete-package=<name>...] |
| 28 |
[--set-container-derived-from=<uri>] |
| 29 |
[--set-container-tag=<name>] |
| 30 |
[--add-container-label=<label>...] |
| 31 |
[--set-type-attr=<attribute=value>...] |
| 32 |
[--set-release-version=<version>] |
| 33 |
[--signing-key=<key-file>...] |
| 34 |
|
| 35 |
.. _db_kiwi_system_prepare_desc: |
| 36 |
|
| 37 |
DESCRIPTION |
| 38 |
----------- |
| 39 |
|
| 40 |
Create a new image root directory. The prepare step sets up a new image |
| 41 |
root directory from the specified XML description. The specified |
| 42 |
directory acts as the root directory of the new image root system. |
| 43 |
You can enter the system as root via chroot using the following command: |
| 44 |
|
| 45 |
.. code:: bash |
| 46 |
|
| 47 |
$ chroot <directory> bash |
| 48 |
|
| 49 |
.. _db_kiwi_system_prepare_opts: |
| 50 |
|
| 51 |
OPTIONS |
| 52 |
------- |
| 53 |
|
| 54 |
--add-bootstrap-package=<name> |
| 55 |
|
| 56 |
Specify a package to install as part of the early {kiwi} bootstrap phase. |
| 57 |
The option can be specified multiple times. |
| 58 |
|
| 59 |
--add-container-label=<name=value> |
| 60 |
|
| 61 |
Add a container label to the container configuration metadata. It |
| 62 |
overwrites the label with the provided key-value pair if it was |
| 63 |
already defined in the XML description. |
| 64 |
|
| 65 |
--add-package=<name> |
| 66 |
|
| 67 |
Specify a package to add (install). The option can be specified |
| 68 |
multiple times. |
| 69 |
|
| 70 |
--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> |
| 71 |
|
| 72 |
Adds a new repository to the existing repository setup in the XML |
| 73 |
description. This option can be specified multiple times. |
| 74 |
For details about the supported option values, see the **--set-repo** |
| 75 |
information below. |
| 76 |
|
| 77 |
--add-repo-credentials=<user:pass_or_filename> |
| 78 |
|
| 79 |
For **uri://user:pass@location**-type repositories, set the user and password |
| 80 |
connected with an add-repo specification. If the provided value is a |
| 81 |
filename in the filesystem, the first line of the file is used as |
| 82 |
credentials. |
| 83 |
|
| 84 |
--allow-existing-root |
| 85 |
|
| 86 |
Allows you to re-use an existing image root directory. |
| 87 |
|
| 88 |
--clear-cache |
| 89 |
|
| 90 |
Deletes the repository cache for each of the used repositories |
| 91 |
before installing any package. This is useful if an image build |
| 92 |
validates the signature of the package from the |
| 93 |
original repository source for any build. Some package managers |
| 94 |
unconditionally trust the contents of the cache, which works for |
| 95 |
cache data dedicated to one build. In the case of {kiwi}, the cache |
| 96 |
is shared between multiple image builds on the host for performance |
| 97 |
reasons. |
| 98 |
|
| 99 |
--ca-cert=<cert-file> |
| 100 |
|
| 101 |
Adds a cert file to the directory storing additional local CA certificates. |
| 102 |
The import will occur immediately after the bootstrap process, where |
| 103 |
the required CA update tooling is expected to be installed. This |
| 104 |
option is useful for situations where certificates are not packaged, |
| 105 |
or the certificates are required during the build process, e.g., due |
| 106 |
to proxy servers in the build environment that need certificates |
| 107 |
in chroot. The option can be specified multiple times. |
| 108 |
|
| 109 |
--ca-target-distribution=<suse|redhat|debian|archlinux> |
| 110 |
|
| 111 |
Specifies the target distribution for the import of certificates |
| 112 |
via the `--ca-cert` option(s) and/or the provided `<certificates>` |
| 113 |
from the image description. The selected distribution is used |
| 114 |
in KIWI to map the distribution-specific CA storage path and |
| 115 |
update tool for the import process. |
| 116 |
|
| 117 |
--delete-package=<name> |
| 118 |
|
| 119 |
Specify a package to delete. The option can be specified |
| 120 |
multiple times. |
| 121 |
|
| 122 |
--description=<directory> |
| 123 |
|
| 124 |
The path to the {kiwi} XML description. The directory must contain at least a |
| 125 |
`config.xml` or `*.kiwi` XML description. |
| 126 |
|
| 127 |
--ignore-repos |
| 128 |
|
| 129 |
Ignores all repository configurations in the XML description. |
| 130 |
This option is normally used in combination with the `--add-repo` |
| 131 |
option. Otherwise, an image build operation results in an error. |
| 132 |
|
| 133 |
--ignore-repos-used-for-build |
| 134 |
|
| 135 |
Works the same way as `--ignore-repos`, but the repository |
| 136 |
configurations that have the `imageonly` attribute set to **true** |
| 137 |
are not ignored. |
| 138 |
|
| 139 |
--root=<directory> |
| 140 |
|
| 141 |
The path to the new root system. |
| 142 |
|
| 143 |
--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> |
| 144 |
|
| 145 |
Overwrites the first repository entry in the XML description with the |
| 146 |
provided information: |
| 147 |
|
| 148 |
- **source** |
| 149 |
|
| 150 |
Source URL pointing to a package repository that must be in a format |
| 151 |
supported by the selected package manager. See the URI_TYPES section for |
| 152 |
details about the supported source locators. |
| 153 |
|
| 154 |
- **type** |
| 155 |
|
| 156 |
Repository type: `rpm-md`, `apt-deb`. |
| 157 |
|
| 158 |
- **alias** |
| 159 |
|
| 160 |
An alias name for the repository. If not specified, {kiwi} generates |
| 161 |
an alias name based on a hex representation of uuid4. While the hex |
| 162 |
is used to uniquely identify the repository, it is not descriptive. |
| 163 |
We recommend using a descriptive and unique alias name. |
| 164 |
|
| 165 |
- **priority** |
| 166 |
|
| 167 |
A number indicating the repository priority. How the value is evaluated |
| 168 |
depends on the selected package manager. Refer to the package |
| 169 |
manager documentation for details about the supported priority ranges |
| 170 |
and their meaning. |
| 171 |
|
| 172 |
- **imageinclude** |
| 173 |
|
| 174 |
Set to either **true** or **false** to specify if the repository |
| 175 |
is part of the system image repository setup or not. |
| 176 |
|
| 177 |
- **package_gpgcheck** |
| 178 |
|
| 179 |
Set to either **true** or **false** to specify if the repository |
| 180 |
must validate the package signatures. |
| 181 |
|
| 182 |
- **{signing_keys}** |
| 183 |
|
| 184 |
A list of signing_keys enclosed in curly brackets and delimited by |
| 185 |
a semicolon. The reference to a signing key must be provided in the URI |
| 186 |
format. |
| 187 |
|
| 188 |
- **components** |
| 189 |
|
| 190 |
A component list for Debian-based repos as a space-delimited string. |
| 191 |
|
| 192 |
- **distribution** |
| 193 |
|
| 194 |
The main distribution name for Debian-based repos. |
| 195 |
|
| 196 |
- **repo_gpgcheck** |
| 197 |
|
| 198 |
Set to either **true** or **false** to specify if the repository |
| 199 |
must validate the repository signature. |
| 200 |
|
| 201 |
- **repo_sourcetype** |
| 202 |
|
| 203 |
Specifies the source type of the repository path. Supported values |
| 204 |
are `baseurl`, `metalink`, or `mirrorlist`. With `baseurl`, the source |
| 205 |
path is interpreted as a simple URI. If `metalink` is set, the source |
| 206 |
path is resolved as a metalink URI, and if `mirrorlist` is set, the |
| 207 |
source path is resolved as a mirrorlist file. If not specified, |
| 208 |
`baseurl` is the default. |
| 209 |
|
| 210 |
--set-repo-credentials=<user:pass_or_filename> |
| 211 |
|
| 212 |
For **uri://user:pass@location**-type repositories, sets the user and |
| 213 |
password connected to the set-repo specification. If the provided value |
| 214 |
is a filename in the filesystem, the first line of that file is |
| 215 |
used as credentials. |
| 216 |
|
| 217 |
--set-container-derived-from=<uri> |
| 218 |
|
| 219 |
Overwrites the source location of the base container for the selected |
| 220 |
image type. The setting is only effective if the configured image type |
| 221 |
is set up with an initial derived_from reference. |
| 222 |
|
| 223 |
--set-container-tag=<name> |
| 224 |
|
| 225 |
Overwrites the container tag in the container configuration. |
| 226 |
The setting applies only if the container configuration |
| 227 |
provides an initial tag value. |
| 228 |
|
| 229 |
--set-type-attr=<attribute=value> |
| 230 |
|
| 231 |
Overwrites/sets the attribute with the provided value in the selected |
| 232 |
build type section. Example: `--set-type-attr volid=some`. |
| 233 |
|
| 234 |
--set-release-version=<version> |
| 235 |
|
| 236 |
Overwrites/sets the release-version element in the selected |
| 237 |
build type preferences section. |
| 238 |
|
| 239 |
--signing-key=<key-file> |
| 240 |
|
| 241 |
Sets the key file to be trusted and imported into the package |
| 242 |
manager database before performing any operation. This is useful |
| 243 |
if an image build validates repository and package |
| 244 |
signatures during build time. This option can be specified multiple |
| 245 |
times. |