summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2024-10-10bootstrap traversing: for explicit trees, create closed directoriesKlaus Aehlig
... by recursively copying and resolving sybolic links. In this way, references within a tree (e.g., #include "../Something.hpp") do not confuse the compiler, as opposed to directory symlinks. Neverthess, by doing this copying only for tree constructors, we still keep the overhead acceptable.
2024-08-26just-mr.py: Accept all tree entries for bootstrapped justPaul Cristian Sarbu
The Python script used for the first stage of bootstrapping just uses the Git index to create trees from directories (be it file repositories, unpacked archives, or distfiles), therefore it has the limitations of Git itself in committing trees that contain entries ignored by Git, such as empty directories, the .git folder, .gitignore files and files referenced there, or other entries with Git-specific magic names. This commit updates the Python script to replace the use of the Git index for importing directories to directly writing the needed blobs and trees to the object database, then commit the resulting top tree explicitly. While there, fix a typing issue from our relaxed approach in using os.environ to set the subprocess env when running commands. As on POSIX the type is _Environ, not simple Dict[str, str], use implicit dictionary merging (Python v3.5+) to set the Git envars. The issue was initially flagged by pyright.
2024-07-19Storage config: change layout to support several storage generationsKlaus Aehlig
2024-06-18Use ServeApi during bootstrapMaksim Denisov
...with a default implementation. Although it is not used directly, it will be needed for instantiation of std::optional.
2024-04-25just-deduplicate-repos: merge pragma of identified repositoriesKlaus Aehlig
While just-deduplcate-repos only identifies repositories that are semantically indistinguishable, there still is the pragma to consider. - If the repository in one use requires to be present, we have to fetch it, hence cannot treat it as absent. - If a repository in one place has to be transformed to a git root, this also has to happen for the copy we keep.
2024-04-25just-import-git: support importing repositories as absentKlaus Aehlig
This allows to simply specify the direct dependencies desired to be absent at import where the dependency structure is handled anyway, rather than afterwards reconstructing which repositories should be absent.
2024-02-21just-import-git: support setting "inherit env"Klaus Aehlig
When importing a repository via just-import-git, allow to specify the value for the "inherit env" property for the repository just being imported.
2024-01-08bootstrap: accept a build dir inside the source treeKlaus Aehlig
While it is best practise to build outside the source tree, some package formats require that a build be carried out inside the source tree. As there are no principle obstacles, as long as a non-existing directory is requested as build dir, support it by ignoring the destination in the recursive copy.
2023-11-14just-import-git: Add --mirror optionPaul Cristian Sarbu
This allows to specify upfront alternative locations from where the imported repository may be fetched. No action is taken in the import, instead the argument gets passed intot he resulting just-mr configuration.
2023-11-14test: Add check for 'mirrors' field in just-mr repositoriesPaul Cristian Sarbu
2023-11-02bootstrap: Add libarchive dependencyPaul Cristian Sarbu
This is brought in by the tree-of-archive rpc of just serve. Also adds lzma and bzip2 as transitive dependencies.
2023-09-19bootstrap: for package builds use -Wno-pedanticKlaus Aehlig
... as well as the already present -Wno-error. In this way, packagebuilding should work out of the box on more systems.
2023-09-13just serve: Basic service implementation with commit-of-tree RPCPaul Cristian Sarbu
Initial version, to be extended later with other RPCs.
2023-09-01Add a utility tool to deduplicate internal repositoriesKlaus Aehlig
Together with just-import-git that allows a work flow of easily importing dependencies without exponential blow up of the resulting repos.json files.
2023-08-31just-mr.py: Fix None checksPaul Cristian Sarbu
2023-08-31just-mr.py: Fix wrong check added by type annotation changesPaul Cristian Sarbu
The checkout locations keys can, of course, include the empty string, so key check should be explicitly typed.
2023-08-31just-import-git: fix fallout of type annotationsKlaus Aehlig
In order to get the type checker happy, some wrong type annotations were added and, as a consequence, an unwarrented conditional as well. To make things worse, this as checking for the non-None-ness of a value by inspecting the truth value, ignoring that the non-None value "" also has truth value False. Remove this conditional alltogether and fix the type annotations.
2023-08-29just-import-git.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).
2023-08-29bootstrap.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526.
2023-08-29parallel-bootstrap-traverser.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).
2023-08-29bootstrap-traverser.py: Add type hints and fix stylePaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526.
2023-08-29just-mr.py: Add type hints, fix style, and improve readabilityPaul Cristian Sarbu
For maximum compatibility, we use the uppercase types from the typing package instead of the built-in types, therefore compliant with PEP 484 and PEP 526. As unfortunately there is no proper JSON typing option that requires many casts, we use a more lax typing for JSON inputs, but enforce return types in order to implicitly infer the actual format of an input JSON variable (dict, list, string etc.).
2023-08-16Introduce configuration variable TOOLCHAIN_CONFIGOliver Reiche
... to pass along toolchain settings for current and future toolchain definitions. Configuration variable COMPILER_FAMILY is replaced by TOOLCHAIN_CONFIG["FAMILY"].
2023-08-14just-mr py: Add support for 7zip archivesPaul Cristian Sarbu
2023-07-10just-mr: Fix handling of .gitignore files in git repositoriesPaul Cristian Sarbu
The command 'git add .' does not include paths found in .gitignore files in the directory tree where the command is issued. This is not the desired behaviour, as we expect for a tree with a given commit id to contain all of the entries, irrespective of their meaning to Git. This commit addresses the issue as described. For the just-mr.py script we modified the staging command to 'git add -f .'. For the compiled just-mr, simply adding the force flag to 'git_index_add_all' did not work as intended for files found in ignored subdirectories. This is a known libgit2 issue which has been fixed in v1.6.3. Until we can upgrade our libgit2 version, a workaround was implemented: we recursively read the directory entries ourselves and add each of them iteratively using 'git_index_add_bypath', making sure to ignore the root '.git' subtree (which cannot be staged). At the moment the handling of Git submodules remains an open issue, as Git does not allow '.git' subtrees to be forcefully added to the index, and thus such directory entries will currently not be considered as part of a git tree. This however is consistent behavior between Git and libgit2.
2023-06-06bootstrap: Improve OS/ARCH determinationOliver Reiche
... by making variables `os` and `arch` accessible to bootstrap hints. Furthermore, support the hints `os_map` and `arch_map` for mapping Justbuild's OS/ARCH to the terminology used by the repository. Values not covered by these maps will be passed through.
2023-05-31Support FINAL_LDFLAGS variable for binariesOliver Reiche
... and set default stack size to 8 MB.
2023-05-23just-import-git: also recognize the workspace root as a layerKlaus T. Aehlig
In the definition of a repository, the workspace root (given by the key "repository") can contain either a description of that root (where to fetch it, whast to expect) or simply a reference to (the workspace root of) another repository. In the latter case, the referenced repository has to be imported as a layer, just as if had been specified as target_root, rule_root, or expression_root.
2023-05-22just-import-git: support assuming the canonical single-repo configKlaus Aehlig
Add an option --plain pretending that the remote repository configuration is the canonical single-repository one. In this way, repositories not having a multi-repository configuration (e.g., code built with a foreign build system) can be imported in the same way to a template, thus providing a more uniform interface. This can also be useful, if a repository is to be imported completely without its transitive dependencis.
2023-04-27bootstrap: Do not prune non-local-depsOliver Reiche
Dependencies (type archive/zip) that are not required for bootstrapping just are usually marked with the hint "drop", in order to avoid fetching non-required archives. This affects only non-local dependencies, as local dependencies (from the system) will not fetch anything and therefore do not need to be dropped. With this commit, the "drop" hint for declared non-local-deps will be ignored during package builds. In this way, the user can specify dependencies that should not be dropped (despite not strictly required to bootstrap just). Consequently, those dependencies remain in the generated bootstrap configuration, in case the user wants to use this configuration to build other targets, such as just-mr.
2023-04-27bootstrap: Write build config to working directoryOliver Reiche
... so in can be used (in combination with the repository config) to build other just targets, such as just-mr.
2023-04-18bootstrap traverser: prefer hard over symlinksKlaus Aehlig
... as in this way, the setup is more close to the one used in our build tool. In particular, tools that search for auxilliary files relativ to their own location get confused less.
2023-04-18bootstrap-traverser: Support actions without inputsOliver Reiche
2023-04-18bootstrap: Replace prebuilt imports by pkgconfigOliver Reiche
2023-04-18bootstrap: Disable -Werror for package buildsOliver Reiche
2023-04-18bootstrap: Support PKG_CONFIG_PATH (and set from LOCALBASE)Oliver Reiche
2023-04-18bootstrap: Use generic toolchain and honor COMPILER_FAMILYOliver Reiche
2023-03-08just-mr: fix options mismatchesPaul Cristian Sarbu
... both with respect to just options and the man page specifications. Option -L of just-mr was reassigned as a short name for --local-launcher, matching its use in just. Its place is now correctly held by the full name option --checkout-locations, as per the section-1 man page.
2023-03-06just-mr.py: Remove unused function argumentPaul Cristian Sarbu
2023-02-14Package bootstrapping: support copying the needed partsKlaus Aehlig
... while following symbolic links. In this way, bootstrapping is possible against preinstalled dependencies that symbolic links or special files in their directories.
2023-02-09bootstrap.py: Add env variable NON_LOCAL_DEPSMichael Thies
... to indicate, in case of a package build, which dependencies should not be taken from the local environment. As those need a different target root (and potentially other roots), we keep a copy of file roots modified when transitioning to local builds and rewrite the changed file roots in the NON_LOCAL_DEPS accordingly. Co-authored-by: Klaus Aehlig <aehlig@linta.de>
2023-01-24bin/boostrap.py: support dropping of repositoriesKlaus Aehlig
Not all repositories mentioned in the repository configuration are needed to boostrap just (e.g., because they are used for testing). Support dropping dependencies for bootstrapping by replacing them by a reference to an empty directory and in this way have less files that need to be fetched.
2023-01-24just-mr.py: Make disdir content reproducible and consistentPaul Cristian Sarbu
In Python the json of a dict does not guarantee an order, while in our internal just-mr implementation the json always has the keys sorted. Also, the JSON dump in Python does not by default use the most compact representation. This change fixes these issues and makes the two just-mr versions produce the same distdir content id.
2023-01-20Add gc subcommandSascha Roloff
2023-01-10just-import-git: accept config from stdinKlaus Aehlig
... to allow simple chaining of imports.
2023-01-10just-import-git: carry out the temporary clone in a shallow wayKlaus Aehlig
2023-01-10just-import-git: fix check for main nameKlaus Aehlig
The main repository to be imported should be treated special, whenever given. This has to be verified as the parameter not being None, rather than being true, as the empty string (a traditional name for the main repository) is also a false value in python.
2022-12-23just-mr: fix distdir computationKlaus Aehlig
just-mr is designed to store everything that can be reported as git tree entirely in git only. To avoid recomputation, just-mr keeps index files mapping the description of a repository to the corresponding git trees. For these index files to be useful, the computation of the key has to be independent of the presence of the respective archives in CAS. This will become even more important once garbage collection will be added. Fix this for distdir repositories.
2022-12-21Bootstrap: Exclude other_tools folder from source files gatheringPaul Cristian Sarbu
2022-12-12Just-mr: Fix handling and meaning of --just optionPaul Cristian Sarbu
The value of --just option should be used as-is, as it might be a var in PATH. The `execvp` call will handle this. The Python script and man page have been updated accrodingly.