Debian Codegraph @

doc/source/commands/system_prepare.rst

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