karafka-rdkafka 0.20.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acb53403fae267059eac930d7e42115ada83a216a56274c1024f10c6f7b91faf
4
- data.tar.gz: a8b0c2f9077792fe9c9243a4acba3cc5c57324798ddaa8d3662b8b3a78723e7d
3
+ metadata.gz: 2cc7d855a1bd6166e7965e3b01c3be359c0234db2c2e5e67a50fce19c3faa4c3
4
+ data.tar.gz: 572729eb41f12b04b47e3fc2c4b3236a24a806029b0b68b1154d51ddb6598737
5
5
  SHA512:
6
- metadata.gz: 6a410cb25e6972d7c91ea0f7a6b135707ba4bf9d4f434a25aabbcc2830bfb29c5b9b372ea159185df53e61a6438ce3aec66033f5011b47fb8b467dc78b1cd78c
7
- data.tar.gz: ff55e9f9eb808991cfaee5a355ab580319ac42d2a19fa2a8cd3fd46ce29d55915d44877ac988a2bc98efb0a5186ae53ae78c3cfd8ff4af57cd77e010a53538ce
6
+ metadata.gz: 5daaebfe042de990fbe3aae8c7e6d35627e09a66d10b4dae6af7065681bcd35fd23409b7cbd6c704110282d2a7b21af868ec144abf709844d21726c0845fe379
7
+ data.tar.gz: c03d505104b9e4770352e18f1e5ca943142bdc8a80fb9240580d91cb7a10f3d395e7826b10b56dfb3ea0e6085d5191516f89342675385a16f614adaa7699d034
@@ -1,3 +1,37 @@
1
+ # CI Strategy: Comprehensive Testing of Build and Precompiled Flows
2
+ #
3
+ # This workflow tests both compilation-from-source and precompiled binary distribution
4
+ # strategies across multiple Ubuntu and Ruby versions to ensure broad compatibility and
5
+ # reliability.
6
+ #
7
+ # WHY WE TEST BOTH UBUNTU 22.04 AND 24.04:
8
+ # - Different system library versions (OpenSSL, zlib, libsasl2, libzstd, etc.)
9
+ # - Different GCC compiler versions that affect native extension compilation
10
+ # - Different glibc versions that can impact binary compatibility
11
+ # - Real-world deployment scenarios where users run on various Ubuntu LTS versions
12
+ # - Different Ruby versions
13
+ #
14
+ # COMPILATION FLOW (build_install + specs_install):
15
+ # - Tests that librdkafka compiles correctly from source on each Ubuntu version
16
+ # - Validates that mini_portile2 can successfully build native dependencies
17
+ # - Ensures Ruby native extensions link properly with system libraries
18
+ # - Verifies that the same codebase works across different toolchain versions
19
+ #
20
+ # PRECOMPILED FLOW (build_precompiled + specs_precompiled):
21
+ # - Tests our precompiled static libraries work on different Ubuntu versions
22
+ # - Validates that statically-linked binaries are truly portable across environments
23
+ # - Ensures precompiled libraries don't have unexpected system dependencies
24
+ # - Verifies that removing build tools doesn't break precompiled binary usage
25
+ #
26
+ # ARTIFACT ISOLATION:
27
+ # - Each Ubuntu version gets separate artifacts (rdkafka-built-gem-22.04, etc.)
28
+ # - Prevents cross-contamination of OS-specific compiled extensions
29
+ # - Ensures test accuracy by matching build and test environments
30
+ #
31
+ # This comprehensive approach catches issues that single-platform testing would miss,
32
+ # such as system library incompatibilities, compiler-specific bugs, or static linking
33
+ # problems that only manifest on specific Ubuntu versions.
34
+
1
35
  name: CI Linux x86_64 GNU
2
36
 
3
37
  concurrency:
@@ -20,41 +54,8 @@ env:
20
54
  BUNDLE_JOBS: 4
21
55
 
22
56
  jobs:
23
- build_install:
24
- timeout-minutes: 30
25
- runs-on: ubuntu-latest
26
- steps:
27
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28
- with:
29
- fetch-depth: 0
30
- - name: Install package dependencies
31
- run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
32
- - name: Set up Ruby
33
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
34
- with:
35
- ruby-version: '3.4' # Use one Ruby version for building
36
- bundler-cache: false
37
- - name: Build gem with mini_portile
38
- run: |
39
- set -e
40
- bundle install
41
- cd ext && bundle exec rake
42
- cd ..
43
- - name: Upload built gem and bundle
44
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45
- with:
46
- name: rdkafka-built-gem
47
- path: |
48
- vendor/bundle/
49
- .bundle/
50
- ext/
51
- lib/
52
- retention-days: 1
53
-
54
57
  specs_install:
55
58
  timeout-minutes: 30
56
- runs-on: ubuntu-latest
57
- needs: build_install
58
59
  strategy:
59
60
  fail-fast: false
60
61
  matrix:
@@ -65,20 +66,17 @@ jobs:
65
66
  - '3.2'
66
67
  - '3.1'
67
68
  - 'jruby-10.0'
69
+ ubuntu-version: ['22.04', '24.04']
68
70
  include:
69
71
  - ruby: '3.4'
70
72
  coverage: 'true'
71
73
  - ruby: 'jruby-10.0'
72
74
  continue-on-error: true
75
+ runs-on: ubuntu-${{ matrix.ubuntu-version }}
73
76
  steps:
74
77
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75
78
  with:
76
79
  fetch-depth: 0
77
- - name: Download built gem
78
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
79
- with:
80
- name: rdkafka-built-gem
81
- path: ./
82
80
  - name: Set up Ruby
83
81
  uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
84
82
  with:
@@ -108,12 +106,17 @@ jobs:
108
106
  echo "Sleeping 2 seconds..."
109
107
  sleep 2
110
108
  done
111
- - name: Install remaining dependencies
109
+ - name: Install dependencies
112
110
  env:
113
111
  RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
114
112
  run: |
115
113
  # Only install gems that aren't Ruby-version specific
116
114
  bundle install
115
+ - name: Build gem with mini_portile
116
+ run: |
117
+ set -e
118
+ cd ext && bundle exec rake
119
+ cd ..
117
120
  - name: Run all specs
118
121
  env:
119
122
  GITHUB_COVERAGE: ${{matrix.coverage}}
@@ -124,7 +127,10 @@ jobs:
124
127
 
125
128
  build_precompiled:
126
129
  timeout-minutes: 30
127
- runs-on: ubuntu-latest
130
+ # We precompile on older Ubuntu and check compatibility by running specs since we aim to
131
+ # release only one precompiled version for all supported Ubuntu versions
132
+ # This is why we do not want Renovate to update it automatically
133
+ runs-on: ubuntu-22.04 # renovate: ignore
128
134
  steps:
129
135
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
130
136
  with:
@@ -135,15 +141,29 @@ jobs:
135
141
  sudo apt-get install -y --no-install-recommends \
136
142
  build-essential \
137
143
  gcc \
144
+ g++ \
138
145
  make \
139
- patch \
140
146
  tar \
147
+ gzip \
141
148
  wget \
149
+ curl \
150
+ file \
151
+ pkg-config \
152
+ autoconf \
153
+ automake \
154
+ libtool \
155
+ python3 \
156
+ git \
142
157
  ca-certificates \
158
+ patch \
143
159
  libsasl2-dev \
144
160
  libssl-dev \
145
161
  zlib1g-dev \
146
- libzstd-dev
162
+ libzstd-dev \
163
+ bison \
164
+ flex \
165
+ perl \
166
+ binutils-dev
147
167
  - name: Cache build-tmp directory
148
168
  uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
149
169
  with:
@@ -162,7 +182,6 @@ jobs:
162
182
 
163
183
  specs_precompiled:
164
184
  timeout-minutes: 30
165
- runs-on: ubuntu-latest
166
185
  needs: build_precompiled
167
186
  strategy:
168
187
  fail-fast: false
@@ -173,9 +192,13 @@ jobs:
173
192
  - '3.3'
174
193
  - '3.2'
175
194
  - '3.1'
195
+ ubuntu-version: ['22.04', '24.04']
176
196
  include:
177
197
  - ruby: '3.4'
198
+ ubuntu-version: '24.04'
178
199
  coverage: 'true'
200
+
201
+ runs-on: ubuntu-${{ matrix.ubuntu-version }}
179
202
  steps:
180
203
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
181
204
  with:
@@ -199,7 +222,6 @@ jobs:
199
222
 
200
223
  echo "=== Container status ==="
201
224
  docker compose ps kafka
202
-
203
225
  for i in {1..30}; do
204
226
  echo "=== Attempt $i/30 ==="
205
227
 
@@ -1,3 +1,26 @@
1
+ # Why We Build and Run Without Caching Native Extensions
2
+ #
3
+ # We intentionally compile the native librdkafka library fresh in each test job
4
+ # rather than caching or pre-building it for several reasons:
5
+ #
6
+ # 1. Architecture Compatibility
7
+ # - Pre-built native libraries (.so files) are architecture-specific
8
+ # - Can cause "Exec format error" when build/runtime environments differ
9
+ # - Building in the same container guarantees compatibility
10
+ #
11
+ # 2. Container Image Variations
12
+ # - Different Ruby Alpine images may have subtle differences in:
13
+ # * Base system libraries, compiler toolchains, musl libc versions
14
+ # - These differences can cause pre-built libraries to fail at runtime
15
+ #
16
+ # 3. Simplicity and Reliability
17
+ # - Single source of truth: everything builds and runs in same environment
18
+ # - No artifact management complexity or potential upload/download failures
19
+ # - Easier debugging when issues are contained in one job
20
+ #
21
+ # Trade-offs: Slightly longer CI times (~2-3 min per job) but much more reliable
22
+ # than dealing with architecture mismatches and artifact corruption issues.
23
+
1
24
  name: CI Linux x86_64 musl
2
25
 
3
26
  concurrency:
@@ -20,70 +43,39 @@ env:
20
43
  BUNDLE_JOBS: 4
21
44
 
22
45
  jobs:
23
- build_install:
24
- timeout-minutes: 30
25
- runs-on: ubuntu-latest
26
- container:
27
- image: alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
28
- steps:
29
- - name: Install dependencies
30
- run: |
31
- apk add --no-cache git curl ca-certificates build-base linux-headers \
32
- pkgconf perl autoconf automake libtool bison flex file \
33
- ruby ruby-dev ruby-bundler bash zstd-dev zlib zlib-dev openssl-dev cyrus-sasl-dev
34
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35
- with:
36
- fetch-depth: 0
37
- - name: Configure git safe directory
38
- run: git config --global --add safe.directory /__w/karafka-rdkafka/karafka-rdkafka
39
- - name: Build gem with mini_portile
40
- run: |
41
- set -e
42
- bundle config set --local path 'vendor/bundle'
43
- bundle install
44
- cd ext && bundle exec rake
45
- cd ..
46
- - name: Upload built gem and bundle
47
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
48
- with:
49
- name: rdkafka-built-gem-musl
50
- path: |
51
- vendor/bundle/
52
- .bundle/
53
- ext/
54
- lib/
55
- retention-days: 1
56
-
57
46
  specs_install:
58
47
  timeout-minutes: 30
59
48
  runs-on: ubuntu-latest
60
- needs: build_install
61
49
  strategy:
62
50
  fail-fast: false
63
51
  matrix:
64
- ruby:
65
- - '3.4'
66
- - '3.3'
67
- - '3.2'
68
- - '3.1'
69
52
  include:
53
+ - ruby: '3.1'
54
+ alpine_version: '3.21'
55
+ - ruby: '3.2'
56
+ alpine_version: '3.21'
57
+ - ruby: '3.2'
58
+ alpine_version: '3.22'
59
+ - ruby: '3.3'
60
+ alpine_version: '3.21'
61
+ - ruby: '3.3'
62
+ alpine_version: '3.22'
63
+ - ruby: '3.4'
64
+ alpine_version: '3.21'
65
+ coverage: 'true'
70
66
  - ruby: '3.4'
67
+ alpine_version: '3.22'
71
68
  coverage: 'true'
72
69
  steps:
73
70
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74
71
  with:
75
72
  fetch-depth: 0
76
- - name: Download built gem
77
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
78
- with:
79
- name: rdkafka-built-gem-musl
80
- path: ./
73
+
81
74
  - name: Start Kafka with Docker Compose
82
75
  run: |
83
76
  docker compose up -d
84
77
  echo "Waiting for Kafka to be ready..."
85
78
  sleep 10
86
-
87
79
  for i in {1..30}; do
88
80
  if docker compose exec -T kafka kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1; then
89
81
  echo "Kafka topics command succeeded!"
@@ -91,39 +83,36 @@ jobs:
91
83
  fi
92
84
  sleep 2
93
85
  done
86
+
94
87
  - name: Run all specs
95
88
  env:
96
89
  GITHUB_COVERAGE: ${{ matrix.coverage }}
97
- RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
98
90
  run: |
99
91
  docker run --rm \
100
92
  --network host \
101
93
  -v "${{ github.workspace }}:/workspace" \
102
94
  -w /workspace \
103
95
  -e "GITHUB_COVERAGE=${{ matrix.coverage }}" \
104
- -e "RDKAFKA_EXT_PATH=/workspace/ext" \
105
- ruby:${{ matrix.ruby }}-alpine \
106
- sh -c 'apk add --no-cache git build-base linux-headers bash \
107
- cyrus-sasl \
108
- cyrus-sasl-login \
109
- cyrus-sasl-crammd5 \
110
- cyrus-sasl-digestmd5 \
111
- cyrus-sasl-gssapiv2 \
112
- cyrus-sasl-scram \
113
- krb5-libs \
114
- openssl \
115
- zlib \
116
- zlib-dev \
117
- zstd-libs && \
96
+ ruby:${{ matrix.ruby }}-alpine${{ matrix.alpine_version }} \
97
+ sh -c 'apk add --no-cache git curl ca-certificates build-base linux-headers \
98
+ pkgconf perl autoconf automake libtool bison flex file \
99
+ ruby-dev ruby-bundler bash zstd-dev zlib zlib-dev openssl-dev \
100
+ cyrus-sasl-dev cyrus-sasl cyrus-sasl-login \
101
+ cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapiv2 cyrus-sasl-scram \
102
+ krb5-libs openssl zlib zstd-libs && \
118
103
  git config --global --add safe.directory /workspace && \
119
104
  bundle config set --local path vendor/bundle && \
120
105
  bundle install && \
106
+ cd ext && bundle exec rake && \
107
+ cd .. && \
121
108
  bundle exec ruby -S rspec'
109
+
122
110
  build_precompiled:
123
111
  timeout-minutes: 45
124
112
  runs-on: ubuntu-latest
125
113
  container:
126
- image: alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
114
+ # Similar to GNU, we build on the oldest for ABI compatibility
115
+ image: alpine:3.18@sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f # renovate: ignore
127
116
  steps:
128
117
  - name: Install dependencies
129
118
  run: |
@@ -22,44 +22,8 @@ env:
22
22
  CONFLUENT_VERSION: "8.0.0"
23
23
 
24
24
  jobs:
25
- build_install:
26
- timeout-minutes: 30
27
- runs-on: macos-latest
28
- steps:
29
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30
- with:
31
- fetch-depth: 0
32
- - name: Install Bash 4+ and Kerberos
33
- run: |
34
- brew install bash
35
- brew list krb5 &>/dev/null || brew install krb5
36
- echo "/opt/homebrew/bin" >> $GITHUB_PATH
37
- - name: Set up Ruby
38
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1.245.0
39
- with:
40
- ruby-version: '3.4' # Use one Ruby version for building
41
- bundler-cache: false
42
- - name: Build gem with mini_portile
43
- run: |
44
- set -e
45
- bundle install
46
- cd ext && bundle exec rake
47
- cd ..
48
- - name: Upload built gem and bundle
49
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
50
- with:
51
- name: rdkafka-built-gem-macos
52
- path: |
53
- vendor/bundle/
54
- .bundle/
55
- ext/
56
- lib/
57
- retention-days: 1
58
-
59
25
  specs_install:
