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       --jobs|-j num
203              Number of jobs to perform in parallel.
204
205       --no-result
206              Don't print informational messages about the outcome of perform‐
207              ing a command or some of its parts.
208
209       --no-progress
210              Suppress progress indicators for long-lasting  operations,  such
211              as network transfers, building, etc.
212
213       --build path
214              The build program to be used to build packages.
215
216       --build-option opt
217              Additional option to be passed to the build program.
218
219       --fetch path
220              The fetch program to be used to download resources.
221
222       --fetch-option opt
223              Additional option to be passed to the fetch program.
224
225       --fetch-timeout sec
226              The fetch and fetch-like (for example, git) program timeout.
227
228       --pkg-proxy url
229              HTTP proxy server to use when fetching package manifests and ar‐
230              chives from remote pkg repositories.
231
232       --git path
233              The git program to be used to fetch git repositories.
234
235       --git-option opt
236              Additional common option to be passed to the git program.
237
238       --sha256 path
239              The sha256 program to be used to calculate SHA256 sums.
240
241       --sha256-option opt
242              Additional option to be passed to the sha256 program.
243
244       --tar path
245              The tar program to be used to extract package archives.
246
247       --tar-option opt
248              Additional option to be passed to the tar program.
249
250       --openssl path
251              The openssl program to be used for crypto operations.
252
253       --openssl-option opt
254              Additional option to be passed to the openssl program.
255
256       --auth type
257              Types of repositories to authenticate.
258
259       --trust fingerprint
260              Trust repository certificate with a SHA256 fingerprint.
261
262       --trust-yes
263              Assume the answer to all authentication prompts is yes.
264
265       --trust-no
266              Assume the answer to all authentication prompts is no.
267
268       --pager path
269              The pager program to be used to show long text.
270
271       --pager-option opt
272              Additional option to be passed to the pager program.
273
274       --options-file file
275              Read additional options from file.
276
277       --default-options dir
278              The directory to load additional default options files from.
279
280       --no-default-options
281              Don't load default options files.
282

ENVIRONMENT

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

EXIT STATUS

291       0
292              Success.
293
294       1
295              Fatal error.
296
297       2
298              Recoverable error which is likely to disappear if the command is
299              re-executed.
300

ENVIRONMENT

302       The  BPKG_DEF_OPT  environment  variable is used to suppress loading of
303       default options files in nested bpkg invocations. Its values are  false
304       or 0 to suppress and true or 1 to load.
305

BUGS

307       Send bug reports to the users@build2.org mailing list.
308
310       Copyright (c) 2014-2021 the build2 authors.
311
312       Permission  is  granted to copy, distribute and/or modify this document
313       under the terms of the MIT License.
314
315
316
317bpkg 0.14.0                      October 2021                          bpkg(1)
Impressum