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       --progress
142              Display progress indicators for long-lasting operations, such as
143              network transfers, building, etc.
144
145       --no-progress
146              Suppress progress indicators for long-lasting  operations,  such
147              as network transfers, building, etc.
148
149       --build path
150              The build program to be used to build packages.
151
152       --build-option opt
153              Additional option to be passed to the build program.
154
155       --fetch path
156              The fetch program to be used to download resources.
157
158       --fetch-option opt
159              Additional option to be passed to the fetch program.
160
161       --fetch-timeout sec
162              The fetch and fetch-like (for example, git) program timeout.
163
164       --pkg-proxy url
165              HTTP proxy server to use when fetching package manifests and ar‐
166              chives from remote pkg repositories.
167
168       --git path
169              The git program to be used to fetch git repositories.
170
171       --git-option opt
172              Additional common option to be passed to the git program.
173
174       --sha256 path
175              The sha256 program to be used to calculate SHA256 sums.
176
177       --sha256-option opt
178              Additional option to be passed to the sha256 program.
179
180       --tar path
181              The tar program to be used to extract package archives.
182
183       --tar-option opt
184              Additional option to be passed to the tar program.
185
186       --openssl path
187              The openssl program to be used for crypto operations.
188
189       --openssl-option opt
190              Additional option to be passed to the openssl program.
191
192       --auth type
193              Types of repositories to authenticate.
194
195       --trust fingerprint
196              Trust repository certificate with a SHA256 fingerprint.
197
198       --trust-yes
199              Assume the answer to all authentication prompts is yes.
200
201       --trust-no
202              Assume the answer to all authentication prompts is no.
203
204       --pager path
205              The pager program to be used to show long text.
206
207       --pager-option opt
208              Additional option to be passed to the pager program.
209
210       --options-file file
211              Read additional options from file.
212
213       --default-options dir
214              The directory to load additional default options files from.
215
216       --no-default-options
217              Don't load default options files.
218
219       --keep-tmp
220              Don't remove the bpkg's temporary directory at the  end  of  the
221              command execution and print its path at the verbosity level 2 or
222              higher.
223

DEFAULT OPTIONS FILES

225       See bpkg-default-options-files(1) for an overview of  the  default  op‐
226       tions  files.  For the cfg-create command the search start directory is
227       the parent directory of the new configuration.  The  following  options
228       files  are  searched for in each directory and, if found, loaded in the
229       order listed:
230
231       bpkg.options
232       bpkg-cfg-create.options
233
234       The following cfg-create command options cannot be specified in the de‐
235       fault options files:
236
237       --directory|-d
238       --wipe
239

BUGS

241       Send bug reports to the users@build2.org mailing list.
242
244       Copyright (c) 2014-2022 the build2 authors.
245
246       Permission  is  granted to copy, distribute and/or modify this document
247       under the terms of the MIT License.
248
249
250
251bpkg 0.15.0                        July 2022                bpkg-cfg-create(1)
Impressum