1bpkg(1)                     General Commands Manual                    bpkg(1)
2
3
4

NAME

6       bpkg - package dependency manager
7

SYNOPSIS

9       bpkg --help
10       bpkg --version
11       bpkg help [command | topic]
12       bpkg [common-options] command [command-options] command-args
13

DESCRIPTION

15       The  build2 package dependency manager is used to manipulate build con‐
16       figurations, packages, and repositories using a set  of  commands  that
17       are summarized below.
18
19       For  a  detailed description of any command or help topic, use the help
20       command or see the corresponding man page (the man pages have the bpkg-
21       prefix,  for  example bpkg-help(1)). Note also that command-options and
22       command-args can be specified in any order and  common-options  can  be
23       specified as part of command-options.
24
25       A  bpkg build configuration is a directory that contains packages built
26       with similar settings. For example, a configuration can be for  a  spe‐
27       cific  target  (i686,  x86_64),  compiler  (clang, gcc) compile options
28       (-O3, -g), and so on. Configurations are relatively cheap  and  can  be
29       created  and  thrown  away  as  needed. Configurations can be moved and
30       copied by simply moving and copying  the  directories.  Note,  however,
31       that a move or copy may render some packages out-of-date. In the build2
32       build system terms a bpkg build configuration is an  amalgamation  that
33       contains packages as subprojects (see bpkg-cfg-create(1) for details).
34
35       Build  configurations  can  be  linked  with each other so that while a
36       package is built in one configuration, some of its dependencies can  be
37       built in linked configurations (see bpkg-cfg-create(1) for details).
38
39       A  bpkg  package  is  an archive or directory (potentially in a version
40       control system) that contains a build2 project plus the  package  mani‐
41       fest  file.  bpkg  can either use package archives/directories directly
42       from the filesystem or it can fetch them from repositories.
43
44       A bpkg repository is a collection of packages as  well  as  information
45       about  prerequisite and complement repositories. Archive, directory and
46       version control-based repositories are supported. A repository is iden‐
47       tified  by  its location which can be a local filesystem path or a URL.
48       See bpkg-repository-types(1) for details on the  repository  structures
49       and URL formats.
50
51       If  the  same version of a package is available from multiple reposito‐
52       ries, then they are assumed to contain identical  package  content.  In
53       such  cases bpkg prefers local repositories over remote and among local
54       repositories it prefers the ones with external packages (see  bpkg-pkg-
55       unpack(1) for details on external packages).
56
57       A typical bpkg workflow would consist of the following steps.
58
59       Create Configuration
60              bpkg create cc                   \
61                config.cxx=clang++             \
62                config.cc.coptions=-O3         \
63                config.install.root=/usr/local \
64                config.install.sudo=sudo
65
66       Add Source Repositories
67              bpkg add https://pkg.cppget.org/1/stable
68              bpkg add https://example.org/foo.git
69
70              Repeat this command to add more repositories.
71
72       Fetch Available Packages List
73              bpkg fetch
74
75       Fetch and Build Packages
76              bpkg build foo bar
77
78       Drop Package
79              If  some  packages are no longer needed, we can remove them from
80              the configuration.
81
82              bpkg drop foo
83
84       Refresh Available Packages List
85              bpkg fetch
86
87       Upgrade Packages
88              bpkg build bar
89
90       Install Packages
91              bpkg install bar
92

COMMANDS

94       help [topic]
95              bpkg-help(1) – show help for a command or help topic
96
97       cfg-create|create
98              bpkg-cfg-create(1) – create configuration
99
100       cfg-info
101              bpkg-cfg-info(1) – print configuration information
102
103       cfg-link|link
104              bpkg-cfg-link(1) – link configuration
105
106       cfg-unlink|unlink
107              bpkg-cfg-unlink(1) – unlink configuration
108
109       rep-info
110              bpkg-rep-info(1) – print repository information
111
112       rep-add|add
113              bpkg-rep-add(1) – add repository to configuration
114
115       rep-remove|remove
116              bpkg-rep-remove(1) – remove repository from configuration
117
118       rep-list|list
119              bpkg-rep-list(1) – list repositories in configuration
120
121       rep-fetch|fetch
122              bpkg-rep-fetch(1) – fetch list of available packages
123
124       rep-create
125              bpkg-rep-create(1) – create repository
126
127       pkg-status|status
128              bpkg-pkg-status(1) – print package status
129
130       pkg-build|build
131              bpkg-pkg-build(1) – build package
132
133       pkg-drop|drop
134              bpkg-pkg-drop(1) – drop package
135
136       pkg-install|install
137              bpkg-pkg-install(1) – install package
138
139       pkg-uninstall|uninstall
140              bpkg-pkg-uninstall(1) – uninstall package
141
142       pkg-update|update
143              bpkg-pkg-update(1) – update package
144
145       pkg-test|test
146              bpkg-pkg-test(1) – test package
147
148       pkg-clean|clean
149              bpkg-pkg-clean(1) – clean package
150
151       pkg-bindist|bindist
152              bpkg-pkg-bindist(1) – generate binary distribution package
153
154       pkg-verify
155              bpkg-pkg-verify(1) – verify package archive
156
157       pkg-fetch
158              bpkg-pkg-fetch(1) – fetch package archive
159
160       pkg-unpack
161              bpkg-pkg-unpack(1) – unpack package archive
162
163       pkg-checkout
164              bpkg-pkg-checkout(1) – check out package version
165
166       pkg-configure
167              bpkg-pkg-configure(1) – configure package
168
169       pkg-disfigure
170              bpkg-pkg-disfigure(1) – disfigure package
171
172       pkg-purge
173              bpkg-pkg-purge(1) – purge package
174

