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 <URL> | apt-key add -" as workaround.

Fixes #3088

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1513797714-18067-1-git-send-email-syuu@scylladb.com>
This commit is contained in:
Takuya ASADA
2017-12-21 04:21:54 +09:00
committed by Avi Kivity
parent 420b61b466
commit b68ee98310
2 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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