Fix jessie apt archive (#724)

pull/725/head 2.1.11
Michele Locati 2023-04-11 18:40:29 +02:00 committed by GitHub
parent 1bbb7c4944
commit 3d99a6c40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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