Skip to content

Commit

Permalink
Merge #417 - Fix #416 - for debian 12 issue that caused libraries for…
Browse files Browse the repository at this point in the history
… extensions to be uninstalled

Fixes: #416
  • Loading branch information
williamdes committed Jun 29, 2023
2 parents adf9118 + ab6a09a commit 87bbb8d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Update to PHP 8.2 (#411)
- Add back a `/sessions` volume for sessions persistence (#399)
- Support adding custom configurations in `/etc/phpmyadmin/conf.d` (#401)
- Fix for debian 12 issue (#416) that caused libraries for extensions to be uninstalled

## [5.2.1] - 2023-02-08

Expand Down
8 changes: 6 additions & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ RUN set -ex; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
extdir="$(php -r 'echo ini_get("extension_dir");')"; \
ldd "$extdir"/*.so \
| awk '/=>/ { print $3 }' \
| awk '{print $1} {system("realpath " $1)}' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down
8 changes: 6 additions & 2 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ RUN set -ex; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
extdir="$(php -r 'echo ini_get("extension_dir");')"; \
ldd "$extdir"/*.so \
| awk '/=>/ { print $3 }' \
| awk '{print $1} {system("realpath " $1)}' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down
8 changes: 6 additions & 2 deletions fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ RUN set -ex; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
extdir="$(php -r 'echo ini_get("extension_dir");')"; \
ldd "$extdir"/*.so \
| awk '/=>/ { print $3 }' \
| awk '{print $1} {system("realpath " $1)}' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1);

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
Expand Down

0 comments on commit 87bbb8d

Please sign in to comment.