Welcome to the ScoutWiki Network

Difference between revisions of "MediaWiki upgrade"

From ScoutWiki Network
Jump to: navigation, search
(Git maintained extensions)
(only one dir)
 
Line 41: Line 41:
 
#* <code>wget http://download.wikimedia.org/mediawiki/{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}/mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0.tar.gz</code>
 
#* <code>wget http://download.wikimedia.org/mediawiki/{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}/mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0.tar.gz</code>
 
#* <code>tar vxfz mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0.tar.gz</code>
 
#* <code>tar vxfz mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0.tar.gz</code>
# Change or add some subdirectories
+
# Rename the new installation directory
#* <code>cp -vr skins mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0</code>
+
#* <code>mv -v mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0 htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
#* <code>cd /srv/www/scoutwiki/mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0</code>
+
# Change or add some subdirectories and copy some files from the old to the new installation directory
 +
#* <code>cd htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
 +
#* <code>cp -vr ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/skins/common skins</code>
 +
#* <code>cp -vr ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/skins/scoutwiki skins</code>
 
#* <code>mv extensions extensions.old</code>
 
#* <code>mv extensions extensions.old</code>
 
#* <code>ln -s ../extensions extensions</code>
 
#* <code>ln -s ../extensions extensions</code>
 
#* <code>ln -s ../sites sites</code>
 
#* <code>ln -s ../sites sites</code>
# Go to the directory with web files
+
#* <code>cp -v ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/.[^.]* ./</code>
#* <code>cd /srv/www/scoutwiki/</code>
+
#* <code>cp -v ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/LocalSettings.php ./</code>
# Copy the new maintenance directory as the new installation directory
+
#* <code>cp -r ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/srv ./</code>
#* <code>cp -vr mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0 htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
+
#* <code>cp -v ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/*.sh ./</code>
# Copy some files from the old to the new installation directory
+
#* <code>cp -v ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/composer ./</code>
#* <code>cp -v htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/.[^.]* htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
+
# Run composer on the new installation directory  
#* <code>cp -v htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/LocalSettings.php htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
+
#* <code>./composer require "mediawiki/bootstrap:~1.0"</code>
#* <code>cp -r htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#explode:{{CURRENTVERSION}}|.|1}}/srv htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}</code>
+
#* <code>./composer update --no-dev</code>  
# Copy some files from the old to the new maintenance directory
 
#* <code>cp -v mediawiki-{{CURRENTVERSION}}/*.sh mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0</code>
 
 
# Link the MediaWiki web root to the new installation directory  
 
# Link the MediaWiki web root to the new installation directory  
#*<code>rm -i htdocs; ln -s htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}} htdocs</code>
+
#*<code>rm -i ../htdocs; ln -s ../htdocs-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}} ../htdocs</code>
 
# Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"  
 
# Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"  
# Go to the new maintenance directory
 
#* <code>cd mediawiki-{{#sub:{{CURRENTVERSION}}|0|2}}{{#expr: 1 + {{#explode:{{CURRENTVERSION}}|.|1}}}}.0</code>
 
 
# Run the update script for each ScoutWiki. Going from small to big.
 
# Run the update script for each ScoutWiki. Going from small to big.
 
#* <code>./update.sh xx</code>, xx is the language code, include asso and media  
 
#* <code>./update.sh xx</code>, xx is the language code, include asso and media  
Line 75: Line 74:
  
 
Most extensions follow the "master" branch except the following:
 
Most extensions follow the "master" branch except the following:
*AbuseFilter - REL1_29
+
*AbuseFilter - REL1_30
*AntiSpoof - REL_29
+
*CentralAuth - REL1_30
*CentralAuth - REL1_29
+
*GlobalUsage - REL1_30
*Cite - REL1_29
+
*MobileFrontend - REL1_30
*CheckUser - REL1_29
+
*Scribunto - REL1_30
*ConfirmEdit - REL1_29
 
*GlobalUsage - REL1_29
 
*MobileFrontend - REL1_29
 
