karafka-rdkafka 0.21.0-x86_64-linux-gnu → 0.22.0-x86_64-linux-gnu

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -0
  4. data/ext/librdkafka.so +0 -0
  5. data/karafka-rdkafka.gemspec +33 -6
  6. data/lib/rdkafka/version.rb +3 -3
  7. data/renovate.json +5 -17
  8. metadata +2 -67
  9. data/.github/CODEOWNERS +0 -3
  10. data/.github/FUNDING.yml +0 -1
  11. data/.github/workflows/ci_linux_alpine_x86_64_musl.yml +0 -197
  12. data/.github/workflows/ci_linux_alpine_x86_64_musl_complementary.yml +0 -264
  13. data/.github/workflows/ci_linux_debian_x86_64_gnu.yml +0 -271
  14. data/.github/workflows/ci_linux_debian_x86_64_gnu_complementary.yml +0 -334
  15. data/.github/workflows/ci_linux_ubuntu_aarch64_gnu.yml +0 -271
  16. data/.github/workflows/ci_linux_ubuntu_aarch64_gnu_complementary.yml +0 -295
  17. data/.github/workflows/ci_linux_ubuntu_x86_64_gnu.yml +0 -281
  18. data/.github/workflows/ci_linux_ubuntu_x86_64_gnu_complementary.yml +0 -294
  19. data/.github/workflows/ci_macos_arm64.yml +0 -284
  20. data/.github/workflows/push_linux_aarch64_gnu.yml +0 -65
  21. data/.github/workflows/push_linux_x86_64_gnu.yml +0 -65
  22. data/.github/workflows/push_linux_x86_64_musl.yml +0 -79
  23. data/.github/workflows/push_macos_arm64.yml +0 -54
  24. data/.github/workflows/push_ruby.yml +0 -37
  25. data/.github/workflows/trigger-wiki-refresh.yml +0 -30
  26. data/.github/workflows/verify-action-pins.yml +0 -16
  27. data/.gitignore +0 -16
  28. data/.rspec +0 -3
  29. data/.ruby-gemset +0 -1
  30. data/.ruby-version +0 -1
  31. data/.yardopts +0 -2
  32. data/dist/cyrus-sasl-2.1.28.tar.gz +0 -0
  33. data/dist/krb5-1.21.3.tar.gz +0 -0
  34. data/dist/openssl-3.0.16.tar.gz +0 -0
  35. data/dist/zlib-1.3.1.tar.gz +0 -0
  36. data/dist/zstd-1.5.7.tar.gz +0 -0
  37. data/ext/README.md +0 -19
  38. data/ext/Rakefile +0 -131
  39. data/ext/build_common.sh +0 -376
  40. data/ext/build_linux_aarch64_gnu.sh +0 -326
  41. data/ext/build_linux_x86_64_gnu.sh +0 -317
  42. data/ext/build_linux_x86_64_musl.sh +0 -773
  43. data/ext/build_macos_arm64.sh +0 -557
  44. data/ext/generate-ssl-certs.sh +0 -109
  45. data/spec/integrations/ssl_stress_spec.rb +0 -121
  46. data/spec/lib/rdkafka/abstract_handle_spec.rb +0 -117
  47. data/spec/lib/rdkafka/admin/create_acl_handle_spec.rb +0 -56
  48. data/spec/lib/rdkafka/admin/create_acl_report_spec.rb +0 -18
  49. data/spec/lib/rdkafka/admin/create_topic_handle_spec.rb +0 -54
  50. data/spec/lib/rdkafka/admin/create_topic_report_spec.rb +0 -16
  51. data/spec/lib/rdkafka/admin/delete_acl_handle_spec.rb +0 -85
  52. data/spec/lib/rdkafka/admin/delete_acl_report_spec.rb +0 -72
  53. data/spec/lib/rdkafka/admin/delete_topic_handle_spec.rb +0 -54
  54. data/spec/lib/rdkafka/admin/delete_topic_report_spec.rb +0 -16
  55. data/spec/lib/rdkafka/admin/describe_acl_handle_spec.rb +0 -85
  56. data/spec/lib/rdkafka/admin/describe_acl_report_spec.rb +0 -73
  57. data/spec/lib/rdkafka/admin_spec.rb +0 -982
  58. data/spec/lib/rdkafka/bindings_spec.rb +0 -198
  59. data/spec/lib/rdkafka/callbacks_spec.rb +0 -20
  60. data/spec/lib/rdkafka/config_spec.rb +0 -258
  61. data/spec/lib/rdkafka/consumer/headers_spec.rb +0 -73
  62. data/spec/lib/rdkafka/consumer/message_spec.rb +0 -139
  63. data/spec/lib/rdkafka/consumer/partition_spec.rb +0 -57
  64. data/spec/lib/rdkafka/consumer/topic_partition_list_spec.rb +0 -248
  65. data/spec/lib/rdkafka/consumer_spec.rb +0 -1343
  66. data/spec/lib/rdkafka/error_spec.rb +0 -95
  67. data/spec/lib/rdkafka/metadata_spec.rb +0 -79
  68. data/spec/lib/rdkafka/native_kafka_spec.rb +0 -130
  69. data/spec/lib/rdkafka/producer/delivery_handle_spec.rb +0 -60
  70. data/spec/lib/rdkafka/producer/delivery_report_spec.rb +0 -25
  71. data/spec/lib/rdkafka/producer/partitions_count_cache_spec.rb +0 -359
  72. data/spec/lib/rdkafka/producer_spec.rb +0 -1527
  73. data/spec/spec_helper.rb +0 -230
