JUST-MR(1)
okay bestie, welcome to the JUST-MR(1) page π this is just-mr, and she is literally the multi-repository configuration tool and launcher for the build tool. No cap, weβre about to make manpage facts cute but every single detail stays. π«Ά
πΈ NAME πΈ
just-mr β multi-repository configuration tool and launcher for the build tool.
β¨ SYNOPSIS β¨
just-mr [OPTION]... mrversion
just-mr [OPTION]... {setup|setup-env} [--all] [main-repo]
just-mr [OPTION]... fetch [--all] [--backup-to-remote] [-o fetch-dir]
[main-repo]
just-mr [OPTION]... update [repo]...
just-mr [OPTION]... gc-repo [--drop-only]
just-mr [OPTION]... do [JUST_ARG]...
just-mr [OPTION]...
{version|describe|analyse|build|install|install-cas|add-to-cas|rebuild|gc}
[JUST_ARG]...
π¦ DESCRIPTION π¦
okay so Just-MR is a configuration tool for the multi-repository Just build system. It can be used both standalone and as a launcher for justbuild(1).
The tool performs specific operations, based on the invoked subcommand, on repositories described in a configuration file. All subcommands operate at the level of workspace roots deduced from the given repository descriptions. See just-mr-repository-config(5) for more details on the input format. periodt. π
π OPTIONS π
π General options π
-h,--helpβ Output a usage message and exit. π-C,--repository-config PATHβ Path to the multi-repository configuration file. Seejust-mr-repository-config(5)for more details. If no configuration file is specified,just-mrwill look for one in the following order:$WORKSPACE_ROOT/repos.json(workspace of thejust-mrinvocation)$WORKSPACE_ROOT/etc/repos.json(workspace of thejust-mrinvocation)$HOME/.just-repos.json/etc/just-repos.json
The default configuration lookup order can be adjusted in the just-mrrc file. See just-mrrc(5) for more details. iykyk.
--absent PATHβ Path to a file specifying which repositories are to be considered absent, overriding the values set by the"pragma"entries in the multi-repository configuration. The file has to contain aJSONarray of those repository names to be considered absent.-D,--defines JSONβ Defines, via an in-line JSON object, an overlay configuration forjustbuild(1); if used as a launcher for a subcommand known to support--defines, this defines value is forwarded, otherwise it is ignored. If-Dis given several times, the-Doptions overlay (in the sense ofmap_union) in the order they are given on the command line.--local-build-root PATHβ Root for local CAS, cache, and build directories. The path will be created if it does not exist already. This option overwrites any values set in thejust-mrrc(5)file. Default: path.cache/justin userβs home directory.--checkout-locations PATHβ Specification file for checkout locations and additional mirrors. This file contains a JSON object with several known keys:- the key
"<version control>"of key"checkouts"specifies pairs of repository URLs as keys and absolute paths as values. Currently supported version control is Git, therefore the respective key is"git". The paths contained for each repository URL point to existing locations on the filesystem containing the checkout of the respective repository. - the key
"local mirrors", if given, is a JSON object mapping primary URLs to a list of local (non-public) mirrors. These mirrors are always tried first (in the given order) before any other URL is contacted. - the key
"preferred hostnames", if given, is a list of strings specifying known hostnames. When fetching from a non-local mirror, URLs with hostnames in the given list are preferred (in the order given) over URLs with other hostnames. - the key
"extra inherit env", if given, is a list of strings specifying additional variable names to be inherited from the environment (besides the ones specified in"inherit env"of the respective repository definition). This can be useful, if the local git mirrors use a different protocol (like ssh instead of https) and hence require different variables to pass the credentials.
- the key
This option overwrites any values set in the just-mrrc(5) file. Default: file path .just-local.json in userβs home directory.
-L,--local-launcher JSON_ARRAYβ JSON array with the list of strings representing the launcher to prepend actionsβ commands before being executed locally. Default:["env", "--"].--distdir PATHβ Directory to look for distfiles before fetching. If given, this will be the first place distfiles are looked for. This option can be given multiple times to specify a list of distribution directories that are used for lookup in the order they appear on the command line. Directories specified via this option will be appended to the ones set in thejust-mrrc(5)file. Default: the single file path.distfilesin userβs home directory.--main NAMEβ The repository to take the target from.-f,--log-file PATHβ Path to local log file.just-mrwill store the information printed onstderrin the log file along with the thread id and timestamp when the output has been generated.--log-limit NUMβ Log limit (higher is more verbose) in interval[0,6](Default:3).--restrict-stderr-log-limit NUMβ Restrict logging on console to the minimum of the specified--log-limitand the value specified in this option. The default is to not additionally restrict the log level at the console.--plain-logβ Do not use ANSI escape sequences to highlight messages.--log-appendβ Append messages to log file instead of overwriting existing.--no-fetch-ssl-verifyβ Disable the default peer SSL certificate verification step when fetching archives (for which we verify the hash anyway) from remote.--fetch-cacert PATHβ Path to the CA certificate bundle containing one or more certificates to be used to peer verify archive fetches from remote.-r,--remote-execution-address NAME:PORTβ Address of a remote execution service. This is used as an intermediary fetch location for archives, between local CAS (or distdirs) and the network.--remote-instance-name NAMEβ Value to pass asinstance_namein the remote execution API.-R,--remote-serve-address NAME:PORTβ Address of ajustbuildserve service. This is used as intermediary fetch location for Git commits, between local CAS and the network.--max-attempts NUMβ If a remote procedure call (rpc) returnsgrpc::StatusCode::UNAVAILABLE, that rpc is retried at mostNUMtimes. (Default:1, i.e., no retry).--initial-backoff-seconds NUMβ Before retrying the second time, the client will wait the given amount of seconds plus a jitter, to better distribute the workload. (Default:1).--max-backoff-seconds NUMβ From the third attempt (included) on, the backoff time is doubled at each attempt, until it exceeds the max-backoff-seconds parameter. From that point, the waiting time is computed as max-backoff-seconds plus a jitter. (Default:60)--fetch-absentβ Try to make available all repositories, including those marked as absent. This option cannot be set together with--compatible.--compatibleβ At increased computational effort, be compatible with the original remote build execution protocol. If a remote execution service address is provided, this option can be used to match the artifacts expected by the remote endpoint.--just PATHβ Name of thejustbuildbinary inPATHor path to thejustbuildbinary. Default:"/usr/bin/justbuild".--rc PATHβ Path to thejust-mrrcfile to use. Seejust-mrrc(5)for more details. Default: file path.just-mrrcin the userβs home directory.--dump-rc PATHβ Dump the effective rc, i.e., the rc after overlaying all applicable auxiliary files specified in the"rc files"field, to the specified file. In this way, an rc can be made self-contained in preparation for committing it to a repository.--git PATHβ Path to thegitbinary inPATHor path to thegitbinary. Used in the rare instances when shelling out togitis needed. Default:"git".--norcβ Option to prevent reading anyjust-mrrc(5)file.-j,--jobs NUMβ Number of jobs to run. Default: Number of cores.
π Authentication options π
Only TLS and mutual TLS (mTLS) are supported. They mirror the justbuild(1) options.
--tls-ca-cert PATHβ Path to a TLS CA certificate that is trusted to sign the server certificate.--tls-client-cert PATHβ Path to a TLS client certificate to enable mTLS. It must be passed in conjunction with--tls-client-keyand--tls-ca-cert.--tls-client-key PATHβ Path to a TLS client key to enable mTLS. It must be passed in conjunction with--tls-client-certand--tls-ca-cert.
β¨ SUBCOMMANDS β¨
π mrversion
okay so mrversion literally just prints a JSON object on stdout that gives you version information for this tool itself. and get this: the version subcommand calls the version subcommand of justbuild. the version info for just-mr is in the same format that justbuild uses too. iconic.
π οΈ setup|setup-env
these subcommands fetch all the required repositories and generate an appropriate multi-repository justbuild configuration file. the resulting file is stored in CAS and its path is printed to stdout. see just-repository-config(5) for more details on the resulting configuration file format.
if a main repository is provided in the input configuration or on the command line, only it and its dependencies are considered in the generation of the resulting multi-repository configuration file. if no main repository is provided, the lexicographical first repository from the configuration is used. to perform the setup for all repositories from the input configuration file, use the --all flag.
the behavior of the two subcommands differs only with respect to the main repository. in the case of setup-env, the workspace root of the main repository is left out, such that it can be deduced from the working directory when justbuild is invoked. in this way, working on a checkout of that repository is possible, while having all of its dependencies properly set up. in the case of setup, the workspace root of the main repository is taken as-is into the output configuration file. slay.
π¦ fetch
this subcommand prepares all archive-type and "git tree" workspace roots for an offline build by fetching all their required source files from the specified locations given in the input configuration file or ensuring the specified tree is present in the Git cache, respectively. any subsequent just-mr or justbuild invocations containing fetched archive or "git tree" workspace roots will thus need no further network connections. no cap.
if a main repository is provided in the input configuration or on the command line, only it and its dependencies are considered for fetching. if no main repository is provided, the lexicographical first repository from the configuration is used. to perform the fetch for all repositories from the input configuration file, use the --all flag.
by default the first existing distribution directory is used as the output directory for writing the fetched archives on disk. if no existing distribution directory can be found an error is produced. to define an output directory that is independent of the given distribution directories, use the -o option.
additionally, and only in native mode, the --backup-to-remote option can be used in combination with the --remote-execution-address argument to synchronize the locally fetched archives, as well as the "git tree" workspace roots, with a remote endpoint.
π update
this subcommand updates the specified repositories (possibly none) and prints the resulting updated configuration file to stdout.
currently, just-mr can only update Git repositories and it will fail if a different repository type is given. the tool also fails if any of the given repository names are not found in the configuration file.
for Git repositories, the subcommand will replace the value for the "commit" field with the commit hash (as a string) found in the remote repository in the specified branch. the output configuration file will otherwise remain the same at the JSON level with the input configuration file.
ποΈ gc-repo
this subcommand rotates the generations of the repository cache. every root used is added to the youngest generation. therefore upon a call to gc-repo all roots are cleaned up that were not used since the last gc-repo.
if --drop-only is given, only the old generations are cleaned up, without rotation. in this way, storage can be reclaimed; this might be necessary as no perfect sharing happens between the repository generations. iykyk.
π do
this subcommand is used as the canonical way of specifying justbuild arguments and calling justbuild via execvp(2). any subsequent argument is unconditionally forwarded to justbuild. for known subcommands (version, describe, analyse, build, install, install-cas, add-to-cas, rebuild, gc), the just-mr setup step is performed first for those commands accepting a configuration and the produced configuration is prefixed to the provided arguments. the main repository for the setup step can be provided in the configuration or on the command line. if no main repository is provided, the lexicographical first repository from the configuration is used.
all logging arguments given to just-mr are passed to justbuild as early arguments. if log files are provided, an unconditional --log-append argument is passed as well, which ensures no log messages will get overwritten.
the --local-launcher argument is passed to justbuild as early argument for those known subcommands that accept it (build, install, rebuild).
the --remote-execution-address, --remote-instance-name, --compatible, and --remote-serve-address arguments are passed to justbuild as early arguments for those known subcommands that accept them (analyse, build, install-cas, add-to-cas, install, rebuild, traverse).
the authentication options given to just-mr are passed to justbuild as early arguments for those known subcommands that accept them, according to justbuild(1).
π― version|describe|analyse|build|install|install-cas|add-to-cas|rebuild|gc
this subcommand is the explicit way of specifying known just subcommands and calling justbuild via execvp(2). the same description as for the do subcommand applies.
β»οΈ gc-repo
rotate the repository-root generations. in this way, all repository roots not needed since the last call to gc-repo are purged and the corresponding disk space reclaimed.
π₯ EXIT STATUS π₯
the exit status of just-mr is one of the following values:
0: the command completed successfully64: setup succeeded, but exec failed65: any unspecified error occurred injust-mr66: unknown subcommand (internal implementation error ofjust-mr)67: error parsing the command-line arguments68: error parsing the configuration69: error during fetch70: error during update71: error during setup
any other exit code that does not have bit 64 set is a status value from justbuild, if just-mr is used as a launcher. see justbuild(1) for more details.
π See also π
and that's a wrap on JUST-MR(1) β the manual page, section 1, bestie! you're now fully fluent in just-mr. go forth and build, periodt π β¨
π¦ where this page comes from
- ubuntu stonking: justbuild 1.6.5-0.1build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms