mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
1d42b4d01c
Replace the use of screen-scraping in the test environment
installation with simply invoking MediaWiki's command-line
installer.
The old code being deleted here relied on our own hardcoded POST
parameter names & the precise layout of MediaWiki's GUI installer at a
given version. Somewhere between [1] and now this inevitably broke.
As far as I can tell there was never a reason for this screen-scraping
hack, when [1] was introduced it hardcoded MediaWiki 1.19.0, the CLI
installer was introduced in 1.17.0. Perhaps the authors weren't aware
of it, or this code was written for an older version.
This allows us to simply delete our own template version of
LocalSettings.php, it'll instead be provided by the CLI installer.
While we're at it let's fix a few things, these changes weren't
practical to split up (I'd need to fix code I was about to mostly
delete)
* Use MediaWiki's own defaults where possible, e.g. before we'd name
the database "wikidb.sqlite", now we'll simply use whatever name
MediaWiki prefers (currently my_wiki.sqlite) by only supplying the
directory name the SQLite file will be dropped into, not the full
path.
* Put all of our database & download assets into a new "mediawiki/"
folder. This makes it easier to reason about as the current &
template "backup" database the tests keep swapping around live
next to each other.
This'll also prevent future potential breakage as there isn't a
single SQLite database. MediaWiki also creates a job queue
database and a couple of cache databases. In practice it seems we
got away with not resetting these when we reset the main database,
but it's the sort of thing that could break in the future (reset,
main store doesn't have the article, but the cache does).
* The "delete" function now only deletes the MediaWiki installation
& database, not the downloaded .tar.gz file. This makes us
friendlier to a developer on a slow connection.
1. 5ef6ad1785
("git-remote-mediawiki: scripts to install, delete and
clear a MediaWiki", 2012-07-06)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
# Name of the web server's directory dedicated to the wiki is WIKI_DIR_NAME
|
|
WIKI_DIR_NAME=wiki
|
|
|
|
# Login and password of the wiki's admin
|
|
WIKI_ADMIN=WikiAdmin
|
|
WIKI_PASSW=AdminPass1
|
|
|
|
# Address of the web server
|
|
SERVER_ADDR=localhost
|
|
|
|
# If LIGHTTPD is not set to true, the script will use the default
|
|
# web server running in WIKI_DIR_INST.
|
|
WIKI_DIR_INST=/var/www
|
|
|
|
# If LIGHTTPD is set to true, the script will use Lighttpd to run
|
|
# the wiki.
|
|
LIGHTTPD=true
|
|
|
|
# The variables below are useful only if LIGHTTPD is set to true.
|
|
PORT=1234
|
|
PHP_DIR=/usr/bin
|
|
LIGHTTPD_DIR=/usr/sbin
|
|
WEB=WEB
|
|
WEB_TMP=$WEB/tmp
|
|
WEB_WWW=$WEB/www
|
|
|
|
# Where our configuration for the wiki is located
|
|
FILES_FOLDER=mediawiki
|
|
FILES_FOLDER_DOWNLOAD=$FILES_FOLDER/download
|
|
FILES_FOLDER_DB=$FILES_FOLDER/db
|
|
FILES_FOLDER_POST_INSTALL_DB=$FILES_FOLDER/post-install-db
|
|
|
|
# The variables below are used by the script to install a wiki.
|
|
# You should not modify these unless you are modifying the script itself.
|
|
# tested versions: 1.19.X -> 1.21.1 -> 1.34.2
|
|
#
|
|
# See https://www.mediawiki.org/wiki/Download for what the latest
|
|
# version is.
|
|
MW_VERSION_MAJOR=1.34
|
|
MW_VERSION_MINOR=2
|