Debian: temporary keep packages with old names (#2186)

* cmake fixes

* Fix test server config

* Debian: temporary keep packages with old names

* fix

* fix

* Debian postinst: adjustable user
This commit is contained in:
proller 2018-04-06 13:49:42 -07:00 committed by GitHub
parent 55934058c6
commit f1f1f09500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 45 additions and 6 deletions

View File

@ -1,7 +1,9 @@
#!/bin/sh #!/bin/sh
set -e set -e
CLICKHOUSE_USER=${CLICKHOUSE_USER=clickhouse}
mkdir -p /etc/clickhouse-client/conf.d mkdir -p /etc/clickhouse-client/conf.d
# user created by clickhouse-server package # user created by clickhouse-server package
chown -R clickhouse /etc/clickhouse-client || true chown -R ${CLICKHOUSE_USER} /etc/clickhouse-client || true

1
debian/clickhouse-server-base.cron.d vendored Symbolic link
View File

@ -0,0 +1 @@
clickhouse-server.cron.d

11
debian/clickhouse-server-base.install vendored Normal file
View File

@ -0,0 +1,11 @@
usr/bin/clickhouse
usr/bin/clickhouse-server
usr/bin/clickhouse-clang
usr/bin/clickhouse-lld
usr/bin/clickhouse-copier
usr/bin/clickhouse-report
etc/systemd/system/clickhouse-server.service
etc/init.d/clickhouse-server
etc/cron.d/clickhouse-server
usr/share/clickhouse/*
etc/security/limits.d/clickhouse.conf

1
debian/clickhouse-server-base.postinst vendored Symbolic link
View File

@ -0,0 +1 @@
clickhouse-server.postinst

1
debian/clickhouse-server-base.preinst vendored Symbolic link
View File

@ -0,0 +1 @@
clickhouse-server.preinst

1
debian/clickhouse-server-base.prerm vendored Symbolic link
View File

@ -0,0 +1 @@
clickhouse-server.prerm

1
debian/clickhouse-server-base.service vendored Symbolic link
View File

@ -0,0 +1 @@
clickhouse-server.service

View File

@ -0,0 +1,2 @@
etc/clickhouse-server/config.xml etc/clickhouse-server
etc/clickhouse-server/users.xml etc/clickhouse-server

View File

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
set -e set -e
CLICKHOUSE_USER=clickhouse CLICKHOUSE_USER=${CLICKHOUSE_USER=clickhouse}
CLICKHOUSE_GROUP=${CLICKHOUSE_USER} CLICKHOUSE_GROUP=${CLICKHOUSE_GROUP=${CLICKHOUSE_USER}}
CLICKHOUSE_DATADIR=/var/lib/clickhouse CLICKHOUSE_DATADIR=${CLICKHOUSE_DATADIR=/var/lib/clickhouse}
CLICKHOUSE_LOGDIR=/var/log/clickhouse-server CLICKHOUSE_LOGDIR=${CLICKHOUSE_LOGDIR=/var/log/clickhouse-server}
test -f /etc/default/clickhouse && . /etc/default/clickhouse test -f /etc/default/clickhouse && . /etc/default/clickhouse

14
debian/control vendored
View File

@ -66,3 +66,17 @@ Priority: extra
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, curl, perl, sudo, openssl Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, curl, perl, sudo, openssl
Description: Clickhouse tests Description: Clickhouse tests
# TODO: Remove:
Package: clickhouse-server-base
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, tzdata
Description: DEPRECATED PACKAGE: Server binary for clickhouse
Package: clickhouse-server-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-server-base (= ${binary:Version})
Description: DEPRECATED PACKAGE: Common configuration files for clickhouse-server-base package

5
debian/rules vendored
View File

@ -97,6 +97,11 @@ override_dh_install:
touch $(DESTDIR)/etc/clickhouse-server/metrika/config.xml touch $(DESTDIR)/etc/clickhouse-server/metrika/config.xml
touch $(DESTDIR)/etc/clickhouse-server/metrika/users.xml touch $(DESTDIR)/etc/clickhouse-server/metrika/users.xml
# todo: remove after removing clickhouse-server-base package:
mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/cron.d
cp debian/clickhouse-server.init $(DESTDIR)/etc/init.d/clickhouse-server
cp debian/clickhouse-server.cron.d $(DESTDIR)/etc/cron.d/clickhouse-server
dh_install --list-missing --sourcedir=$(DESTDIR) dh_install --list-missing --sourcedir=$(DESTDIR)
override_dh_auto_install: override_dh_auto_install:

View File

@ -43,7 +43,7 @@ do
shift shift
elif [[ $1 == '--fast' ]]; then elif [[ $1 == '--fast' ]]; then
# Wrong but fast pbuilder mode: create base package with all depends # Wrong but fast pbuilder mode: create base package with all depends
EXTRAPACKAGES="$EXTRAPACKAGES debhelper cmake gcc-7 g++-7 libc6-dev libmariadbclient-dev libicu-dev libltdl-dev libreadline-dev libssl-dev unixodbc-dev psmisc bash expect python python-lxml python-termcolor curl perl sudo openssl" EXTRAPACKAGES="$EXTRAPACKAGES debhelper cmake ninja-build gcc-7 g++-7 libc6-dev libmariadbclient-dev libicu-dev libltdl-dev libreadline-dev libssl-dev unixodbc-dev psmisc bash expect python python-lxml python-termcolor curl perl sudo openssl"
shift shift
else else
echo "Unknown option $1" echo "Unknown option $1"