diff --git a/cmake/create_init_script.cmake b/cmake/create_init_script.cmake index 0b6500b80d9..ca9d9640c27 100644 --- a/cmake/create_init_script.cmake +++ b/cmake/create_init_script.cmake @@ -6,7 +6,7 @@ # Будет создан init.d скрипт с названием divider для демона (бинарника) Divider macro (create_init_script daemonname) - set (filename ${daemonname}-metrika-yandex) + set (filename ${daemonname}) # Опционально принимаем filename вторым аргументом. set (extra_args ${ARGN}) list (LENGTH extra_args num_extra_args) diff --git a/dbms/src/Storages/tests/broken_increment_test.sh b/dbms/src/Storages/tests/broken_increment_test.sh index ee0ad381a63..9a5215ff9fb 100755 --- a/dbms/src/Storages/tests/broken_increment_test.sh +++ b/dbms/src/Storages/tests/broken_increment_test.sh @@ -18,8 +18,8 @@ echo 'Inserting without increment.txt' echo "2014-01-01 41" | clickhouse-client --query="INSERT INTO increment.a FORMAT TabSeparated" ls /opt/clickhouse/data/increment/a/ cat /opt/clickhouse/data/increment/a/increment.txt -sudo /etc/init.d/clickhouse-server-metrika-yandex stop -sudo /etc/init.d/clickhouse-server-metrika-yandex start +sudo /etc/init.d/clickhouse-server stop +sudo /etc/init.d/clickhouse-server start sleep 10s ls /opt/clickhouse/data/increment/a/ cat /opt/clickhouse/data/increment/a/increment.txt diff --git a/dbms/src/Storages/tests/collapsing_merge_order_test.sh b/dbms/src/Storages/tests/collapsing_merge_order_test.sh index e518b59f7a2..2aecea12e54 100755 --- a/dbms/src/Storages/tests/collapsing_merge_order_test.sh +++ b/dbms/src/Storages/tests/collapsing_merge_order_test.sh @@ -13,7 +13,7 @@ echo "('2014-01-01', 'key1', 1, 'val1')" | clickhouse-client --query="INSERT INT echo "('2014-01-01', 'key1', -1, 'val1'),('2014-01-01', 'key1', 1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p1 VALUES" || exit 7 echo "('2014-01-01', 'key1', -1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p2 VALUES" || exit 8 -sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 10 +sudo /etc/init.d/clickhouse-server stop || exit 10 sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m0/} || exit 12 sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p1/20140101_20140101_1_1_0,m0/20140101_20140101_2_2_0} || exit 13 @@ -21,19 +21,19 @@ sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p1/20140101_20140101 sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m1/20140101_20140101_3_3_0} || exit 15 rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29 -sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 16 +sudo /etc/init.d/clickhouse-server start || exit 16 sleep 10s echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 17 echo "OPTIMIZE TABLE collapsing_test.m1" | clickhouse-client || exit 18 -sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 19 +sudo /etc/init.d/clickhouse-server stop || exit 19 sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m1/} || exit 20 sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m0/20140101_20140101_3_3_0} || exit 21 rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29 -sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 22 +sudo /etc/init.d/clickhouse-server start || exit 22 sleep 10s echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 23 diff --git a/dbms/src/Storages/tests/mergetest.sh b/dbms/src/Storages/tests/mergetest.sh index df2c381ef96..62079eb4562 100755 --- a/dbms/src/Storages/tests/mergetest.sh +++ b/dbms/src/Storages/tests/mergetest.sh @@ -29,7 +29,7 @@ echo 'Files (there should be few non-old_ pieces):' ls $path echo 'Stopping server' -sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 7 +sudo /etc/init.d/clickhouse-server stop || exit 7 echo 'Truncating in half each non-old_ piece with level>1' pieces=`ls $path | grep -Pv '(^tmp_|^old_|_0$)' | grep -v 'increment.txt'` || exit 8 @@ -42,7 +42,7 @@ do done echo 'Starting server' -sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 11 +sudo /etc/init.d/clickhouse-server start || exit 11 until echo 'SHOW DATABASES' | clickhouse-client > /dev/null do diff --git a/debian/clickhouse-compressor-metrika-yandex.install b/debian/clickhouse-compressor.install similarity index 100% rename from debian/clickhouse-compressor-metrika-yandex.install rename to debian/clickhouse-compressor.install diff --git a/debian/config-processor-metrika-yandex.install b/debian/config-processor-metrika-yandex.install deleted file mode 100644 index 4fe95c8c95a..00000000000 --- a/debian/config-processor-metrika-yandex.install +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/config-processor diff --git a/debian/rules b/debian/rules index 50cc38b70e6..eb624a9cb61 100755 --- a/debian/rules +++ b/debian/rules @@ -66,7 +66,7 @@ clean: find ./debian/ -name "*.docs" -type l -delete rm -f ./debian/copyright # Удалим созданные *.install файлы - for DAEMON_PKG in ${DAEMONS}; do AUTO=`grep "# automatically created" debian/$$DAEMON_PKG-metrika-yandex.install`; if [ "x$$AUTO" != "x" ]; then rm -f debian/$$DAEMON_PKG-metrika-yandex.install; fi; done + for DAEMON_PKG in ${DAEMONS}; do AUTO=`grep "# automatically created" debian/$$DAEMON_PKG.install`; if [ "x$$AUTO" != "x" ]; then rm -f debian/$$DAEMON_PKG.install; fi; done dh_clean install: build @@ -82,7 +82,7 @@ install: build if [ -e debian/tmp/etc/init.d/clickhouse-server ]; then ln -s tmp/etc/init.d/clickhouse-server debian/clickhouse-server-base.clickhouse-server.init; fi # создаем дефолтный cron, если нет крон-файла созданного пользователем - # cron_name имеет вид daemonname-metrika-yandex + # cron_name имеет вид daemonname # Для ClickHouse не должно быть лишних зависимостей. for I in debian/tmp/etc/init.d/*; \ do \ @@ -94,38 +94,36 @@ install: build echo "#*/10 * * * * root /etc/init.d/$$cron_name condstart 1>/dev/null 2>&1" > debian/tmp/etc/cron.d/$$cron_name; \ fi; \ done; \ - # Создаём нужные *.install файлы - # Только для демонов, т.к. пакеты ClickHouse не имеют суффикса metrika-yandex + # Making necessary *.install files for DAEMON_PKG in ${DAEMONS}; do \ - if [ ! -e "debian/$$DAEMON_PKG-metrika-yandex.install" ]; then \ - echo "# automatically created" > debian/$$DAEMON_PKG-metrika-yandex.install; \ - echo "/etc/$$DAEMON_PKG/config.xml" >> debian/$$DAEMON_PKG-metrika-yandex.install; \ - echo "/usr/bin/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.install; \ - echo "/etc/cron.d/$$DAEMON_PKG-metrika-yandex" >> debian/$$DAEMON_PKG-metrika-yandex.install; \ + if [ ! -e "debian/$$DAEMON_PKG.install" ]; then \ + echo "# automatically created" > debian/$$DAEMON_PKG.install; \ + echo "/etc/$$DAEMON_PKG/config.xml" >> debian/$$DAEMON_PKG.install; \ + echo "/usr/bin/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.install; \ + echo "/etc/cron.d/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.install; \ if [ -e "debian/tmp/etc/monrun/conf.d/$$DAEMON_PKG.conf" ]; then \ - echo "/etc/monrun/conf.d/$$DAEMON_PKG.conf" >> debian/$$DAEMON_PKG-metrika-yandex.install; \ + echo "/etc/monrun/conf.d/$$DAEMON_PKG.conf" >> debian/$$DAEMON_PKG.install; \ fi;\ fi; \ done - # Создаём нужные *.postinst файлы - # Note: Только для демонов, т.к. пакеты ClickHouse не имеют суффикса metrika-yandex + # Making necessary *.postinst files for DAEMON_PKG in ${DAEMONS}; do \ - if [ ! -e "debian/$$DAEMON_PKG-metrika-yandex.postinst" ]; then \ - echo "# automatically created" > debian/$$DAEMON_PKG-metrika-yandex.postinst; \ - echo "mkdir -p /etc/$$DAEMON_PKG/conf.d" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ - echo "chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ - if [ -e "debian/tmp/etc/init.d/$$DAEMON_PKG-metrika-yandex" ]; then \ + if [ ! -e "debian/$$DAEMON_PKG.postinst" ]; then \ + echo "# automatically created" > debian/$$DAEMON_PKG.postinst; \ + echo "mkdir -p /etc/$$DAEMON_PKG/conf.d" >> debian/$$DAEMON_PKG.postinst; \ + echo "chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.postinst; \ + if [ -e "debian/tmp/etc/init.d/$$DAEMON_PKG" ]; then \ if echo $$DAEMON_PKG | grep server > /dev/null; then\ - echo "update-rc.d $$DAEMON_PKG-metrika-yandex defaults > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ + echo "update-rc.d $$DAEMON_PKG defaults > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG.postinst; \ else\ - echo "update-rc.d $$DAEMON_PKG-metrika-yandex start 30 2 3 4 5 . stop 70 0 1 6 . > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ + echo "update-rc.d $$DAEMON_PKG start 30 2 3 4 5 . stop 70 0 1 6 . > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG.postinst; \ fi\ fi\ \ else \ - echo >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ - echo "mkdir -p /etc/$$DAEMON_PKG/conf.d; chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \ + echo >> debian/$$DAEMON_PKG.postinst; \ + echo "mkdir -p /etc/$$DAEMON_PKG/conf.d; chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.postinst; \ fi; \ done diff --git a/release_lib.sh b/release_lib.sh index 7f145c6b029..7d28336cd4d 100644 --- a/release_lib.sh +++ b/release_lib.sh @@ -4,7 +4,7 @@ function add_daemon_impl { local daemon=$1 local control=$CONTROL local dependencies=$2 - local description_short="${daemon%-metrika-yandex/ daemon}" + local description_short="${daemon%/ daemon}" local description_full=$3 echo -e "\n\n" >> $control; @@ -48,7 +48,7 @@ function make_control { #skip it explicitly ;; * ) - add_daemon_impl "${DAEMON_PKG}-metrika-yandex" + add_daemon_impl "${DAEMON_PKG}" ;; esac done