public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/puppet] rawhide: Fix ruby 4 issue (rhbz#246493)
Date: Thu, 04 Jun 2026 16:18:51 GMT [thread overview]
Message-ID: <178058993166.1.5031470547825481953.rpms-puppet-0451922cc55c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/puppet
Branch : rawhide
Commit : 0451922cc55cabede1d1631979b06b70cd269cae
Author : Terje Røsten <terjeros@gmail.com>
Date : 2026-05-10T12:59:54+02:00
Stats : +104/-4 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/puppet/c/0451922cc55cabede1d1631979b06b70cd269cae?branch=rawhide
Log:
Fix ruby 4 issue (rhbz#246493)
---
diff --git a/0001-Ruby-4-fixes-from-OpenVox.patch b/0001-Ruby-4-fixes-from-OpenVox.patch
new file mode 100644
index 0000000..66dbbde
--- /dev/null
+++ b/0001-Ruby-4-fixes-from-OpenVox.patch
@@ -0,0 +1,87 @@
+From 4f56ee5f83943a72e4e7bec5dc118bc9b969210b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terjeros@gmail.com>
+Date: Sat, 9 May 2026 11:28:45 +0200
+Subject: [PATCH] Ruby 4 fixes from OpenVox
+
+---
+ lib/puppet/util/execution.rb | 4 ++--
+ lib/puppet/util/monkey_patches.rb | 21 +--------------------
+ lib/puppet/util/tag_set.rb | 3 ++-
+ 3 files changed, 5 insertions(+), 23 deletions(-)
+
+diff --git a/lib/puppet/util/execution.rb b/lib/puppet/util/execution.rb
+index c8673d2..171f49a 100644
+--- a/lib/puppet/util/execution.rb
++++ b/lib/puppet/util/execution.rb
+@@ -78,8 +78,8 @@ module Puppet::Util::Execution
+ # a predictable output
+ english_env = ENV.to_hash.merge({ 'LANG' => 'C', 'LC_ALL' => 'C' })
+ output = Puppet::Util.withenv(english_env) do
+- # We are intentionally using 'pipe' with open to launch a process
+- open("| #{command_str} 2>&1") do |pipe| # rubocop:disable Security/Open
++ # Use IO.popen instead of open for Ruby 4 compatibility
++ IO.popen("#{command_str} 2>&1", "r") do |pipe|
+ yield pipe
+ end
+ end
+diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
+index 0f72188..51d7260 100644
+--- a/lib/puppet/util/monkey_patches.rb
++++ b/lib/puppet/util/monkey_patches.rb
+@@ -22,15 +22,6 @@ module RDoc
+ end
+ end
+
+-class Object
+- # ActiveSupport 2.3.x mixes in a dangerous method
+- # that can cause rspec to fork bomb
+- # and other strange things like that.
+- def daemonize
+- raise NotImplementedError, "Kernel.daemonize is too dangerous, please don't try to use it."
+- end
+-end
+-
+ unless Dir.singleton_methods.include?(:exists?)
+ class Dir
+ def self.exists?(file_name)
+@@ -52,22 +43,12 @@ end
+ require_relative '../../puppet/ssl/openssl_loader'
+ unless Puppet::Util::Platform.jruby_fips?
+ class OpenSSL::SSL::SSLContext
+- if DEFAULT_PARAMS[:options]
+- DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv3
+- else
+- DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_NO_SSLv3
+- end
+-
+ alias __original_initialize initialize
+ private :__original_initialize
+
+ def initialize(*args)
+ __original_initialize(*args)
+- params = {
+- :options => DEFAULT_PARAMS[:options],
+- :ciphers => DEFAULT_PARAMS[:ciphers],
+- }
+- set_params(params)
++ set_params
+ end
+ end
+ end
+diff --git a/lib/puppet/util/tag_set.rb b/lib/puppet/util/tag_set.rb
+index 6bc09db..2ec1d19 100644
+--- a/lib/puppet/util/tag_set.rb
++++ b/lib/puppet/util/tag_set.rb
+@@ -11,7 +11,8 @@ class Puppet::Util::TagSet < Set
+ end
+
+ def to_yaml
+- @hash.keys.to_yaml
++ # Ruby 4 changed Set's internal structure, use to_a instead of @hash.keys
++ to_a.to_yaml
+ end
+
+ def self.from_data_hash(data)
+--
+2.54.0
+
diff --git a/puppet.spec b/puppet.spec
index 3d7b6a9..a2ef08f 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -4,13 +4,14 @@
Name: puppet
Version: 8.10.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Network tool for managing many disparate systems
License: Apache-2.0
URL: https://puppet.com
Source0: https://downloads.puppetlabs.com/puppet/%{name}-%{version}.tar.gz
Source1: https://downloads.puppetlabs.com/puppet/%{name}-%{version}.tar.gz.asc
Source2: RPM-GPG-KEY-puppet-20250406
+Patch: 0001-Ruby-4-fixes-from-OpenVox.patch
# Get these by checking out the right tag from https://github.com/puppetlabs/puppet-agent and:
# sed 's|.\+puppetlabs/\([a-z_-]\+\).git.\+tags/v\?\([0-9\.]\+\)"}|https://forge.puppet.com/v3/files/\1-\2.tar.gz|' configs/components/module-puppetlabs-*.json
Source3: https://forge.puppet.com/v3/files/puppetlabs-augeas_core-1.5.0.tar.gz
@@ -33,13 +34,17 @@ Patch: openvox-dnf5.patch
BuildArch: noarch
# ruby-devel does not require the base package, but requires -libs instead
+BuildRequires: facter
+BuildRequires: gnupg2
+BuildRequires: hiera
BuildRequires: ruby
BuildRequires: ruby-devel
+BuildRequires: rubygem(concurrent-ruby) >= 1.1.9
+BuildRequires: rubygem(deep_merge) >= 1.0
+BuildRequires: rubygem(racc)
+BuildRequires: rubygem(semantic_puppet) >= 1.0.2
BuildRequires: rubygem-json
-BuildRequires: facter
-BuildRequires: hiera
BuildRequires: systemd
-BuildRequires: gnupg2
Requires: hiera >= 3.3.1
Requires: facter >= 4.3.0
Requires: rubygem(concurrent-ruby) >= 1.1.9
@@ -146,6 +151,11 @@ echo "D %{_rundir}/%{name} 0755 %{name} %{name} -" > \
rm -r %{buildroot}%{_datadir}/%{name}/ext/{debian,osx,solaris,suse,windows,systemd,redhat}
rm %{buildroot}%{_datadir}/%{name}/ext/{build_defaults.yaml,project_data.yaml}
+%check
+# Minimal runtime check
+export RUBYLIB=%{buildroot}%{_datadir}/ruby/vendor_ruby
+%{buildroot}%{_bindir}/puppet agent --help
+
%files
%attr(-, puppet, puppet) %{_localstatedir}/log/%{name}
%attr(-, root, root) %{_datadir}/%{name}
@@ -215,6 +225,9 @@ rm %{buildroot}%{_datadir}/%{name}/ext/{build_defaults.yaml,project_data.yaml}
%systemd_postun_with_restart %{name}.service
%changelog
+* Sat May 09 2026 Terje Rosten <terjeros@gmail.com> - 8.10.0-5
+- Fix ruby 4 issue (rhbz#246493)
+
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 8.10.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
reply other threads:[~2026-06-04 16:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178058993166.1.5031470547825481953.rpms-puppet-0451922cc55c@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox