bpkg-cfg-create(1)
π NAME π
bestie, meet bpkg-cfg-create β it's the manual page (section 1, general commands) for the command that creates a configuration. we're in bpkg-cfg-create(1) territory and it's lowkey iconic π
β¨ SYNOPSIS β¨
okay so here's how you actually call it:
bpkg cfg-create|create [options] [cfg-args]
bpkg cfg-create|create [options] --existing|-e
cfg-args = (module | cfg-var)...
like, cfg-create and create are the same thing, pick your fave π«Ά
πΈ DESCRIPTION πΈ
so cfg-create does one of two things, depending on the form you use:
- first form β it creates a brand new bpkg configuration with the build2 modules and configuration variables you name as
cfg-args - second form β it initializes a configuration based on an existing build system configuration
and heads up: the bpkg configuration is itself a build system configuration, so if you want the full lore on that, go look at the build system driver (b(1)) create meta-operation. no cap.
now, the directory rules, and these are important bestie:
- unless you pass
--existing|-eor--wipe,cfg-createexpects the configuration directory to be empty, or to not exist at all (in which case it will be created for you, slay)
by default, the configuration made with the first form loads the config, test, dist, and install modules. but you can throw in extra modules and, if you need them, their configuration variables, as cfg-create arguments. for example:
bpkg create cxx config.cxx=clang++ config.install.root=/usr/local
here's a subtle little thing that's giving very much β¨ detail β¨: by default, bpkg appends .config to the names of the modules you specify, so that only their configurations get loaded. you can override that behavior by putting a period (.) after the module name. you can also tell bpkg to use the optional module load by prefixing the module name with a question mark (?). like:
bpkg create cxx. "?cli"
now the linking situation π¦ β configurations can be linked with each other, which lets a package be built in one configuration while its dependencies live in one or more linked configurations. very main character energy. this is how you make a "base" configuration with common dependencies shared between multiple configurations. this same mechanism is also used to provide a host configuration, which is what gets used to build build-time dependencies.
every configuration gets an automatically-generated UUID unless you specify one with --uuid. that UUID is used to check the integrity of configuration links. and for the convenience of referring to linked configurations, a configuration can also be assigned a name with --name. obsessed.
a configuration also has a type, set with --type. three predefined types exist: target, host, and build2. if you don't say anything explicitly, target is assumed. when satisfying a dependency of one package on another, a linked configuration will only be considered if:
- it has the same type as the other configuration, for run-time dependencies
- it has the
hosttype, for regular build-time dependencies - it has the
build2type, for build system module build-time dependencies
and note β a host configuration is a target configuration for the host machine. so to create a self-hosted configuration, use type host. π easy to forget.
to link a configuration we use the bpkg-cfg-link(1) command. but as a shortcut, host and build system module configurations can also be linked during configuration creation with the --host-config and --build2-config options, respectively. and if a build-time dependency shows up in a configuration that has no linked configuration of a suitable type (host or build2, nor is itself of a suitable type), then a private host or build system module configuration named host or build2, respectively, is created automatically inside the configuration's .bpkg/ subdirectory. it just does that. periodt.
π CFG-CREATE OPTIONS π
--directory|-ddir β create the configuration in dir instead of in the current working directory.--existing|-eβ initialize a bpkg configuration based on an existing build system configuration.--wipeβ wipe the configuration directory clean before creating the new configuration. > for safety, this option requires that you specify the configuration directory explicitly with--directory|-d. π¨--host-configdir β link the specified host configuration with the configuration being created, as if by running thebpkg-cfg-link(1)command.--no-host-configβ ignore any specified--host-configoptions.--build2-configdir β link the specified build system module configuration with the configuration being created, as if by running thebpkg-cfg-link(1)command.--no-build2-configβ ignore any specified--build2-configoptions.--namename β the name of the configuration being created. if this configuration is linked with another configuration usingbpkg-cfg-link(1), this name will be used as the link name unless it's overridden. by default the configuration is created unnamed. π--typetype β the type of the configuration being created. by default, a configuration of typetargetis created.--uuiduuid β use the specified UUID as the configuration id instead of generating one automatically.
π COMMON OPTIONS π
these are the shared ones, summarized below β the full deep dive lives in bpkg-common-options(1), iykyk.
-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 between0and6.--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 level2or higher.
π§ DEFAULT OPTIONS FILES π§
peep bpkg-default-options-files(1) for the whole overview of the default options files. for the cfg-create command, the search start directory is the parent directory of the new configuration. in each directory, the following options files are searched for and, if found, loaded in the order listed:
bpkg.options
bpkg-cfg-create.options
and these cfg-create command options cannot be specified in the default options files, so don't even try:
--directory|-d
--wipe
π BUGS π
found a bug? send bug reports to the users@build2.org mailing list. they want to hear it fr fr.
π 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 bestie, you ate it, go create some configurations πβ¨ππ¦ this was bpkg-cfg-create(1) from bpkg 0.17.0, dated June 2024 β signing off, mwah π
πΈπ«Ά
π¦ 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