summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
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.
2022-12-09just-import-git.py: Support distdir repositoriesOliver Reiche
2022-12-09rules: Refactoring and minor improvementsOliver Reiche
Compared to the previous commit, the action graphs for just and its unit tests are unchanged. - Git hash of action graph for ["",""]: c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973 - Git hash of action graph for ["test/buildtool","TESTS"]: 8063dfb3dd7daa9ae01d95c177e14946f785c57e Refactor: - "local cflags" to "private-cflags" - "local defines" to "private-defines" - "link externals" to "private-ldflags" - "deps" to "private-deps" for (test) binaries - "proto" to "private-proto" for binaries Improvements: - consistent variable declaration order: OS, ARCH, HOST_ARCH, TARGET_ARCH, CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS, AR, ENV, PATH - use fields close to their definition (in RULES) - use common expression for binaries and test binaries - split expression "flags" and "compiler" ... to separate ones for CC and CXX. - rename "transition" to "deps-transition" ... to avoid conflicts with other transitions. - support "defaults-transition" for CC expressions Implement: - "cflags" for libraries - "private-cflags" for (test) binaries - "private-defines" for test binaries - "private-ldflags" for test binaries - (public) "defines" for libraries
2022-12-06just-mr: Fix norc handling in Python scriptPaul Cristian Sarbu
If norc options is given then no checks for the rc_path (e.g., whether it points to a file or not) should even be considered.
2022-12-02just-mr: fix format-string interpolationKlaus Aehlig
2022-11-30Add script to import a git repos as dependencyKlaus Aehlig
... assuming this repo already uses just and has a multi-repository configuration committed. In the import, transitive dependencies, as well as repositories serving as layers, are taken into account, and "file" repositories are rewritten to be subdirs of the repository imported. The imported repositories are renamed to reflect the repository pulling them in, extending the name appropriately to avoid conflicts. This renaming is reflected in the bindings and layer references of the imported repositories as well. In this simple version, no automatic deduplication of imported repositories to already existing repositories is made, but the user can specify that certain foreign repositories should not be imported and mapped to already present repositories.
2022-11-07just-mr: remove leftoverAlberto Sartori
2022-11-03also honor additional flags in the early bootstrap phaseKlaus Aehlig
2022-10-31bootstrap: allow overwriting of arKlaus Aehlig
... in the same way, as we support different names for cc and c++.
2022-10-28bootstrap: be consistent with the desired compilerAlberto Sartori
2022-10-26bootstrap: honor CC and CXX from build configurationKlaus Aehlig
... also in the first phases of the bootstrap procedure. Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
2022-10-26bootstrap: Support building bootstrap_just in parallelOliver Reiche
2022-10-26Bootstrap: allow setting build configurationKlaus Aehlig
When constructing the build configuration for the bootstrap build is just, start with the value of the environment variable JUST_BUILD_CONF, if set, instead of the empty object. While there, also propagate SOURCE_DATE_EPOCH from the environment to the build configuration.
2022-10-21just-mr: Fix use of wrong file path for checkout locationsOliver Reiche
2022-10-20just-mr: Warn on inefficient Git operationsOliver Reiche
2022-10-20just-mr: Support for just-mrrc fileOliver Reiche
2022-10-20just-mr: Implement just-mr launchersOliver Reiche
2022-10-19Apply sharding as used in git to files stored in the just cache directory.Sascha Roloff
This commit also introduces an incompatible change, since it modifies the way how files are stored in the just cache directory. This modification reduces the number of files per directory and only introduces a maximum number new directories to avoid possible performance bottlenecks.
2022-10-19Add generation directory as part of the just cache root.Sascha Roloff
This change is introduced to be prepared for future changes such as garbage collection. It is an incompatible change compared to earlier just versions since it modifies the local path to the just cache directory, where among others the CASes, action cache, target-level cache are located.
2022-10-13bootstrap: by default, bootstrap in parallelKlaus Aehlig
Only if the environment variable DEBUG is set, fall back to sequentially executing the graph generated by the bootstrap version of just.
2022-10-13Add a parallel version of the bootstrap graph traverserOliver Reicher
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05Bootstrap: Support ARM architecturesOliver Reiche
2022-10-05just-mr.py: for the fetch subcommand acutally fetchKlaus Aehlig
A checkout does not necessarily fetch an archive: if we already have the git tree for that archive, this is enough to create a build root. For the fetch command, however, we need to have the actual archive as we have to copy it to the distdir. Of course, we only create the git tree once we got hold of the archive. However, with the introduction of CAS purging, the invariant that we have the archive whenever we can create a build root will no longer be true. This is acutally a feature as the git trees can be stored more compactly if we accumulate different release archives of the same upstream project. However, it also means that we explicitly have to fetch the archive in the fetch subcommand. Do this.
2022-07-28Add setup-env option to just-mrPaul Cristian Sarbu
2022-07-28Fix style in just-mrPaul Cristian Sarbu
2022-07-26Fix just-mr bug: ensure git cache folder present for git opsPaul Cristian Sarbu
2022-07-25just-mr: retry `git tag -f` if neededKlaus Aehlig
just-mr uses git tags to ensure that git roots used in the repository configuration handed out do not get garbage collected. Here, the tag encodes the commit to be kept; hence we can safely do this operation forcefully: we would only reset the tag to its old value. However, this tagging still is not free of races: git seems to first check for the existence of the tag and if not present tries creation under the assumption that no other process does so (and fails if this is the case). As our tagging is idempotent, we can safely retry it to work around this git race.
2022-07-25Support bootstrapping from preinstalled sourcesKlaus Aehlig
For quick development, it is convenient to only need a C++ compiler and python3 and get all dependencies downloaded at the beginning of the bootstrap process. For packaging the tool, however, this is not a valid approach; dependencies should be managed by the packing tool there (so that security updates have to be fixed only at one place). So, for building our tool, the dependencies look like installed to the ambient environment.
2022-07-20just-mr: Fix use of local Git repos with relative pathOliver Reiche
... by computing the absolute path (required to successfully identified them as a Git root) and enforcing that tag creation is only performed for the default Git root from the cache directory.