[Pkg-mediawiki-devel] Bug#706368: [mediawiki] README.Debian broken/outdated
Filipus Klutiero
chealer at gmail.com
Mon Apr 29 00:33:07 UTC 2013
Package: mediawiki
Version: 1:1.19.5-1
Severity: normal
As previously reported, README.Debian is mostly broken or outdated. However, one particularly bad part caused a serious problem on my install when I upgraded mediawiki.
> Then just copy the generated config to the real system location :
> mv /var/lib/mediawiki/mw-config/LocalSettings.php \
> /etc/mediawiki
This is outdated (see https://github.com/wikimedia/mediawiki-core/commit/edd12f0fd60c740673c58919d10cf62e39b74442).
This caused me to proceed with the install this way (391-403 for this step):
> 389 nano /etc/mediawiki/apache.conf
> 390 invoke-rc.d apache2 reload
> 391 mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki
> 392 #mv /var/lib/mediawiki/mw-config/index.php /etc/mediawiki
> 393 cd /etc/mediawiki
> 394 ls
> 395 mv /tmp/LocalSettings.php /etc/mediawiki
> 396 less /var/log/apache2/error.log
> 397 #mv LocalSettings.php /var/lib/mediawiki/
> 398 less /var/log/apache2/error.log
> 399 mv LocalSettings.php /var/lib/mediawiki/
> 400 less /var/log/apache2/error.log
> 401 ls /var/lib/mediawiki/LocalSettings.php
> 402 stat /var/lib/mediawiki/LocalSettings.php
> 403 chown www-data: /var/lib/mediawiki/LocalSettings.php
In other words, when MediaWiki failed to obtain access to LocalSettings.php, I guessed the README was using an old LocalSettings.php location and the new location was now directly the path mentioned in the README without the config/ (/var/lib/mediawiki/). I moved LocalSettings.php there (overwriting the symlink without realizing), and only then fixed the permission problem. At the next upgrade, dpkg quietly turned my LocalSettings.php into a broken symlink, causing both a disruption of service and a limited data loss.
Besides updating the README, there are of course other measures which would avoid this scenario:
* Make the code directly read /etc/mediawiki/ and drop the confusing symlinks, no longer needed
* Just save the generated LocalSettings.php where it has to go directly
More information about the Pkg-mediawiki-devel
mailing list