Skip to content

Commit

Permalink
sysutils/puppet7: Fix build with rubygem-concurrent-ruby 1.2.0+
Browse files Browse the repository at this point in the history
- Bump PORTREVISION for package change

Use ThreadLocalVar instead of RubyThreadLocalVar which was removed in 1.2.0.
RubyThreadLocalVar is a private class and an implementation detail.

Reference:	ruby-concurrency/concurrent-ruby#988
		ruby-concurrency/concurrent-ruby#986
		puppetlabs/puppet@9182bc3
  • Loading branch information
sunpoet committed Feb 5, 2023
1 parent 347b5b8 commit 9b4522c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/puppet7/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= puppet
PORTVERSION= 7.21.0
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= https://forge.puppet.com/v3/files/:forge
PKGNAMESUFFIX= 7
Expand Down
13 changes: 13 additions & 0 deletions sysutils/puppet7/files/patch-lib_puppet_thread__local.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Reference: https://github.com/ruby-concurrency/concurrent-ruby/pull/988
https://github.com/ruby-concurrency/concurrent-ruby/issues/986
https://github.com/puppetlabs/puppet/commit/9182bc3dd2576f409a6d01fb5c08d392670e90a2

--- lib/puppet/thread_local.rb.orig 2022-12-02 03:58:03 UTC
+++ lib/puppet/thread_local.rb
@@ -3,5 +3,5 @@ require 'concurrent'
# We want to use the pure Ruby implementation even on JRuby. If we use the Java
# implementation of ThreadLocal, we end up leaking references to JRuby instances
# and preventing them from being garbage collected.
-class Puppet::ThreadLocal < Concurrent::RubyThreadLocalVar
+class Puppet::ThreadLocal < Concurrent::ThreadLocalVar
end

0 comments on commit 9b4522c

Please sign in to comment.