>From 53ff1cca3306d71419c2f185dfc8dbd5438ae735 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 29 Sep 2015 11:52:30 +0200 Subject: [PATCH 1/3] CI: Don't depend on user input with apt-get Resolves: https://fedorahosted.org/sssd/ticket/2433 --- contrib/ci/README.md | 5 +++++ contrib/ci/distro.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/ci/README.md b/contrib/ci/README.md index 6b5f7f30eac8327d5aa45c3bfefd57e8d3109fe0..50b73ec354f92e9909a57a82ec72ba1a8516aa1c 100644 --- a/contrib/ci/README.md +++ b/contrib/ci/README.md @@ -47,6 +47,11 @@ and Debian-based distros: Where `` is the user invoking CI. +You may also want to allow passing DEBIAN_FRONTEND environment variable to +apt-get on Debian, so CI can request non-interactive package installation: + + Defaults!/usr/bin/apt-get env_keep += "DEBIAN_FRONTEND" + On Red Hat distros a repository carrying dependencies missing from some distros needs to be added to yum configuration. See instructions on the [Copr project page](http://copr-fe.cloud.fedoraproject.org/coprs/lslebodn/sssd-deps/). diff --git a/contrib/ci/distro.sh b/contrib/ci/distro.sh index 5416bfff325c4e5d0a10ebea67cba26e20e03fd5..6a2aebca6f987de6207cb5dc1ade65d8615a70e1 100644 --- a/contrib/ci/distro.sh +++ b/contrib/ci/distro.sh @@ -60,7 +60,8 @@ function distro_pkg_install() {print} END {exit s}' elif [[ "$DISTRO_BRANCH" == -debian-* ]]; then - [ $# != 0 ] && sudo -p "$prompt" apt-get --yes install -- "$@" + [ $# != 0 ] && DEBIAN_FRONTEND=noninteractive \ + sudo -p "$prompt" apt-get --yes install -- "$@" else echo "Cannot install packages on $DISTRO_BRANCH" >&2 exit 1 -- 2.5.0