*Scribunto - REL1_29
 
 
:<code>git checkout REL{{#sub:{{CURRENTVERSION}}|0|1}}_{{#sub:{{CURRENTVERSION}}|2|2}}</code>
 
:<code>git checkout REL{{#sub:{{CURRENTVERSION}}|0|1}}_{{#sub:{{CURRENTVERSION}}|2|2}}</code>
 +
  
 
===Composer  maintained extensions===
 
===Composer  maintained extensions===

Latest revision as of 15:01, 12 December 2017

MediaWiki

Minor release

Upgrading using patch

A small patch file is usually made available for a minor version upgrade. Download and extract the patch files.

  1. Change to the directory with the maintenance version of MediaWiki.
    • cd /srv/www/scoutwiki/mediawiki-1.30.2
  2. Download the patch file and gunzip it.
  3. Use patch -p1 --dry-run to check what will be changed
    • patch -p1 --dry-run < mediawiki-1.30.3.patch
  4. If all is well, run patch again without --dry-run.
    • patch -p1 < mediawiki-1.30.3.patch
  5. If available download the interface text changes patch file and gunzip it.
  6. Use patch -p1 --dry-run to check what will be changed
    • patch -p1 --dry-run < mediawiki-i18n-1.30.3.patch
  7. If all is well, run patch again without --dry-run.
    • patch -p1 < mediawiki-i18n-1.30.3.patch
  8. Lock the database for maintenance
    • nano /srv/www/scoutwiki/htdocs/sites/CommonSettings.php
  9. Repeat 2 to 7 in the directory with the active version of MediaWiki.
    • cd /srv/www/scoutwiki/htdocs.
  10. Unlock the database
    • nano /srv/www/scoutwiki/htdocs/sites/CommonSettings.php
  11. Rename the directory with the maintenance version of MediaWiki.
    • mv /srv/www/scoutwiki/mediawiki-1.30.2 /srv/www/scoutwiki/mediawiki-1.30.3.
  12. Check the Special:Version on all ScoutWiki's and you should see the new version number in place.

Major release

  1. Go to the directory with web files
    • cd /srv/www/scoutwiki/
  2. Lock the database for maintenance
    • nano /srv/www/scoutwiki/htdocs/sites/CommonSettings.php
  3. backup the database
    • (to be added)
  4. Download the release file and untar it.
  5. Rename the new installation directory
    • mv -v mediawiki-1.31.0 htdocs-1.31
  6. Change or add some subdirectories and copy some files from the old to the new installation directory
    • cd htdocs-1.31
    • cp -vr ../htdocs-1.30/skins/common skins
    • cp -vr ../htdocs-1.30/skins/scoutwiki skins
    • mv extensions extensions.old
    • ln -s ../extensions extensions
    • ln -s ../sites sites
    • cp -v ../htdocs-1.30/.[^.]* ./
    • cp -v ../htdocs-1.30/LocalSettings.php ./
    • cp -r ../htdocs-1.30/srv ./
    • cp -v ../htdocs-1.30/*.sh ./
    • cp -v ../htdocs-1.30/composer ./
  7. Run composer on the new installation directory
    • ./composer require "mediawiki/bootstrap:~1.0"
    • ./composer update --no-dev
  8. Link the MediaWiki web root to the new installation directory
    • rm -i ../htdocs; ln -s ../htdocs-1.31 ../htdocs
  9. Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"
  10. Run the update script for each ScoutWiki. Going from small to big.
    • ./update.sh xx, xx is the language code, include asso and media
    • Check the ScoutWiki, it should work again.
  11. Update the extensions
  12. Unlock the database
    • nano /srv/www/scoutwiki/sites/CommonSettings.php

Extensions

A list of all the mediawiki_extensions on the ScoutWiki's including ES and HU.

Git maintained extensions

To update the extensions run ./update.sh in /srv/www/scoutwiki/extensions/

Most extensions follow the "master" branch except the following:

  • AbuseFilter - REL1_30
  • CentralAuth - REL1_30
  • GlobalUsage - REL1_30
  • MobileFrontend - REL1_30
  • Scribunto - REL1_30
git checkout REL1_30


Composer maintained extensions

Run composer in /srv/www/scoutwiki/composer only use ./composer.sh instead of php composer.phar. So to update the extensions that are maintained with composer run ./composer.sh update

Other extensions