summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail f. Shiryaev2020-08-19 23:10:12 +0200
committerMikhail f. Shiryaev2020-08-19 23:10:12 +0200
commitd4ea06d556ccfeeeb09f06296ab30e644ce144cf (patch)
tree1fe306f12a89a87d2ced0b8517eb40189ff9961e
parent64bafe172b9c742b6ebb5279d05f87f44f161fd4 (diff)
downloadaur-d4ea06d556ccfeeeb09f06296ab30e644ce144cf.tar.gz
Replace building with repacking deb, upgrade to latest stable
-rw-r--r--.SRCINFO72
-rw-r--r--PKGBUILD140
-rw-r--r--clickhouse.install11
-rw-r--r--libunwind.patch10
4 files changed, 50 insertions, 183 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 457c59969935..1615de090521 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,68 +1,22 @@
pkgbase = clickhouse
pkgdesc = An open-source column-oriented database management system that allows generating analytical data reports in real time
- pkgver = 19.5.3.8
+ pkgver = 20.6.3.28
pkgrel = 1
- url = https://clickhouse.yandex/
+ url = https://clickhouse.tech/
install = clickhouse.install
- arch = i686
arch = x86_64
license = Apache
- makedepends = cmake
- makedepends = patchelf
- depends = cppkafka-git
- depends = jemalloc-git
- depends = ncurses
- depends = readline
- depends = unixodbc
- depends = termcap
- depends = double-conversion
- depends = capnproto
- depends = re2
- depends = gtest
- depends = gsasl
- depends = libxml2
- depends = llvm>=8
- depends = brotli
- depends = lld
- depends = clang
- depends = libdaemon
- depends = poco
- depends = snappy
- backup = etc/clickhouse-client/config.xml
- backup = etc/clickhouse-server/config.xml
- backup = etc/clickhouse-server/users.xml
- source = https://github.com/yandex/ClickHouse/archive/v19.5.3.8-stable.tar.gz
- source = https://github.com/apache/arrow/archive/87ac6fd.tar.gz
- source = https://github.com/google/cctz/archive/4f9776a.tar.gz
- source = https://github.com/edenhill/librdkafka/archive/8695b9d.tar.gz
- source = https://github.com/mfontanini/cppkafka/archive/9b184d8.tar.gz
- source = https://github.com/lz4/lz4/archive/c10863b.tar.gz
- source = https://github.com/Dead2/zlib-ng/archive/9173b89.tar.gz
- source = https://github.com/ClickHouse-Extras/boost/archive/471ea20.tar.gz
- source = https://github.com/ClickHouse-Extras/ssl/archive/ba8de79.tar.gz
- source = https://github.com/aklomp/base64/archive/a27c565.tar.gz
- source = https://github.com/ClickHouse-Extras/libhdfs3/archive/e2131aa.tar.gz
- source = https://github.com/ClickHouse-Extras/protobuf/archive/1273537.tar.gz
- source = https://github.com/apache/thrift/archive/010ccf0.tar.gz
- source = https://github.com/ClickHouse-Extras/hyperscan/archive/05dab0e.tar.gz
- source = https://github.com/facebook/zstd/archive/2555975.tar.gz
- source = libunwind.patch
- md5sums = 9f9e710b10623453eee7d6be9b778ea8
- md5sums = 70cf5232e7053256dea81e7f7b0d1ebe
- md5sums = 5323f7ba2565a84a80a93edde95eb4fe
- md5sums = 211c6903a4179959f456055dbb054b05
- md5sums = cc75288aa9af1ce714ed184e0f2caaae
- md5sums = 7b92f0554687e6a8949adc5c10aeff78
- md5sums = 8a7abcc6998e461605ecb2988ff93dfc
- md5sums = 8cfc42d6e90721e37e0806d6fb905b09
- md5sums = bf1ee7e88660616c92592dd4c1036f61
- md5sums = e98c6b94f39d6947c83eb554aeb618e2
- md5sums = b84bdd5d5d8c75c2ff5573670e05eaa9
- md5sums = d63e8036385a27113365a40eb6bfe75e
- md5sums = 305944814e6124a2b9c2e306fb02ac16
- md5sums = 2d17a2f38bd80d68f17ec529f887aa62
- md5sums = aaa86ec9f379ef587cc53f7b96bcc0e7
- md5sums = f3f60b75abf8d6f21de74db6e88e1e7b
+ depends = tzdata
+ depends = libcap
+ noextract = clickhouse-common-static_20.6.3.28_amd64.deb
+ noextract = clickhouse-client_20.6.3.28_all.deb
+ noextract = clickhouse-server_20.6.3.28_all.deb
+ source = https://repo.clickhouse.tech/deb/stable/main/clickhouse-common-static_20.6.3.28_amd64.deb
+ source = https://repo.clickhouse.tech/deb/stable/main/clickhouse-client_20.6.3.28_all.deb
+ source = https://repo.clickhouse.tech/deb/stable/main/clickhouse-server_20.6.3.28_all.deb
+ sha256sums = 1ec4802df6a4069884bb7461b753693bad919864fff4782f02d7406ab18e1d8e
+ sha256sums = 9133df7c11676ceed8175c771e6c41ae3b0029369d699fec7c5b6ea41ea8e07e
+ sha256sums = 17271d0314d22c3d5b2a7caee7ff4d00ca5f9ffa4eb6ebe29084e447d36ec52d
pkgname = clickhouse
diff --git a/PKGBUILD b/PKGBUILD
index 687160ff4c76..69e9086006ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,119 +1,49 @@
-# $Id: $
# Maintainer: Dmitry Bilunov <kmeaw@yandex-team.ru>
+# Maintainer: Mikhail f. Shiryaev <mr dot felixoid at gmail dot com>
+#pkgbase=clickhouse
+#pkgname=(clickhouse clickhouse-dbg)
pkgname=clickhouse
-pkgver=19.5.3.8
+pkgver=20.6.3.28
pkgrel=1
pkgdesc='An open-source column-oriented database management system that allows generating analytical data reports in real time'
-arch=('i686' 'x86_64')
-url='https://clickhouse.yandex/'
+arch=('x86_64')
+url='https://clickhouse.tech/'
license=('Apache')
-depends=('cppkafka-git' 'jemalloc-git' 'ncurses' 'readline' 'unixodbc' 'termcap' 'double-conversion' 'capnproto' 're2' 'gtest' 'gsasl' 'libxml2' 'llvm>=8' 'brotli' 'lld' 'clang' 'libdaemon' 'poco' 'snappy')
-makedepends=('cmake' 'patchelf')
-source=(https://github.com/yandex/ClickHouse/archive/v$pkgver-stable.tar.gz
- https://github.com/apache/arrow/archive/87ac6fd.tar.gz
- https://github.com/google/cctz/archive/4f9776a.tar.gz
- https://github.com/edenhill/librdkafka/archive/8695b9d.tar.gz
- https://github.com/mfontanini/cppkafka/archive/9b184d8.tar.gz
- https://github.com/lz4/lz4/archive/c10863b.tar.gz
- https://github.com/Dead2/zlib-ng/archive/9173b89.tar.gz
- https://github.com/ClickHouse-Extras/boost/archive/471ea20.tar.gz
- https://github.com/ClickHouse-Extras/ssl/archive/ba8de79.tar.gz
- https://github.com/aklomp/base64/archive/a27c565.tar.gz
- https://github.com/ClickHouse-Extras/libhdfs3/archive/e2131aa.tar.gz
- https://github.com/ClickHouse-Extras/protobuf/archive/1273537.tar.gz
- https://github.com/apache/thrift/archive/010ccf0.tar.gz
- https://github.com/ClickHouse-Extras/hyperscan/archive/05dab0e.tar.gz
- https://github.com/facebook/zstd/archive/2555975.tar.gz
- libunwind.patch)
-md5sums=('9f9e710b10623453eee7d6be9b778ea8'
- '70cf5232e7053256dea81e7f7b0d1ebe'
- '5323f7ba2565a84a80a93edde95eb4fe'
- '211c6903a4179959f456055dbb054b05'
- 'cc75288aa9af1ce714ed184e0f2caaae'
- '7b92f0554687e6a8949adc5c10aeff78'
- '8a7abcc6998e461605ecb2988ff93dfc'
- '8cfc42d6e90721e37e0806d6fb905b09'
- 'bf1ee7e88660616c92592dd4c1036f61'
- 'e98c6b94f39d6947c83eb554aeb618e2'
- 'b84bdd5d5d8c75c2ff5573670e05eaa9'
- 'd63e8036385a27113365a40eb6bfe75e'
- '305944814e6124a2b9c2e306fb02ac16'
- '2d17a2f38bd80d68f17ec529f887aa62'
- 'aaa86ec9f379ef587cc53f7b96bcc0e7'
- 'f3f60b75abf8d6f21de74db6e88e1e7b')
-backup=('etc/clickhouse-client/config.xml' 'etc/clickhouse-server/config.xml' 'etc/clickhouse-server/users.xml')
+depends=('tzdata' 'libcap')
+noextract=(
+ clickhouse-common-static_${pkgver}_amd64.deb
+ clickhouse-client_${pkgver}_all.deb
+ clickhouse-server_${pkgver}_all.deb
+ )
+source=(
+ https://repo.clickhouse.tech/deb/stable/main/clickhouse-common-static_${pkgver}_amd64.deb
+ https://repo.clickhouse.tech/deb/stable/main/clickhouse-client_${pkgver}_all.deb
+ https://repo.clickhouse.tech/deb/stable/main/clickhouse-server_${pkgver}_all.deb
+ )
+sha256sums=(
+ 1ec4802df6a4069884bb7461b753693bad919864fff4782f02d7406ab18e1d8e
+ 9133df7c11676ceed8175c771e6c41ae3b0029369d699fec7c5b6ea41ea8e07e
+ 17271d0314d22c3d5b2a7caee7ff4d00ca5f9ffa4eb6ebe29084e447d36ec52d
+)
install=$pkgname.install
-prepare() {
- cd ClickHouse-$pkgver-stable
- sed -e 's/mysqlxx common\(.*\) \(\${Z_LIB}\)/mysqlxx \2 common\1/' -i libs/libmysqlxx/CMakeLists.txt
- patch -p1 < ../libunwind.patch
- mkdir -p contrib/arrow contrib/cctz contrib/librdkafka contrib/cppkafka contrib/lz4 contrib/base64 contrib/libhdfs3 contrib/protobuf contrib/thrift contrib/hyperscan contrib/zstd
- rm -rf contrib/{arrow,cctz,librdkafka,cppkafka,lz4,zlib-ng,boost,ssl,base64,libhdfs3,protobuf,thrift,hyperscan,zstd}/*
- mv ../arrow-87ac6fd*/* contrib/arrow/
- mv ../librdkafka-8695b9d*/* contrib/librdkafka/
- mv ../cppkafka-9b184d8*/* contrib/cppkafka/
- mv ../cctz-4f9776a*/* contrib/cctz/
- mv ../lz4-c10863b*/* contrib/lz4/
- mv ../zlib-ng-9173b89*/* contrib/zlib-ng/
- mv ../boost-471ea20*/* contrib/boost/
- mv ../ssl-ba8de79*/* contrib/ssl/
- mv ../base64-a27c565*/* contrib/base64/
- mv ../libhdfs3-e2131aa*/* contrib/libhdfs3/
- mv ../protobuf-1273537*/* contrib/protobuf/
- mv ../thrift-010ccf0*/* contrib/thrift/
- mv ../hyperscan-05dab0e*/* contrib/hyperscan/
- mv ../zstd-2555975*/* contrib/zstd/
- for dir in contrib/*/; do
- rmdir $dir &> /dev/null || true
+package() {
+ for deb in "${noextract[@]}"; do
+ bsdtar -xf $deb
+ tar xf data.tar.gz -C "${pkgdir}"
done
-}
-build() {
- cd ClickHouse-$pkgver-stable
- COMP=""
- if ! pacman -Q clang | grep '^clang 7'; then
- COMP="-D ENABLE_EMBEDDED_COMPILER=False"
- fi
- cmake -D CMAKE_BUILD_TYPE:STRING=Release -D USE_STATIC_LIBRARIES:BOOL=False -D SPLIT_SHARED_LIBRARIES:BOOL=True -D ENABLE_TESTS:BOOL=False -D UNBUNDLED:BOOL=False -D USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY:BOOL=False -D USE_INTERNAL_CAPNP_LIBRARY:BOOL=False -D USE_INTERNAL_POCO_LIBRARY:BOOL=True -D USE_INTERNAL_RE2_LIBRARY:BOOL=False -D USE_INTERNAL_LIBGSASL_LIBRARY:BOOL=False -D USE_INTERNAL_GTEST_LIBRARY:BOOL=False -D USE_INTERNAL_LIBXML2_LIBRARY:BOOL=False -D USE_INTERNAL_LLVM_LIBRARY:BOOL=False -D USE_INTERNAL_BROTLI_LIBRARY:BOOL=False -D NO_WERROR=1 -D DOUBLE_CONVERSION_ROOT_DIR=/usr -D USE_INTERNAL_PARQUET_LIBRARY:BOOL=False -D USE_INTERNAL_ZSTD_LIBRARY:BOOL=False -D USE_INTERNAL_RDKAFKA_LIBRARY:BOOL=True -D USE_RDKAFKA:BOOL=True -D USE_INTERNAL_LZ4_LIBRARY:BOOL=True -D ENABLE_JEMALLOC:BOOL=True -D USE_INTERNAL_JEMALLOC_LIBRARY:BOOL=False -D USE_BASE64:BOOL=True -D USE_INTERNAL_HDFS3_LIBRARY:BOOL=True -D ENABLE_MYSQL:BOOL=True -D USE_INTERNAL_MYSQL_LIBRARY:BOOL=False -D USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY:BOOL=False -D USE_INTERNAL_PROTOBUF_LIBRARY:BOOL=True -D USE_INTERNAL_PROTOBUF_LIBRARY:BOOL=True -D PARQUET_INCLUDE_DIR:STRING=/usr/include -D USE_INTERNAL_POCO_LIBRARY:BOOL=False $COMP .
- cmake --build . --target clickhouse
-}
+ gzip -d "${pkgdir}/usr/share/doc/${pkgname}-server/LICENSE.gz"
+ mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+ mv "${pkgdir}/lib" "${pkgdir}/usr/lib"
+ mv "${pkgdir}/usr/share/doc/clickhouse-server/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"
-package() {
- cd ClickHouse-$pkgver-stable
- mkdir -p $pkgdir/etc/clickhouse-server/ $pkgdir/etc/clickhouse-client/
- mkdir -p $pkgdir/usr/bin/
- mkdir -p $pkgdir/usr/lib/systemd/system
- ln -s clickhouse-client $pkgdir/usr/bin/clickhouse-server
- cp dbms/programs/server/config.xml dbms/programs/server/users.xml $pkgdir/etc/clickhouse-server/
- cp dbms/programs/clickhouse $pkgdir/usr/bin/clickhouse-client
- patchelf --remove-rpath $pkgdir/usr/bin/clickhouse-client
- patchelf --replace-needed libz.so.1 libz-ng.so.1 $pkgdir/usr/bin/clickhouse-client
- cp dbms/programs/client/clickhouse-client.xml $pkgdir/etc/clickhouse-client/config.xml
- compiler="libclickhouse-compiler.so"
- if ! pacman -Q clang | grep '^clang 7'; then
- compiler=""
- fi
- for lib in libclickhouse{-{benchmark,{clien,forma,performance-tes}t,{co{mpresso,pie},obfuscato,serve}r,extract-from-config,local}-lib,{_{aggregat,tabl}e,}_functions,_{com{mon_{config,io,zookeeper},pression},dictionaries{,_embedded},parsers,storage{_kafka,s_system}}}.so $compiler; do
- libsrc=$(find dbms/ -name "$lib")
- libdst=$lib.$pkgver
- cp ${libsrc:?$lib not found} $pkgdir/usr/lib/$libdst
- patchelf --remove-rpath $pkgdir/usr/lib/$libdst
- patchelf --replace-needed $lib $lib.$pkgver $pkgdir/usr/bin/clickhouse-client
- done
- for lib in lib{b{ase64,oost_{{file,}system,program_options}_internal},c{ctz,ommon},daemon,{dbm,string_util}s,mysqlxx,pocoext}.so; do
- libsrc=$(find contrib/ libs/ dbms/ -name "$lib")
- libdst=libclickhouse-${lib#lib}.$pkgver
- cp ${libsrc:?$lib not found} $pkgdir/usr/lib/$libdst
- patchelf --remove-rpath $pkgdir/usr/lib/$libdst
- patchelf --replace-needed $lib $libdst $pkgdir/usr/bin/clickhouse-client
- done
- cp contrib/zlib-ng/libz.so.1 $pkgdir/usr/lib/libz-ng.so.1
- cp contrib/protobuf/cmake/libprotobuf.so.3.6.1 $pkgdir/usr/lib/libprotobuf.so.3.6.1
- sed -e 's:/opt/clickhouse:/var/lib/clickhouse:g' -i $pkgdir/etc/clickhouse-server/config.xml
- sed -e '/listen_host/s%::<%::1<%' -i $pkgdir/etc/clickhouse-server/config.xml
- cp debian/clickhouse-server.service $pkgdir/usr/lib/systemd/system
+ rm -rf "${pkgdir}/etc/cron.d" \
+ "${pkgdir}/etc/init.d" \
+ "${pkgdir}/etc/security" \
+ "${pkgdir}/etc/systemd" \
+ "${pkgdir}/usr/share/doc"
}
# vim:set ts=2 sw=2 et:
diff --git a/clickhouse.install b/clickhouse.install
index ceee0a0d9cf3..18e371055e85 100644
--- a/clickhouse.install
+++ b/clickhouse.install
@@ -1,7 +1,8 @@
post_install() {
groupadd -r clickhouse &>/dev/null
useradd -r -g clickhouse -d /var/lib/clickhouse -s /bin/false clickhouse &>/dev/null
- mkdir -p /var/lib/clickhouse/data/default /var/lib/clickhouse/metadata/default /var/lib/clickhouse/tmp
+ mkdir -p /var/lib/clickhouse/
+ chmod 0750 /var/lib/clickhouse
mkdir -p /var/log/clickhouse-server
chown clickhouse:clickhouse -R /var/lib/clickhouse /var/log/clickhouse-server
ldconfig
@@ -15,11 +16,3 @@ post_remove() {
groupdel clickhouse
fi
}
-
-post_upgrade() {
- ldconfig
-}
-
-post_remove() {
- ldconfig
-}
diff --git a/libunwind.patch b/libunwind.patch
deleted file mode 100644
index fc79ecb7af15..000000000000
--- a/libunwind.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/contrib/libunwind/src/x86_64/Gos-linux.c 2017-10-09 14:13:11.126198905 +0300
-+++ b/contrib/libunwind/src/x86_64/Gos-linux.c 2017-10-09 14:13:18.736311245 +0300
-@@ -29,6 +29,7 @@
- #include "ucontext_i.h"
-
- #include <sys/syscall.h>
-+#include <asm-generic/ucontext.h>
-
- HIDDEN void
- tdep_fetch_frame (struct dwarf_cursor *dw, unw_word_t ip, int need_unwind_info)