Age | Commit message (Collapse) | Author |
|
A lot of the dependencies in the "just" repository are not for
building just itself, but are used the the just-mr tool or for
testing. As the bootstrap process, however, only bootstraps the just
tool itself, drop those dependencies from the bootstrap process.
|
|
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.
|
|
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.
|
|
As now all remote Git operations in GitRepo require at most just
the branch name, there is no more need to inquire the repository
about branch refspecs.
|
|
The libgit2 library does not satisfy the http.sslVerify gitconfig
field or the GIT_SSL_NO_VERIFY environment variable, so we have to
perform these checks ourselves and supply the correct return value
from the certificate_check git_fetch_options callback.
The callbacks used for fixing the remote fetch SSL certificate
verification are reused here.
|
|
The libgit2 library does not satisfy the http.sslVerify gitconfig
field or the GIT_SSL_NO_VERIFY environment variable, so we have to
perform these checks ourselves and supply the correct return value
from the certificate_check git_fetch_options callback.
|
|
...and use instead the branch name. A valid direct refspec (as those
retrieved by a remote_ls call) will always end in the branch name,
so checking the last path component ('/'-delimited substring) of a
retrieved refspec is enough.
|
|
|
|
from remote
|
|
This also removes the need to call the GET_BRANCH_REFNAME critical
operation.
|
|
|
|
|
|
|
|
|
|
By default, just-mr fetches to the first existing distribution
directory; by default, the first distribution directory to consider
is ~/.distfiles. If an explicit destination is desired, it should
be specified with the -o option. Fix the invocation of just-mr in
the end-to-end test to use the specified destination; this also makes
local execution of te test hermetic (as was originally intended), even
if the user has a directory ~/.distfiles.
|
|
|
|
Run build and garbage collection end to end and verify two basic
properties.
- A target used after the the last gc is still available after
another gc, and so are all its parts, even if the output is a
single tree.
- A target not used between to gc is purged from disk and disk
space is not used any more.
|
|
|
|
|
|
This code movement is required to break a cyclic dependency coming with the
introduction of the garbage collector. target_cache depends on
garbage_collector and garbage_collector would depend on target_cache to
determine the target-level-cache directory. After moving this calculation to a
more general location, the cycle is broken.
|
|
|
|
This usage of a different header file is required to break a cyclic dependency
coming with the introduction of the garbage collector. entity_name implicitly
depends on local_cas, which will get a new dependency to garbage_collector.
garbage_collector depends on target_cache_entry, which transitively depends on
entity_name. entity_name_data instead does not depend on local_cas and breaks
the cycle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Both, the python script as well as the compiled variant of just-mr
fetch try to overwrite already existing distfiles in the distdir.
While it is unclear if overwriting existing distfiles or not
copying to distdir if a file with that name already exists is the
better behaviour, we at least should not error out, as the compiled
just-mr currently does as it sets permission to 444 and hence cannot
overwrite later; fix this by addwing owner write permissions before
overwriting.
|
|
|
|
The absent value for an optional string is std::nullopt, not
the empty string.
|
|
just-mr fetch is supposed to fetch to the first (in search order)
distdir that is an existing directory (and error out if no such
directory exists). So, once a directory is found, there is no need
to create it---we already verified it is an existing directory.
|
|
... in error message reporting the lack of present distdirs.
|
|
... to avoid potential staging conflicts. Having them staged to
just-mr was a copy-and-paste error in the first place anyway.
|
|
For libcurl we need to set the CURL_FOLLOWLOCATION flag (disbaled by
default) to enable 3xx redirects. Libcurl has sane defaults for
related settings in order to handle redirects when enabled, though
for fetches there should be limited risks, as content (and SHA hashes,
if provided) is checked to ensure the intended archives are fetched.
|
|
|
|
... to ensure unique readability even with file names containing
spaces or other special symbols; those kind of fancy file names
typically occur when a string intended as named target is implicitly
taken as a file (e.g., due to a spelling error). While there, also
include directory and repository in the error message.
|
|
... by specifying that we always ensure the latest stable
release of just can build just at head. If the only version
available is older than the last stable release, it might
be necessary to go through the bootstrap path.
|
|
|
|
... to allow simple chaining of imports.
|
|
|
|
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.
|
|
in the end-to-end tests
|
|
This target uses the just-mr binary and will replace the Python
script in all non-bootstrap-related scenarios.
|
|
|