Skip to content

Commit

Permalink
Add temporary "freetype-config" workaround for PHP 7.3, 7.2, and 7.1 …
Browse files Browse the repository at this point in the history
…on buster

See:

- docker-library/php#865
- https://bugs.php.net/bug.php?id=76324
- php/php-src#3632
- php/php-src@2d03197

This is not necessary for Debian Stretch (where `freetype-config` still exists) nor PHP 7.4+ (where `pkg-config` is used instead/in addition).
  • Loading branch information
Watcher919 committed Jul 19, 2019
1 parent 813aa4b commit 96c94b0
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 7.1/buster/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ RUN set -eux; \

COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
COPY apache2-foreground /usr/local/bin/
Expand Down
3 changes: 3 additions & 0 deletions 7.1/buster/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ RUN set -eux; \

COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions 7.1/buster/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ RUN set -eux; \

COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
3 changes: 3 additions & 0 deletions 7.1/buster/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ RUN set -eux; \

COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions 7.2/buster/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
COPY apache2-foreground /usr/local/bin/
Expand Down
3 changes: 3 additions & 0 deletions 7.2/buster/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions 7.2/buster/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
3 changes: 3 additions & 0 deletions 7.2/buster/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions 7.3/buster/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
COPY apache2-foreground /usr/local/bin/
Expand Down
3 changes: 3 additions & 0 deletions 7.3/buster/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions 7.3/buster/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
Expand Down
3 changes: 3 additions & 0 deletions 7.3/buster/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium

# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config

ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
Expand Down
9 changes: 9 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ for version in "${versions[@]}"; do
-e '/log_limit/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$suite" = 'stretch' ] || { [ "$majorVersion" = '7' ] && [ "$minorVersion" -ge '4' ]; }; then
# https://github.com/docker-library/php/issues/865
# https://bugs.php.net/bug.php?id=76324
# https://github.com/php/php-src/pull/3632
# https://github.com/php/php-src/commit/2d03197749696ac3f8effba6b7977b0d8729fef3
sed -ri \
-e '/freetype-config/d' \
"$version/$suite/$variant/Dockerfile"
fi

# remove any _extra_ blank lines created by the deletions above
gawk '
Expand Down

0 comments on commit 96c94b0

Please sign in to comment.