| 1 |
.. _kiwi_system_build: |
| 2 |
|
| 3 |
kiwi-ng system build |
| 4 |
==================== |
| 5 |
|
| 6 |
.. _db_kiwi_system_build_synopsis: |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
-------- |
| 10 |
|
| 11 |
.. code:: bash |
| 12 |
|
| 13 |
kiwi-ng [global options] service <command> [<args>] |
| 14 |
|
| 15 |
kiwi-ng system build -h | --help |
| 16 |
kiwi-ng system build --description=<directory> --target-dir=<directory> |
| 17 |
[--allow-existing-root] |
| 18 |
[--clear-cache] |
| 19 |
[--ignore-repos] |
| 20 |
[--ignore-repos-used-for-build] |
| 21 |
[--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] |
| 22 |
[--set-repo-credentials=<user:pass_or_filename>] |
| 23 |
[--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] |
| 24 |
[--add-repo-credentials=<user:pass_or_filename>...] |
| 25 |
[--add-package=<name>...] |
| 26 |
[--add-bootstrap-package=<name>...] |
| 27 |
[--ca-cert=<cert-file>...] |
| 28 |
[--ca-target-distribution=<suse,redhat,debian,archlinux>] |
| 29 |
[--delete-package=<name>...] |
| 30 |
[--set-container-derived-from=<uri>] |
| 31 |
[--set-container-tag=<name>] |
| 32 |
[--add-container-label=<label>...] |
| 33 |
[--set-type-attr=<attribute=value>...] |
| 34 |
[--set-release-version=<version>] |
| 35 |
[--signing-key=<key-file>...] |
| 36 |
kiwi-ng system build help |
| 37 |
|
| 38 |
.. _db_kiwi_system_build_desc: |
| 39 |
|
| 40 |
DESCRIPTION |
| 41 |
----------- |
| 42 |
|
| 43 |
Build an image in one step. The build command combines preparation and building |
| 44 |
steps, which makes it possible to create an image with a single command. The |
| 45 |
build command creates the root directory of the image under |
| 46 |
`<target-dir>/build/image-root` and writes a log file, |
| 47 |
`<target-dir>/build/image-root.log`. The resulting image files are created in the |
| 48 |
specified target directory. |
| 49 |
|
| 50 |
.. _db_kiwi_system_build_opts: |
| 51 |
|
| 52 |
OPTIONS |
| 53 |
------- |
| 54 |
|
| 55 |
--add-bootstrap-package=<name> |
| 56 |
|
| 57 |
Specifies a package to install as part of the early {kiwi} bootstrap phase. |
| 58 |
The option can be specified multiple times. |
| 59 |
|
| 60 |
--add-container-label=<name=value> |
| 61 |
|
| 62 |
Adds a container label in the container configuration metadata. It |
| 63 |
overwrites the label with the provided key-value pair if it is |
| 64 |
already defined in the XML description. |
| 65 |
|
| 66 |
--add-package=<name> |
| 67 |
|
| 68 |
Specifies a package to add (install). The option can be specified |
| 69 |
multiple times. |
| 70 |
|
| 71 |
--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> |
| 72 |
|
| 73 |
Adds a new repository to the existing repository setup in the XML |
| 74 |
description. This option can be specified multiple times. |
| 75 |
For details about the possible option values, see the **--set-repo** |
| 76 |
information below. |
| 77 |
|
| 78 |
--add-repo-credentials=<user:pass_or_filename> |
| 79 |
|
| 80 |
For **uri://user:pass@location** repositories, set the user and password |
| 81 |
associated with an add-repo specification. If the provided value describes a |
| 82 |
filename in the filesystem, the first line of that file is used as |
| 83 |
credentials. |
| 84 |
|
| 85 |
--allow-existing-root |
| 86 |
|
| 87 |
Uses an existing root directory from a previous |
| 88 |
build attempt. Use with caution, because this can cause an inconsistent |
| 89 |
root tree if the existing contents do not fit the |
| 90 |
previous image type setup. |
| 91 |
|
| 92 |
--clear-cache |
| 93 |
|
| 94 |
Deletes the repository cache for each of the used repositories |
| 95 |
before installing any package. This is useful when an image build |
| 96 |
validates the signature of the package from the |
| 97 |
original repository source for any build. Some package managers |
| 98 |
unconditionally trust the contents of the cache, which works for |
| 99 |
cache data dedicated to one build. In the case of {kiwi}, the cache |
| 100 |
is shared between multiple image builds on that host for performance |
| 101 |
reasons. |
| 102 |
|
| 103 |
--ca-cert=<cert-file> |
| 104 |
|
| 105 |
Adds a cert file to the directory storing additional local CA certificates. |
| 106 |
The import will occur immediately after the bootstrap process, where |
| 107 |
the required CA update tooling is expected to be installed. This |
| 108 |
option is useful for situations where certificates are not packaged, |
| 109 |
or the certificates are required during the build process, e.g., due |
| 110 |
to proxy servers in the build environment that need certificates |
| 111 |
in chroot. The option can be specified multiple times. |
| 112 |
|
| 113 |
--ca-target-distribution=<suse|redhat|debian|archlinux> |
| 114 |
|
| 115 |
Specifies the target distribution for the import of certificates |
| 116 |
via the `--ca-cert` options(s) and/or the provided `<certificates>` |
| 117 |
from the image description. The selected distribution is used |
| 118 |
in KIWI to map the distribution-specific CA storage path and |
| 119 |
update tool for the import process. |
| 120 |
|
| 121 |
--delete-package=<name> |
| 122 |
|
| 123 |
Specifies a package to delete. The option can be specified |
| 124 |
multiple times. |
| 125 |
|
| 126 |
--description=<directory> |
| 127 |
|
| 128 |
The path to an XML description. This is a directory containing at least |
| 129 |
one `_config.xml_` or `_*.kiwi_` XML file. |
| 130 |
|
| 131 |
--ignore-repos |
| 132 |
|
| 133 |
Ignores all repository configurations from the XML description. |
| 134 |
This option is used in combination with the `--add-repo` |
| 135 |
option. Otherwise, there are no repositories available for an |
| 136 |
image build, which leads to an error. |
| 137 |
|
| 138 |
--ignore-repos-used-for-build |
| 139 |
|
| 140 |
Works the same way as `--ignore-repos`, except that repository configuration |
| 141 |
with the `imageonly` attribute set to **true** is not ignored. |
| 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 as a result of a hex representation from uuid4. While the hex |
| 162 |
is used to uniquely identify the repository, it is not descriptive. |
| 163 |
We recommend using descriptive aliases. |
| 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 indicate 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 indicate if the repository |
| 180 |
should 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 indicate if the repository |
| 199 |
should 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, set the user and |
| 213 |
password connected to the set-repo specification. If the provided |
| 214 |
value describes a filename in the filesystem, the first line of that file |
| 215 |
is 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 applies only 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 is only effective if the container configuration |
| 227 |
provides the 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's database before performing any operation. This is useful |
| 243 |
when an image build validates repository and package |
| 244 |
signatures during build time. This option can be specified multiple |
| 245 |
times. |
| 246 |
|
| 247 |
--target-dir=<directory> |
| 248 |
|
| 249 |
The path to store the build results. |
| 250 |
|
| 251 |
.. _db_kiwi_system_build_uri: |
| 252 |
|
| 253 |
URI_TYPES |
| 254 |
--------- |
| 255 |
|
| 256 |
- **http://** | **https://** | **ftp://** |
| 257 |
|
| 258 |
A remote repository delivered via the HTTP or FTP protocol. |
| 259 |
|
| 260 |
- **obs://** |
| 261 |
|
| 262 |
An Open Buildservice repository. The source data is translated into |
| 263 |
an HTTP URL pointing to http://download.opensuse.org. |
| 264 |
|
| 265 |
- **ibs://** |
| 266 |
|
| 267 |
An internal Open Buildservice repository. The source data is translated into |
| 268 |
an HTTP URL pointing to download.suse.de. |
| 269 |
|
| 270 |
- **dir://** |
| 271 |
|
| 272 |
A local directory. |