Skip to content

Commit b033dae

Browse files
committed
Fix upstream removal of python3-setuptools
1 parent 043437c commit b033dae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ FROM php-base
185185
gpg-agent \
186186
mariadb-client \
187187
rsync \
188+
python3-setuptools \
188189
# PHP Requirements
189190
php7.4 \
190191
php7.4-apcu \
@@ -229,6 +230,13 @@ FROM php-base
229230
COPY --from=composer-build --chown=www-data:www-data --chmod=0550 /tmp/Vendor /var/www/MISP/app/Vendor
230231
COPY --from=composer-build --chown=www-data:www-data --chmod=0550 /tmp/Plugin /var/www/MISP/app/Plugin
231232

233+
# python3-setuptools has been deprecated upstream (and 'distutils.version' is needed by 'mixbox')
234+
RUN cp /usr/lib/python3/dist-packages/setuptools/_distutils/version.py \
235+
/usr/local/lib/python3.12/site-packages/mixbox/distutils_version.py
236+
RUN sed -i 's/from distutils\.version/from mixbox.distutils_version/' \
237+
/usr/local/lib/python3.12/site-packages/mixbox/parser.py
238+
RUN apt-get remove --purge python3-setuptools -y
239+
232240
# Gather these in one layer, only act on actual directories under /etc/php/
233241
RUN <<-EOF
234242
set -- "ssdeep" "rdkafka" "brotli" "simdjson" "zstd"

0 commit comments

Comments
 (0)