From c64829f091ce6fc10483b0e64616376facd15d36 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 21 Oct 2024 20:34:54 +0200 Subject: [PATCH 1/2] Add ostruct as runtime dependency The ostruct gem moves from default gems to a normal gem in Ruby 3.5. It raises the following warning on Ruby 3.3.5: ``` lib/puppet/util/command_line.rb:14: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. ``` --- puppet.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/puppet.gemspec b/puppet.gemspec index ed1944f5965..4b922adb31f 100644 --- a/puppet.gemspec +++ b/puppet.gemspec @@ -30,6 +30,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency('puppet-resource_api', '~> 1.5') spec.add_runtime_dependency('scanf', '~> 1.0') spec.add_runtime_dependency('semantic_puppet', '~> 1.0') + spec.add_runtime_dependency('ostruct', '~> 0.6.0') platform = spec.platform.to_s if platform == 'universal-darwin' From 231a89edfb87df07ee783f19104352017afc801a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 21 Oct 2024 20:32:18 +0200 Subject: [PATCH 2/2] Add syslog as runtime dependency The syslog gem moves from default gems to a normal gem in Ruby 3.4. It raises the following warning on Ruby 3.3.5: ``` lib/puppet/util/command_line.rb:14: warning: syslog was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0. You can add syslog to your Gemfile or gemspec to silence this warning. ``` --- Gemfile | 1 - puppet.gemspec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 366b326c390..4ac7e39bf85 100644 --- a/Gemfile +++ b/Gemfile @@ -35,7 +35,6 @@ group(:features) do # requires native ldap headers/libs # gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby] gem 'puppetserver-ca', '~> 2.0', require: false - gem 'syslog', '~> 0.1.1', require: false, platforms: [:ruby] gem 'CFPropertyList', ['>= 3.0.6', '< 4'], require: false end diff --git a/puppet.gemspec b/puppet.gemspec index 4b922adb31f..78d4d092f70 100644 --- a/puppet.gemspec +++ b/puppet.gemspec @@ -37,9 +37,12 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency('CFPropertyList', ['>= 3.0.6', '< 4']) end - if platform == 'x64-mingw32' || platform == 'x86-mingw32' + if (platform == 'x64-mingw32' || platform == 'x86-mingw32') || Gem.win_platform? # ffi 1.16.0 - 1.16.2 are broken on Windows spec.add_runtime_dependency('ffi', '>= 1.15.5', '< 1.17.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2') spec.add_runtime_dependency('minitar', '~> 0.9') + elsif !Gem.java_platform? + # don't depend on syslog on jruby, it requires extensions + spec.add_runtime_dependency('syslog', '~> 0.1.2') end end