diff --git a/5.5/Dockerfile b/5.5/Dockerfile index c821362595..2754bfe8e3 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -23,7 +23,6 @@ ENV PHP_VERSION 5.5.26 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -31,15 +30,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 1f6f617296..0f193a9b86 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -36,7 +36,6 @@ ENV PHP_VERSION 5.5.26 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -44,15 +43,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile index 4294535629..3a410e9b8f 100644 --- a/5.5/fpm/Dockerfile +++ b/5.5/fpm/Dockerfile @@ -24,7 +24,6 @@ ENV PHP_VERSION 5.5.26 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -32,15 +31,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index e1137aef4a..6fa6255495 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -23,7 +23,6 @@ ENV PHP_VERSION 5.6.10 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -31,15 +30,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 3764d8b158..4208b3fa2f 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -36,7 +36,6 @@ ENV PHP_VERSION 5.6.10 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -44,15 +43,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 0e03eb95fe..ddc31a0919 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -24,7 +24,6 @@ ENV PHP_VERSION 5.6.10 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - bzip2 \ libcurl4-openssl-dev \ libpcre3-dev \ libreadline6-dev \ @@ -32,15 +31,16 @@ RUN buildDeps=" \ libsqlite3-dev \ libssl-dev \ libxml2-dev \ + xz-utils \ " \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o php.tar.xz \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o php.tar.xz.asc \ + && gpg --verify php.tar.xz.asc \ && mkdir -p /usr/src/php \ - && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ + && tar -xof php.tar.xz -C /usr/src/php --strip-components=1 \ + && rm php.tar.xz* \ && cd /usr/src/php \ && ./configure \ --with-config-file-path="$PHP_INI_DIR" \ diff --git a/update.sh b/update.sh index dff12ceb90..418ab4a617 100755 --- a/update.sh +++ b/update.sh @@ -23,7 +23,18 @@ packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')" curl -sSL "${packagesUrl}" > "$packages" for version in "${versions[@]}"; do - fullVersion="$(sed 's/;/;\n/g' $packages | grep -e 'php-'"$version"'.*\.tar\.bz2' | sed -r 's/.*php-('"$version"'[^"]+)\.tar\.bz2.*/\1/' | sort -V | tail -1)" + fullVersion='' + for comp in xz bz2; do + fullVersion="$(sed 's/;/;\n/g' $packages | grep -e 'php-'"$version"'.*\.tar\.'"$comp" | sed -r 's/.*php-('"$version"'[^"]+)\.tar\.'"$comp"'.*/\1/' | sort -V | tail -1)" + if [ "$fullVersion" ]; then + break + fi + done + if [ -z "$fullVersion" ]; then + echo >&2 "ERROR: missing $version in $packagesUrl" + continue + fi + gpgKey="${gpgKeys[$version]}" if [ -z "$gpgKey" ]; then echo >&2 "ERROR: missing GPG key fingerprint for $version"