#1051382 mediawiki: Provide configuration option to run update.php automatically

#1051382#5
Date:
2023-09-07 06:29:18 UTC
From:
To:
Dear Maintainer,

Context
------------
FreedomBox, a Debian pure blend for home servers, provides MediaWiki as an
application. FreedomBox also manages updates of all the installed packages
(using the unattended-updates package). FreedomBox makes releases of the
freedombox package every 2 weeks, which are sent to end users via the
stable-backports channel. The FreedomBox project doesn't expect users to be
proficient with the commandline interface or have any knowledge of system
administration.

Problem
------------
Whenever the MediaWiki package is updated, it is expected that the system
administrator runs an update.php script to do database migrations. If the
package goes through an upgrade and this script is not run, MediaWiki is
left in
an unusable state.

Current workaround
------------------------------
This issue is being fixed currently by triggering update.php from
FreedomBox (by
incrementing the version number of the MediaWiki app in FreedomBox). In the
worst case, a user needs to wait 2 weeks (i.e. the next release of the
freedombox package) for a fix. See [1] as an example of this problem.

Proposed long-term solution
------------------------------------------
Provide support in the Debian package for FreedomBox's use case. If the user
installed MediaWiki database using dbconfig and answered positively to a
question to auto-update the database, then run update.php during package
upgrade.

Please feel free to discuss this issue at [1] on Salsa.

Links:
1. https://salsa.debian.org/freedombox-team/freedombox/-/issues/2119

Regards,
Joseph Nuthalapati
(on behalf of the FreedomBox team)

#1051382#10
Date:
2023-09-08 13:05:45 UTC
From:
To:
Hi Joseph,

Ack. I agree we should do this in the mediawiki package and it's
probably the best user experience for the majority of package users in
addition to FreedomBox.

We are not currently compatible with dbconfig, we'll have to look into
how complicated or not it'll be to hook into MediaWiki's installer and
updater.

(And there's other stuff we should flip on by default like the jobrunner
systemd service.)