Debian Patches

Status for clickhouse/18.16.1+ds-7.3

Patch Description Author Forwarded Bugs Origin Last update
0000-cmake-ignore-git-submodules.patch Make CMakeLists.txt ignoring git submodules. The embedded boost is removed, so CMake will fail believing that stuff is missing. Tobias Frost <> not-needed 2022-10-29
0001-Enable-link-time-optimization-flto.patch Enable link time optimization (-flto).
This reduce target's size by 30%.
Alexander GQ Gerasiov <> no 2019-01-16
0002-Remove-non-determinism.patch Remove non-determinism. Alexander GQ Gerasiov <> no 2019-01-16
0003-Fix-FTBFS-with-gcc-because-of-Wno-format.patch Fix FTBFS with gcc because of -Wno-format Alexander GQ Gerasiov <> no 2018-12-25
0004-Disable-optimization-for-build-host.patch Disable optimization for build host. Alexander GQ Gerasiov <> no 2019-01-09
0005-Use-system-installed-googletest.patch Use system installed googletest.
Since googletest 3.5 or 3.6 in Debian it is installed as source into
/usr/src/googletest to allow build with user's compiler.

So we just need to build it from the directory the same way we build
bundled one.
Alexander GQ Gerasiov <> no 2018-12-26
0006-Disable-unwind.patch Disable unwind
CH uses unreleaser libunwind API, so disable it until it would be released
and uploaded into the archive.
Alexander GQ Gerasiov <> no 2018-12-27
0007-Disable-base64-usage-not-available-in-Debian-yet.patch Disable base64 usage (not available in Debian yet). Alexander GQ Gerasiov <> no 2018-12-29
0008-Replace-cpuid-with-cpuinfo.patch Replace cpuid with cpuinfo.
cpuinfo is already shipped in Debian and provides more suitable API.
This commit is not enough for inclusion into upstream codebase. One also
needs to replace cpuid with cpuinfo in the "contrib" directory.
Alexander GQ Gerasiov <> no 2019-01-04
0009-Fix-install-of-binaries-when-SPLIT_BINARIES-is-set.patch Fix install of binaries when SPLIT_BINARIES is set. Alexander GQ Gerasiov <> no 2019-01-05
0010-Fix-link-with-pthread-when-std-thread-is-used.patch Fix link with pthread when std::thread is used.
According to docs, you should add -lpthread when use std::thread in your code.
This doesn't matter if you build static binaries but fails the build when
Alexander GQ Gerasiov <> no 2019-01-06
0011-Change-libraries-hierarchy-links-most-of-them-into-m.patch Change libraries hierarchy: links most of them into main .so.
I don't thinks this could be applied upstream as is, but allows me to reduce
target's summary size a lot.
Alexander GQ Gerasiov <> no 2019-01-05
0012-Correctly-find-and-use-system-metrohash-library.patch Correctly find and use system metrohash library.
Also fix test conflict with new version of metrahash headers.

I think it would be bundle latest metrohash library into CH's contrib to keep
the codebase synced. (At least it breaks nothing.)
Alexander GQ Gerasiov <> no 2019-01-11
0013-server-config.xml-Set-log-level-to-warning.patch server/config.xml: Set log level to warning. Alexander GQ Gerasiov <> no 2019-01-21
0014-Set-default-umask-to-027.patch Set default umask to 027. Alexander GQ Gerasiov <> no 2019-01-31
0015-Fix-fallback-lz4-decomression.patch Fix fallback lz4 decomression. Alexander GQ Gerasiov <> no 2019-01-31
0016-MySQL-8-integr-reqs-previous-decl-checks.patch MySQL 8 integration requires previous declaration checks
C and C++ differ in the form of types being defined. While C++ structs
are defined also as new types, in C you have to explicitly typedef the
struct to have a new type.

Fir this case, it was enough to check if MySQL header was already
defined in order not to re-declare MYSQL, MYSQL_RES, MYSQL_ROW and
Rafael David Tinoco <> yes upstream upstream, 2019-08-20
0017-gcc9-mitigation-for-conditional-bug.patch GCC9 mitigation for conditional bug
The following function:

std::string toString(const ColumnDefaultKind kind)
return it != std::end(map) ? it->second : throw Exception{"Invalid
ColumnDefaultKind", ErrorCodes::LOGICAL_ERROR};

causes gcc9 to crash while other similar function (in related syntax):

ColumnDefaultKind columnDefaultKindFromString(const std::string & str)
return it != std::end(map) ? it->second : throw Exception{"Unknown
column default specifier: " + str, ErrorCodes::LOGICAL_ERROR};

does not. Changing the syntax to:

std::string toString(const ColumnDefaultKind kind)

const auto it = map.find(kind);

if (it == std::end(map))
throw Exception{"Invalid ColumnDefaultKind",

return it->second;

fixes the issue.

Upstream bug:
Upstream bug:
Upstream bug:
Rafael David Tinoco <> yes upstream 2019-08-20
fix-ftbfs.patch Fix ftbfs with new mysql, new libdivide Dimitri John Ledkov <> no
python3.patch no
gcc10-ftbfs.patch fix missing C++ include, exposed by toolchain changes
Steve Langasek <> no 2020-07-27
dont-redefine-numeric-limits-for-int128.patch Don't redefine struct std::numeric_limits<__int128 unsigned> It is already defined with libstdc++-10-dev Balint Reczey <> no vendor 2020-12-03
fix-996130.patch no
ftbfs_capn_version_check.patch Fix capnproto version check for capnp::UnalignedFlatArrayMessageReader capnp::UnalignedFlatArrayMessageReader was introduced in
(which is a part of 0.7.0 release). Unfortunately,
capnp::UnalignedFlatArrayMessageReader was removed in
(which is a part of 0.8.0 release)
So change CAPNP_VERSION check accordingly.
yes upstream 2022-10-29
fix-gtest-missing-include.patch Missing include to <thread> in test suite. Tobias Frost <> invalid 2022-10-29
fix-995660-FTBFS-OpenSSL3.patch Fix FTBFS with OpenSSL 3.0 DH parameters needs to be minimum 512 bits. Test suite tries to generate 256
bits, so it fails. The patch changes this to 512. Thanks Kurt for the analyis
in the Debian bug report.
Tobias Frost <> no debian 2022-10-29
dont-fail-setrlimit.patch Do not fail setrlimit if core dump size is not configured If coresize is not configured, clickhouse tries to set max core size to 1GiB.
However, if core size limit is lower already, this syscall will fail due to
insufficient permissions. (see setrlimit).
This patch will only try to apply the 1GiB default if the current limit is
It will still fail if the user has configured something setrlimit is not
allowed to set.
Tobias Frost <> no debian 2022-10-31
CVE-2021-4238x-and-4330x.patch Fix for CVE-2021-42387, CVE-2021-42388, CVE-2021-43304, CVE-2021-43305 Cherry pick relevant parts from upstream PR, adapted to version in Debian. no debian 2022-10-30
limit-compiled-expressions-cache-size-956415.patch Limit default compiled expressions cache size. Default it is unbound and leads to OOM eventually. yes debian upstream 2022-10-31

All known versions for source package 'clickhouse'