Skip to content

Conversation

jgiannuzzi
Copy link
Member

Instead of having multiple builds with and without `libsasl2` on Linux,
one of which cannot be redistributed within Python wheels, we use
`dlopen` to load `libsasl2` at runtime on Unix.
The SASL GSSAPI mechanism availability is thus checked at runtime.
Because of differences in soname ABI bumps between Debian-based and
RPM-based distros, the previous SASL builds did not work on Debian-based
systems. This is also solved in this change, by probing the various
known names for `libsasl2`.
Copy link

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 🚀

Comment on lines +86 to +104
typedef struct sasl_secret {
unsigned long len;
unsigned char data[1];
} sasl_secret_t;

typedef struct sasl_callback {
unsigned long id;
int (*proc)(void);
void *context;
} sasl_callback_t;

typedef struct sasl_interact {
unsigned long id;
const char *challenge;
const char *prompt;
const char *defresult;
const void *result;
unsigned len;
} sasl_interact_t;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified that the original structs do not have a packed attribute, so the layout of these copied structs should be the same.

@jgiannuzzi jgiannuzzi merged commit 32edec8 into G-Research:2.11.0-gr Aug 15, 2025
28 of 30 checks passed
@jgiannuzzi jgiannuzzi deleted the hotfix/libsasl2_dlopen branch August 15, 2025 06:51
jgiannuzzi added a commit to G-Research/confluent-kafka-python that referenced this pull request Aug 15, 2025
- Hotfix: use system-provided cyrus-sasl/libsasl2 at runtime
  - revert previous approach for universal build that is now obsoleted by G-Research/librdkafka#9
  - use `librdkafka.redist` version `2.11.0.1-RC1`
- CI: build linux arm64 wheels too
- CI: check version consistency
- Bump version to `2.11.0.1-RC1+gr`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants