From 15aacb40fc008092ea020f5868685f0340c986c8 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 5 Sep 2018 13:14:11 +0300 Subject: [PATCH] dist/debian: robustly enable networking in build_deb.sh build_deb is randomly failing due to not picking up USENETWORK=yes in the config file. Fix by switching to explicit specification of the pbuilder configuration file, instead of hoping pbuilder will pick it up from root's home directory. Partial backport of cd1c79f90f247c24b96e50fadf3b0b10216fc194. --- dist/debian/build_deb.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dist/debian/build_deb.sh b/dist/debian/build_deb.sh index 6916338..2d59e51 100755 --- a/dist/debian/build_deb.sh +++ b/dist/debian/build_deb.sh @@ -131,19 +131,18 @@ if [ "$TARGET" != "trusty" ]; then pystache dist/common/systemd/scylla-jmx.service.mustache "{ $MUSTACHE_DIST }" > debian/scylla-jmx.service fi -cp ./dist/debian/pbuilderrc ~/.pbuilderrc sudo rm -fv /var/cache/pbuilder/scylla-jmx-$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 update +sudo -E DIST=$TARGET /usr/sbin/pbuilder clean --configfile ./dist/debian/pbuilderrc +sudo -E DIST=$TARGET /usr/sbin/pbuilder create --configfile ./dist/debian/pbuilderrc +sudo -E DIST=$TARGET /usr/sbin/pbuilder update --configfile ./dist/debian/pbuilderrc if [ "$TARGET" = "jessie" ]; then echo "apt-get install -y -t jessie-backports ca-certificates-java" > build/jessie-pkginst.sh chmod a+rx build/jessie-pkginst.sh - sudo -E DIST=$TARGET /usr/sbin/pbuilder execute build/jessie-pkginst.sh + sudo -E DIST=$TARGET /usr/sbin/pbuilder --configfile ./dist/debian/pbuilderrc execute build/jessie-pkginst.sh elif [ "$TARGET" = "bionic" ]; then echo "apt-get install -y ca-certificates-java openjdk-8-jdk-headless" > build/bionic-workaround.sh echo "update-ca-certificates -f" >> build/bionic-workaround.sh chmod a+rx build/bionic-workaround.sh - sudo -E DIST=$TARGET /usr/sbin/pbuilder execute --save-after-exec build/bionic-workaround.sh + sudo -E DIST=$TARGET /usr/sbin/pbuilder --configfile ./dist/debian/pbuilderrc execute --save-after-exec build/bionic-workaround.sh fi -sudo -E DIST=$TARGET pdebuild --buildresult build/debs +sudo -E DIST=$TARGET pdebuild --configfile ./dist/debian/pbuilderrc --buildresult build/debs