From c8088f4cc4165832a2fa0194d023cfbcccff8a81 Mon Sep 17 00:00:00 2001 From: Michael Harp Date: Thu, 5 Nov 2026 06:42:41 -0500 Subject: [PATCH] Hold multi_json at 1.19.1 in agent-runtime-8.x agent-runtime-8.x installs multi_json into the vendor gem directory that puppetserver also loads from. Since #288 that has been 1.21.2, which OpenVox Server 8 cannot load. The ruby platform gem has no JRuby options cache backend, and 1.20.0 and later need Ruby 3.2 while the server runs JRuby 9.4 (Ruby 3.1). From openvox-agent 8.31.1 on, `require 'multi_json'` fails on the server with a LoadError. Override the version where ruby_version is 3.2, after the section update_gems maintains. The automation keeps other projects on the latest release and does not touch the override. Fixes #333 Co-Authored-By: Claude Fable 5.1 Signed-off-by: Michael Harp --- configs/components/rubygem-multi_json.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configs/components/rubygem-multi_json.rb b/configs/components/rubygem-multi_json.rb index 3a366007..34eb466e 100644 --- a/configs/components/rubygem-multi_json.rb +++ b/configs/components/rubygem-multi_json.rb @@ -10,6 +10,19 @@ pkg.build_requires 'rubygem-concurrent-ruby' ### End automated maintenance section ### + # agent-runtime-8.x installs this gem into the vendor gem directory that + # puppetserver also loads from, under JRuby. multi_json 1.20.0 and later + # cannot be loaded there. The ruby platform gem installed here has no + # options_cache/concurrent_store.rb, which the gem requires under JRuby, and + # those releases need Ruby 3.2 while OpenVox Server 8 runs JRuby 9.4 (Ruby 3.1). + # Hold the Ruby 3.2 runtime at 1.19.1, the last release that loads on both. + # Other projects follow the version maintained above. + # https://github.com/OpenVoxProject/puppet-runtime/issues/333 + if settings[:ruby_version] == '3.2' + pkg.version '1.19.1' + pkg.sha256sum '7aefeff8f2c854bf739931a238e4aea64592845e0c0395c8a7d2eea7fdd631b7' + end + instance_eval File.read('configs/components/_base-rubygem.rb') # Overwrite the base rubygem's default GEM_HOME with the vendor gem directory