1bpkg-cfg-create(1)          General Commands Manual         bpkg-cfg-create(1)
2
3
4

NAME

6       bpkg-cfg-create - create configuration
7

SYNOPSIS

9       bpkg cfg-create|create [options] [cfg-args]
10       bpkg cfg-create|create [options] --existing|-e
11
12       cfg-args = (module | cfg-var)...
13

DESCRIPTION

15       The cfg-create command creates a new bpkg configuration with the speci‐
16       fied build2 modules and configuration variables  (the  first  form)  or
17       initializes  one  based  on an existing build system configuration (the
18       second form). The bpkg configuration itself is a build system  configu‐
19       ration;  see  build  system driver (b(1)) create meta-operation for de‐
20       tails.
21
22       Unless the --existing|-e or --wipe option is specified, cfg-create  ex‐
23       pects the configuration directory to be empty or to not exist (in which
24       case it will be created).
25
26       By default, the configuration created with the  first  form  loads  the
27       config,  test,  dist,  and install modules. However, additional modules
28       and, if required, their configuration variables can be specified as the
29       cfg-create arguments. For example:
30
31       bpkg create cxx config.cxx=clang++ config.install.root=/usr/local
32
33       By  default,  bpkg appends .config to the names of the modules that you
34       specify so that only their configurations are loaded. You can  override
35       this  behavior  by specifying the period (.) after the module name. You
36       can also instruct bpkg to use the optional module load by prefixing the
37       module name with the question mark (?). For example:
38
39       bpkg create cxx. "?cli"
40
41       Configurations  can  be linked with each other to allow a package to be
42       built in one configuration while its dependencies in one or more linked
43       configurations.  This can be used to create a "base" configuration with
44       common dependencies that are shared  between  multiple  configurations.
45       This  mechanism  is  also  used to provide a host configuration that is
46       used to build build-time dependencies.
47
48       Each configuration is assigned an automatically-generated  UUID  unless
49       one is specified with the --uuid option. This UUID is used to check the
50       integrity of configuration  links.  For  convenience  of  referring  to
51       linked configurations, a configuration can also be assigned a name with
52       the --name option.
53
54       A configuration also has a type specified with the --type option. Three
55       predefined types are target, host, and build2. If the type is not spec‐
56       ified explicitly, then target is assumed. When satisfying a  dependency
57       of  one package on another, a linked configuration will only be consid‐
58       ered if (1) it has the same type as the other  configuration  for  run-
59       time  dependencies, (2) it has the host type for regular build-time de‐
60       pendencies, and (3) it has the build2  type  for  build  system  module
61       build-time  dependencies.  Note  that  a host configuration is a target
62       configuration for the host machine. So to create a self-hosted configu‐
63       ration, use type host.
64
65       To  link  a  configuration  we  use  the bpkg-cfg-link(1) command. As a
66       shortcut, host and build  system  module  configurations  can  also  be
67       linked  during  the  configuration  creation with the --host-config and
68       --build2-config options, respectively. If a  build-time  dependency  is
69       encountered  in  a  configuration that has no linked configuration of a
70       suitable type (host or build2, nor is itself of a suitable type),  then
71       a  private  host  or  build  system  module configuration named host or
72       build2, respectively, is created automatically  inside  the  configura‐
73       tion's .bpkg/ subdirectory.
74

CFG-CREATE OPTIONS

76       --directory|-d dir
77              Create the configuration in dir rather than in the current work‐
78              ing directory.
79
80       --existing|-e
81              Initialize a bpkg configuration based on an existing build  sys‐
82              tem configuration.
83
84       --wipe Wipe  the  configuration directory clean before creating the new
85              configuration.  For safety, this option requires that you  spec‐
86              ify the configuration directory explicitly with --directory|-d.
87
88       --host-config dir
89              Link the specified host configuration with the configuration be‐
90              ing created as if by running the bpkg-cfg-link(1) command.
91
92       --no-host-config
93              Ignore any specified --host-config options.
94
95       --build2-config dir
96              Link the specified build system module  configuration  with  the
97              configuration  being  created  as  if  by  running the bpkg-cfg-
98              link(1) command.
99
100       --no-build2-config
101              Ignore any specified --build2-config options.
102
103       --name name
104              The name of the configuration being created. If this  configura‐
105              tion  is  linked  with  another  configuration  using  bpkg-cfg-
106              link(1), this name will be used as the link name unless overrid‐
107              den. By default the configuration is created unnamed.
108
109       --type type
110              The type of the configuration being created. By default, config‐
111              uration of type target is created.
112
113       --uuid uuid
114              Use the specified UUID as the configuration id instead of gener‐
115              ating one automatically.
116

COMMON OPTIONS

118       The  common  options are summarized below with a more detailed descrip‐
119       tion available in bpkg-common-options(1).
120
121       -v     Print essential underlying commands being executed.
122
123       -V     Print all underlying commands being executed.
124
125       --quiet|-q
126              Run quietly, only printing error messages.
127
128       --verbose level
129              Set the diagnostics verbosity to level between 0 and 6.
130
131       --stdout-format format
132              Representation format to use for printing to stdout.
133
134       --jobs|-j num
135              Number of jobs to perform in parallel.
136
137       --no-result
138              Don't print informational messages about the outcome of perform‐
139              ing a command or some of its parts.
140
141       --structured-result fmt
142              Write the result of performing a command in a structured form.
143
144       --progress
145              Display progress indicators for long-lasting operations, such as
146              network transfers, building, etc.
147
148       --no-progress
149              Suppress progress indicators for long-lasting  operations,  such
150              as network transfers, building, etc.
151
152       --diag-color
153              Use color in diagnostics.
154
155       --no-diag-color
156              Don't use color in diagnostics.
157
158       --build path
159              The build program to be used to build packages.
160
161       --build-option opt
162              Additional option to be passed to the build program.
163
164       --fetch path
165              The fetch program to be used to download resources.
166
167       --fetch-option opt
168              Additional option to be passed to the fetch program.
169
170       --fetch-timeout sec
171              The fetch and fetch-like (for example, git) program timeout.
172
173       --pkg-proxy url
174              HTTP proxy server to use when fetching package manifests and ar‐
175              chives from remote pkg repositories.
176
177       --git path
178              The git program to be used to fetch git repositories.
179
180       --git-option opt
181              Additional common option to be passed to the git program.
182
183       --sha256 path
184              The sha256 program to be used to calculate SHA256 sums.
185
186       --sha256-option opt
187              Additional option to be passed to the sha256 program.
188
189       --tar path
190              The tar program to be used to extract package archives.
191
192       --tar-option opt
193              Additional option to be passed to the tar program.
194
195       --openssl path
196              The openssl program to be used for crypto operations.
197
198       --openssl-option opt
199              Additional option to be passed to the openssl program.
200
201       --auth type
202              Types of repositories to authenticate.
203
204       --trust fingerprint
205              Trust repository certificate with a SHA256 fingerprint.
206
207       --trust-yes
208              Assume the answer to all authentication prompts is yes.
209
210       --trust-no
211              Assume the answer to all authentication prompts is no.
212
213       --git-capabilities up=pc
214              Protocol capabilities (pc) for a git repository URL prefix (up).
215
216       --pager path
217              The pager program to be used to show long text.
218
219       --pager-option opt
220              Additional option to be passed to the pager program.
221
222       --options-file file
223              Read additional options from file.
224
225       --default-options dir
226              The directory to load additional default options files from.
227
228       --no-default-options
229              Don't load default options files.
230
231       --keep-tmp
232              Don't remove the bpkg's temporary directory at the  end  of  the
233              command execution and print its path at the verbosity level 2 or
234              higher.
235

DEFAULT OPTIONS FILES

237       See bpkg-default-options-files(1) for an overview of  the  default  op‐
238       tions  files.  For the cfg-create command the search start directory is
239       the parent directory of the new configuration.  The  following  options
240       files  are  searched for in each directory and, if found, loaded in the
241       order listed:
242
243       bpkg.options
244       bpkg-cfg-create.options
245
246       The following cfg-create command options cannot be specified in the de‐
247       fault options files:
248
249       --directory|-d
250       --wipe
251

BUGS

253       Send bug reports to the users@build2.org mailing list.
254
256       Copyright (c) 2014-2023 the build2 authors.
257
258       Permission  is  granted to copy, distribute and/or modify this document
259       under the terms of the MIT License.
260
261
262
263bpkg 0.16.0                        June 2023                bpkg-cfg-create(1)
Impressum