Skip to content

Commit a3f22c9

Browse files
committed
workarround
libmemcachedutil workarround arm32 debian 13
1 parent 07c0011 commit a3f22c9

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

debian.apache.Dockerfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ RUN \
6767
else \
6868
PHP_EXTENSIONS_LIST="$PHP_EXTENSIONS_LIST gd" ; \
6969
fi ; \
70-
install-php-extensions $PHP_EXTENSIONS_LIST ; \
71-
php -m
72-
70+
# bugfix/workarround: https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libmemcachedutil2
71+
DISTRO="$(cat /etc/os-release | grep -E ^ID= | cut -d = -f 2)" ; \
72+
DISTRO_VERSION_NUMBER="$(cat /etc/os-release | grep -E ^VERSION_ID= | cut -d = -f 2 | cut -d '"' -f 2 | cut -d . -f 1,2)" ; \
73+
if [ "$DISTRO" = "debian" ] && [ "$DISTRO_VERSION_NUMBER" -ge 13 ]; then \
74+
if grep -q 'libmemcachedutil2' /usr/local/bin/install-php-extensions && \
75+
! grep -q 'libmemcachedutil2t64' /usr/local/bin/install-php-extensions; then \
76+
echo ">> Applying libmemcachedutil2 → libmemcachedutil2t64 workaround"; \
77+
sed -i 's/libmemcachedutil2/libmemcachedutil2t64/g' /usr/local/bin/install-php-extensions; \
78+
else \
79+
echo ">> Workaround not needed (already fixed upstream)"; \
80+
fi; \
81+
fi; \
82+
install-php-extensions $PHP_EXTENSIONS_LIST ; \
83+
php -m

debian.fpm.Dockerfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ RUN \
6767
else \
6868
PHP_EXTENSIONS_LIST="$PHP_EXTENSIONS_LIST gd" ; \
6969
fi ; \
70-
install-php-extensions $PHP_EXTENSIONS_LIST ; \
71-
php -m
72-
70+
# bugfix/workarround: https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=libmemcachedutil2
71+
DISTRO="$(cat /etc/os-release | grep -E ^ID= | cut -d = -f 2)" ; \
72+
DISTRO_VERSION_NUMBER="$(cat /etc/os-release | grep -E ^VERSION_ID= | cut -d = -f 2 | cut -d '"' -f 2 | cut -d . -f 1,2)" ; \
73+
if [ "$DISTRO" = "debian" ] && [ "$DISTRO_VERSION_NUMBER" -ge 13 ]; then \
74+
if grep -q 'libmemcachedutil2' /usr/local/bin/install-php-extensions && \
75+
! grep -q 'libmemcachedutil2t64' /usr/local/bin/install-php-extensions; then \
76+
echo ">> Applying libmemcachedutil2 → libmemcachedutil2t64 workaround"; \
77+
sed -i 's/libmemcachedutil2/libmemcachedutil2t64/g' /usr/local/bin/install-php-extensions; \
78+
else \
79+
echo ">> Workaround not needed (already fixed upstream)"; \
80+
fi; \
81+
fi; \
82+
install-php-extensions $PHP_EXTENSIONS_LIST ; \
83+
php -m

0 commit comments

Comments
 (0)