Created
April 28, 2017 12:13
-
-
Save lomik/76770c41af0fef201bc8f979f27bdb42 to your computer and use it in GitHub Desktop.
Сборщик rpm clickhouse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
set -e | |
IMAGE="Докер образ с centos7, rpmbuild, fpm" | |
# Докер-образ строится примерно такой командой (возможно что-то забыто): | |
# RUN yum install -y rpm-build ruby ruby-devel rubygems && gem install fpm && yum clean all | |
docker run --rm -ti $IMAGE bash -c ' | |
set -e | |
set -x | |
export VERSION=1.1.54135 | |
wget http://repo.yandex.ru/clickhouse/precise/pool/main/c/clickhouse/clickhouse-server-base_${VERSION}_amd64.deb | |
wget http://repo.yandex.ru/clickhouse/precise/pool/main/c/clickhouse/clickhouse-client_${VERSION}_amd64.deb | |
mkdir /clickhouse-server /clickhouse-client | |
cd /clickhouse-server | |
ar vx /clickhouse-server-base_${VERSION}_amd64.deb | |
tar -xzvf data.tar.gz | |
rm -fv debian-binary *.tar.gz | |
cd /clickhouse-client | |
ar vx /clickhouse-client_${VERSION}_amd64.deb | |
tar -xzvf data.tar.gz | |
rm -fv debian-binary *.tar.gz | |
cd / | |
fpm --verbose -s dir -t rpm \ | |
-n clickhouse-server \ | |
-v $VERSION \ | |
--iteration 1 \ | |
--vendor "YANDEX LLC" \ | |
--url "https://github.com/yandex/ClickHouse" \ | |
--description "ClickHouse is an open-source column-oriented database management system that allows generating analytical data reports in real time." \ | |
-a "x86_64" \ | |
--no-auto-depends \ | |
-d clickhouse-client \ | |
-x etc \ | |
clickhouse-server/=/ | |
fpm --verbose -s dir -t rpm \ | |
-n clickhouse-client \ | |
-v $VERSION \ | |
--iteration 1 \ | |
--vendor "YANDEX LLC" \ | |
--url "https://github.com/yandex/ClickHouse" \ | |
--description "ClickHouse client" \ | |
-a "x86_64" \ | |
--no-auto-depends \ | |
--config-files "/etc/clickhouse-client/config.xml" \ | |
clickhouse-client/=/ | |
echo | |
ls -l *.rpm | |
bash | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment