From f1b5ed40eb8ee3c4c11ba66b9b9c1d6478f4ba72 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 8 Jul 2020 13:13:45 +0500 Subject: [PATCH] Remove ppa:ondrej/php from the list of apt repositories (#1104) * Remove ppa:ondrej/php from the list of apt repositories * Add documentation and fixes * fix documentation Co-authored-by: Sergey Dolin --- images/linux/scripts/helpers/document.sh | 12 ++++++++++++ images/linux/scripts/installers/php.sh | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/images/linux/scripts/helpers/document.sh b/images/linux/scripts/helpers/document.sh index e7311689c..9f6830efa 100644 --- a/images/linux/scripts/helpers/document.sh +++ b/images/linux/scripts/helpers/document.sh @@ -28,3 +28,15 @@ function DocumentInstalledItem { function DocumentInstalledItemIndent { WriteItem " - $1" } + +function AddBlockquote { + WriteItem "> $1" +} + +function StartCode { + WriteItem "``````" +} + +function EndCode { + WriteItem "``````" +} diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index f5f8b9733..0c4bbaabb 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -134,5 +134,17 @@ for version in $php_versions; do DocumentInstalledItem "PHP $version ($(php$version --version | head -n 1))" done +# ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php +# see https://github.com/actions/virtual-environments/issues/1084 +if isUbuntu20 ; then + rm /etc/apt/sources.list.d/ondrej-ubuntu-php-focal.list + apt-get update + AddBlockquote "To use ppa:ondrej/php APT repository On Ubuntu 20.04 it is necessary to add it to the APT sources" + StartCode + WriteItem apt-add-repository ppa:ondrej/php -y + WriteItem apt-get update + EndCode +fi + DocumentInstalledItem "Composer ($(composer --version))" DocumentInstalledItem "PHPUnit ($(phpunit --version))"