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-verify
152              bpkg-pkg-verify(1) – verify package archive
153
154       pkg-fetch
155              bpkg-pkg-fetch(1) – fetch package archive
156
157       pkg-unpack
158              bpkg-pkg-unpack(1) – unpack package archive
159
160       pkg-checkout
161              bpkg-pkg-checkout(1) – check out package version
162
163       pkg-configure
164              bpkg-pkg-configure(1) – configure package
165
166       pkg-disfigure
167              bpkg-pkg-disfigure(1) – disfigure package
168
169       pkg-purge
170              bpkg-pkg-purge(1) – purge package
171

HELP TOPICS

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

COMMON OPTIONS

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

ENVIRONMENT

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

EXIT STATUS

303       0
304              Success.
305
306       1
307              Fatal error.
308
309       2
310              Recoverable error which is likely to disappear if the command is
311              re-executed.
312

ENVIRONMENT

314       The BPKG_DEF_OPT environment variable is used to  suppress  loading  of
315       default  options files in nested bpkg invocations. Its values are false
316       or 0 to suppress and true or 1 to load.
317

BUGS

319       Send bug reports to the users@build2.org mailing list.
320
322       Copyright (c) 2014-2022 the build2 authors.
323
324       Permission is granted to copy, distribute and/or modify  this  document
325       under the terms of the MIT License.
326
327
328
329bpkg 0.15.0                        July 2022                           bpkg(1)
Impressum