60
26
  timeout-minutes: 30
61
- runs-on: macos-latest
62
- needs: build_install
63
27
  strategy:
64
28
  fail-fast: false
65
29
  matrix:
@@ -69,18 +33,21 @@ jobs:
69
33
  - '3.3'
70
34
  - '3.2'
71
35
  - '3.1'
36
+ macos-version:
37
+ - 'macos-14' # macOS 14 Sonoma (ARM64)
38
+ - 'macos-15' # macOS 15 Sequoia (ARM64)
72
39
  include:
73
40
  - ruby: '3.4'
41
+ macos-version: 'macos-15'
74
42
  coverage: 'true'
43
+ exclude:
44
+ - ruby: '3.5.0-preview1'
45
+ macos-version: 'macos-14'
46
+ runs-on: ${{ matrix.macos-version }}
75
47
  steps:
76
48
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
77
49
  with:
78
50
  fetch-depth: 0
79
- - name: Download built gem
80
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
81
- with:
82
- name: rdkafka-built-gem-macos
83
- path: ./
84
51
  - name: Install Bash 4+ and Kerberos
85
52
  run: |
86
53
  brew install bash
@@ -153,12 +120,16 @@ jobs:
153
120
  [ $i -eq 30 ] && { echo "❌ Kafka failed to start"; exit 1; }
154
121
  sleep 2
155
122
  done
156
- - name: Install remaining dependencies
123
+ - name: Install dependencies
157
124
  env:
158
125
  RDKAFKA_EXT_PATH: ${{ github.workspace }}/ext
159
126
  run: |
160
- # Only install gems that aren't Ruby-version specific
161
127
  bundle install
128
+ - name: Build gem with mini_portile
129
+ run: |
130
+ set -e
131
+ cd ext && bundle exec rake
132
+ cd ..
162
133
  - name: Run all specs
163
134
  env:
164
135
  GITHUB_COVERAGE: ${{matrix.coverage}}
@@ -168,7 +139,7 @@ jobs:
168
139
 
169
140
  build_precompiled:
170
141
  timeout-minutes: 45
171
- runs-on: macos-latest
142
+ runs-on: macos-14
172
143
  steps:
173
144
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
174
145
  with:
@@ -196,7 +167,6 @@ jobs:
196
167
 
197
168
  specs_precompiled:
198
169
  timeout-minutes: 30
199
- runs-on: macos-latest
200
170
  needs: build_precompiled
201
171
  strategy:
202
172
  fail-fast: false
@@ -207,9 +177,17 @@ jobs:
207
177
  - '3.3'
208
178
  - '3.2'
209
179
  - '3.1'
180
+ macos-version:
181
+ - 'macos-14'
182
+ - 'macos-15'
210
183
  include:
211
184
  - ruby: '3.4'
185
+ macos-version: 'macos-15'
212
186
  coverage: 'true'
187
+ exclude:
188
+ - ruby: '3.5.0-preview1'
189
+ macos-version: 'macos-14'
190
+ runs-on: ${{ matrix.macos-version }}
213
191
  steps:
214
192
  - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
215
193
  with:
@@ -16,7 +16,8 @@ jobs:
16
16
  push:
17
17
  if: github.repository_owner == 'karafka'
18
18
  timeout-minutes: 30
19
- runs-on: ubuntu-latest
19
+ # Same as CI, we build on the oldest possible for ABI compatibility
20
+ runs-on: ubuntu-22.04 # renovate: ignore
20
21
  environment: deployment
21
22
  permissions:
22
23
  contents: write
@@ -15,7 +15,8 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  environment: deployment
17
17
  container:
18
- image: alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
18
+ # Same as CI, we build on the oldest possible for ABI compatibility
19
+ image: alpine:3.18@sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f # renovate: ignore
19
20
  steps:
20
21
  - name: Install dependencies