HELP TOPICS

176       common-options
177              bpkg-common-options(1) – details on common options
178
179       default-options-files
180              bpkg-default-options-files(1) – specifying default options
181
182       repository-types
183              bpkg-repository-types(1) – repository types, structure, and URLs
184
185       repository-signing
186              bpkg-repository-signing(1) – how to sign repository
187
188       argument-grouping
189              bpkg-argument-grouping(1) – argument grouping facility
190

COMMON OPTIONS

192       The common options are summarized below with a more  detailed  descrip‐
193       tion available in bpkg-common-options(1).
194
195       -v     Print essential underlying commands being executed.
196
197       -V     Print all underlying commands being executed.
198
199       --quiet|-q
200              Run quietly, only printing error messages.
201
202       --verbose level
203              Set the diagnostics verbosity to level between 0 and 6.
204
205       --stdout-format format
206              Representation format to use for printing to stdout.
207
208       --jobs|-j num
209              Number of jobs to perform in parallel.
210
211       --no-result
212              Don't print informational messages about the outcome of perform‐
213              ing a command or some of its parts.
214
215       --structured-result fmt
216              Write the result of performing a command in a structured form.
217
218       --progress
219              Display progress indicators for long-lasting operations, such as
220              network transfers, building, etc.
221
222       --no-progress
223              Suppress  progress  indicators for long-lasting operations, such
224              as network transfers, building, etc.
225
226       --diag-color
227              Use color in diagnostics.
228
229       --no-diag-color
230              Don't use color in diagnostics.
231
232       --build path
233              The build program to be used to build packages.
234
235       --build-option opt
236              Additional option to be passed to the build program.
237
238       --fetch path
239              The fetch program to be used to download resources.
240
241       --fetch-option opt
242              Additional option to be passed to the fetch program.
243
244       --fetch-timeout sec
245              The fetch and fetch-like (for example, git) program timeout.
246
247       --pkg-proxy url
248              HTTP proxy server to use when fetching package manifests and ar‐
249              chives from remote pkg repositories.
250
251       --git path
252              The git program to be used to fetch git repositories.
253
254       --git-option opt
255              Additional common option to be passed to the git program.
256
257       --sha256 path
258              The sha256 program to be used to calculate SHA256 sums.
259
260       --sha256-option opt
261              Additional option to be passed to the sha256 program.
262
263       --tar path
264              The tar program to be used to extract package archives.
265
266       --tar-option opt
267              Additional option to be passed to the tar program.
268
269       --openssl path
270              The openssl program to be used for crypto operations.
271
272       --openssl-option opt
273              Additional option to be passed to the openssl program.
274
275       --auth type
276              Types of repositories to authenticate.
277
278       --trust fingerprint
279              Trust repository certificate with a SHA256 fingerprint.
280
281       --trust-yes
282              Assume the answer to all authentication prompts is yes.
283
284       --trust-no
285              Assume the answer to all authentication prompts is no.
286
287       --git-capabilities up=pc
288              Protocol capabilities (pc) for a git repository URL prefix (up).
289
290       --pager path
291              The pager program to be used to show long text.
292
293       --pager-option opt
294              Additional option to be passed to the pager program.
295
296       --options-file file
297              Read additional options from file.
298
299       --default-options dir
300              The directory to load additional default options files from.
301
302       --no-default-options
303              Don't load default options files.
304
305       --keep-tmp
306              Don't  remove  the  bpkg's temporary directory at the end of the
307              command execution and print its path at the verbosity level 2 or
308              higher.
309

ENVIRONMENT

311       Commands executed by bpkg while the current and linked build configura‐
312       tion databases are open will  have  the  BPKG_OPEN_CONFIGS  environment
313       variable set to the space-separated, "-quoted list of absolute and nor‐
314       malized configuration directory paths. This can be used by build system
315       hooks and/or programs that they execute.
316

EXIT STATUS

318       0
319              Success.
320
321       1
322              Fatal error.
323
324       2
325              Recoverable error which is likely to disappear if the command is
326              re-executed.
327

ENVIRONMENT

329       The BPKG_DEF_OPT environment variable is used to  suppress  loading  of
330       default  options files in nested bpkg invocations. Its values are false
331       or 0 to suppress and true or 1 to load.
332

BUGS

334       Send bug reports to the users@build2.org mailing list.
335
337       Copyright (c) 2014-2023 the build2 authors.
338
339       Permission is granted to copy, distribute and/or modify  this  document
340       under the terms of the MIT License.
341
342
343
344bpkg 0.16.0                        June 2023                           bpkg(1)
Impressum