mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
112 lines
4.3 KiB
Plaintext
112 lines
4.3 KiB
Plaintext
# ubuntu:
|
|
# sudo DIST=trusty pbuilder create --configfile debian/.pbuilderrc && DIST=trusty pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=xenial pbuilder create --configfile debian/.pbuilderrc && DIST=xenial pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=zesty pbuilder create --configfile debian/.pbuilderrc && DIST=zesty pdebuild --configfile debian/.pbuilderrc
|
|
# debian:
|
|
# sudo DIST=experimental pbuilder create --configfile debian/.pbuilderrc && DIST=experimental pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=testing pbuilder create --configfile debian/.pbuilderrc && DIST=testing pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=unstable pbuilder create --configfile debian/.pbuilderrc && DIST=unstable pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=stable pbuilder create --configfile debian/.pbuilderrc && DIST=stable pdebuild --configfile debian/.pbuilderrc
|
|
# TODO:
|
|
# sudo DIST=zesty ARCH=i386 pbuilder create --configfile debian/.pbuilderrc && DIST=zesty ARCH=i386 pdebuild --configfile debian/.pbuilderrc
|
|
# sudo DIST=experimental ARCH=arm64 pbuilder create --configfile debian/.pbuilderrc && DIST=experimental ARCH=arm64 pdebuild --configfile debian/.pbuilderrc
|
|
|
|
# from https://wiki.debian.org/PbuilderTricks :
|
|
|
|
# Codenames for Debian suites according to their alias. Update these when
|
|
# needed.
|
|
UNSTABLE_CODENAME="sid"
|
|
TESTING_CODENAME="buster"
|
|
STABLE_CODENAME="stretch"
|
|
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
|
|
|
|
# List of Debian suites.
|
|
DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME $STABLE_BACKPORTS_SUITE
|
|
"experimental" "unstable" "testing" "stable")
|
|
|
|
# List of Ubuntu suites. Update these when needed.
|
|
UBUNTU_SUITES=("zesty" "xenial" "trusty")
|
|
|
|
# Mirrors to use. Update these to your preferred mirror.
|
|
#DEBIAN_MIRROR="deb.debian.org"
|
|
#UBUNTU_MIRROR="mirrors.kernel.org"
|
|
|
|
UBUNTU_MIRROR="mirror.yandex.ru"
|
|
DEBIAN_MIRROR="mirror.yandex.ru"
|
|
|
|
# Optionally use the changelog of a package to determine the suite to use if
|
|
# none set.
|
|
if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
|
|
DIST=$(dpkg-parsechangelog --show-field=Distribution)
|
|
fi
|
|
|
|
# Optionally set a default distribution if none is used. Note that you can set
|
|
# your own default (i.e. ${DIST:="unstable"}).
|
|
: ${DIST:="$(lsb_release --short --codename)"}
|
|
|
|
# Optionally change Debian codenames in $DIST to their aliases.
|
|
case "$DIST" in
|
|
$UNSTABLE_CODENAME)
|
|
DIST="unstable"
|
|
;;
|
|
$TESTING_CODENAME)
|
|
DIST="testing"
|
|
;;
|
|
$STABLE_CODENAME)
|
|
DIST="stable"
|
|
;;
|
|
esac
|
|
|
|
# Optionally set the architecture to the host architecture if none set. Note
|
|
# that you can set your own default (i.e. ${ARCH:="i386"}).
|
|
: ${ARCH:="$(dpkg --print-architecture)"}
|
|
|
|
NAME="$DIST"
|
|
if [ -n "${ARCH}" ]; then
|
|
NAME="$NAME-$ARCH"
|
|
DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
|
|
fi
|
|
|
|
BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
|
|
DISTRIBUTION="$DIST"
|
|
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
|
|
APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
|
|
BUILDPLACE="/var/cache/pbuilder/build/"
|
|
|
|
if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
|
|
# Debian configuration
|
|
OSNAME=debian
|
|
MIRRORSITE="http://$DEBIAN_MIRROR/$OSNAME/"
|
|
COMPONENTS="main contrib non-free"
|
|
if $(echo "$STABLE_CODENAME stable" | grep -q $DIST); then
|
|
OTHERMIRROR="$OTHERMIRROR | deb $MIRRORSITE $STABLE_BACKPORTS_SUITE $COMPONENTS"
|
|
fi
|
|
# APTKEYRINGS=/usr/share/keyrings/debian-archive-keyring.gpg
|
|
# sudo apt install debian-archive-keyring
|
|
DEBOOTSTRAPOPTS+=( '--keyring' '/usr/share/keyrings/debian-archive-keyring.gpg' )
|
|
elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
|
|
# Ubuntu configuration
|
|
OSNAME=ubuntu
|
|
MIRRORSITE="http://$UBUNTU_MIRROR/$OSNAME/"
|
|
COMPONENTS="main restricted universe multiverse"
|
|
OTHERMIRROR+="deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/$OSNAME $DIST main"
|
|
# deb http://apt.llvm.org/zesty/ llvm-toolchain-zesty-5.0 main
|
|
ALLOWUNTRUSTED=yes
|
|
else
|
|
echo "Unknown distribution: $DIST"
|
|
exit 1
|
|
fi
|
|
|
|
echo "using $NAME $OSNAME $DIST $ARCH $LOGNAME"
|
|
|
|
CCACHEDIR=/var/cache/pbuilder/ccache
|
|
export CCACHE_PREFIX=
|
|
|
|
export DEB_BUILD_OPTIONS=parallel=`nproc`
|
|
|
|
# Floating bug with permissions:
|
|
sudo mkdir -p /var/cache/pbuilder/ccache
|
|
sudo chmod -R a+rwx /var/cache/pbuilder/ccache
|
|
|
|
# echo "DEBOOTSTRAPOPTS = ${DEBOOTSTRAPOPTS[@]}"
|