Page MenuHomePhabricator

mediawiki:1.31 image ships in an unusable state because it lacks 'short-url.conf'
Closed, DeclinedPublic

Description

Hi everyone,

For reasons I don't immediately understand, the update.sh has a special case that specifically does not create a conf-available/short-url.conf for the 13.1 release:

diff
		case "$mediawikiRelease" in
			1.31 )
				extras=""
				;;
		esac

and the consequence is the 1.31/apache/Dockerfile is missing the section that creates and enables short-url.conf

$ diff3 1.3{1,5,6}/apache/Dockerfile
====1
1:1c
  FROM php:7.3-apache
2:1c
3:1c
  FROM php:7.4-apache
====1
1:53a
2:54,68c
3:54,68c
  # Enable Short URLs
  RUN set -eux; \
  	a2enmod rewrite; \
  	{ \
  		echo "<Directory /var/www/html>"; \
  		echo "  RewriteEngine On"; \
  		echo "  RewriteCond %{REQUEST_FILENAME} !-f"; \
  		echo "  RewriteCond %{REQUEST_FILENAME} !-d"; \
  		echo "  RewriteRule ^ %{DOCUMENT_ROOT}/index.php [L]"; \
  		echo "</Directory>"; \
  	} > "$APACHE_CONFDIR/conf-available/short-url.conf"; \
  	a2enconf short-url

  # Enable AllowEncodedSlashes for VisualEditor
  RUN sed -i "s/<\/VirtualHost>/\tAllowEncodedSlashes NoDecode\n<\/VirtualHost>/" "$APACHE_CONFDIR/sites-available/000-default.conf"
====
1:70,71c
  ENV MEDIAWIKI_MAJOR_VERSION 1.31
  ENV MEDIAWIKI_VERSION 1.31.15
2:85,86c
  ENV MEDIAWIKI_MAJOR_VERSION 1.35
  ENV MEDIAWIKI_VERSION 1.35.3
3:85,86c
  ENV MEDIAWIKI_MAJOR_VERSION 1.36
  ENV MEDIAWIKI_VERSION 1.36.1

This leaves the docker:1.31 image on Docker Hub unusable out of the box.

I have a PR prepared here. I don't think I've ever done a PR for a WikiMedia project, so please be patient and guide me if I've done something wrong, specifically when it comes to referring to the Phabricator task in the commit message.

Event Timeline

Legoktm subscribed.

Sorry we weren't able to fix this for 1.31, but it's been fixed for currently supported versions AIUI. Please re-open if that's not the case.