diff --git a/README.md b/README.md index b068398..16919e6 100644 --- a/README.md +++ b/README.md @@ -390,6 +390,7 @@ Here's the list of all the supported environment variables: | oci8 & pdo_oci | `IPE_INSTANTCLIENT_BASIC=1` | The oci8 and pdo_oci PHP extensions require [Oracle Instant Client](https://www.oracle.com/database/technologies/instant-client.html). In order to save disk space, we install the Basic Lite version: if you want to install the Basic (non-lite) version simply set this environment variable | | http, intl, mongodb | `IPE_ICU_EN_ONLY=1` | Some extensions require the ICU library, use this flag to install a smaller, but English-only, ICU library on Alpine 3.16 and later | | pspell | `IPE_ASPELL_LANGUAGES='...'` | Configure the languages to be made available (for example: `IPE_ASPELL_LANGUAGES='en fr'`). If omitted, we'll assume `en` | +| | `IPE_DEB_ARCHIVE` & `IPE_DEB_ARCHIVE_SECURITY` | The APT packages of very old Debian versions (eg Jessie) may have been archived: you can use these environment variables to specify custom URLs of these APT archives | ## Special requirements diff --git a/install-php-extensions b/install-php-extensions index 6819e9e..9634c52 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -3898,9 +3898,21 @@ invokeAptGetUpdate() { fi IPE_APTGET_INSTALLOPTIONS='' if ! grep -q 'VERSION="8 (jessie)"' /etc/os-release; then + IPE_APTGETUPDATE_ALREADY=y DEBIAN_FRONTEND=noninteractive apt-get update -q return fi + # See https://www.debian.org/distrib/archive.en.html for a list of mirrors + if test -z "${IPE_DEB_ARCHIVE:-}"; then + IPE_DEB_ARCHIVE=http://archive.kernel.org/debian-archive + fi + 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;\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 invokeAptGetUpdate_tmp="$(mktemp)" DEBIAN_FRONTEND=noninteractive apt-get update -q 2>"$invokeAptGetUpdate_tmp" if test -s "$invokeAptGetUpdate_tmp"; then