From b68ee983103d4397cc98e47770c32d71fb185f7e Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Thu, 21 Dec 2017 04:21:54 +0900 Subject: [PATCH] dist/debian: make pbuilder works on Debian 9 On Debian 9, 'pbuilder create' fails because of lack of GPG key for 3rdparty repo, so we need --allow-untrusted on 'pbuilder create' and 'pbuilder update'. Also, apt-key adv --fetch-keys does not works correctly on it, but we can use "curl | apt-key add -" as workaround. Fixes #3088 Signed-off-by: Takuya ASADA Message-Id: <1513797714-18067-1-git-send-email-syuu@scylladb.com> --- dist/debian/build_deb.sh | 4 ++-- dist/debian/debian_install_gpgkey.sh | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/debian/build_deb.sh b/dist/debian/build_deb.sh index 34360cdb1e..a6dbc52bc7 100755 --- a/dist/debian/build_deb.sh +++ b/dist/debian/build_deb.sh @@ -225,9 +225,9 @@ cp ./dist/debian/pbuilderrc ~/.pbuilderrc if [ $NO_CLEAN -eq 0 ]; then sudo rm -fv /var/cache/pbuilder/scylla-server-$TARGET.tgz sudo -E DIST=$TARGET /usr/sbin/pbuilder clean - sudo -E DIST=$TARGET /usr/sbin/pbuilder create + sudo -E DIST=$TARGET /usr/sbin/pbuilder create --allow-untrusted fi -sudo -E DIST=$TARGET /usr/sbin/pbuilder update +sudo -E DIST=$TARGET /usr/sbin/pbuilder update --allow-untrusted if [ "$TARGET" = "trusty" ] || [ "$TARGET" = "xenial" ] || [ "$TARGET" = "yakkety" ] || [ "$TARGET" = "zesty" ] || [ "$TARGET" = "artful" ] || [ "$TARGET" = "bionic" ]; then sudo -E DIST=$TARGET /usr/sbin/pbuilder execute --save-after-exec dist/debian/ubuntu_enable_ppa.sh elif [ "$TARGET" = "jessie" ] || [ "$TARGET" = "stretch" ]; then diff --git a/dist/debian/debian_install_gpgkey.sh b/dist/debian/debian_install_gpgkey.sh index b097aa4386..10f411d236 100644 --- a/dist/debian/debian_install_gpgkey.sh +++ b/dist/debian/debian_install_gpgkey.sh @@ -1,11 +1,12 @@ #!/bin/bash . /etc/os-release -apt-get -y install gnupg-curl ca-certificates if [ "$VERSION_ID" = "8" ]; then + apt-get -y install gnupg-curl ca-certificates apt-key adv --fetch-keys https://download.opensuse.org/repositories/home:/scylladb:/scylla-3rdparty-jessie/Debian_8.0/Release.key elif [ "$VERSION_ID" = "9" ]; then - apt-key adv --fetch-keys https://download.opensuse.org/repositories/home:/scylladb:/scylla-3rdparty-stretch/Debian_9.0/Release.key + apt-get -y install dirmngr curl ca-certificates + curl -fsSL https://download.opensuse.org/repositories/home:/scylladb:/scylla-3rdparty-stretch/Debian_9.0/Release.key | apt-key add - else echo "Unsupported distribution." exit 1