ace-lab 0.16.1 → 0.16.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43544cb9d29837137b78875a858a4e81d99390c8d976cf6e4766093ea2f39eed
4
- data.tar.gz: b59622ae6c163d57d5c5a0b826f2e132e70aaae4e18d413f1ebb9125cc92a548
3
+ metadata.gz: 59e9a71fd2aca6e0e830fa27a018ce5fa98ec6425dc16b9e173697753aa1b61f
4
+ data.tar.gz: 2ab5294e49ea83a6eba1703370e683c248c6d140d1721c4c8b76b6481399538f
5
5
  SHA512:
6
- metadata.gz: 4f09c451fe9d17ef50af343b85dea1d64ff57cb51a874f74a3f88168b293cdb1d6ab3ec6d460b440773209e1ac28c17b41def498baec5ddff3adf4143d8ba1c3
7
- data.tar.gz: 506e6c17dbce6fbbb8361faecad76918d17e48588cd4d4beadc83eb153b6146e4fa9d51c4e039bf04a06bd43b9b305ef5d50fc808dcfa8063820634f8e68ec34
6
+ metadata.gz: 672d4bedbd558125d2f14c8c13bcc62d2c4b9653e1eca3c726155d0db7fca78260465bb8c188fbed2a52185b546780e8ec3a871533ab90b780c4c92b19881f12
7
+ data.tar.gz: 6afe8fa7d8d110a5876b6af237b2a88eff6fa2ad9fc2b2401aab40aa0b22c109f2a71e7909ce11ca50e295781dc1785c5e990d95af7f9576c298dcfad3807c95
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.16.2] - 2026-11-15
11
+
12
+ ### Fixed
13
+
14
+ - Normalize shared runtime file permissions so unprivileged agents can read gems shipped with private source modes; never follow packaged symlinks.
15
+ - Generate the runtime Gemfile with the RubyGems source URI instead of its object representation, allowing fresh bundle installation.
16
+
10
17
  ## [0.16.1] - 2026-11-12
11
18
 
12
19
  ### 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 `ace-lab install` once. To rerun
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
@@ -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
- install_entrypoints(gem_home, runtime["bin_dir"]) unless failure
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ace
4
4
  module Lab
5
- VERSION = "0.16.1"
5
+ VERSION = "0.16.2"
6
6
  end
7
7
  end
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.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-11-12 00:00:00.000000000 Z
10
+ date: 2026-11-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler