diff --git a/Dockerfile b/Dockerfile index 773e993034..a2c7a7da78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,37 +40,23 @@ FROM alpine/git AS base # build args specifying the branches for webwork2 and pg used to build the image - -# To use the master branches of webwork2 and pg -#ARG WEBWORK2_BRANCH=master -#ARG PG_BRANCH=master -# To use the 2.15 branches of webwork2 and pg from the "official" GitHub repositories -ARG WEBWORK2_GIT_URL=https://github.com/openwebwork/webwork2.git -ARG WEBWORK2_BRANCH=develop -ARG PG_GIT_URL=https://github.com/openwebwork/pg.git -ARG PG_BRANCH=develop - -# assign the build args to the ENV variables -ENV WEBWORK2_GIT_URL_ENV ${WEBWORK2_GIT_URL} -ENV WEBWORK2_BRANCH_ENV ${WEBWORK2_BRANCH} -ENV PG_GIT_URL_ENV ${PG_GIT_URL} -ENV PG_BRANCH_ENV ${PG_BRANCH} +ARG WEBWORK2_GIT_URL +ARG WEBWORK2_BRANCH +ARG PG_GIT_URL +ARG PG_BRANCH WORKDIR /opt/base -RUN echo Cloning branch $WEBWORK2_BRANCH_ENV from $WEBWORK2_GIT_URL_ENV \ - && echo git clone --single-branch --branch ${WEBWORK2_BRANCH_ENV} --depth 1 $WEBWORK2_GIT_URL_ENV \ - && git clone --single-branch --branch ${WEBWORK2_BRANCH_ENV} --depth 1 $WEBWORK2_GIT_URL_ENV \ +RUN echo Cloning branch $WEBWORK2_BRANCH from $WEBWORK2_GIT_URL \ + && echo git clone --single-branch --branch ${WEBWORK2_BRANCH} --depth 1 $WEBWORK2_GIT_URL \ + && git clone --single-branch --branch ${WEBWORK2_BRANCH} --depth 1 $WEBWORK2_GIT_URL \ && rm -rf webwork2/.git webwork2/{*ignore,Dockerfile,docker-compose.yml,docker-config} -RUN echo Cloning branch $PG_BRANCH_ENV branch from $PG_GIT_URL_ENV \ - && echo git clone --single-branch --branch ${PG_BRANCH_ENV} --depth 1 $PG_GIT_URL_ENV \ - && git clone --single-branch --branch ${PG_BRANCH_ENV} --depth 1 $PG_GIT_URL_ENV \ +RUN echo Cloning branch $PG_BRANCH branch from $PG_GIT_URL \ + && echo git clone --single-branch --branch ${PG_BRANCH} --depth 1 $PG_GIT_URL \ + && git clone --single-branch --branch ${PG_BRANCH} --depth 1 $PG_GIT_URL \ && rm -rf pg/.git -RUN git clone --single-branch --branch master --depth 1 https://github.com/mathjax/MathJax \ - && rm -rf MathJax/.git - # Optional - include OPL (also need to uncomment further below when an included OPL is desired): #RUN git clone --single-branch --branch master --depth 1 https://github.com/openwebwork/webwork-open-problem-library.git \ # && rm -rf webwork-open-problem-library/.git @@ -81,9 +67,7 @@ RUN git clone --single-branch --branch master --depth 1 https://github.com/mathj # we need to change FROM before setting the ENV variables -FROM ubuntu:18.04 -# Once ubuntu 20.04 is used, CGI.pm and CGI::Cookie will be new enough to -# drop the cpanm install of CGI::Cookie which is needed to upgrade it. +FROM ubuntu:20.04 ENV WEBWORK_URL=/webwork2 \ WEBWORK_ROOT_URL=http://localhost \ @@ -111,14 +95,10 @@ ENV WEBWORK_ROOT=$APP_ROOT/webwork2 \ # ================================================================== -# Phase 3 - Ubuntu 18.04 base image + required packages +# Phase 3 - Ubuntu 20.04 base image + required packages -# Packages changes/added for ubuntu 18.04: - -# For ubuntu 18.04 libemail-address-xs-perl installed from Ubuntu, for 16.04 it would be installed using cpamn -# -# texlive-generic-recommended # For ubuntu 16.04 - contains path.sty -# texlive-plain-generic # For ubuntu 18.04 - contains path.sty +# Packages changes/added for ubuntu 20.04: +# libcgi-pm-perl (for CGI::Cookie), libdbd-mariadb-perl # Do NOT include "apt-get -y upgrade" # see: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ @@ -131,9 +111,11 @@ RUN apt-get update \ gcc \ libapache2-request-perl \ libarchive-zip-perl \ + libcgi-pm-perl \ libcrypt-ssleay-perl \ libdatetime-perl \ libdbd-mysql-perl \ + libdbd-mariadb-perl \ libemail-address-xs-perl \ libexception-class-perl \ libextutils-xsbuilder-perl \ @@ -200,6 +182,7 @@ RUN apt-get update \ libcpanel-json-xs-perl \ make \ netpbm \ + patch \ preview-latex-style \ texlive \ texlive-latex-extra \ @@ -221,6 +204,8 @@ RUN apt-get update \ fonts-linuxlibertine \ lmodern \ zip \ + iputils-ping \ + imagemagick \ jq \ npm \ && apt-get clean \ @@ -231,14 +216,13 @@ RUN apt-get update \ # ================================================================== -# Phase 4 - Install webwork2, pg, MathJaX which were downloaded to /opt/base/ in phase 1 +# Phase 4 - Install webwork2 and pg which were downloaded to /opt/base/ in phase 1 # Option: Install the OPL in the image also (about 850 MB) RUN mkdir -p $APP_ROOT/courses $APP_ROOT/libraries $APP_ROOT/libraries/webwork-open-problem-library $APP_ROOT/webwork2 /www/www/html COPY --from=base /opt/base/webwork2 $APP_ROOT/webwork2 COPY --from=base /opt/base/pg $APP_ROOT/pg -COPY --from=base /opt/base/MathJax $APP_ROOT/MathJax # Optional - include OPL (also need to uncomment above to clone from GitHub when needed): # ??? could/should this include the main OPL = /opt/base/webwork-open-problem-library/OpenProblemLibrary and not Contrib and Pending ??? @@ -278,16 +262,9 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \ # Phase 6 - install additional Perl modules from CPAN (not packaged for Ubuntu or outdated in Ubuntu) -# Ubuntu 18.04 has CGI.pm 4.38-1 which is too old to support the cookie samesite attribute added in CGI.pm 4.45 - so install CGI::Cookie here to get an upgraded version. - -RUN cpanm install Statistics::R::IO CGI::Cookie \ +RUN cpanm install Statistics::R::IO \ && rm -fr ./cpanm /root/.cpanm /tmp/* -# Now installed from Ubuntu packages: -# XML::Parser::EasyTree Iterator Iterator::Util Pod::WSDL Array::Utils HTML::Template Mail::Sender Email::Sender::Simple Data::Dump -# For Ubuntu 16.04 would also need: -# Email::Address::XS - # ================================================================== # Phase 7 - setup apache @@ -298,6 +275,10 @@ RUN cpanm install Statistics::R::IO CGI::Cookie \ # Always provide the dummy default-ssl.conf file: COPY docker-config/ssl/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf +# Patch files that are applied below +COPY docker-config/xmlrpc-lite-utf8-fix.patch /tmp +COPY docker-config/imagemagick-allow-pdf-read.patch /tmp + # However SSL will only be enabled at container startup via docker-entrypoint.sh. RUN cd $APP_ROOT/webwork2/conf \ @@ -316,13 +297,20 @@ RUN cd $APP_ROOT/webwork2/conf \ && sed -i -e 's/^$/\ PerlPassEnv WEBWORK_URL\n\ PerlPassEnv WEBWORK_ROOT_URL\n\ - PerlPassEnv WEBWORK_DB_DSN\n\ + PerlPassEnv WEBWORK_DB_DRIVER\n\ + PerlPassEnv WEBWORK_DB_NAME\n\ + PerlPassEnv WEBWORK_DB_HOST\n\ + PerlPassEnv WEBWORK_DB_PORT\n\ PerlPassEnv WEBWORK_DB_USER\n\ PerlPassEnv WEBWORK_DB_PASSWORD\n\ PerlPassEnv WEBWORK_SMTP_SERVER\n\ PerlPassEnv WEBWORK_SMTP_SENDER\n\ PerlPassEnv WEBWORK_TIMEZONE\n\ - \n/' /etc/apache2/conf-enabled/webwork.conf + \n/' /etc/apache2/conf-enabled/webwork.conf \ + && patch -p1 -d / < /tmp/xmlrpc-lite-utf8-fix.patch \ + && rm /tmp/xmlrpc-lite-utf8-fix.patch \ + && patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \ + && rm /tmp/imagemagick-allow-pdf-read.patch EXPOSE 80 WORKDIR $APP_ROOT diff --git a/docker-compose.yml b/docker-compose.yml index cf76cc4ca3..66dabd5620 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,12 +2,39 @@ version: '3.5' services: db: image: mariadb:10.4 + + # Set a fixed container name, so it does not depend on the directory name + container_name: webwork2_db_1 + volumes: - mysql:/var/lib/mysql # Set up UTF8MB4 in config file for the container. # Needs to be done BEFORE the database is created. + # *** Some other MariaDB settings were modified in the sample file: + # wait_timeout, interactive_timeout, max_connections, net_read_timeout + # + skip-name-resolve + # Note: It seems different versions of the MariaDB container need + # this file in different locations. Put in in both places. - "./docker-config/db/mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf" + - "./docker-config/db/mariadb.cnf:/etc/mysql/mariadb.cnf" + + # Tuning MariaDB config - sample file + # The sample file modifies wait_timeout, and adds skip-name-resolve + #- "./docker-config/db/my.cnf:/etc/mysql/my.cnf" + + # Adjust open file limits for MariaDB/mySQL - sample file + #- "./docker-config/db/limits.conf:/etc/security/limits.conf" + + # Provides read only access to the host system's /etc/localtime - tested on Linux hosts + #- "/etc/localtime:/etc/localtime:ro" + + # The ulimits lines were only tested on Linux hosts in conjuction woth the limits.conf file +# ulimits: +# nofile: +# soft: 4096 +# hard: 4096 + restart: always environment: # When the MariaDB container is first started it will set the @@ -21,30 +48,50 @@ services: MYSQL_USER: ${WEBWORK_DB_USER} MYSQL_PASSWORD: ${WEBWORK_DB_PASSWORD} + # A timezone for the DB server can be set: + #TZ: zone/city + # where zone/city must be a valid setting. + # "/usr/bin/timedatectl list-timezones" on an Ubuntu system with + # that tool installed will find valid values. + # See: https://stackoverflow.com/questions/39172652/using-docker-compose-to-set-containers-timezones + app: + # Modifying the image name can be helpful to create a new image instead of + # overwriting the "standard" one during testing. image: webwork - # Select the appropriate "build:" block: - - # For use/building when docker-compose.yml is in the webwork2 directory - build: . - # For use/building when docker-compose.yml is OUTSIDE the webwork2 directory. - # For example, if multiple hosts use a NFS shared webwork2/ directory, and - # each one needs customized values in docker-compose.yml. - # Under typical use, the Dockerfile should not need to be customized per host, - # but may contain some changes/additions relative to the standard webwork image. - # - #build: - # context: /Path_To/webwork2/ - # dockerfile: /Path_To/Dockerfile + # Set a fixed container name, so it does not depend on the directory name + container_name: webwork2_app_1 + + # Set up the "build:" configuration: + build: + # For use/building when docker-compose.yml is in the webwork2 directory + context: . + # For use/building when docker-compose.yml is OUTSIDE the webwork2 directory. + # For example, if multiple hosts use a NFS shared webwork2/ directory, and + # each one needs customized values in docker-compose.yml. + # Under typical use, the Dockerfile should not need to be customized per host, + # but may contain some changes/additions relative to the standard webwork image. + # + # context: /Path_To/webwork2/ + # dockerfile: /Path_To/Dockerfile + args: + # build args specifying the branches for webwork2 and pg used to build the image + # To use the master branches of webwork2 and pg + #- ARG WEBWORK2_BRANCH=master + #- ARG PG_BRANCH=master + # To use the 2.15 branches of webwork2 and pg from the "official" GitHub repositories + - WEBWORK2_GIT_URL=https://github.com/openwebwork/webwork2.git + - WEBWORK2_BRANCH=develop + - PG_GIT_URL=https://github.com/openwebwork/pg.git + - PG_BRANCH=develop depends_on: - db - r volumes: - # ====================================================================== # If you are using locally modified webwork2 files, then @@ -138,15 +185,14 @@ services: APACHE_RUN_GROUP: www-data # Standard database environment variables needed by WeBWorK: + + # Select which DBD driver to use + WEBWORK_DB_DRIVER: MariaDB + # WEBWORK_DB_DRIVER: mysql + WEBWORK_DB_HOST: db WEBWORK_DB_PORT: 3306 WEBWORK_DB_NAME: webwork - WEBWORK_DB_DSN: DBI:mysql:webwork:db:3306 - # We currently need to put the same data in the WEBWORK_DB_DSN line above - # as we cannot use the following form, as it would be done before the values - # needed are available. - # NO GOOD # WEBWORK_DB_DSN: DBI:mysql${WEBWORK_DB_NAME}:${WEBWORK_DB_HOST}:${WEBWORK_DB_PORT} - # These are set in the .env file and import values from there WEBWORK_DB_PASSWORD: ${WEBWORK_DB_PASSWORD} @@ -196,4 +242,8 @@ services: volumes: oplVolume: + driver: local + name: webwork2_oplVolume mysql: + driver: local + name: webwork2_mysql diff --git a/docker-config/db/limits.conf b/docker-config/db/limits.conf new file mode 100644 index 0000000000..036d7d58be --- /dev/null +++ b/docker-config/db/limits.conf @@ -0,0 +1,58 @@ +# /etc/security/limits.conf +# +#Each line describes a limit for a user in the form: +# +# +# +#Where: +# can be: +# - a user name +# - a group name, with @group syntax +# - the wildcard *, for default entry +# - the wildcard %, can be also used with %group syntax, +# for maxlogin limit +# - NOTE: group and wildcard limits are not applied to root. +# To apply a limit to the root user, must be +# the literal username root. +# +# can have the two values: +# - "soft" for enforcing the soft limits +# - "hard" for enforcing hard limits +# +# can be one of the following: +# - core - limits the core file size (KB) +# - data - max data size (KB) +# - fsize - maximum filesize (KB) +# - memlock - max locked-in-memory address space (KB) +# - nofile - max number of open file descriptors +# - rss - max resident set size (KB) +# - stack - max stack size (KB) +# - cpu - max CPU time (MIN) +# - nproc - max number of processes +# - as - address space limit (KB) +# - maxlogins - max number of logins for this user +# - maxsyslogins - max number of logins on the system +# - priority - the priority to run user process with +# - locks - max number of file locks the user can hold +# - sigpending - max number of pending signals +# - msgqueue - max memory used by POSIX message queues (bytes) +# - nice - max nice priority allowed to raise to values: [-20, 19] +# - rtprio - max realtime priority +# - chroot - change root to directory (Debian-specific) +# +# +# + +#* soft core 0 +#root hard core 100000 +#* hard rss 10000 +#@student hard nproc 20 +#@faculty soft nproc 20 +#@faculty hard nproc 50 +#ftp hard nproc 0 +#ftp - chroot /ftp +#@student - maxlogins 4 + +mysql soft nofile 4096 +mysql hard nofile 4096 +# End of file diff --git a/docker-config/db/mariadb.cnf b/docker-config/db/mariadb.cnf index 88245b35b9..440d80a867 100644 --- a/docker-config/db/mariadb.cnf +++ b/docker-config/db/mariadb.cnf @@ -39,6 +39,9 @@ max_connections = 500 # wait_timeout (default usually 28800), # interactive_timeout (default usually 28800), # net_read_timeout (default usually 60) -wait_timeout = 28800 +wait_timeout = 86400 interactive_timeout = 28800 net_read_timeout = 3600 + +# WW add skip-name-resolve (saves time) +skip-name-resolve diff --git a/docker-config/db/my.cnf b/docker-config/db/my.cnf new file mode 100644 index 0000000000..287d7d2d71 --- /dev/null +++ b/docker-config/db/my.cnf @@ -0,0 +1,196 @@ +# MariaDB database server configuration file. +# +# You can copy this file to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# * Basic Settings +# +#user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc_messages_dir = /usr/share/mysql +lc_messages = en_US +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +#bind-address = 127.0.0.1 +# +# * Fine Tuning +# +max_connections = 100 +connect_timeout = 5 +# +# WW: wait_timeout 86400 instead of 600, decreases frequency of connection timeouts +wait_timeout = 86400 +# +max_allowed_packet = 16M +thread_cache_size = 128 +sort_buffer_size = 4M +bulk_insert_buffer_size = 16M +tmp_table_size = 32M +max_heap_table_size = 32M +# +# WW add skip-name-resolve (saves time) +skip-name-resolve +# +# * MyISAM +# +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched. On error, make copy and try a repair. +myisam_recover_options = BACKUP +key_buffer_size = 128M +#open-files-limit = 2000 +table_open_cache = 400 +myisam_sort_buffer_size = 512M +concurrent_insert = 2 +read_buffer_size = 2M +read_rnd_buffer_size = 1M +# +# * Query Cache Configuration +# +# Cache only tiny result sets, so we can fit more in the query cache. +query_cache_limit = 128K +query_cache_size = 64M +# for more write intensive setups, set to DEMAND or OFF +#query_cache_type = DEMAND +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +# +# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. +# +# we do want to know about network errors and such +#log_warnings = 2 +# +# Enable the slow query log to see queries with especially long duration +#slow_query_log[={0|1}] +# WW DEVELOP - may want to enable next line +#slow-query-log = 1 +slow_query_log_file = /var/log/mysql/mariadb-slow.log +long_query_time = 10 +#log_slow_rate_limit = 1000 +#log_slow_verbosity = query_plan + +#log-queries-not-using-indexes +#log_slow_admin_statements +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#report_host = master1 +#auto_increment_increment = 2 +#auto_increment_offset = 1 +#log_bin = /var/log/mysql/mariadb-bin +#log_bin_index = /var/log/mysql/mariadb-bin.index +# not fab for performance, but safer +#sync_binlog = 1 +expire_logs_days = 10 +max_binlog_size = 100M +# slaves +#relay_log = /var/log/mysql/relay-bin +#relay_log_index = /var/log/mysql/relay-bin.index +#relay_log_info_file = /var/log/mysql/relay-bin.info +#log_slave_updates +#read_only +# +# If applications support it, this stricter sql_mode prevents some +# mistakes like inserting invalid dates etc. +#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +default_storage_engine = InnoDB +innodb_buffer_pool_size = 256M +innodb_log_buffer_size = 8M +innodb_file_per_table = 1 +innodb_open_files = 400 +innodb_io_capacity = 400 +innodb_flush_method = O_DIRECT +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +#bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completion + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!include /etc/mysql/mariadb.cnf +!includedir /etc/mysql/conf.d/ diff --git a/docker-config/docker-entrypoint.sh b/docker-config/docker-entrypoint.sh index ac70883357..0556140552 100755 --- a/docker-config/docker-entrypoint.sh +++ b/docker-config/docker-entrypoint.sh @@ -72,7 +72,10 @@ if [ "$1" = 'apache2' ]; then if [ $i == 'site.conf' ]; then sed -i -e 's/webwork_url = '\''\/webwork2'\''/webwork_url = $ENV{"WEBWORK_URL"}/' \ -e 's/server_root_url = '\'''\''/server_root_url = $ENV{"WEBWORK_ROOT_URL"}/' \ - -e 's/database_dsn ="dbi:mysql:webwork"/database_dsn =$ENV{"WEBWORK_DB_DSN"}/' \ + -e 's/^\$database_driver="MariaDB"/$database_driver = $ENV{"WEBWORK_DB_DRIVER"}/' \ + -e 's/^\$database_host="localhost"/$database_host = $ENV{"WEBWORK_DB_HOST"}/' \ + -e 's/^\$database_port="3306"/$database_port = $ENV{"WEBWORK_DB_PORT"}/' \ + -e 's/^\$database_name="webwork"/$database_name = $ENV{"WEBWORK_DB_NAME"}/' \ -e 's/database_username ="webworkWrite"/database_username =$ENV{"WEBWORK_DB_USER"}/' \ -e 's/database_password ="passwordRW"/database_password =$ENV{"WEBWORK_DB_PASSWORD"}/' \ -e 's/mail{smtpServer} = '\'''\''/mail{smtpServer} = $ENV{"WEBWORK_SMTP_SERVER"}/' \ diff --git a/docker-config/imagemagick-allow-pdf-read.patch b/docker-config/imagemagick-allow-pdf-read.patch new file mode 100644 index 0000000000..b9857d1da6 --- /dev/null +++ b/docker-config/imagemagick-allow-pdf-read.patch @@ -0,0 +1,10 @@ +--- a/etc/ImageMagick-6/policy.xml 2020-11-22 14:46:53.591198189 -0600 ++++ b/etc/ImageMagick-6/policy.xml 2021-03-22 10:35:12.821990590 -0500 +@@ -91,6 +91,6 @@ + + + +- ++ + + diff --git a/docker-config/xmlrpc-lite-utf8-fix.patch b/docker-config/xmlrpc-lite-utf8-fix.patch new file mode 100644 index 0000000000..0a6d1571a7 --- /dev/null +++ b/docker-config/xmlrpc-lite-utf8-fix.patch @@ -0,0 +1,11 @@ +--- a/usr/share/perl5/XMLRPC/Lite.pm 2013-05-16 21:02:00.000000000 -0500 ++++ b/usr/share/perl5/XMLRPC/Lite.pm 2021-03-22 10:30:40.498229670 -0500 +@@ -52,7 +52,7 @@ + + return $class->SUPER::new( + typelookup => { +- base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/}, 'as_base64'], ++ base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/ && !utf8::is_utf8($_[0])}, 'as_base64'], + int => [20, sub {$_[0] =~ /^[+-]?\d+$/}, 'as_int'], + double => [30, sub {$_[0] =~ /^(-?(?:\d+(?:\.\d*)?|\.\d+)|([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)$/}, 'as_double'], + dateTime => [35, sub {$_[0] =~ /^\d{8}T\d\d:\d\d:\d\d$/}, 'as_dateTime'],