From owner-svn-ports-all@freebsd.org Wed Mar 1 18:30:08 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F930CF32BB; Wed, 1 Mar 2017 18:30:08 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DC1BC5B; Wed, 1 Mar 2017 18:30:08 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v21IU7d2051697; Wed, 1 Mar 2017 18:30:07 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v21IU6G2051689; Wed, 1 Mar 2017 18:30:06 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201703011830.v21IU6G2051689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Wed, 1 Mar 2017 18:30:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r435190 - in head: . databases databases/clickhouse databases/clickhouse/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 18:30:08 -0000 Author: amdmi3 Date: Wed Mar 1 18:30:06 2017 New Revision: 435190 URL: https://svnweb.freebsd.org/changeset/ports/435190 Log: ClickHouse is an open-source column-oriented database management system that allows generating analytical data reports in real time. WWW: https://clickhouse.yandex/ PR: 216152 Submitted by: proler@gmail.com Added: head/databases/clickhouse/ head/databases/clickhouse/Makefile (contents, props changed) head/databases/clickhouse/distinfo (contents, props changed) head/databases/clickhouse/files/ head/databases/clickhouse/files/clickhouse.in (contents, props changed) head/databases/clickhouse/pkg-descr (contents, props changed) head/databases/clickhouse/pkg-plist (contents, props changed) Modified: head/GIDs head/UIDs head/databases/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Wed Mar 1 18:16:03 2017 (r435189) +++ head/GIDs Wed Mar 1 18:30:06 2017 (r435190) @@ -741,7 +741,7 @@ zetacoin:*:780: # free: 797 # free: 798 # free: 799 -# free: 800 +clickhouse:*:800: # free: 801 # free: 802 # free: 803 Modified: head/UIDs ============================================================================== --- head/UIDs Wed Mar 1 18:16:03 2017 (r435189) +++ head/UIDs Wed Mar 1 18:30:06 2017 (r435190) @@ -746,7 +746,7 @@ zetacoin:*:780:780::0:0:ZetaCoin Daemon: # free: 797 # free: 798 # free: 799 -# free: 800 +clickhouse:*:800:800::0:0:ClickHouse Daemon:/var/db/clickhouse:/usr/sbin/nologin # free: 801 # free: 802 # free: 803 Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Wed Mar 1 18:16:03 2017 (r435189) +++ head/databases/Makefile Wed Mar 1 18:30:06 2017 (r435190) @@ -33,6 +33,7 @@ SUBDIR += cdb SUBDIR += cego SUBDIR += cegobridge + SUBDIR += clickhouse SUBDIR += couchdb SUBDIR += courier-authlib-mysql SUBDIR += courier-authlib-pgsql Added: head/databases/clickhouse/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/clickhouse/Makefile Wed Mar 1 18:30:06 2017 (r435190) @@ -0,0 +1,76 @@ +# Created by: proler@gmail.com +# $FreeBSD$ + +PORTNAME= clickhouse +PORTVERSION= 1.1.54165 +DISTVERSIONPREFIX= v +DISTVERSIONSUFFIX= -stable +CATEGORIES= databases + +MAINTAINER= proler@gmail.com +COMMENT= ClickHouse is an column-oriented database management system + +LICENSE= APACHE20 + +BUILD_DEPENDS= bash:shells/bash +LIB_DEPENDS= libsqlite3.so:databases/sqlite3 \ + libtcmalloc.so:devel/google-perftools \ + libodbc.so:databases/unixODBC \ + libltdl.so:devel/libltdl \ + libicudata.so:devel/icu \ + libboost_program_options.so:devel/boost-libs + +USE_GITHUB= yes +GH_ACCOUNT= yandex +GH_PROJECT= ClickHouse + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= "Only supported on amd64" + +USES= compiler:c++14-lang cmake iconv mysql ssl readline +USE_LDCONFIG= yes +CMAKE_ARGS= -DUSE_INTERNAL_GPERFTOOLS_LIBRARY=0 \ + -DUSE_INTERNAL_BOOST_LIBRARY=0 \ + -DUSE_INTERNAL_ZLIB_LIBRARY=0 \ + -DUSE_STATIC_LIBRARIES=0 \ + -DNO_WERROR=1 + +USE_RC_SUBR= ${PORTNAME} +USERS= clickhouse +GROUPS= clickhouse + +#temporary! use PORTVERSION after version match +SOVERSION= 1.1.54164 +PLIST_SUB= SOVERSION=${SOVERSION} + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 +BUILD_DEPENDS+= clang38:devel/llvm38 +CC= clang38 +CXX= clang++38 +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|/var/lib/clickhouse|/var/db/clickhouse|' ${WRKSRC}/dbms/src/Server/config.xml + +post-install: + @${RM} ${STAGEDIR}${PREFIX}/bin/clickhouse-compressor + @${RM} ${STAGEDIR}${PREFIX}/bin/config-processor + @${RM} ${STAGEDIR}${PREFIX}/bin/corrector_utf8 + @${RM} ${STAGEDIR}${PREFIX}/lib/cmake/Poco/PocoConfig.cmake + @${RMDIR} ${STAGEDIR}${PREFIX}/lib/cmake/Poco + @${RMDIR} ${STAGEDIR}${PREFIX}/lib/cmake + + ${INSTALL_DATA} ${WRKSRC}/dbms/src/Client/config.xml \ + ${STAGEDIR}${PREFIX}/etc/clickhouse-client/config.xml.sample + ${INSTALL_DATA} ${WRKSRC}/dbms/src/Server/config.xml \ + ${STAGEDIR}${PREFIX}/etc/clickhouse-server/config.xml.sample + ${INSTALL_DATA} ${WRKSRC}/dbms/src/Server/users.xml \ + ${STAGEDIR}${PREFIX}/etc/clickhouse-server/users.xml.sample + + @${MKDIR} ${STAGEDIR}/var/db/clickhouse + @${MKDIR} ${STAGEDIR}/var/log/clickhouse + @${MKDIR} ${STAGEDIR}/var/run/clickhouse + +.include Added: head/databases/clickhouse/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/clickhouse/distinfo Wed Mar 1 18:30:06 2017 (r435190) @@ -0,0 +1,3 @@ +TIMESTAMP = 1488372403 +SHA256 (yandex-ClickHouse-v1.1.54165-stable_GH0.tar.gz) = 192dc82094e3350a5030a68a39ed08b484d48d05514ed6d6c16647f21520aeb5 +SIZE (yandex-ClickHouse-v1.1.54165-stable_GH0.tar.gz) = 13510381 Added: head/databases/clickhouse/files/clickhouse.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/clickhouse/files/clickhouse.in Wed Mar 1 18:30:06 2017 (r435190) @@ -0,0 +1,62 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: clickhouse +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf[.local] to enable clickhouse server +# +# clickhouse_enable (bool): Set to "NO" by default +# Set it to "YES" to enable clickhouse server +# clickhouse_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U clickhouse` +# just before clickhouse starts. +# clickhouse_config (str): Path to config file (required). +# (default: %%PREFIX%%/etc/clickhouse-server/config.xml) +# clickhouse_rundir (str): Path to directory holding a pidfile. +# (default: /var/run/clickhouse) +# clickhouse_user (str): User to run as +# (default: clickhouse) +# clickhouse_group (str): Group to run as +# (default: clickhouse) +# clickhouse_logdir (str): Path to log directory +# (default: /var/log/clickhouse) +# clickhouse_dbdir (str): Path to world database directory +# (default: /var/db/clickhouse) + +. /etc/rc.subr + +name=clickhouse +rcvar=clickhouse_enable + +load_rc_config ${name} + +: ${clickhouse_enable="NO"} +: ${clickhouse_limits="NO"} +: ${clickhouse_config="%%PREFIX%%/etc/clickhouse-server/config.xml"} +: ${clickhouse_rundir="/var/run/clickhouse"} +: ${clickhouse_user="clickhouse"} +: ${clickhouse_group="clickhouse"} +: ${clickhouse_logdir="/var/log/clickhouse"} +: ${clickhouse_dbdir="/var/db/clickhouse"} +: ${clickhouse_flags=""} +: ${clickhouse_args="--server --config-file ${clickhouse_config} ${clickhouse_flags}"} + +command=/usr/sbin/daemon +procname=/usr/local/bin/clickhouse +pidfile=${clickhouse_rundir}/clickhouse.pid +command_args="-c -f -p ${pidfile} ${procname} ${clickhouse_args}" +required_files=${clickhouse_config} +start_precmd=clickhouse_prestart + +clickhouse_prestart () { + if checkyesno clickhouse_limits; then + eval `/usr/bin/limits -e -U ${clickhouse_user}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" Added: head/databases/clickhouse/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/clickhouse/pkg-descr Wed Mar 1 18:30:06 2017 (r435190) @@ -0,0 +1,4 @@ +ClickHouse is an open-source column-oriented database management +system that allows generating analytical data reports in real time. + +WWW: https://clickhouse.yandex/ Added: head/databases/clickhouse/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/clickhouse/pkg-plist Wed Mar 1 18:30:06 2017 (r435190) @@ -0,0 +1,14 @@ +bin/clickhouse +bin/clickhouse-benchmark +bin/clickhouse-client +bin/clickhouse-local +bin/clickhouse-server +@sample etc/clickhouse-client/config.xml.sample +@sample etc/clickhouse-server/config.xml.sample +@sample etc/clickhouse-server/users.xml.sample +lib/libclickhouse.so +lib/libclickhouse.so.1 +lib/libclickhouse.so.%%SOVERSION%% +@dir(clickhouse,clickhouse,700) /var/db/clickhouse +@dir(clickhouse,clickhouse) /var/log/clickhouse +@dir(clickhouse,clickhouse) /var/run/clickhouse