Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make clickhouse link to openssl dynamically #31995

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions clickhouse-24.9.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: clickhouse-24.9
version: 24.9.2.42
epoch: 0
epoch: 1
description: ClickHouse is the fastest and most resource efficient open-source database for real-time apps and analytics.
copyright:
- license: Apache-2.0
Expand Down Expand Up @@ -32,6 +32,7 @@ environment:
- llvm-lld-17-dev
- nasm
- ninja
- openssl-dev
- perl
- python3
- yasm
Expand All @@ -46,27 +47,29 @@ pipeline:
# The default build script is defensive and tries to protect against defining cflags.
- uses: patch
with:
patches: allow_cflags.patch
patches: allow_cflags.patch dynamically_link_openssl.patch

- runs: |
git submodule update --init
mkdir build
cd build
cmake \

- uses: cmake/configure
with:
output-dir: build
opts: |
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCOMPILER_CACHE=disabled \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DNO_ARMV81_OR_HIGHER=1 \
-DCMAKE_INSTALL_LIBDIR=lib \
..
-DCMAKE_INSTALL_LIBDIR=lib

- runs: |
cd build
ninja -j $(nproc)
mkdir -p ${{targets.destdir}}/var/lib/clickhouse
mkdir -p ${{targets.destdir}}/var/log/clickhouse-server
DESTDIR=${{targets.destdir}} ninja install
rm -rf ${{targets.destdir}}/usr/lib/debug

- uses: strip

Expand All @@ -76,6 +79,11 @@ subpackages:
pipeline:
- uses: split/dev

- name: "${{package.name}}-debug"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can omit this, looking at build output of ninja it contains /usr/lib/debug but that's not coming up in the package. It looks like a split/debug is required but the package is empty which is not desirable. 💭

description: "headers for clickhouse"
pipeline:
- uses: split/debug

- name: "${{package.name}}-bash-completion"
description: "bash completion for clickhouse"
pipeline:
Expand Down
22 changes: 22 additions & 0 deletions clickhouse-24.9/dynamically_link_openssl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6abf48a6..d9bea856 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -445,11 +445,12 @@ endif ()

enable_testing() # Enable for tests without binary

-if (ARCH_S390X)
- set(ENABLE_OPENSSL_DYNAMIC_DEFAULT ON)
-else ()
- set(ENABLE_OPENSSL_DYNAMIC_DEFAULT OFF)
-endif ()
+# if (ARCH_S390X)
+# set(ENABLE_OPENSSL_DYNAMIC_DEFAULT ON)
+# else ()
+# set(ENABLE_OPENSSL_DYNAMIC_DEFAULT OFF)
+# endif ()
+set(ENABLE_OPENSSL_DYNAMIC_DEFAULT ON)
option(ENABLE_OPENSSL_DYNAMIC "This option removes SSL from ClickHouse and will link to the OpenSSL version supplied by OS." ${ENABLE_OPENSSL_DYNAMIC_DEFAULT})

# when installing to /usr - place configs to /etc but for /usr/local place to /usr/local/etc
Loading