From 7655337ec9a43dfbe8e2e889c31fb6ad2e68f7e0 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 27 Apr 2023 10:40:50 +0200 Subject: [PATCH] Fix stretch apt archive (#737) --- .github/workflows/test-extensions.yml | 2 +- install-php-extensions | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-extensions.yml b/.github/workflows/test-extensions.yml index 67d9837..207801c 100644 --- a/.github/workflows/test-extensions.yml +++ b/.github/workflows/test-extensions.yml @@ -98,7 +98,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - run: docker run --rm --volume "$(pwd):/app" --workdir /app php:7.3-stretch ./scripts/test-restore-apt + - run: docker run --rm --volume "$(pwd):/app" --workdir /app php:8.2-bullseye ./scripts/test-restore-apt test_custom_version: name: Test installing specific versions needs: diff --git a/install-php-extensions b/install-php-extensions index 8234a45..7875814 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -3925,7 +3925,12 @@ invokeAptGetUpdate() { return fi IPE_APTGET_INSTALLOPTIONS='' - if ! grep -q 'VERSION="8 (jessie)"' /etc/os-release; then + invokeAptGetUpdate_fixdistro='' + if grep -q 'VERSION="8 (jessie)"' /etc/os-release; then + invokeAptGetUpdate_fixdistro=jessie + elif grep -q 'VERSION="9 (stretch)"' /etc/os-release; then + invokeAptGetUpdate_fixdistro=stretch + else IPE_APTGETUPDATE_ALREADY=y DEBIAN_FRONTEND=noninteractive apt-get update -q return @@ -3937,7 +3942,7 @@ invokeAptGetUpdate() { if test -z "${IPE_DEB_ARCHIVE_SECURITY:-}"; then IPE_DEB_ARCHIVE_SECURITY=http://archive.kernel.org/debian-archive/debian-security fi - sed -ri "s;^(\s*deb\s+http://(httpredir|deb).debian.org/debian\s+jessie-updates\b.*);#\1;" /etc/apt/sources.list + sed -ri "s;^(\s*deb\s+http://(httpredir|deb).debian.org/debian\s+$invokeAptGetUpdate_fixdistro-updates\b.*);#\1;" /etc/apt/sources.list sed -ri "s;^(\s*deb\s+)http://(httpredir|deb).debian.org;\1$IPE_DEB_ARCHIVE;" /etc/apt/sources.list sed -ri "s;^(\s*deb\s+)http://security.debian.org/debian-security;\1$IPE_DEB_ARCHIVE_SECURITY;" /etc/apt/sources.list sed -ri "s;^(\s*deb\s+)http://security.debian.org;\1$IPE_DEB_ARCHIVE_SECURITY;" /etc/apt/sources.list