libdatadog 6.0.0.1.0-x86_64-linux → 6.0.0.2.0-x86_64-linux

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: 8c86d5cb95105ea3a8dc1f1ed3aa5d5f92af7bfb6e7c15a07e33432c12e0d1c1
4
- data.tar.gz: 23ed74c884e40ba554bbbb37563a6f3fa808bc0a7db61b55cce9754bca561b58
3
+ metadata.gz: 64b9e6840230ef0378e41a9d8be765a4b20916e2c7418c6f398653f20c17b806
4
+ data.tar.gz: 293007bed91ec67a43ae6fbff0bee38fce9719b3da14139613f87dfd0f12d258
5
5
  SHA512:
6
- metadata.gz: 3d81da56a948b628a1a101553e89feeccb7b2720016960731eb2489e659ec47676210b0ac29e4fef650c8beac37e07d6112d3ff85784352eacc359008b2da7ca
7
- data.tar.gz: 64c9c486919fdb7bab52c127e97c2fc5ac61d30e32c431d54000834d87023e02d8eb8b12a538e4ef63f0710cedb6d218180d909ec86098df7f5c69e22903495f
6
+ metadata.gz: 78cfdda3da0c0fe3e34f93c77d95766de0ba9a13e6ef1a5d6d1ae812e889eb7dbad40b7c80d7e350fa4fdc3bfc35ac1dbd20bbd49f79ecf4975b44747032e487
7
+ data.tar.gz: e70e533263441e6524378d4daa05e646991920aea4ec20170fbdd085f0039743f5479b0121a8a57c1c075e2bc2d86e5283fe274cbc708fd791ad3ea77e9932c3
@@ -4,7 +4,7 @@ module Libdatadog
4
4
  # Current libdatadog version
5
5
  LIB_VERSION = "6.0.0"
6
6
 
7
- GEM_MAJOR_VERSION = "1"
7
+ GEM_MAJOR_VERSION = "2"
8
8
  GEM_MINOR_VERSION = "0"
9
9
  GEM_PRERELEASE_VERSION = "" # remember to include dot prefix, if needed!
10
10
  private_constant :GEM_MAJOR_VERSION, :GEM_MINOR_VERSION, :GEM_PRERELEASE_VERSION
data/lib/libdatadog.rb CHANGED
@@ -9,24 +9,7 @@ module Libdatadog
9
9
  end
10
10
 
11
11
  def self.pkgconfig_folder(pkgconfig_file_name = "datadog_profiling_with_rpath.pc")
12
- current_platform = Gem::Platform.local.to_s
13
-
14
- if RbConfig::CONFIG["arch"].include?("-musl") && !current_platform.include?("-musl")
15
- # Fix/workaround for https://github.com/DataDog/dd-trace-rb/issues/2222
16
- #
17
- # Old versions of rubygems (for instance 3.0.3) don't properly detect alternative libc implementations on Linux;
18
- # in particular for our case, they don't detect musl. (For reference, Rubies older than 2.7 may have shipped with
19
- # an affected version of rubygems).
20
- # In such cases, we fall back to use RbConfig::CONFIG['arch'] instead.
21
- #
22
- # Why not use RbConfig::CONFIG['arch'] always? Because Gem::Platform.local.to_s does some normalization we want
23
- # in other situations -- for instance, it turns `x86_64-linux-gnu` to `x86_64-linux`. So for now we only add this
24
- # workaround in a specific situation where we actually know it is wrong.
25
- #
26
- # See also https://github.com/rubygems/rubygems/pull/2922 and https://github.com/rubygems/rubygems/pull/4082
27
-
28
- current_platform = RbConfig::CONFIG["arch"]
29
- end
12
+ current_platform = self.current_platform
30
13
 
31
14
  return unless available_binaries.include?(current_platform)
32
15
 
@@ -40,4 +23,37 @@ module Libdatadog
40
23
  private_class_method def self.vendor_directory
41
24
  ENV["LIBDATADOG_VENDOR_OVERRIDE"] || "#{__dir__}/../vendor/libdatadog-#{Libdatadog::LIB_VERSION}/"
42
25
  end
26
+
27
+ def self.current_platform
28
+ platform = Gem::Platform.local.to_s
29
+
30
+ if platform.end_with?("-gnu")
31
+ # In some cases on Linux with glibc the platform includes a -gnu suffix. We normalize it to not have the suffix.
32
+ #
33
+ # Note: This should be platform = platform.delete_suffix("-gnu") but it doesn't work on legacy Rubies; once
34
+ # dd-trace-rb 2.0 is out we can simplify this.
35
+ #
36
+ platform = platform[0..-5]
37
+ end
38
+
39
+ if RbConfig::CONFIG["arch"].include?("-musl") && !platform.include?("-musl")
40
+ # Fix/workaround for https://github.com/datadog/dd-trace-rb/issues/2222
41
+ #
42
+ # Old versions of rubygems (for instance 3.0.3) don't properly detect alternative libc implementations on Linux;
43
+ # in particular for our case, they don't detect musl. (For reference, Rubies older than 2.7 may have shipped with
44
+ # an affected version of rubygems).
45
+ # In such cases, we fall back to use RbConfig::CONFIG['arch'] instead.
46
+ #
47
+ # Why not use RbConfig::CONFIG['arch'] always? Because Gem::Platform.local.to_s does some normalization that seemed
48
+ # useful in the past, although part of it got removed in https://github.com/rubygems/rubygems/pull/5852.
49
+ # For now we only add this workaround in a specific situation where we actually know it is wrong, but in the
50
+ # future it may be worth re-evaluating if we should move away from `Gem::Platform` altogether.
51
+ #
52
+ # See also https://github.com/rubygems/rubygems/pull/2922 and https://github.com/rubygems/rubygems/pull/4082
53
+
54
+ RbConfig::CONFIG["arch"]
55
+ else
56
+ platform
57
+ end
58
+ end
43
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libdatadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.1.0
4
+ version: 6.0.0.2.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-12 00:00:00.000000000 Z
11
+ date: 2024-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: libdatadog is a Rust-based utility library for Datadog's ddtrace gem.
14
14
  email: