Gebruiker:Egel/upgrade

Scoutpedia.nl, dé Scouting wiki
Ga naar:navigatie, zoeken

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. Make a backup of the MediaWiki directory.
    • cp -vr /srv/www/scoutwiki/htdocs-1.39 /srv/www/scoutwiki/htdocs-1.39.5
  2. Change to the MediaWiki directory.
    • cd /srv/www/scoutwiki/htdocs-1.39
  3. Download the patch file and gunzip it.
  4. Use patch -p1 --dry-run to check what will be changed
    • patch -p1 --dry-run < mediawiki-1.39.6.patch
  5. If all is well, run patch again without --dry-run.
    • patch -p1 < mediawiki-1.39.6.patch
  6. 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. backup the database
    • (to be added)
  3. Download the release file and untar it.
  4. Rename the new installation directory
    • mv -v mediawiki-1.40.0 htdocs-1.40
  5. Change or add some subdirectories and copy some files from the old to the new installation directory
    • cd htdocs-1.40
    • mv skins skins.old
    • ln -s ../skins-1.40 skins
    • mv extensions extensions.old
    • ln -s ../extensions-1.40 extensions
    • ln -s ../sites sites
    • cp -v ../htdocs-1.39/composer.local.json ./
    • cp -v ../htdocs-1.39/LocalSettings.php ./
    • cp -r ../htdocs-1.39/srv ./
    • cp -v ../htdocs-1.39/*.sh ./
    • cp -v ../htdocs-1.39/composer.phar ./
  6. Run composer on the new installation directory
    • php /srv/www/scoutwiki/htdocs/composer.phar update --no-dev
  7. Link the MediaWiki web root to the new installation directory
    • rm -i ../htdocs; ln -s ../htdocs-1.40 ../htdocs
  8. Check the ScoutWiki's, they most likely give some database error, not a blank screen or "can't find LocalSettings.php"
  9. 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.
  10. Update the extensions

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 "Release" branch when available otherwise the "Master" branch.

git checkout REL1_39

Composer maintained extensions

Run composer in /srv/www/scoutwiki/htdocs only use php composer.phar. So to update the extensions that are maintained with composer run php /srv/www/scoutwiki/htdocs/composer.phar update --no-dev

Hacks

extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php

       public function getInterwikiCodeFromSite( Site $site ) {
                // FIXME: We should use $site->getInterwikiIds, but the interwiki ids in
                // the sites table are wrong currently, see T137537.
//              $id = $site->getGlobalId();
//              $id = preg_replace( '/(wiki\w*|wiktionary)$/', '', $id );
//              $id = strtr( $id, [ '_' => '-' ] );
                $id = $site->getInterwikiIds()[0];
                if ( !$id ) {
                        $id = $site->getLanguageCode();
                }
                return $id;
        }
Cookies helpen ons onze services aan te bieden. Door onze services te gebruiken stemt u in met het gebruik van onze cookies.