[ -x /usr/bin/eatmydata ] && eatmydata="eatmydata"
\$eatmydata apt-get -y -o DPkg::Options::=--force-confnew dist-upgrade
- #case $distribution in
- # squeeze) \$eatmydata apt-get -y -o DPkg::Options::=--force-confnew install debhelper/${distribution}-backports ;;
- #esac
- # install llvm/clang (not in pgdg-buildenv because it's architecture-specific)
- case $distribution in
- jessie) ;;
- stretch|bionic|xenial)
- case $architecture in amd64|i386) apt-get -y install llvm-6.0-dev clang-6.0 ;; esac ;;
- buster|disco) apt-get -y install llvm-7-dev clang-7 ;;
- focal|eoan) apt-get -y install llvm-9-dev clang-9 ;;
- *) apt-get -y install llvm-11-dev clang-11 ;;
- esac
- # bionic-updates has libllvm7, but we don't want that yet (2019-09-03)
- [ "$distribution" = "bionic" ] && apt-get remove --purge -y libllvm7
\$eatmydata apt-get -y -o DPkg::Options::=--force-confnew install pgdg-buildenv pgdg-keyring
eatmydata apt-get -y autoremove --purge
- apt-get clean
# remove libreadline-dev if present
if dpkg -l 'libreadline*-dev' | grep -q '^ii'; then
apt-get remove -y 'libreadline*-dev'
fi
- dpkg -l 'libpq*' 'newpid' 'pgdg*' 'postgresql*' 'libreadline*' 'libedit*' '*llvm*' '*clang*' || :
-
+ # install PostgreSQL
+ apt-get -y -o DPkg::Options::=--force-confnew install postgresql-common
# don't create any cluster on PostgreSQL installation
grep -q '^create_main_cluster = false' /etc/postgresql-common/createcluster.conf || sed -i -e 's/.*create_main_cluster.*/create_main_cluster = false/' /etc/postgresql-common/createcluster.conf
+ apt-get -y -o DPkg::Options::=--force-confnew install postgresql-all # separate step to ease bootstrapping
+
+ apt-get clean
+ dpkg -l 'libpq*' 'newpid' 'pgdg*' 'postgresql*' 'libreadline*' 'libedit*' '*llvm*' '*clang*' || :
EOF
) 9> $LOCKDIR/$distribution-$architecture.lock