bpkg(1)
π bpkg β the build2 package dependency manager π
hey bestie π so this is the manual page for bpkg, from the General Commands Manual section. it's the package dependency manager that ships with build2, and honestly? she does a LOT. let's get into it π«Ά
β¨ NAME β¨
bpkg β package dependency manager π
πΈ SYNOPSIS πΈ
bpkg --help
bpkg --version
bpkg help [command | topic]
bpkg [common-options] command [command-options] command-args
π¦ DESCRIPTION π¦
The build2 package dependency manager is what you use to manipulate build configurations, packages, and repositories, using a whole lil set of commands that are summarized below. β
Want the full tea on any command or help topic? use the help command, or go read the matching man page β those have the bpkg- prefix, like bpkg-help(1). π Also note that command-options and command-args can be specified in any order, and common-options can be specified as part of command-options. slay, flexible.
π what even IS a build configuration
A bpkg build configuration is a directory that contains packages built with similar settings. Like, a configuration could be for a specific target (i686, x86_64), compiler (clang, gcc) compile options (-O3, -g), and so on. Configurations are relatively cheap and can be created and thrown away as needed. πΈ
Configurations can be moved and copied by simply moving and copying the directories. Note, however, that a move or copy may render some packages out-of-date. π In the build2 build system terms, a bpkg build configuration is an amalgamation that contains packages as subprojects β see bpkg-cfg-create(1) for details.
Build configurations can be linked with each other so that while a package is built in one configuration, some of its dependencies can be built in linked configurations (again, bpkg-cfg-create(1) for the deets). π
π packages and repositories
A bpkg package is an archive or directory (potentially in a version control system) that contains a build2 project plus the package manifest file. bpkg can either use package archives/directories directly from the filesystem, or it can fetch them from repositories. π§Ί
A bpkg repository is a collection of packages as well as information about prerequisite and complement repositories. Archive, directory and version control-based repositories are supported. A repository is identified by its location, which can be a local filesystem path or a URL. See bpkg-repository-types(1) for details on the repository structures and URL formats. π
If the same version of a package is available from multiple repositories, then they are assumed to contain identical package content. In such cases bpkg prefers local repositories over remote, and among local repositories it prefers the ones with external packages (see bpkg-pkg-unpack(1) for details on external packages). π
π« a typical bpkg workflow
Here's what a normal bpkg glow-up sequence looks like:
Create Configuration
bpkg create cc \
config.cxx=clang++ \
config.cc.coptions=-O3 \
config.install.root=/usr/local \
config.install.sudo=sudo
Add Source Repositories
bpkg add https://pkg.cppget.org/1/stable
bpkg add https://example.org/foo.git
Repeat this command to add more repositories. π
Fetch Available Packages List
bpkg fetch
Fetch and Build Packages
bpkg build foo bar
Drop Package
If some packages are no longer needed, we can remove them from the configuration.
bpkg drop foo
Refresh Available Packages List
bpkg fetch
Upgrade Packages
bpkg build bar
Install Packages
bpkg install bar
π COMMANDS π
help [topic]βbpkg-help(1)β show help for a command or help topiccfg-create|createβbpkg-cfg-create(1)β create configurationcfg-infoβbpkg-cfg-info(1)β print configuration informationcfg-link|linkβbpkg-cfg-link(1)β link configurationcfg-unlink|unlinkβbpkg-cfg-unlink(1)β unlink configurationrep-infoβbpkg-rep-info(1)β print repository informationrep-add|addβbpkg-rep-add(1)β add repository to configurationrep-remove|removeβbpkg-rep-remove(1)β remove repository from configurationrep-list|listβbpkg-rep-list(1)β list repositories in configurationrep-fetch|fetchβbpkg-rep-fetch(1)β fetch list of available packagesrep-createβbpkg-rep-create(1)β create repositorypkg-status|statusβbpkg-pkg-status(1)β print package statuspkg-build|buildβbpkg-pkg-build(1)β build packagepkg-drop|dropβbpkg-pkg-drop(1)β drop packagepkg-install|installβbpkg-pkg-install(1)β install packagepkg-uninstall|uninstallβbpkg-pkg-uninstall(1)β uninstall packagepkg-update|updateβbpkg-pkg-update(1)β update packagepkg-test|testβbpkg-pkg-test(1)β test packagepkg-clean|cleanβbpkg-pkg-clean(1)β clean packagepkg-bindist|bindistβbpkg-pkg-bindist(1)β generate binary distribution packagepkg-verifyβbpkg-pkg-verify(1)β verify package archivepkg-fetchβbpkg-pkg-fetch(1)β fetch package archivepkg-unpackβbpkg-pkg-unpack(1)β unpack package archivepkg-checkoutβbpkg-pkg-checkout(1)β check out package versionpkg-configureβbpkg-pkg-configure(1)β configure packagepkg-disfigureβbpkg-pkg-disfigure(1)β disfigure packagepkg-purgeβbpkg-pkg-purge(1)β purge package
π HELP TOPICS π
common-optionsβbpkg-common-options(1)β details on common optionsdefault-options-filesβbpkg-default-options-files(1)β specifying default optionsrepository-typesβbpkg-repository-types(1)β repository types, structure, and URLsrepository-signingβbpkg-repository-signing(1)β how to sign repositoryargument-groupingβbpkg-argument-grouping(1)β argument grouping facility
β¨ COMMON OPTIONS β¨
The common options are summarized below β and there's a way more detailed description available in bpkg-common-options(1). π
-vβ Print essential underlying commands being executed.-Vβ Print all underlying commands being executed.--quiet,-qβ Run quietly, only printing error messages. π€«--verboselevel β Set the diagnostics verbosity to level between 0 and 6.--stdout-formatformat β Representation format to use for printing to stdout.--jobs,-jnum β Number of jobs to perform in parallel.--no-resultβ Don't print informational messages about the outcome of performing a command or some of its parts.--structured-resultfmt β Write the result of performing a command in a structured form.--progressβ Display progress indicators for long-lasting operations, such as network transfers, building, etc.--no-progressβ Suppress progress indicators for long-lasting operations, such as network transfers, building, etc.--diag-colorβ Use color in diagnostics. π--no-diag-colorβ Don't use color in diagnostics.--buildpath β The build program to be used to build packages.--build-optionopt β Additional option to be passed to the build program.--fetchpath β The fetch program to be used to download resources.--fetch-optionopt β Additional option to be passed to the fetch program.--fetch-timeoutsec β The fetch and fetch-like (for example,git) program timeout.--pkg-proxyurl β HTTP proxy server to use when fetching package manifests and archives from remote pkg repositories.--gitpath β The git program to be used to fetch git repositories.--git-optionopt β Additional common option to be passed to the git program.--sha256path β The sha256 program to be used to calculate SHA256 sums.--sha256-optionopt β Additional option to be passed to the sha256 program.--tarpath β The tar program to be used to extract package archives.--tar-optionopt β Additional option to be passed to the tar program.--opensslpath β The openssl program to be used for crypto operations.--openssl-optionopt β Additional option to be passed to the openssl program.--authtype β Types of repositories to authenticate.--trustfingerprint β Trust repository certificate with a SHA256 fingerprint.--trust-yesβ Assume the answer to all authentication prompts is yes.--trust-noβ Assume the answer to all authentication prompts is no.--git-capabilitiesup=pc β Protocol capabilities (pc) for a git repository URL prefix (up).--pagerpath β The pager program to be used to show long text.--pager-optionopt β Additional option to be passed to the pager program.--options-filefile β Read additional options from file.--default-optionsdir β The directory to load additional default options files from.--no-default-optionsβ Don't load default options files.--keep-tmpβ Don't remove the bpkg's temporary directory at the end of the command execution and print its path at the verbosity level 2 or higher.
πΏ ENVIRONMENT πΏ
Commands executed by bpkg while the current and linked build configuration databases are open will have the BPKG_OPEN_CONFIGS environment variable set to the space-separated, "-quoted list of absolute and normalized configuration directory paths. This can be used by build system hooks and/or programs that they execute. π«Ά
π EXIT STATUS π
0β Success. π1β Fatal error.2β Recoverable error which is likely to disappear if the command is re-executed.
π ENVIRONMENT (yes, again bestie) π
The BPKG_DEF_OPT environment variable is used to suppress loading of default options files in nested bpkg invocations. Its values are false or 0 to suppress, and true or 1 to load. π
π BUGS π
Send bug reports to the users@build2.org mailing list. π¬
Β©οΈ COPYRIGHT Β©οΈ
Copyright (c) 2014-2024 the build2 authors.
Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License.
okay that's the whole page, no cap β¨ this was bpkg 0.17.0, dated June 2024 β literally iconic, obsessed, periodt πππ¦
π¦ where this page comes from
- fedora 43: bpkg 0.17.0-5.fc43 Β· MIT
- fedora 44: bpkg 0.17.0-7.fc44 Β· MIT
- nixos 26.05: bpkg 0.17.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms