mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Better release --rpm
This commit is contained in:
parent
1773d85bed
commit
0bd65f49a2
6
debian/pbuilder-hooks/A00ccache
vendored
6
debian/pbuilder-hooks/A00ccache
vendored
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# set -x
|
||||||
|
|
||||||
# CCACHEDIR - for pbuilder ; CCACHE_DIR - for ccache
|
# CCACHEDIR - for pbuilder ; CCACHE_DIR - for ccache
|
||||||
|
|
||||||
echo "CCACHEDIR=$CCACHEDIR CCACHE_DIR=$CCACHE_DIR SET_CCACHEDIR=$SET_CCACHEDIR"
|
echo "CCACHEDIR=$CCACHEDIR CCACHE_DIR=$CCACHE_DIR SET_CCACHEDIR=$SET_CCACHEDIR"
|
||||||
@ -12,9 +14,7 @@ if [ -n "$CCACHE_DIR" ]; then
|
|||||||
chmod -R a+rwx $CCACHE_DIR $DISTCC_DIR ||:
|
chmod -R a+rwx $CCACHE_DIR $DISTCC_DIR ||:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $CCACHE_PREFIX = 'distcc' ] && mkdir -p ~/.distcc && echo "localhost/`nproc`" >> ~/.distcc/hosts
|
[ $CCACHE_PREFIX = 'distcc' ] && mkdir -p $DISTCC_DIR && echo "localhost/`nproc`" >> $DISTCC_DIR/hosts && distcc --show-hosts
|
||||||
# [ $CCACHE_PREFIX = 'distcc' ] && mkdir -p /etc/distcc/ && echo "localhost/`nproc`" >> /etc/distcc/hosts
|
|
||||||
# distcc --show-hosts
|
|
||||||
|
|
||||||
df -h
|
df -h
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
|
@ -182,16 +182,16 @@ function gen_dockerfiles {
|
|||||||
|
|
||||||
function make_rpm {
|
function make_rpm {
|
||||||
get_version
|
get_version
|
||||||
VERSION_STRING+=$VERSION_POSTFIX
|
[ -z "$VERSION_STRING" ] && get_version
|
||||||
VERSION=$VERSION_STRING
|
VERSION_FULL=${VERSION_STRING}${VERSION_POSTFIX}
|
||||||
PACKAGE_DIR=../
|
PACKAGE_DIR=${PACKAGE_DIR=../}
|
||||||
|
|
||||||
function deb_unpack {
|
function deb_unpack {
|
||||||
rm -rf $PACKAGE-$VERSION
|
rm -rf $PACKAGE-$VERSION_FULL
|
||||||
alien --verbose --generate --to-rpm --scripts ${PACKAGE_DIR}${PACKAGE}_${VERSION}_${ARCH}.deb
|
alien --verbose --generate --to-rpm --scripts ${PACKAGE_DIR}${PACKAGE}_${VERSION_FULL}_${ARCH}.deb
|
||||||
cd $PACKAGE-$VERSION
|
cd $PACKAGE-$VERSION_FULL
|
||||||
mv ${PACKAGE}-$VERSION-2.spec ${PACKAGE}-$VERSION-2.spec.tmp
|
mv ${PACKAGE}-$VERSION_FULL-2.spec ${PACKAGE}-$VERSION_FULL-2.spec.tmp
|
||||||
cat ${PACKAGE}-$VERSION-2.spec.tmp \
|
cat ${PACKAGE}-$VERSION_FULL-2.spec.tmp \
|
||||||
| grep -vF '%dir "/"' \
|
| grep -vF '%dir "/"' \
|
||||||
| grep -vF '%dir "/usr/"' \
|
| grep -vF '%dir "/usr/"' \
|
||||||
| grep -vF '%dir "/usr/bin/"' \
|
| grep -vF '%dir "/usr/bin/"' \
|
||||||
@ -210,11 +210,11 @@ function make_rpm {
|
|||||||
| grep -vF '%dir "/etc/cron.d/"' \
|
| grep -vF '%dir "/etc/cron.d/"' \
|
||||||
| grep -vF '%dir "/etc/systemd/system/"' \
|
| grep -vF '%dir "/etc/systemd/system/"' \
|
||||||
| grep -vF '%dir "/etc/systemd/"' \
|
| grep -vF '%dir "/etc/systemd/"' \
|
||||||
> ${PACKAGE}-$VERSION-2.spec
|
> ${PACKAGE}-$VERSION_FULL-2.spec
|
||||||
}
|
}
|
||||||
|
|
||||||
function rpm_pack {
|
function rpm_pack {
|
||||||
rpmbuild --buildroot="$CUR_DIR/${PACKAGE}-$VERSION" -bb --target ${TARGET} "${PACKAGE}-$VERSION-2.spec"
|
rpmbuild --buildroot="$CUR_DIR/${PACKAGE}-$VERSION_FULL" -bb --target ${TARGET} "${PACKAGE}-$VERSION_FULL-2.spec"
|
||||||
cd $CUR_DIR
|
cd $CUR_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,10 +237,10 @@ function make_rpm {
|
|||||||
ARCH=all
|
ARCH=all
|
||||||
TARGET=noarch
|
TARGET=noarch
|
||||||
deb_unpack
|
deb_unpack
|
||||||
mv ${PACKAGE}-$VERSION-2.spec ${PACKAGE}-$VERSION-2.spec_tmp
|
mv ${PACKAGE}-$VERSION_FULL-2.spec ${PACKAGE}-$VERSION_FULL-2.spec_tmp
|
||||||
echo "Requires: python2" >> ${PACKAGE}-$VERSION-2.spec
|
echo "Requires: python2" >> ${PACKAGE}-$VERSION_FULL-2.spec
|
||||||
#echo "Requires: python2-termcolor" >> ${PACKAGE}-$VERSION-2.spec
|
#echo "Requires: python2-termcolor" >> ${PACKAGE}-$VERSION-2.spec
|
||||||
cat ${PACKAGE}-$VERSION-2.spec_tmp >> ${PACKAGE}-$VERSION-2.spec
|
cat ${PACKAGE}-$VERSION_FULL-2.spec_tmp >> ${PACKAGE}-$VERSION_FULL-2.spec
|
||||||
rpm_pack
|
rpm_pack
|
||||||
|
|
||||||
PACKAGE=clickhouse-common-static
|
PACKAGE=clickhouse-common-static
|
||||||
@ -253,18 +253,17 @@ function make_rpm {
|
|||||||
TARGET=x86_64
|
TARGET=x86_64
|
||||||
unpack_pack
|
unpack_pack
|
||||||
|
|
||||||
mv clickhouse-*-${VERSION_STRING}-2.*.rpm ${PACKAGE_DIR}
|
mv clickhouse-*-${VERSION_FULL}-2.*.rpm ${PACKAGE_DIR}
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_tgz {
|
function make_tgz {
|
||||||
get_version
|
[ -z "$VERSION_STRING" ] && get_version
|
||||||
VERSION_STRING+=$VERSION_POSTFIX
|
VERSION_FULL="${VERSION_STRING}${VERSION_POSTFIX}"
|
||||||
VERSION=$VERSION_STRING
|
PACKAGE_DIR=${PACKAGE_DIR=../}
|
||||||
PACKAGE_DIR=../
|
|
||||||
|
|
||||||
for PACKAGE in clickhouse-server clickhouse-client clickhouse-test clickhouse-common-static clickhouse-common-static-dbg; do
|
for PACKAGE in clickhouse-server clickhouse-client clickhouse-test clickhouse-common-static clickhouse-common-static-dbg; do
|
||||||
alien --verbose --to-tgz ${PACKAGE_DIR}${PACKAGE}_${VERSION}_*.deb
|
alien --verbose --to-tgz ${PACKAGE_DIR}${PACKAGE}_${VERSION_FULL}_*.deb
|
||||||
done
|
done
|
||||||
|
|
||||||
mv clickhouse-*-${VERSION_STRING}.tgz ${PACKAGE_DIR}
|
mv clickhouse-*-${VERSION_FULL}.tgz ${PACKAGE_DIR}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user