karafka-rdkafka 0.13.9 → 0.13.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c954a06b4461885d7648e8081d0426ebb895a82f1a27607f2224fc9e60843574
4
- data.tar.gz: a25bf01b430920c7fd2cf22b0dd23ea1de9dd15d1b45f614025e97a3b725f8f3
3
+ metadata.gz: a78b060310c1f99afc9955f17d3a2fe92d5252cc7aec870c3fa34b20e543385b
4
+ data.tar.gz: 5714200f1cc64e0b1b7f4f5118f5a10010055ceb1232986fee4caae952199c44
5
5
  SHA512:
6
- metadata.gz: afe480fedbbe5dc6f055709aaf3601acb17aaaa890f1c6e7423b90263eb8fa893de0e8b9bb571e6abf1c5fc0b8df2a6be2e5de4af1de1b68414204275981246e
7
- data.tar.gz: 7bb81ff6dcbc95b018ede8bd986eda701f1f5f3bb3985684d436a38a2173f8753b01e1642780eb9ad52a65ad02e2b3b7d656c4259758c8571ef2858822384875
6
+ metadata.gz: 33338b74897b69cc42f370c57803b048bb6055617509518fba2accd705bb674b09bc311f43116669b135d8e6d5263746c40371d7935bba50e934d1254f50f4a8
7
+ data.tar.gz: 9b77936f7fa8a53474e04f79ed47e9bedba8524311da0d4bc501261508b6d5e6bf4c02a2202a9b3d41126fe98ce0d03dad5e663a9f73777cf48c4c2644ef4295
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Rdkafka Changelog
2
2
 
3
+ ## 0.13.10 (2024-07-10)
4
+ - [Fix] Switch to local release of librdkafka to mitigate its unavailability.
5
+
3
6
  ## 0.13.9 (2023-11-07)
4
7
  - [Enhancement] Expose alternative way of managing consumer events via a separate queue.
5
8
  - [Enhancement] Allow for setting `statistics_callback` as nil to reset predefined settings configured by a different gem.
Binary file
data/ext/Rakefile CHANGED
@@ -1,40 +1,67 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require File.expand_path('../../lib/rdkafka/version', __FILE__)
4
- require "mini_portile2"
5
4
  require "fileutils"
6
5
  require "open-uri"
7
6
 
8
7
  task :default => :clean do
9
- # Download and compile librdkafka
10
- recipe = MiniPortile.new("librdkafka", Rdkafka::LIBRDKAFKA_VERSION)
8
+ # For nix users, nix can't locate the file paths because the packages it's requiring aren't managed by the system but are
9
+ # managed by nix itself, so using the normal file paths doesn't work for nix users.
10
+ #
11
+ # Mini_portile causes an issue because it's dependencies are downloaded on the fly and therefore don't exist/aren't
12
+ # accessible in the nix environment
13
+ if ENV.fetch('RDKAFKA_EXT_PATH', '').empty?
14
+ # Download and compile librdkafka if RDKAFKA_EXT_PATH is not set
15
+ require "mini_portile2"
16
+ recipe = MiniPortile.new("librdkafka", Rdkafka::LIBRDKAFKA_VERSION)
11
17
 
12
- # Use default homebrew openssl if we're on mac and the directory exists
13
- # and each of flags is not empty
14
- if recipe.host&.include?("darwin") && system("which brew &> /dev/null") && Dir.exist?("#{homebrew_prefix = %x(brew --prefix openssl).strip}")
15
- ENV["CPPFLAGS"] = "-I#{homebrew_prefix}/include" unless ENV["CPPFLAGS"]
16
- ENV["LDFLAGS"] = "-L#{homebrew_prefix}/lib" unless ENV["LDFLAGS"]
17
- end
18
+ # Use default homebrew openssl if we're on mac and the directory exists
19
+ # and each of flags is not empty
20
+ if recipe.host&.include?("darwin") && system("which brew &> /dev/null") && Dir.exist?("#{homebrew_prefix = %x(brew --prefix openssl).strip}")
21
+ ENV["CPPFLAGS"] = "-I#{homebrew_prefix}/include" unless ENV["CPPFLAGS"]
22
+ ENV["LDFLAGS"] = "-L#{homebrew_prefix}/lib" unless ENV["LDFLAGS"]
23
+ end
24
+
25
+ releases = File.expand_path(File.join(File.dirname(__FILE__), '../dist'))
26
+
27
+ recipe.files << {
28
+ :url => "file://#{releases}/librdkafka_#{Rdkafka::LIBRDKAFKA_VERSION}.tar.gz",
29
+ :sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
30
+ }
31
+ recipe.configure_options = ["--host=#{recipe.host}"]
32
+
33
+ # Disable using libc regex engine in favor of the embedded one
34
+ # The default regex engine of librdkafka does not always work exactly as most of the users
35
+ # would expect, hence this flag allows for changing it to the other one
36
+ if ENV.key?('RDKAFKA_DISABLE_REGEX_EXT')
37
+ recipe.configure_options << '--disable-regex-ext'
38
+ end
18
39
 
