From 20c106df2dd8b83c897c5a202ed335a6f560f918 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 21 Oct 2024 20:32:18 +0200 Subject: [PATCH] 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..daa075501d1 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 Gem::Platform::WINDOWS.include?(spec.platform) || Gem::Platform::WINDOWS.any? { |p| Gem::Platform.match(p) } # 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') + else + # don't depend on syslog on jruby, it requires extensions + spec.add_runtime_dependency('syslog', '~> 0.1.2') unless JAVA end end