Debian Codegraph @

doc/source/commands/system_build.rst

raw
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 --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
37 .. _db_kiwi_system_build_desc:
38
39 DESCRIPTION
40 -----------
41
42 Build an image in one step. The build command combines preparation and building
43 steps, which makes it possible to create an image with a single command. The
44 build command creates the root directory of the image under
45 `<target-dir>/build/image-root` and writes a log file,
46 `<target-dir>/build/image-root.log`. The resulting image files are created in the
47 specified target directory.
48
49 .. _db_kiwi_system_build_opts:
50
51 OPTIONS
52 -------
53
54 --add-bootstrap-package=<name>
55
56 Specifies 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 Adds a container label in the container configuration metadata. It
62 overwrites the label with the provided key-value pair if it is
63 already defined in the XML description.
64
65 --add-package=<name>
66
67 Specifies 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 possible 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** repositories, set the user and password
80 associated with an add-repo specification. If the provided value describes a
81 filename in the filesystem, the first line of that file is used as
82 credentials.
83
84 --allow-existing-root
85
86 Uses an existing root directory from a previous
87 build attempt. Use with caution, because this can cause an inconsistent
88 root tree if the existing contents do not fit the
89 previous image type setup.
90
91 --clear-cache
92
93 Deletes the repository cache for each of the used repositories
94 before installing any package. This is useful when an image build
95 validates the signature of the package from the
96 original repository source for any build. Some package managers
97 unconditionally trust the contents of the cache, which works for
98 cache data dedicated to one build. In the case of {kiwi}, the cache
99 is shared between multiple image builds on that host for performance
100 reasons.
101
102 --ca-cert=<cert-file>
103
104 Adds a cert file to the directory storing additional local CA certificates.
105 The import will occur immediately after the bootstrap process, where
106 the required CA update tooling is expected to be installed. This
107 option is useful for situations where certificates are not packaged,
108 or the certificates are required during the build process, e.g., due
109 to proxy servers in the build environment that need certificates
110 in chroot. The option can be specified multiple times.
111
112 --ca-target-distribution=<suse|redhat|debian|archlinux>
113
114 Specifies the target distribution for the import of certificates
115 via the `--ca-cert` options(s) and/or the provided `<certificates>`
116 from the image description. The selected distribution is used
117 in KIWI to map the distribution-specific CA storage path and
118 update tool for the import process.
119
120 --delete-package=<name>
121
122 Specifies a package to delete. The option can be specified
123 multiple times.
124
125 --description=<directory>
126
127 The path to an XML description. This is a directory containing at least
128 one `_config.xml_` or `_*.kiwi_` XML file.
129
130 --ignore-repos
131
132 Ignores all repository configurations from the XML description.
133 This option is used in combination with the `--add-repo`
134 option. Otherwise, there are no repositories available for an
135 image build, which leads to an error.
136
137 --ignore-repos-used-for-build
138
139 Works the same way as `--ignore-repos`, except that repository configuration
140 with the `imageonly` attribute set to **true** is not ignored.
141
142 --set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>
143
144 Overwrites the first repository entry in the XML description with the
145 provided information:
146
147 - **source**
148
149 Source URL pointing to a package repository that must be in a format
150 supported by the selected package manager. See the URI_TYPES section for
151 details about the supported source locators.
152
153 - **type**
154
155 Repository type: `rpm-md`, `apt-deb`.
156
157 - **alias**
158
159 An alias name for the repository. If not specified, {kiwi} generates
160 an alias name as a result of a hex representation from uuid4. While the hex
161 is used to uniquely identify the repository, it is not descriptive.
162 We recommend using descriptive aliases.
163
164 - **priority**
165
166 A number indicating the repository priority. How the value is evaluated
167 depends on the selected package manager. Refer to the package
168 manager documentation for details about the supported priority ranges
169 and their meaning.
170
171 - **imageinclude**
172
173 Set to either **true** or **false** to indicate if the repository
174 is part of the system image repository setup or not.
175
176 - **package_gpgcheck**
177
178 Set to either **true** or **false** to indicate if the repository
179 should validate the package signatures.
180
181 - **{signing_keys}**
182
183 A list of `signing_keys` enclosed in curly brackets and delimited by
184 a semicolon. The reference to a signing key must be provided in the URI
185 format.
186
187 - **components**
188
189 A component list for Debian-based repos as a space-delimited string.
190
191 - **distribution**
192
193 The main distribution name for Debian-based repos.
194
195 - **repo_gpgcheck**
196
197 Set to either **true** or **false** to indicate if the repository
198 should validate the repository signature.
199
200 - **repo_sourcetype**
201
202 Specifies the source type of the repository path. Supported values
203 are `baseurl`, `metalink`, or `mirrorlist`. With `baseurl`, the source
204 path is interpreted as a simple URI. If `metalink` is set, the source
205 path is resolved as a metalink URI, and if `mirrorlist` is set, the
206 source path is resolved as a mirrorlist file. If not specified,
207 `baseurl` is the default.
208
209 --set-repo-credentials=<user:pass_or_filename>
210
211 For **uri://user:pass@location**-type repositories, set the user and
212 password connected to the set-repo specification. If the provided
213 value describes a filename in the filesystem, the first line of that file
214 is used as credentials.
215
216 --set-container-derived-from=<uri>
217
218 Overwrites the source location of the base container for the selected
219 image type. The setting applies only if the configured image type
220 is set up with an initial `derived_from` reference.
221
222 --set-container-tag=<name>
223
224 Overwrites the container tag in the container configuration.
225 The setting is only effective if the container configuration
226 provides the initial tag value.
227
228 --set-type-attr=<attribute=value>
229
230 Overwrites/sets the attribute with the provided value in the selected
231 build type section. Example: `--set-type-attr volid=some`.
232
233 --set-release-version=<version>
234
235 Overwrites/sets the release-version element in the selected
236 build type preferences section.
237
238 --signing-key=<key-file>
239
240 Sets the key file to be trusted and imported into the package
241 manager's database before performing any operation. This is useful
242 when an image build validates repository and package
243 signatures during build time. This option can be specified multiple
244 times.
245
246 --target-dir=<directory>
247
248 The path to store the build results.
249
250 .. _db_kiwi_system_build_uri:
251
252 URI_TYPES
253 ---------
254
255 - **http://** | **https://** | **ftp://**
256
257 A remote repository delivered via the HTTP or FTP protocol.
258
259 - **obs://**
260
261 An Open Buildservice repository. The source data is translated into
262 an HTTP URL pointing to http://download.opensuse.org.
263
264 - **ibs://**
265
266 An internal Open Buildservice repository. The source data is translated into
267 an HTTP URL pointing to download.suse.de.
268
269 - **dir://**
270
271 A local directory.