Skip to content

Commit

Permalink
Merge branch 'just-buildsystem:master' into github-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
oreiche authored Jan 24, 2024
2 parents fd539ff + 1c0ad76 commit b2cb6e1
Show file tree
Hide file tree
Showing 164 changed files with 6,365 additions and 1,603 deletions.
22 changes: 17 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ A feature release on top of `1.2.0`, backwards compatible.

### Major new features

- New subcommand `just serve` to start server answering queries
about the tree of a given commit, if known. The functionality
of this subcommand will be extended over time to eventually
provide a target-level caching service as described in the
corresponding design document.
- New subcommand `just serve` to start a target-level caching service,
as described in the corresponding design document.
- `just-mr` is able to back up and retrieve distribution files
from a remote execution endpoint. This simplifies usage in an
environment with restricted internet access.
Expand All @@ -30,6 +27,9 @@ A feature release on top of `1.2.0`, backwards compatible.
- When `just-mr` executes the action to generate the desired tree of a
`"git tree"` repository, it can be specified that certain variables
of the environment can be inherited.
- Support for fetching archives from FTP and TFTP was added to `just-mr`
if it was built with bundled curl. For package builds, libcurl has
enabled whatever the distro considers suitable.

### Fixes

Expand All @@ -48,6 +48,12 @@ A feature release on top of `1.2.0`, backwards compatible.
on upgrading or downgrading. However, old target-level cache
entries will not be used leading potentially to rebuilding of
some targets.
- Garbage collection now honors the dependencies of target-level
caches entries on one another. When upgrading in place, this only
applies for target-level cache entries written initially after
the upgrade.
- The taintedness of `"configure"` targets is now propagated
correctly in analysis.
- Improved portability and update of the bundled dependencies.
- Various minor improvements and typo fixes in the documentation.
- Fixed a race condition in an internal cache of `just execute`
Expand All @@ -58,6 +64,12 @@ A feature release on top of `1.2.0`, backwards compatible.
directories if they are part of the action's input.
- Fixed overwrite of existing symlinks in the output directory
when using subcommands `install` and `install-cas`.
- The format for target-cache shards was changed to a canonical form.
The new and old formats do not overlap, therefore the correctness
of the builds is not affected. In particular, no special care has
to be taken on upgrading or downgrading. However, some target-level
cache entries will not be used leading potentially to rebuilding of
some targets.

## Release `1.2.0` (2023-08-25)

Expand Down
34 changes: 32 additions & 2 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,44 @@
{ "type": "let*"
, "bindings":
[ ["ENABLE_ARES", true]
, ["HTTP_ONLY", true]
, ["CURL_DISABLE_DICT", true]
, ["CURL_DISABLE_FILE", true]
, ["CURL_DISABLE_FTP", false]
, ["CURL_DISABLE_GOPHER", true]
, ["CURL_DISABLE_IMAP", true]
, ["CURL_DISABLE_LDAP", true]
, ["CURL_DISABLE_LDAPS", true]
, ["CURL_DISABLE_MQTT", true]
, ["CURL_DISABLE_POP3", true]
, ["CURL_DISABLE_RTSP", true]
, ["CURL_DISABLE_SMB", true]
, ["CURL_DISABLE_SMTP", true]
, ["CURL_DISABLE_TELNET", true]
, ["CURL_DISABLE_TFTP", false]
, ["CURL_USE_LIBPSL", false]
, ["CURL_USE_LIBSSH2", false]
]
, "body":
{ "type": "env"
, "vars":
["ENABLE_ARES", "HTTP_ONLY", "CURL_USE_LIBPSL", "CURL_USE_LIBSSH2"]
[ "ENABLE_ARES"
, "CURL_DISABLE_DICT"
, "CURL_DISABLE_FILE"
, "CURL_DISABLE_FTP"
, "CURL_DISABLE_GOPHER"
, "CURL_DISABLE_IMAP"
, "CURL_DISABLE_LDAP"
, "CURL_DISABLE_LDAPS"
, "CURL_DISABLE_MQTT"
, "CURL_DISABLE_POP3"
, "CURL_DISABLE_RTSP"
, "CURL_DISABLE_SMB"
, "CURL_DISABLE_SMTP"
, "CURL_DISABLE_TELNET"
, "CURL_DISABLE_TFTP"
, "CURL_USE_LIBPSL"
, "CURL_USE_LIBSSH2"
]
}
}
}
Expand Down
20 changes: 16 additions & 4 deletions bin/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from pathlib import Path
from concurrent.futures import ThreadPoolExecutor

from typing import Any, Dict, List, Optional, Set, cast
from typing import Any, Callable, Dict, List, Optional, Set, cast

# generic JSON type that avoids getter issues; proper use is being enforced by
# return types of methods and typing vars holding return values of json getters
Expand Down Expand Up @@ -341,6 +341,16 @@ def prune_config(*, repos_file: str, empty_dir: str) -> None:
with open(repos_file, "w") as f:
json.dump(repos, f, indent=2)

def ignore_dst(dst: str) -> Callable[[str, List[str]], List[str]]:
def ignore_(path: str, names: List[str]) -> List[str]:
if os.path.normpath(path) == dst:
return names
for n in names:
if os.path.normpath(os.path.join(path, n)) == dst:
return[n]
return []
return ignore_


def copy_roots(*, repos_file: str, copy_dir: str) -> None:
with open(repos_file) as f:
Expand All @@ -353,10 +363,12 @@ def copy_roots(*, repos_file: str, copy_dir: str) -> None:
new_root: str = os.path.join(copy_dir, repo)
for x in to_copy:
src: str = os.path.join(old_root, x)
dst: str = os.path.join(new_root, x)
dst: str = os.path.normpath(os.path.join(new_root, x))

if os.path.isdir(src):
shutil.copytree(src,
dst,
ignore=ignore_dst(dst),
symlinks=False,
dirs_exist_ok=True)
elif os.path.isfile(src):
Expand All @@ -379,8 +391,8 @@ def bootstrap() -> None:
os.makedirs(cast(str, g_WRKDIR), exist_ok=True)
with open(os.path.join(cast(str, g_WRKDIR), "build-conf.json"), 'w') as f:
json.dump(g_CONF, f, indent=2)
src_wrkdir: str = os.path.join(cast(str, g_WRKDIR), "src")
shutil.copytree(g_SRCDIR, src_wrkdir)
src_wrkdir: str = os.path.normpath(os.path.join(cast(str, g_WRKDIR), "src"))
shutil.copytree(g_SRCDIR, src_wrkdir, ignore=ignore_dst(src_wrkdir))
if g_LOCAL_DEPS:
config_to_local(repos_file=os.path.join(src_wrkdir, REPOS),
link_targets_file=os.path.join(src_wrkdir,
Expand Down
Loading

0 comments on commit b2cb6e1

Please sign in to comment.