Repository navigation
Package plugin releases as flat shared libraries - #12
Merged
Merged
Conversation
The release tar step was publishing the whole CMake target directory, so Windows artifacts included project files, object files, and import libraries. Stage only runtime shared libraries, and add a vcpkg DLL only when a staged binary imports it. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
Stage each plugin with install(RUNTIME_DEPENDENCY_SET) and tar the plugin-runtime component so the archive is a flat set of shared libraries without CMake or import-library files. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
Search OpenSSL and vcpkg for shared libraries the plugin imports, and stop dropping Homebrew and /usr copies of those libraries. Keep the C/C++ runtime on the host, and point bundled ELF and Mach-O dependencies at the flat directory. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
Set /MT before project() so FetchContent dependencies use the same CRT, and select the Windows static vcpkg triplet so curl, the AWS SDK, Azure AMQP, and Kafka's OpenSSL match it. Unix Kafka links PIC OpenSSL statically and keeps zlib, zstd, and Cyrus SASL shared. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
Distro libz.a and libzstd.a are not position-independent, so Linux packages were shipping those shared libraries. FetchContent now builds both into the plugin. libsasl2, and the libcrypto it imports, stay shared because Cyrus SASL loads mechanism modules at runtime. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
The install() override split bracket arguments on semicolons, so the generated cmake_install.cmake no longer parsed. librdkafka's export is removed in the fetched sources instead. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
Client READMEs now state that each archive is the plugin library, with /MT on Windows and static third-party libraries elsewhere. Linux Kafka still ships libsasl2. Each plugin's gateway JSON is in the root README, and the Pub/Sub client config is inlined from the sample. Co-authored-by: Michał Komor <michalkomorsdn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release archives stay flat shared libraries, installed by
graftcode_install_plugin(RUNTIME_DEPENDENCY_SET). There is no Python packager.Third-party libraries are linked into the plugin wherever that is safe:
cmake/StaticPluginRuntime.cmakesets the MSVC CRT to/MT(Debug/MTd) beforeproject(), so FetchContent dependencies use the same runtime. It also selects the static vcpkg triplet (x64-windows-static,arm64-windows-static, orx86-windows-static) unless one is already set. curl, OpenSSL, the AWS SDK, and Azure AMQP are then static/MTlibraries.ucrtbase.dlland Win32 system libraries stay on the host. Users do not need the VC++ Redistributable.v1.3.1and zstdv1.5.6are FetchContent static libraries built with position-independent code. OpenSSL is static: PIClibssl.a/libcrypto.aon Linux and macOS, and the vcpkg static triplet on Windows. librdkafka's libcurl OIDC helper is off.Shared library that remains, and why:
libsasl2.so.2loads Cyrus SASL mechanism modules at runtime. A staticlibsasl2.awould still need those modules from the host. On the Ubuntu 22.04 release runners that library did not importlibcrypto, so it is not in those archives. If the build machine'slibsasl2does importlibcrypto.so.3, the package step copies that file too. The plugin's own TLS uses static OpenSSL.macOS Kafka packaging is fixed. An
install()override had splitinstall(CODE)on semicolons and wrote acmake_install.cmakethat did not parse. librdkafka'sinstall(EXPORT)is removed in the fetched sources instead.The root README and each plugin Readme describe that packaging for client distros. The root README includes a gateway
--configexample for every plugin, taken from the plugin Readmes and samples. The Pub/Sub clientGraftConfigJSON is inlined fromsamples/pubsub/graftConfig.pubsub.example.json.Shared Plugin Release for
795ae84is green (30 build jobs). Each archive contains:macos-14) / x64 (macos-26-intel)libRabbitmqPlugin.solibRabbitmqPlugin.dylibRabbitmqPlugin.dlllibKafkaPlugin.so,libsasl2.so.2,libsasl2.so.2.0.25libKafkaPlugin.dylibKafkaPlugin.dlllibPubSubPlugin.solibPubSubPlugin.dylibPubSubPlugin.dlllibSqsPlugin.solibSqsPlugin.dylibSqsPlugin.dlllibServiceBusPlugin.solibServiceBusPlugin.dylibServiceBusPlugin.dllWhat to copy
The plugin library. On Linux Kafka, also copy
libsasl2.so.2andlibsasl2.so.2.0.25from the same archive. No VC++ Redistributable on Windows.