19
- recipe.files << {
20
- :url => "https://codeload.github.com/confluentinc/librdkafka/tar.gz/v#{Rdkafka::LIBRDKAFKA_VERSION}",
21
- :sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
22
- }
23
- recipe.configure_options = ["--host=#{recipe.host}"]
24
- recipe.cook
25
- # Move dynamic library we're interested in
26
- if recipe.host.include?('darwin')
27
- from_extension = '1.dylib'
28
- to_extension = 'dylib'
40
+ recipe.cook
41
+ # Move dynamic library we're interested in
42
+ if recipe.host.include?('darwin')
43
+ from_extension = '1.dylib'
44
+ to_extension = 'dylib'
45
+ else
46
+ from_extension = 'so.1'
47
+ to_extension = 'so'
48
+ end
49
+ lib_path = File.join(File.dirname(__FILE__), "ports/#{recipe.host}/librdkafka/#{Rdkafka::LIBRDKAFKA_VERSION}/lib/librdkafka.#{from_extension}")
50
+ FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
51
+ # Cleanup files created by miniportile we don't need in the gem
52
+ FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
53
+ FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
29
54
  else
30
- from_extension = 'so.1'
31
- to_extension = 'so'
55
+ # Otherwise, copy existing libraries to ./ext
56
+ if ENV['RDKAFKA_EXT_PATH'].nil? || ENV['RDKAFKA_EXT_PATH'].empty?
57
+ raise "RDKAFKA_EXT_PATH must be set in your nix config when running under nix"
58
+ end
59
+ files = [
60
+ File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.dylib'),
61
+ File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.so')
62
+ ]
63
+ files.each { |ext| FileUtils.cp(ext, File.dirname(__FILE__)) if File.exist?(ext) }
32
64
  end
33
- lib_path = File.join(File.dirname(__FILE__), "ports/#{recipe.host}/librdkafka/#{Rdkafka::LIBRDKAFKA_VERSION}/lib/librdkafka.#{from_extension}")
34
- FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
35
- # Cleanup files created by miniportile we don't need in the gem
36
- FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
37
- FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
38
65
  end
39
66
 
40
67
  task :clean do
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.13.9"
4
+ VERSION = "0.13.10"
5
5
  LIBRDKAFKA_VERSION = "2.2.0"
6
6
  LIBRDKAFKA_SOURCE_SHA256 = "af9a820cbecbc64115629471df7c7cecd40403b6c34bfdbb9223152677a47226"
7
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-rdkafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.9
4
+ version: 0.13.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thijs Cadier
@@ -35,7 +35,7 @@ cert_chain:
35
35
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
36
36
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
37
37
  -----END CERTIFICATE-----
38
- date: 2023-11-07 00:00:00.000000000 Z
38
+ date: 2024-07-10 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: ffi
@@ -184,6 +184,7 @@ files:
184
184
  - README.md
185
185
  - Rakefile
186
186
  - certs/cert_chain.pem
187
+ - dist/librdkafka_2.2.0.tar.gz
187
188
  - docker-compose.yml
188
189
  - ext/README.md
189
190
  - ext/Rakefile
@@ -261,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
262
  - !ruby/object:Gem::Version
262
263
  version: '0'
263
264
  requirements: []
264
- rubygems_version: 3.4.19
265
+ rubygems_version: 3.5.14
265
266
  signing_key:
266
267
  specification_version: 4
267
268
  summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
metadata.gz.sig CHANGED
Binary file