21
22
  run: |
@@ -44,6 +45,7 @@ jobs:
44
45
  name: librdkafka-precompiled-musl
45
46
  path: ext/
46
47
  retention-days: 1
48
+
47
49
  push:
48
50
  if: github.repository_owner == 'karafka'
49
51
  timeout-minutes: 30
@@ -16,7 +16,7 @@ jobs:
16
16
  push:
17
17
  if: github.repository_owner == 'karafka'
18
18
  timeout-minutes: 30
19
- runs-on: macos-latest
19
+ runs-on: macos-14
20
20
  environment: deployment
21
21
  permissions:
22
22
  contents: write
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Rdkafka Changelog
2
2
 
3
+ ## 0.20.1 (2025-07-17)
4
+ - [Enhancement] Drastically increase number of platforms in the integration suite
5
+ - [Fix] Support Ubuntu `22.04` and older Alpine precompiled versions
6
+ - [Fix] FFI::DynamicLibrary.load_library': Could not open library
7
+
3
8
  ## 0.20.0 (2025-07-17)
4
9
  - **[Feature]** Add precompiled `x86_64-linux-gnu` setup.
5
10
  - **[Feature]** Add precompiled `x86_64-linux-musl` setup.
@@ -285,12 +285,12 @@ file librdkafka.so
285
285
  log "Checking dependencies with ldd:"
286
286
  ldd librdkafka.so
287
287
 
288
- log "Checking for external dependencies (should only show system libraries):"
289
- EXTERNAL_DEPS=$(nm -D librdkafka.so | grep " U " | grep -v "@GLIBC" || true)
290
- if [ -n "$EXTERNAL_DEPS" ]; then
291
- error "Found external dependencies - library is not self-contained: $EXTERNAL_DEPS"
288
+ log "Checking for non-system library dependencies:"
289
+ NON_SYSTEM_DEPS=$(ldd librdkafka.so | grep -v -E "(linux-vdso|ld-linux|libc\.so|libpthread\.so|libm\.so|libdl\.so)" || true)
290
+ if [ -n "$NON_SYSTEM_DEPS" ]; then
291
+ error "Found non-system dependencies: $NON_SYSTEM_DEPS"
292
292
  else
293
- log "✅ No external dependencies found - library is self-contained!"
293
+ log "✅ Only system dependencies found - library is portable!"
294
294
  fi
295
295
 
296
296
  # Copy to output directory
@@ -40,31 +40,6 @@ Gem::Specification.new do |gem|
40
40
  gem.extensions = %w(ext/Rakefile)
41
41
  end
42
42
 
43
- if ENV['RUBY_PLATFORM']
44
- gem.platform = ENV['RUBY_PLATFORM']
45
- gem.files = `git ls-files`.split($\)
46
-
47
- # Do not include the source code for librdkafka as it should be precompiled already per
48
- # platform. Same applies to any possible patches.
49
- gem.files = gem.files.reject do |file|
50
- file.match?(%r{^dist/librdkafka-.*\.tar\.gz$}) ||
51
- file.match?(%r{^dist/patches/})
52
- end
53
-
54
- # Add the compiled extensions that exist (not in git)
55
- if File.exist?('ext/librdkafka.so')
56
- gem.files << 'ext/librdkafka.so'
57
- end
58
-
59
- if File.exist?('ext/librdkafka.dylib')
60
- gem.files << 'ext/librdkafka.dylib'
61
- end
62
- else
63
- gem.platform = Gem::Platform::RUBY
64
- gem.files = `git ls-files`.split($\)
65
- gem.extensions = %w(ext/Rakefile)
66
- end
67
-
68
43
  gem.add_dependency 'ffi', '~> 1.15'
69
44
  gem.add_dependency 'logger'
70
45
  gem.add_dependency 'mini_portile2', '~> 2.6'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.20.0"
4
+ VERSION = "0.20.1"
5
5
  LIBRDKAFKA_VERSION = "2.8.0"
6
6
  LIBRDKAFKA_SOURCE_SHA256 = "5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25"
7
7
  end
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.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thijs Cadier