@@ -1,317 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Build self-contained librdkafka.so for Linux x86_64 with checksum verification
4
- # Usage: ./build-librdkafka-linux.sh
5
- #
6
- # Expected directory structure:
7
- # ext/build_linux_x86_64_gnu.sh (this script)
8
- # ext/build-common.sh (shared functions)
9
- # dist/librdkafka-*.tar.gz (librdkafka source tarball)
10
- # dist/patches/*.patch (optional Ruby-specific patches)
11
- #
12
- set -euo pipefail
13
-
14
- # Source common functions and constants
15
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
- source "$SCRIPT_DIR/build_common.sh"
17
-
18
- # Platform-specific paths
19
- DIST_DIR="$SCRIPT_DIR/../dist"
20
- PATCHES_DIR="$DIST_DIR/patches"
21
- BUILD_DIR="$(pwd)/build-tmp"
22
- DEPS_PREFIX="/tmp"
23
-
24
- # Check common dependencies
25
- check_common_dependencies
26
-
27
- # Linux-specific dependency check
28
- log "Checking Linux-specific build dependencies..."
29
- command -v gcc &> /dev/null || error "gcc not found. Install with: apt-get install build-essential"
30
-
31
- # Auto-detect librdkafka tarball
32
- log "Looking for librdkafka tarball in $DIST_DIR..."
33
- LIBRDKAFKA_TARBALL=$(find_librdkafka_tarball "$DIST_DIR")
34
- log "Found librdkafka tarball: $LIBRDKAFKA_TARBALL"
35
-
36
- # Verify librdkafka tarball checksum if available
37
- verify_librdkafka_checksum "$LIBRDKAFKA_TARBALL"
38
-
39
- # Find patches
40
- PATCHES_FOUND=()
41
- find_patches "$PATCHES_DIR" PATCHES_FOUND
42
-
43
- security_log "Starting secure build with checksum verification enabled"
44
- log "Building self-contained librdkafka.so for Linux x86_64 GNU"
45
- log "Dependencies to build:"
46
- log " - OpenSSL: $OPENSSL_VERSION"
47
- log " - Cyrus SASL: $CYRUS_SASL_VERSION"
48
- log " - MIT Kerberos: $KRB5_VERSION"
49
- log " - zlib: $ZLIB_VERSION"
50
- log " - ZStd: $ZSTD_VERSION"
51
- log "librdkafka source: $LIBRDKAFKA_TARBALL"
52
- log "Build directory: $BUILD_DIR"
53
-
54
- # Create build directory
55
- mkdir -p "$BUILD_DIR"
56
- cd "$BUILD_DIR"
57
-
58
- # Build OpenSSL
59
- log "Building OpenSSL $OPENSSL_VERSION..."
60
- OPENSSL_PREFIX="$DEPS_PREFIX/static-openssl-$OPENSSL_VERSION"
61
- OPENSSL_TARBALL="openssl-$OPENSSL_VERSION.tar.gz"
62
- OPENSSL_DIR="openssl-$OPENSSL_VERSION"
63
-
64
- secure_download "$(get_openssl_url)" "$OPENSSL_TARBALL"
65
- extract_if_needed "$OPENSSL_TARBALL" "$OPENSSL_DIR"
66
- cd "$OPENSSL_DIR"
67
-
68
- # Check if OpenSSL lib directory exists (lib or lib64)
69
- if [ ! -f "$OPENSSL_PREFIX/lib/libssl.a" ] && [ ! -f "$OPENSSL_PREFIX/lib64/libssl.a" ]; then
70
- log "Configuring and building OpenSSL..."
71
- export CFLAGS="-fPIC"
72
- ./Configure linux-x86_64 \
73
- no-shared \
74
- no-dso \
75
- --prefix="$OPENSSL_PREFIX"
76
- make clean || true
77
- make -j$(get_cpu_count)
78
- make install
79
- unset CFLAGS
80
- log "OpenSSL built successfully"
81
- else
82
- log "OpenSSL already built, skipping..."
83
- fi
84
-
85
- # Determine OpenSSL lib directory
86
- if [ -f "$OPENSSL_PREFIX/lib64/libssl.a" ]; then
87
- OPENSSL_LIB_DIR="$OPENSSL_PREFIX/lib64"
88
- else
89
- OPENSSL_LIB_DIR="$OPENSSL_PREFIX/lib"
90
- fi
91
- log "OpenSSL libraries in: $OPENSSL_LIB_DIR"
92
-
93
- cd "$BUILD_DIR"
94
-
95
- # Build MIT Kerberos (krb5)
96
- log "Building MIT Kerberos $KRB5_VERSION..."
97
- KRB5_PREFIX="$DEPS_PREFIX/static-krb5-$KRB5_VERSION"
98
- KRB5_TARBALL="krb5-$KRB5_VERSION.tar.gz"
99
- KRB5_DIR="krb5-$KRB5_VERSION"
100
-
101
- secure_download "$(get_krb5_url)" "$KRB5_TARBALL"
102
- extract_if_needed "$KRB5_TARBALL" "$KRB5_DIR"
103
- cd "$KRB5_DIR/src"
104
-
105
- if [ ! -f "$KRB5_PREFIX/lib/libgssapi_krb5.a" ]; then
106
- log "Configuring and building MIT Kerberos..."
107
- make clean 2>/dev/null || true
108
- ./configure --disable-shared --enable-static --prefix="$KRB5_PREFIX" \
109
- --without-ldap --without-tcl --without-keyutils \
110
- --disable-rpath --without-system-verto \
111
- CFLAGS="-fPIC" CXXFLAGS="-fPIC"
112
-
113
- # Build everything except the problematic kadmin tools
114
- log "Building Kerberos (will ignore kadmin build failures)..."
115
- make -j$(get_cpu_count) || {
116
- log "Full build failed (expected due to kadmin), continuing with libraries..."
117
- # The libraries should be built even if kadmin fails
118
- true
119
- }
120
-
121
- # Install what was successfully built
122
- make install || {
123
- log "Full install failed, installing individual components..."
124
- # Try to install the core libraries manually
125
- make install-mkdirs 2>/dev/null || true
126
- make -C util install 2>/dev/null || true
127
- make -C lib install 2>/dev/null || true
128
- make -C plugins/kdb/db2 install 2>/dev/null || true
129
- }
130
-
131
- # Verify we got the essential libraries
132
- if [ ! -f "$KRB5_PREFIX/lib/libgssapi_krb5.a" ]; then
133
- error "Failed to build essential Kerberos libraries"
134
- fi
135
-
136
- log "MIT Kerberos libraries built successfully"
137
- else
138
- log "MIT Kerberos already built, skipping..."
139
- fi
140
-
141
- cd "$BUILD_DIR"
142
-
143
- # Build SASL
144
- log "Building Cyrus SASL $CYRUS_SASL_VERSION..."
145
- SASL_PREFIX="$DEPS_PREFIX/static-sasl-$CYRUS_SASL_VERSION"
146
- SASL_TARBALL="cyrus-sasl-$CYRUS_SASL_VERSION.tar.gz"
147
- SASL_DIR="cyrus-sasl-$CYRUS_SASL_VERSION"
148
-
149
- secure_download "$(get_sasl_url)" "$SASL_TARBALL"
150
- extract_if_needed "$SASL_TARBALL" "$SASL_DIR"
151
- cd "$SASL_DIR"
152
-
153
- if [ ! -f "$SASL_PREFIX/lib/libsasl2.a" ]; then
154
- log "Configuring and building SASL..."
155
- make clean 2>/dev/null || true
156
- ./configure --disable-shared --enable-static --prefix="$SASL_PREFIX" \
157
- --without-dblib --disable-gdbm \
158
- --enable-gssapi="$KRB5_PREFIX" \
159
- CFLAGS="-fPIC" CXXFLAGS="-fPIC" \
160
- CPPFLAGS="-I$KRB5_PREFIX/include" \
161
- LDFLAGS="-L$KRB5_PREFIX/lib"
162
- make -j$(get_cpu_count)
163
- make install
164
- log "SASL built successfully"
165
- else
166
- log "SASL already built, skipping..."
167
- fi
168
-
169
- cd "$BUILD_DIR"
170
-
171
- # Build zlib
172
- log "Building zlib $ZLIB_VERSION..."
173
- ZLIB_PREFIX="$DEPS_PREFIX/static-zlib-$ZLIB_VERSION"
174
- ZLIB_TARBALL="zlib-$ZLIB_VERSION.tar.gz"
175
- ZLIB_DIR="zlib-$ZLIB_VERSION"
176
-
177
- secure_download "$(get_zlib_url)" "$ZLIB_TARBALL"
178
- extract_if_needed "$ZLIB_TARBALL" "$ZLIB_DIR"
179
- cd "$ZLIB_DIR"
180
-
181
- if [ ! -f "$ZLIB_PREFIX/lib/libz.a" ]; then
182
- log "Configuring and building zlib..."
183
- make clean 2>/dev/null || true
184
- export CFLAGS="-fPIC"
185
- ./configure --prefix="$ZLIB_PREFIX" --static
186
- make -j$(get_cpu_count)
187
- make install
188
- unset CFLAGS
189
- log "zlib built successfully"
190
- else
191
- log "zlib already built, skipping..."
192
- fi
193
-
194
- cd "$BUILD_DIR"
195
-
196
- # Build ZStd
197
- log "Building ZStd $ZSTD_VERSION..."
198
- ZSTD_PREFIX="$DEPS_PREFIX/static-zstd-$ZSTD_VERSION"
199
- ZSTD_TARBALL="zstd-$ZSTD_VERSION.tar.gz"
200
- ZSTD_DIR="zstd-$ZSTD_VERSION"
201
-
202
- secure_download "$(get_zstd_url)" "$ZSTD_TARBALL"
203
- extract_if_needed "$ZSTD_TARBALL" "$ZSTD_DIR"
204
- cd "$ZSTD_DIR"
205
-
206
- if [ ! -f "$ZSTD_PREFIX/lib/libzstd.a" ]; then
207
- log "Building ZStd..."
208
- make clean 2>/dev/null || true
209
- make lib-mt CFLAGS="-fPIC" PREFIX="$ZSTD_PREFIX" -j$(get_cpu_count)
210
- # Use standard install target - install-pc may not exist in all versions
211
- make install PREFIX="$ZSTD_PREFIX"
212
- log "ZStd built successfully"
213
- else
214
- log "ZStd already built, skipping..."
215
- fi
216
-
217
- cd "$BUILD_DIR"
218
-
219
- # Extract and patch librdkafka
220
- log "Extracting librdkafka..."
221
- tar xzf "$LIBRDKAFKA_TARBALL"
222
- cd "librdkafka-$LIBRDKAFKA_VERSION"
223
-
224
- # Fix permissions and apply patches
225
- fix_configure_permissions
226
- apply_patches PATCHES_FOUND
227
-
228
- # Configure librdkafka
229
- log "Configuring librdkafka..."
230
-
231
- if [ -f configure ]; then
232
- log "Using standard configure (autotools)"
233
- # Export environment variables for configure to pick up
234
- export CPPFLAGS="-I$KRB5_PREFIX/include"
235
- export LDFLAGS="-L$KRB5_PREFIX/lib"
236
-
237
- ./configure --enable-static --disable-shared --disable-curl \
238
- --enable-gssapi
239
-
240
- # Clean up environment variables
241
- unset CPPFLAGS LDFLAGS
242
- else
243
- error "No configure script found (checked: configure.self, configure)"
244
- fi
245
-
246
- # Build librdkafka
247
- log "Compiling librdkafka..."
248
- make clean || true
249
- make -j$(get_cpu_count)
250
-
251
- # Verify librdkafka.a exists
252
- if [ ! -f src/librdkafka.a ]; then
253
- error "librdkafka.a not found after build"
254
- fi
255
-
256
- log "librdkafka.a built successfully"
257
-
258
- # Create self-contained shared library
259
- log "Creating self-contained librdkafka.so..."
260
-
261
- echo '
262
- {
263
- global:
264
- rd_kafka_*;
265
- local:
266
- *;
267
- };
268
- ' > export.map
269
-
270
- gcc -shared -fPIC \
271
- -Wl,--version-script=export.map \
272
- -Wl,--whole-archive src/librdkafka.a -Wl,--no-whole-archive \
273
- -o librdkafka.so \
274
- "$SASL_PREFIX/lib/libsasl2.a" \
275
- "$KRB5_PREFIX/lib/libgssapi_krb5.a" \
276
- "$KRB5_PREFIX/lib/libkrb5.a" \
277
- "$KRB5_PREFIX/lib/libk5crypto.a" \
278
- "$KRB5_PREFIX/lib/libcom_err.a" \
279
- "$KRB5_PREFIX/lib/libkrb5support.a" \
280
- "$OPENSSL_LIB_DIR/libssl.a" \
281
- "$OPENSSL_LIB_DIR/libcrypto.a" \
282
- "$ZLIB_PREFIX/lib/libz.a" \
283
- "$ZSTD_PREFIX/lib/libzstd.a" \
284
- -lpthread -lm -ldl -lresolv
285
-
286
- if [ ! -f librdkafka.so ]; then
287
- error "Failed to create librdkafka.so"
288
- fi
289
-
290
- log "librdkafka.so created successfully"
291
-
292
- # Verify the build
293
- log "Verifying build..."
294
- file librdkafka.so
295
-
296
- log "Checking dependencies with ldd:"
297
- ldd librdkafka.so
298
-
299
- log "Checking for non-system library dependencies:"
300
- NON_SYSTEM_DEPS=$(ldd librdkafka.so | grep -v -E "(linux-vdso|ld-linux|libc\.so|libpthread\.so|libm\.so|libdl\.so)" || true)
301
- if [ -n "$NON_SYSTEM_DEPS" ]; then
302
- error "Found non-system dependencies: $NON_SYSTEM_DEPS"
303
- else
304
- log "✅ Only system dependencies found - library is portable!"
305
- fi
306
-
307
- # Copy to output directory
308
- OUTPUT_DIR="$SCRIPT_DIR"
309
- cp librdkafka.so "$OUTPUT_DIR/"
310
- log "librdkafka.so copied to: $OUTPUT_DIR/librdkafka.so"
311
-
312
- # Print summaries
313
- print_security_summary
314
- print_build_summary "Linux" "x86_64" "$OUTPUT_DIR" "librdkafka.so"
315
-
316
- # Cleanup
317
- cleanup_build_dir "$BUILD_DIR"