Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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
|
|
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.
|
|
|
|
... 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.
|
|
|
|
|
|
... in the same way, as we support different names for cc and c++.
|
|
|
|
... also in the first phases of the bootstrap procedure.
Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
Only if the environment variable DEBUG is set, fall back to sequentially
executing the graph generated by the bootstrap version of just.
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
... 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.
|
|
... and not only located on the file system. This change
enables the use of Git bundles as "non-local" repositories.
|
|
While the just binary itself was carefully created to work correctly
in the presence of several instances running simultaneously, the
just-mr.py script started as proof-of-concept out of the need to
conveniently generate a multi-repository configuration for just.
Nevertheless, it is now actually used, so parallel running instances
have to be taken seriously. Moreover, we have to ensure that in
case of failures, we don't leave the local build root in a state
giving a false impression on how an unpacked archive looks like.
Both can be avoided by always working on temporary directories and,
should a persistent location be needed, only renaming to the final
desitantion once everything is set up correclty.
|
|
When converting a directory to git, just-mr.py shells out to git
to to the actual conversion. However, not in all cases git waits
for its children, in particular when deciding to implicitly run
git-gc ("Auto packing the repository in background for optimum
performance.") This causes problems, as we assume that after git
finishes we safely can remove the temporary directory from which
we pulled; however, the shutils.rmtree function we call for this
assumes the directory to be removed not to be changed by other
processes---like git removing the file gc.pid. Work around this,
by retrying the removal of no longer needed temporary directories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
... so that destinations like "foo/." are handled correctly.
Also, support linking to "." in trees by only late creation of the
input directory.
|
|
... and also use it for "git init" and "git add" as well, to avoid
effects of unusual git configurations.
|
|
While git's (sha1-based) blob identifier is good for daily use and
strong enough to avoid accidental hash collisions (after all, we're
using git to version our sources), sha1 is no longer considered
safe enough to verify files downloaded through an unsecure channel.
Therefore, support additional checksum verification when obtaining
a file from the network.
|
|
Some libraries, e.g., libgit2, bring an include directory that is
expected to occur directly in the search path (containing a git2
directory and a git2.h file). Support this use case by allowing
"." as include_name in the bootstrap hints.
|
|
|
|
|
|
|
|
|
|
... so accessing the CAS from a different cwd wont fail if
the local_build_root was provided as relative path.
|
|
As the default target is also staged canonically, there
is no longer the need for the bootstrap script to know
the path and staging output of the internal main target.
|