Merge pull request #605 from infosiftr/shared-sodium

Update sodium extension to be shared (so it can be replaced if necessary by users)
This commit is contained in:
yosifkit 2018-03-21 13:34:44 -07:00 committed by GitHub
commit 7707290c53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 12 deletions

View File

@ -122,7 +122,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -157,6 +157,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -123,7 +123,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -158,6 +158,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html

View File

@ -123,7 +123,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -158,6 +158,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -122,7 +122,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -157,6 +157,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -123,7 +123,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -158,6 +158,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html

View File

@ -123,7 +123,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -158,6 +158,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -204,7 +204,7 @@ RUN set -eux; \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -246,6 +246,9 @@ RUN set -eux; \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
COPY apache2-foreground /usr/local/bin/

View File

@ -145,7 +145,7 @@ RUN set -eux; \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -187,6 +187,9 @@ RUN set -eux; \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -146,7 +146,7 @@ RUN set -eux; \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -188,6 +188,9 @@ RUN set -eux; \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html

View File

@ -146,7 +146,7 @@ RUN set -eux; \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -188,6 +188,9 @@ RUN set -eux; \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -116,7 +116,7 @@ RUN set -xe \
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -151,6 +151,9 @@ RUN set -xe \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -139,7 +139,7 @@ RUN set -eux; \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
# https://wiki.php.net/rfc/libsodium
--with-sodium \
--with-sodium=shared \
\
--with-curl \
--with-libedit \
@ -181,6 +181,9 @@ RUN set -eux; \
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
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]

View File

@ -166,6 +166,14 @@ for version in "${versions[@]}"; do
sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile"
fi
# remove any _extra_ blank lines created by the deletions above
awk '
NF > 0 { blank = 0 }
NF == 0 { ++blank }
blank < 2 { print }
' "$version/$suite/$variant/Dockerfile" > "$version/$suite/$variant/Dockerfile.new"
mv "$version/$suite/$variant/Dockerfile.new" "$version/$suite/$variant/Dockerfile"
# automatic `-slim` for stretch
# TODO always add slim once jessie is removed
sed -ri \