apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.54k stars 467 forks source link

Allow usage of shared libraries during build / make Linux packaging easier #2432

Open der-eismann opened 3 months ago

der-eismann commented 3 months ago

Search before asking

Motivation

While the primary use case of kvrocks lies in containerized environments, it would be great to make it easier to use in normal OS environments. One way would be to provide RPM & DEB files, but in https://github.com/apache/kvrocks/discussions/1152#discussioncomment-4297513 it was made clear that this won't happen, which is okay. But the only alternatives are OS packages (which are only provided by Arch AUR at this point) or building binaries yourself, which could be an obstacle for some.

My main issue with the build process is that all needed libraries are downloaded and built as static libraries, this is usually a no-go for Linux packagers. For some things like RocksDB it probably makes sense to use a pinned version, but zstd and snappy should be easy targets to use dynamically.

Solution

Make it possible to use locally available libraries and headers instead of downloading all dependencies during the build.

Are you willing to submit a PR?

PragmaTwice commented 3 months ago

Refer to https://kvrocks.apache.org/download/third-party-packages.

The Apache Kvrocks PMC doesn't maintain prebuilt binaries for any Linux distro (except the official Docker image).

But out of the PMC, some contributors in the community does maintain some Linux packages for Kvrocks.

Currently it includes:

Actually, both of these projects are mainly maintained by me in my spare time.

Currently, I don't have much time to improve kvrocks-fpm and expand it to other package formats besides DEB. But if anyone is interested and willing to help complete this task, I would be very grateful.