ace-lab 0.16.1 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/docs/runtime-bundle.md +5 -1
- data/lib/ace/lab/molecules/extension_provisioner.rb +1 -1
- data/lib/ace/lab/molecules/gemset_provisioner.rb +21 -3
- data/lib/ace/lab/organisms/verify.rb +20 -1
- data/lib/ace/lab/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a1f579c031ce43080f9b2d888d0b2562ee4e78eade7b83b623417281c3e173ef
|
|
4
|
+
data.tar.gz: 186b2c8a7af37bbc265ab4b10347a1c57d614605647d42da9804e9f8f6e0d4e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 772408cad32f95576d19d2639dfe1f1ecaada5651680e16a35b14829561cd7139d75b00bcc7dd985ecc626ca839d13d986babef1fa35600eaea6d85da6003d03
|
|
7
|
+
data.tar.gz: 0450d71541435490cb5ee4cd4cf168eb44affa84c3b2f026f7f90dd70d5cdc07feadc7e50498ea0564463fda8bbf768fb2541eb0cfb7f7ffea69904758717cdb
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.16.3] - 2026-11-15
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Bind readiness probes to the manifest runtime and the running Ruby interpreter, including noninteractive SSH environments without Ruby on PATH. Never resolve role instructions through a project binstub when a runtime is declared.
|
|
15
|
+
- Keep extension projection receipts unique across upgrades and repair previously duplicated entries on reprojection, so unchanged retries converge.
|
|
16
|
+
|
|
17
|
+
## [0.16.2] - 2026-11-15
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Normalize shared runtime file permissions so unprivileged agents can read gems shipped with private source modes; never follow packaged symlinks.
|
|
22
|
+
- Generate the runtime Gemfile with the RubyGems source URI instead of its object representation, allowing fresh bundle installation.
|
|
23
|
+
|
|
10
24
|
## [0.16.1] - 2026-11-12
|
|
11
25
|
|
|
12
26
|
### Changed
|
data/docs/runtime-bundle.md
CHANGED
|
@@ -31,7 +31,11 @@ A failed update restores the previous Gemfile, lockfile and bundle configuration
|
|
|
31
31
|
Already installed sibling versions remain on disk; the lockfile selects the
|
|
32
32
|
runtime. Diagnostics of a bundled runtime use frozen, read-only `bundle check`.
|
|
33
33
|
|
|
34
|
-
For updates, change the manifest pins and run
|
|
34
|
+
For updates, preserve `ACE_TOOLCHAIN=installed`, change the manifest pins and run
|
|
35
|
+
`ace-lab install` once. Use the installer version that contains the required fixes;
|
|
36
|
+
installing a newer gem does not switch an older locked binstub. See the
|
|
37
|
+
[operator upgrade procedure](../../docs/lab-setup.md#3-upgrade-istniejącego-laba--bez-odtwarzania-środowiska)
|
|
38
|
+
for backups, publication status, reloads and readiness checks. To rerun
|
|
35
39
|
installation of an unchanged runtime directly:
|
|
36
40
|
|
|
37
41
|
```sh
|
|
@@ -172,7 +172,7 @@ module Ace
|
|
|
172
172
|
retained = previous.filter_map do |relative|
|
|
173
173
|
ExtensionProjection.validate_destination!(output_dir, relative)
|
|
174
174
|
target = File.join(output_dir, relative)
|
|
175
|
-
next
|
|
175
|
+
next if expected.key?(relative)
|
|
176
176
|
|
|
177
177
|
FileUtils.rm_f(target)
|
|
178
178
|
File.exist?(target) ? relative : nil
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require_relative "../errors"
|
|
4
4
|
require "open3"
|
|
5
5
|
require "fileutils"
|
|
6
|
+
require "find"
|
|
6
7
|
require "yaml"
|
|
7
8
|
require "rbconfig"
|
|
8
9
|
|
|
@@ -46,7 +47,7 @@ module Ace
|
|
|
46
47
|
bundle_root = File.dirname(File.dirname(gem_home))
|
|
47
48
|
gemfile = File.join(bundle_root, "Gemfile")
|
|
48
49
|
raise Ace::Lab::InvalidConfigurationError, "runtime Gemfile must not be a symlink" if File.symlink?(gemfile)
|
|
49
|
-
content = "source #{Gem.sources.first.to_s.dump}\n" + gems.map do |gem|
|
|
50
|
+
content = "source #{Gem.sources.first.uri.to_s.dump}\n" + gems.map do |gem|
|
|
50
51
|
"gem #{gem.fetch('name').dump}, #{gem.fetch('version').dump}\n"
|
|
51
52
|
end.join
|
|
52
53
|
settings_dir = File.join(bundle_root, ".bundle")
|
|
@@ -66,7 +67,10 @@ module Ace
|
|
|
66
67
|
result = @runner.call(runtime_argv(gem_home,
|
|
67
68
|
["BUNDLE_GEMFILE=#{gemfile}", "BUNDLE_USER_CONFIG=#{File::NULL}", "bundle", "install"]))
|
|
68
69
|
failure = command_failure("bundle install", result) unless result["status"] == "ok"
|
|
69
|
-
|
|
70
|
+
unless failure
|
|
71
|
+
converge_runtime_modes(gem_home)
|
|
72
|
+
install_entrypoints(gem_home, runtime["bin_dir"])
|
|
73
|
+
end
|
|
70
74
|
rescue StandardError, Interrupt
|
|
71
75
|
restore_bundle(previous)
|
|
72
76
|
raise
|
|
@@ -182,6 +186,19 @@ module Ace
|
|
|
182
186
|
end
|
|
183
187
|
end
|
|
184
188
|
|
|
189
|
+
# Archives may retain the publisher's private/group-only source modes.
|
|
190
|
+
# This shared runtime must be readable by its unprivileged consumers.
|
|
191
|
+
# Never follow a packaged symlink into a different filesystem tree.
|
|
192
|
+
def converge_runtime_modes(gem_home)
|
|
193
|
+
Find.find(gem_home) do |path|
|
|
194
|
+
stat = File.lstat(path)
|
|
195
|
+
next if stat.symlink?
|
|
196
|
+
next unless stat.directory? || stat.file?
|
|
197
|
+
mode = stat.directory? || (stat.mode & 0o111).positive? ? 0o755 : 0o644
|
|
198
|
+
File.chmod(mode, path) unless (stat.mode & 0o7777) == mode
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
185
202
|
def install_entrypoints(gem_home, directory)
|
|
186
203
|
return unless directory
|
|
187
204
|
FileUtils.mkdir_p(directory)
|
|
@@ -283,7 +300,8 @@ module Ace
|
|
|
283
300
|
def runtime_argv(gem_home, argv)
|
|
284
301
|
["env"] +
|
|
285
302
|
(BUNDLER_ENV_KEYS + ENV.keys.grep(/\ABUNDLER?_/)).uniq.flat_map { |key| ["-u", key] } +
|
|
286
|
-
["GEM_HOME=#{gem_home}", "GEM_PATH=#{gem_home}"
|
|
303
|
+
["GEM_HOME=#{gem_home}", "GEM_PATH=#{gem_home}",
|
|
304
|
+
"PATH=#{[File.dirname(Gem.ruby), File.join(gem_home, "bin"), ENV.fetch("PATH", "")].join(File::PATH_SEPARATOR)}"] + argv
|
|
287
305
|
end
|
|
288
306
|
|
|
289
307
|
# `gem list <name> --exact --local` prints one `name (v1, v2)`
|
|
@@ -89,6 +89,7 @@ module Ace
|
|
|
89
89
|
# as install/prepare
|
|
90
90
|
def call
|
|
91
91
|
manifest = Molecules::InstallManifestLoader.load(path: manifest_path, platform: platform)
|
|
92
|
+
@runtime_gem_home = manifest["gemset"]["gems"].empty? ? nil : manifest["gemset"]["gem_home"]
|
|
92
93
|
entries = manifest["accounts"].to_h { |a| [a["username"], @account_lookup.call(a["username"])] }
|
|
93
94
|
executors = target_executors(manifest, entries)
|
|
94
95
|
|
|
@@ -264,6 +265,13 @@ module Ace
|
|
|
264
265
|
# Match the executor's resolver: installed mode always resolves the
|
|
265
266
|
# installed launcher, and root never executes repository binstubs.
|
|
266
267
|
def nav_binary(project_root)
|
|
268
|
+
if @runtime_gem_home
|
|
269
|
+
launcher = File.join(@runtime_gem_home, "bin", "ace-nav")
|
|
270
|
+
unless File.executable?(launcher)
|
|
271
|
+
raise Ace::Support::Cli::Toolchain::Error, "target runtime ace-nav launcher unavailable: #{launcher}"
|
|
272
|
+
end
|
|
273
|
+
return launcher
|
|
274
|
+
end
|
|
267
275
|
return Ace::Support::Cli::Toolchain.executable("ace-nav") if Ace::Support::Cli::Toolchain.installed?
|
|
268
276
|
|
|
269
277
|
binstub = File.join(project_root, "bin", "ace-nav")
|
|
@@ -271,8 +279,19 @@ module Ace
|
|
|
271
279
|
use_binstub ? binstub : "ace-nav"
|
|
272
280
|
end
|
|
273
281
|
|
|
282
|
+
def nav_environment
|
|
283
|
+
return Ace::Support::Cli::Toolchain.child_environment unless @runtime_gem_home
|
|
284
|
+
|
|
285
|
+
ENV.keys.grep(/\ABUNDLER?_/).to_h { |key| [key, nil] }.merge(
|
|
286
|
+
"RUBYOPT" => nil, "RUBYLIB" => nil, "ACE_TOOLCHAIN" => "installed",
|
|
287
|
+
"GEM_HOME" => @runtime_gem_home, "GEM_PATH" => @runtime_gem_home,
|
|
288
|
+
"PATH" => [File.dirname(Gem.ruby), File.join(@runtime_gem_home, "bin"),
|
|
289
|
+
ENV.fetch("PATH", "")].join(File::PATH_SEPARATOR)
|
|
290
|
+
)
|
|
291
|
+
end
|
|
292
|
+
|
|
274
293
|
def run_nav(argv, cwd)
|
|
275
|
-
out, err, status = Open3.capture3(
|
|
294
|
+
out, err, status = Open3.capture3(nav_environment, *argv, chdir: cwd)
|
|
276
295
|
{"status" => status.success? ? "ok" : (status.exitstatus || "signal #{status.termsig}"),
|
|
277
296
|
"out" => out, "err" => err}
|
|
278
297
|
rescue Errno::ENOENT
|
data/lib/ace/lab/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ace-lab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.16.
|
|
4
|
+
version: 0.16.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michal Czyz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-11-
|
|
10
|
+
date: 2026-11-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|