From fc0646f61618a87c2d8dcd0ba7cfe15a9ec67f1a Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Fri, 5 Jan 2024 14:56:50 +0100 Subject: [PATCH 1/3] Use RUBY_PLATFORM to decide between rb-inotify and rb-kqueue This matches what modules/dhcp_isc/configuration_loader.rb does in load_programmable_settings. It then also merges into a single dhcp_isc bundler group. The rsec gem is limited to the ruby platfrom because you can't run dhcp_isc on Windows anyway. --- bundler.d/dhcp_isc.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bundler.d/dhcp_isc.rb b/bundler.d/dhcp_isc.rb index 7798a2a67..d63eb3e52 100644 --- a/bundler.d/dhcp_isc.rb +++ b/bundler.d/dhcp_isc.rb @@ -1,9 +1,5 @@ -gem 'rsec', '< 1', groups: [:dhcp_isc_inotify, :dhcp_isc_kqueue] - -group :dhcp_isc_inotify do - gem 'rb-inotify' -end - -group :dhcp_isc_kqueue do - gem 'rb-kqueue' +group :dhcp_isc do + gem 'rb-inotify', install_if: -> { RUBY_PLATFORM.match?(/linux/) } + gem 'rb-kqueue', install_if: -> { RUBY_PLATFORM.match?(/bsd/) } + gem 'rsec', '< 1', platforms: [:ruby] end From 362868eb9121f854b85408e3964444a8391514fd Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Sat, 24 Jan 2026 12:27:28 +0100 Subject: [PATCH 2/3] Limit krb5 and libvirt bundler groups to non-Windows --- bundler.d/krb5.rb | 4 ++-- bundler.d/libvirt.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundler.d/krb5.rb b/bundler.d/krb5.rb index 3bfce8a41..4f0180330 100644 --- a/bundler.d/krb5.rb +++ b/bundler.d/krb5.rb @@ -1,4 +1,4 @@ group :krb5 do - gem 'rkerberos', '>= 0.1.1' - gem 'gssapi' + gem 'rkerberos', '>= 0.1.1', platforms: [:ruby] + gem 'gssapi', platforms: [:ruby] end diff --git a/bundler.d/libvirt.rb b/bundler.d/libvirt.rb index 9dedd09b4..c8b58dfa7 100644 --- a/bundler.d/libvirt.rb +++ b/bundler.d/libvirt.rb @@ -1,3 +1,3 @@ group :libvirt do - gem 'ruby-libvirt', '>= 0.6.0' + gem 'ruby-libvirt', '>= 0.6.0', platforms: [:ruby] end From 150c302dba5888cec0a2aa3ee0ab290304799646 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Sat, 24 Jan 2026 12:27:56 +0100 Subject: [PATCH 3/3] Replace deprecated mingw and x64_mingw with windows Quoting the bundler man page: > The following platform values are deprecated and should be replaced with windows: > * mswin, mswin64, mingw32, x64_mingw Link: https://bundler.io/man/gemfile.5.html#PLATFORMS --- bundler.d/windows.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundler.d/windows.rb b/bundler.d/windows.rb index 568c0177a..426f63f8c 100644 --- a/bundler.d/windows.rb +++ b/bundler.d/windows.rb @@ -1,5 +1,5 @@ group :windows do - gem 'highline', :platforms => [:mingw, :x64_mingw] - gem 'win32-service', :platforms => [:mingw, :x64_mingw] + gem 'highline', platforms: [:windows] + gem 'win32-service', platforms: [:windows] gem 'dhcpsapi', '>= 0.0.11', '< 1.0.0' end