Difference between revisions of "Mediawiki subversion (SVN) to git migration"

From Biowikifarm Metawiki
Jump to: navigation, search
m (Step 1 new: normal clone plus git-archive-exports: +Extension export from a Git clone)
 
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''This is a planning document'''
+
'''The history of this page contains the details of the migration from mediawiki 1.18 svn to 1.20 git. The permanently relevant information has now been migrated to '''[[Mediawiki installation]]''' and '''[[Mediawiki maintenance]]'''.
 +
 
 +
----
  
 
How-to is here: https://www.mediawiki.org/wiki/Download_from_Git . Checking extensions: Which extensions previously obtained from WMF-Subversion (i.e. excluding those we have in local SVN) are Not in the following list of git-migrated mediawiki extensions? https://gerrit.wikimedia.org/r/#/admin/projects/
 
How-to is here: https://www.mediawiki.org/wiki/Download_from_Git . Checking extensions: Which extensions previously obtained from WMF-Subversion (i.e. excluding those we have in local SVN) are Not in the following list of git-migrated mediawiki extensions? https://gerrit.wikimedia.org/r/#/admin/projects/
Line 7: Line 9:
 
* http://developer.imagej.net/using-git
 
* http://developer.imagej.net/using-git
  
 +
==Finding tags and branches==
  
===Comparing 1.20 git-extensions with 1.18 and above, Nov. 2012===
+
HINT: to see available branches/tags:
''' Local SVN are now in same folder as git checkout = OK'''
+
 
+
'''Manually copied''' i.e. now available in the 1.20git extension folder:
+
* SMWAskAPI - only installed on offene-naturfuehrer = OK
+
 
+
'''Missing but no longer used = OK'''
+
* AddMediaWizard (no longer found by find/grep)
+
* ArrayExtension replaced by extension: Arrays (all seem to be updated)
+
* SyntaxHighlight (no longer used, all occurrences refer to SyntaxHighlight_GeSHi)
+
 
+
'''Missing, now disabled in common/local settings = OK'''
+
* Disabling MassEditRegex - Installed on all wikis, but not used because the currently installed version (r4) is not compatible with MediaWiki 1.18. We have tested this extension on 1.19 where it works. For some wikis this extension would be very useful.
+
* Disabling MathStatFunctions - probably never used.
+
* Disabling DynamicPageList - only installed 4 wiki, was deprecated a long time; all pages checked and function removed.
+
* Disabling '''FileAttach:''' Used only as testing in testwikis, now removed there.
+
 
+
 
+
''' THE FOLLOWING probably may have to be disabled when migrating:'''
+
* MultipleUpload (also called MultiUpload) - only installed on OpenMedia, KeytoNature and OroWiki
+
* jQueryMsg - installed on all wikis, but obsolete in v.1.20!!
+
** http://www.mediawiki.org/wiki/Git/Conversion/Extensions_still_in_svn says "jQueryMsg - Abandoned - Available in Core"
+
 
+
 
+
==New mediawiki git notes - LATER MOVE TO MW Maintenance!==
+
 
+
Main source: [http://www.mediawiki.org/wiki/Download_from_Git mediawiki.org: Download from Git]. See also [https://gerrit.wikimedia.org/r/#/admin/projects/ overview of wikimedia projects in Git].
+
 
+
'''IMPORTANT CHANGE in comparison to earlier subversion setup: we directly clone all extensions into the /extension folder, instead of cloning elsewhere and then symlinking.'''
+
 
+
: Memo: use "git tag -l | sort -V" um tags sortiert anzuzeigen
+
 
+
Background: git creates a full copy of the repository. Since we need several parallel branches, we clone once into mediawiki-git, and from there locally into further repose. Local repos use hardlinks, so they do not need much additional hard drive space (Note: git uses hardlinks inside .git, see ls -l: hardlink number is col. before owner; the checkout is NOT hardlinked and requires additional space.).
+
 
+
===Step 1 old: bare core for second level clones. Second level not working!===
+
# 1. FIRST create a local git-clone for mediawiki-core (bare) and mw-extensions (submodules, cannot be bare):
+
cd /usr/share; sudo mkdir mediawiki-git; cd /usr/share/mediawiki-git
+
sudo git clone --bare https://gerrit.wikimedia.org/r/p/mediawiki/core.git core
+
sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git extensions
+
cd /usr/share/mediawiki-git/extensions; sudo git submodule update --init --recursive
+
# Note: with after init, one can use "git foreach". Example:
+
#  git submodule foreach 'echo $path `git rev-parse HEAD`'
+
#  will show the path and currently checked out commit for each submodule.
+
 
+
===Step 1 new: normal clone plus git-archive-exports===
+
 
+
Alternative to above: Full clone (not bare) for export using archive
+
<syntaxhighlight lang="bash" style="font-size:105%">
+
# 1. FIRST create a biowikifarm git-clone (non-bare) for mediawiki-core and mw-extensions (submodules):
+
  cd /usr/share; sudo mkdir mw-wmf-clone; cd /usr/share/mw-wmf-clone
+
  sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git core
+
  sudo git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git extensions
+
  cd /usr/share/mw-wmf-clone/extensions; sudo git submodule update --init --recursive
+
# Note: with after init, one can use "git foreach". Example:
+
#  git submodule foreach 'echo $path `git rev-parse HEAD`'
+
#  will show the path and currently checked out commit for each submodule.
+
# From this we can checkout/archive a MediaWiki verions into other folders:
+
  sudo mkdir /usr/share/mw1.20
+
  cd /usr/share/mw-wmf-clone/core
+
  sudo git archive 1.20.2 | sudo tar --extract --recursive-unlink --directory=/usr/share/mw1.20
+
# for extension AccessControl
+
  ext="AccessControl"
+
  extpathto="/usr/share/mw1.20/extensions/"
+
  extpathfrom="/usr/share/mw-wmf-clone/extensions/"
+
  cloneVersion="HEAD"
+
  sudo mkdir --parents "${extpathto}${ext}"
+
  # delete target directory before (unlink)
+
  cd "${extpathfrom}${ext}" && sudo git archive $cloneVersion  | sudo tar --extract --recursive-unlink --directory="${extpathto}${ext}"
+
</syntaxhighlight>
+
 
+
{{Hidden
+
|toggle position=left
+
|contentstyle=border-left:1px solid gray;padding-left:0.5em;margn-left:0.5em;
+
|header=SAME needs to be done manually for:
+
|content=<syntaxhighlight lang="bash" style="font-size:105%">
+
# SAME needs to be done for:
+
sudo git clone --mirror {$url}AdminLinks AdminLinks
+
sudo git clone --mirror {$url}APC APC
+
sudo git clone --mirror {$url}Arrays Arrays
+
sudo git clone --mirror {$url}ArticleFeedback ArticleFeedback
+
sudo git clone --mirror {$url}ArticleFeedbackv5 ArticleFeedbackv5
+
sudo git clone --mirror {$url}AssertEdit AssertEdit
+
sudo git clone --mirror {$url}CategoryTree CategoryTree
+
sudo git clone --mirror {$url}CentralAuth CentralAuth
+
sudo git clone --mirror {$url}CentralNotice CentralNotice
+
sudo git clone --mirror {$url}CharInsert CharInsert
+
sudo git clone --mirror {$url}CheckUser CheckUser
+
sudo git clone --mirror {$url}Cite Cite
+
sudo git clone --mirror {$url}cldr cldr
+
sudo git clone --mirror {$url}ClickTracking ClickTracking
+
sudo git clone --mirror {$url}CodeEditor CodeEditor
+
sudo git clone --mirror {$url}Collection Collection
+
sudo git clone --mirror {$url}ConditionalShowSection ConditionalShowSection
+
sudo git clone --mirror {$url}Configure Configure
+
sudo git clone --mirror {$url}ConfirmAccount ConfirmAccount
+
sudo git clone --mirror {$url}ConfirmEdit ConfirmEdit
+
sudo git clone --mirror {$url}ContactPage ContactPage
+
sudo git clone --mirror {$url}Contest Contest
+
sudo git clone --mirror {$url}ContributionReporting ContributionReporting
+
sudo git clone --mirror {$url}DataTransfer DataTransfer
+
sudo git clone --mirror {$url}DiscussionThreading DiscussionThreading
+
sudo git clone --mirror {$url}DismissableSiteNotice DismissableSiteNotice
+
sudo git clone --mirror {$url}DoubleWiki DoubleWiki
+
sudo git clone --mirror {$url}DumpHTML DumpHTML
+
sudo git clone --mirror {$url}DynamicPageList DynamicPageList
+
sudo git clone --mirror {$url}EmailCapture EmailCapture
+
sudo git clone --mirror {$url}ExpandTemplates ExpandTemplates
+
sudo git clone --mirror {$url}ExternalData ExternalData
+
sudo git clone --mirror {$url}FlaggedRevs FlaggedRevs
+
sudo git clone --mirror {$url}FormPreloadPostCache FormPreloadPostCache
+
sudo git clone --mirror {$url}Gadgets Gadgets
+
sudo git clone --mirror {$url}GlobalBlocking GlobalBlocking
+
sudo git clone --mirror {$url}GlobalUsage GlobalUsage
+
sudo git clone --mirror {$url}GlobalUserGroups GlobalUserGroups
+
sudo git clone --mirror {$url}GraphViz GraphViz
+
sudo git clone --mirror {$url}HeaderTabs HeaderTabs
+
sudo git clone --mirror {$url}ImageMap ImageMap
+
sudo git clone --mirror {$url}InputBox InputBox
+
sudo git clone --mirror {$url}Interlanguage Interlanguage
+
sudo git clone --mirror {$url}intersection intersection
+
sudo git clone --mirror {$url}Interwiki Interwiki
+
sudo git clone --mirror {$url}LabeledSectionTransclusion LabeledSectionTransclusion
+
sudo git clone --mirror {$url}LiquidThreads LiquidThreads
+
sudo git clone --mirror {$url}Lockdown Lockdown
+
sudo git clone --mirror {$url}Loops Loops
+
sudo git clone --mirror {$url}Maintenance Maintenance
+
sudo git clone --mirror {$url}Maps Maps
+
sudo git clone --mirror {$url}Math Math
+
sudo git clone --mirror {$url}MediaFunctions MediaFunctions
+
sudo git clone --mirror {$url}MobileFrontend MobileFrontend
+
sudo git clone --mirror {$url}MoodBar MoodBar
+
sudo git clone --mirror {$url}MWSearch MWSearch
+
sudo git clone --mirror {$url}Nuke Nuke
+
sudo git clone --mirror {$url}OAI OAI
+
sudo git clone --mirror {$url}OggHandler OggHandler
+
sudo git clone --mirror {$url}OpenID OpenID
+
sudo git clone --mirror {$url}OpenSearchXml OpenSearchXml
+
sudo git clone --mirror {$url}PagedTiffHandler PagedTiffHandler
+
sudo git clone --mirror {$url}ParserFunctions ParserFunctions
+
sudo git clone --mirror {$url}PdfHandler PdfHandler
+
sudo git clone --mirror {$url}Persona Persona
+
sudo git clone --mirror {$url}Poem Poem
+
sudo git clone --mirror {$url}ProofreadPage ProofreadPage
+
sudo git clone --mirror {$url}Quiz Quiz
+
sudo git clone --mirror {$url}Renameuser Renameuser
+
sudo git clone --mirror {$url}ReplaceText ReplaceText
+
sudo git clone --mirror {$url}RSS RSS
+
sudo git clone --mirror {$url}Scribunto Scribunto
+
sudo git clone --mirror {$url}SemanticCompoundQueries SemanticCompoundQueries
+
sudo git clone --mirror {$url}SemanticDrilldown SemanticDrilldown
+
sudo git clone --mirror {$url}SemanticForms SemanticForms
+
sudo git clone --mirror {$url}SemanticFormsInputs SemanticFormsInputs
+
sudo git clone --mirror {$url}SemanticImageInput SemanticImageInput
+
sudo git clone --mirror {$url}SemanticInternalObjects SemanticInternalObjects
+
sudo git clone --mirror {$url}SemanticMaps SemanticMaps
+
sudo git clone --mirror {$url}SemanticMediaWiki SemanticMediaWiki
+
sudo git clone --mirror {$url}SemanticResultFormats SemanticResultFormats
+
sudo git clone --mirror {$url}SemanticSignup SemanticSignup
+
sudo git clone --mirror {$url}SemanticWatchlist SemanticWatchlist
+
sudo git clone --mirror {$url}SimpleSurvey SimpleSurvey
+
sudo git clone --mirror {$url}SocialProfile SocialProfile
+
sudo git clone --mirror {$url}SpamBlacklist SpamBlacklist
+
sudo git clone --mirror {$url}Sudo Sudo
+
sudo git clone --mirror {$url}Suhosin Suhosin
+
sudo git clone --mirror {$url}SwiftCloudFiles SwiftCloudFiles
+
sudo git clone --mirror {$url}SyntaxHighlight_GeSHi SyntaxHighlight_GeSHi
+
sudo git clone --mirror {$url}TimedMediaHandler TimedMediaHandler
+
sudo git clone --mirror {$url}TitleKey TitleKey
+
sudo git clone --mirror {$url}UploadLocal UploadLocal
+
sudo git clone --mirror {$url}UploadWizard UploadWizard
+
sudo git clone --mirror {$url}Validator Validator
+
sudo git clone --mirror {$url}Variables Variables
+
sudo git clone --mirror {$url}Vector Vector
+
sudo git clone --mirror {$url}VipsScaler VipsScaler
+
sudo git clone --mirror {$url}VisualEditor VisualEditor
+
sudo git clone --mirror {$url}WebFonts WebFonts
+
sudo git clone --mirror {$url}Widgets Widgets
+
sudo git clone --mirror {$url}Wikibase Wikibase
+
sudo git clone --mirror {$url}WikibaseSolr WikibaseSolr
+
sudo git clone --mirror {$url}WikiEditor WikiEditor
+
sudo git clone --mirror {$url}WikiLove WikiLove
+
sudo git clone --mirror {$url}WikimediaMessages WikimediaMessages
+
</syntaxhighlight>
+
}}
+
 
+
==== Extension export from a Git clone ====
+
 
+
<syntaxhighlight lang="bash" style="font-size:105%">
+
extpathto="/usr/share/mw1.20/extensions/"
+
extpathfrom="/usr/share/mw-wmf-clone/extensions/"
+
# specify version control like this:
+
#"SemanticMediaWiki"          → version HEAD + extension SemanticMediaWiki
+
#"tags/1.8, SemanticMediaWiki" → version  1.8 + extension SemanticMediaWiki
+
EXTENSIONS="AccessControl
+
AdminLinks
+
APC
+
Arrays
+
ArticleFeedback
+
ArticleFeedbackv5
+
AssertEdit
+
CategoryTree
+
CentralAuth
+
CentralNotice
+
CharInsert
+
CheckUser
+
Cite
+
cldr
+
ClickTracking
+
CodeEditor
+
Collection
+
ConditionalShowSection
+
Configure
+
ConfirmAccount
+
ConfirmEdit
+
ContactPage
+
Contest
+
ContributionReporting
+
DataTransfer
+
DiscussionThreading
+
DismissableSiteNotice
+
DoubleWiki
+
DumpHTML
+
DynamicPageList
+
EmailCapture
+
ExpandTemplates
+
ExternalData
+
FlaggedRevs
+
FormPreloadPostCache
+
Gadgets
+
GlobalBlocking
+
GlobalUsage
+
GlobalUserGroups
+
GraphViz
+
HeaderTabs
+
ImageMap
+
InputBox
+
Interlanguage
+
intersection
+
Interwiki
+
LabeledSectionTransclusion
+
LiquidThreads
+
Lockdown
+
Loops
+
Maintenance
+
Maps
+
Math
+
MediaFunctions
+
MobileFrontend
+
MoodBar
+
MWSearch
+
Nuke
+
OAI
+
OggHandler
+
OpenID
+
OpenSearchXml
+
PagedTiffHandler
+
ParserFunctions
+
PdfHandler
+
Persona
+
Poem
+
ProofreadPage
+
Quiz
+
Renameuser
+
ReplaceText
+
RSS
+
Scribunto
+
SemanticCompoundQueries
+
SemanticDrilldown
+
SemanticForms
+
SemanticFormsInputs
+
SemanticImageInput
+
SemanticInternalObjects
+
SemanticMaps
+
tags/1.8, SemanticMediaWiki
+
SemanticResultFormats
+
SemanticSignup
+
SemanticWatchlist
+
SimpleSurvey
+
SocialProfile
+
SpamBlacklist
+
Sudo
+
Suhosin
+
SwiftCloudFiles
+
SyntaxHighlight_GeSHi
+
TimedMediaHandler
+
TitleKey
+
UploadLocal
+
UploadWizard
+
Validator
+
Variables
+
Vector
+
VipsScaler
+
VisualEditor
+
WebFonts
+
Widgets
+
Wikibase
+
WikibaseSolr
+
WikiEditor
+
WikiLove
+
WikimediaMessages"
+
 
+
IFS=$'\n' # field separator to newline
+
for extdef in $EXTENSIONS; do
+
  # split line on ", " to handle exported version HEAD (default) or a specified git tag, e.g.:
+
  # "tags/1.8, SemanticMediaWiki" will export tag 1.8
+
  #    ↓            ↓
+
  # $cloneVersion  $extension
+
  # if nothing is given (just the extension) then HEAD as export is assumed
+
 
+
  # get cloneVersion and extension (as part of the line-string)
+
  cloneVersion=$([ "${extdef%,*}" == "$extdef" ] && echo "HEAD" || echo "${extdef%,*}")
+
  extension=$([ "${extdef%,*}" == "$extdef" ] && echo "$extdef" || echo "${extdef##*,* }")
+
  if [ ! -d "${extpathto}${extension}" ]; then
+
    sudo mkdir --parents "${extpathto}${extension}"
+
  fi
+
  if [ ! -d "${extpathfrom}${extension}" ]; then
+
    echo "${extpathfrom}${extension} DOES NOT EXIST to export a git archive from!! (Skip this step)"
+
  else
+
    printf "Git archive export: %-30s %s\n" $extension $cloneVersion
+
    # sudo git archive --prefix=AdminLinks/ HEAD  | sudo tar --extract --recursive-unlink --directory=/usr/share/mw1.20/extensions
+
    cd "${extpathfrom}${extension}" && sudo git archive $cloneVersion  --prefix="${extension}/" | sudo tar --extract --recursive-unlink --directory="${extpathto}"
+
  fi
+
done
+
</syntaxhighlight>
+
 
+
===Step 1 alternative: using mirror (kept temporarily as alternative)===
+
 
+
Alternative to above: MIRROR-BASED
+
# INSERT: NEW ALTERNATIVE TEST WITH MIRROR INSTEAD. BUT THE PROBLEM IS WITH THE SUBMODULES recloning, NOT WITH CORE.
+
# 1.XXX FIRST create a local git-clone for mediawiki-core (bare) and mw-extensions (submodules, cannot be bare):
+
# using mirror option, because we want to subclone from this clone again.
+
cd /usr/share; sudo mkdir mw-wmf-mirror; cd /usr/share/mw-wmf-mirror
+
sudo git clone --mirror https://gerrit.wikimedia.org/r/p/mediawiki/core.git core
+
# Now create mirror-clones of each extension based on the submodule. Note: Simply using:
+
#  git clone --mirror https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git extensions;
+
#  git submodule update --init --recursive
+
#  will not work in second step, when this clone is locally re-cloned (for different version checkouts)
+
cd /usr/share/mw-wmf-mirror; sudo mkdir extensions; cd /usr/share/mw-wmf-mirror/extensions;
+
url="https://gerrit.wikimedia.org/r/p/mediawiki/extensions"
+
sudo git clone --mirror {$url}AccessControl AccessControl
+
sudo git clone --mirror {$url}AdminLinks AdminLinks
+
sudo git clone --mirror {$url}APC APC
+
sudo git clone --mirror {$url}Arrays Arrays
+
sudo git clone --mirror {$url}ArticleFeedback ArticleFeedback
+
sudo git clone --mirror {$url}ArticleFeedbackv5 ArticleFeedbackv5
+
sudo git clone --mirror {$url}AssertEdit AssertEdit
+
sudo git clone --mirror {$url}CategoryTree CategoryTree
+
sudo git clone --mirror {$url}CentralAuth CentralAuth
+
sudo git clone --mirror {$url}CentralNotice CentralNotice
+
sudo git clone --mirror {$url}CharInsert CharInsert
+
sudo git clone --mirror {$url}CheckUser CheckUser
+
sudo git clone --mirror {$url}Cite Cite
+
sudo git clone --mirror {$url}cldr cldr
+
sudo git clone --mirror {$url}ClickTracking ClickTracking
+
sudo git clone --mirror {$url}CodeEditor CodeEditor
+
sudo git clone --mirror {$url}Collection Collection
+
sudo git clone --mirror {$url}ConditionalShowSection ConditionalShowSection
+
sudo git clone --mirror {$url}Configure Configure
+
sudo git clone --mirror {$url}ConfirmAccount ConfirmAccount
+
sudo git clone --mirror {$url}ConfirmEdit ConfirmEdit
+
sudo git clone --mirror {$url}ContactPage ContactPage
+
sudo git clone --mirror {$url}Contest Contest
+
sudo git clone --mirror {$url}ContributionReporting ContributionReporting
+
sudo git clone --mirror {$url}DataTransfer DataTransfer
+
sudo git clone --mirror {$url}DiscussionThreading DiscussionThreading
+
sudo git clone --mirror {$url}DismissableSiteNotice DismissableSiteNotice
+
sudo git clone --mirror {$url}DoubleWiki DoubleWiki
+
sudo git clone --mirror {$url}DumpHTML DumpHTML
+
sudo git clone --mirror {$url}DynamicPageList DynamicPageList
+
sudo git clone --mirror {$url}EmailCapture EmailCapture
+
sudo git clone --mirror {$url}ExpandTemplates ExpandTemplates
+
sudo git clone --mirror {$url}ExternalData ExternalData
+
sudo git clone --mirror {$url}FlaggedRevs FlaggedRevs
+
sudo git clone --mirror {$url}FormPreloadPostCache FormPreloadPostCache
+
sudo git clone --mirror {$url}Gadgets Gadgets
+
sudo git clone --mirror {$url}GlobalBlocking GlobalBlocking
+
sudo git clone --mirror {$url}GlobalUsage GlobalUsage
+
sudo git clone --mirror {$url}GlobalUserGroups GlobalUserGroups
+
sudo git clone --mirror {$url}GraphViz GraphViz
+
sudo git clone --mirror {$url}HeaderTabs HeaderTabs
+
sudo git clone --mirror {$url}ImageMap ImageMap
+
sudo git clone --mirror {$url}InputBox InputBox
+
sudo git clone --mirror {$url}Interlanguage Interlanguage
+
sudo git clone --mirror {$url}intersection intersection
+
sudo git clone --mirror {$url}Interwiki Interwiki
+
sudo git clone --mirror {$url}LabeledSectionTransclusion LabeledSectionTransclusion
+
sudo git clone --mirror {$url}LiquidThreads LiquidThreads
+
sudo git clone --mirror {$url}Lockdown Lockdown
+
sudo git clone --mirror {$url}Loops Loops
+
sudo git clone --mirror {$url}Maintenance Maintenance
+
sudo git clone --mirror {$url}Maps Maps
+
sudo git clone --mirror {$url}Math Math
+
sudo git clone --mirror {$url}MediaFunctions MediaFunctions
+
sudo git clone --mirror {$url}MobileFrontend MobileFrontend
+
sudo git clone --mirror {$url}MoodBar MoodBar
+
sudo git clone --mirror {$url}MWSearch MWSearch
+
sudo git clone --mirror {$url}Nuke Nuke
+
sudo git clone --mirror {$url}OAI OAI
+
sudo git clone --mirror {$url}OggHandler OggHandler
+
sudo git clone --mirror {$url}OpenID OpenID
+
sudo git clone --mirror {$url}OpenSearchXml OpenSearchXml
+
sudo git clone --mirror {$url}PagedTiffHandler PagedTiffHandler
+
sudo git clone --mirror {$url}ParserFunctions ParserFunctions
+
sudo git clone --mirror {$url}PdfHandler PdfHandler
+
sudo git clone --mirror {$url}Persona Persona
+
sudo git clone --mirror {$url}Poem Poem
+
sudo git clone --mirror {$url}ProofreadPage ProofreadPage
+
sudo git clone --mirror {$url}Quiz Quiz
+
sudo git clone --mirror {$url}Renameuser Renameuser
+
sudo git clone --mirror {$url}ReplaceText ReplaceText
+
sudo git clone --mirror {$url}RSS RSS
+
sudo git clone --mirror {$url}Scribunto Scribunto
+
sudo git clone --mirror {$url}SemanticCompoundQueries SemanticCompoundQueries
+
sudo git clone --mirror {$url}SemanticDrilldown SemanticDrilldown
+
sudo git clone --mirror {$url}SemanticForms SemanticForms
+
sudo git clone --mirror {$url}SemanticFormsInputs SemanticFormsInputs
+
sudo git clone --mirror {$url}SemanticImageInput SemanticImageInput
+
sudo git clone --mirror {$url}SemanticInternalObjects SemanticInternalObjects
+
sudo git clone --mirror {$url}SemanticMaps SemanticMaps
+
sudo git clone --mirror {$url}SemanticMediaWiki SemanticMediaWiki
+
sudo git clone --mirror {$url}SemanticResultFormats SemanticResultFormats
+
sudo git clone --mirror {$url}SemanticSignup SemanticSignup
+
sudo git clone --mirror {$url}SemanticWatchlist SemanticWatchlist
+
sudo git clone --mirror {$url}SimpleSurvey SimpleSurvey
+
sudo git clone --mirror {$url}SocialProfile SocialProfile
+
sudo git clone --mirror {$url}SpamBlacklist SpamBlacklist
+
sudo git clone --mirror {$url}Sudo Sudo
+
sudo git clone --mirror {$url}Suhosin Suhosin
+
sudo git clone --mirror {$url}SwiftCloudFiles SwiftCloudFiles
+
sudo git clone --mirror {$url}SyntaxHighlight_GeSHi SyntaxHighlight_GeSHi
+
sudo git clone --mirror {$url}TimedMediaHandler TimedMediaHandler
+
sudo git clone --mirror {$url}TitleKey TitleKey
+
sudo git clone --mirror {$url}UploadLocal UploadLocal
+
sudo git clone --mirror {$url}UploadWizard UploadWizard
+
sudo git clone --mirror {$url}Validator Validator
+
sudo git clone --mirror {$url}Variables Variables
+
sudo git clone --mirror {$url}Vector Vector
+
sudo git clone --mirror {$url}VipsScaler VipsScaler
+
sudo git clone --mirror {$url}VisualEditor VisualEditor
+
sudo git clone --mirror {$url}WebFonts WebFonts
+
sudo git clone --mirror {$url}Widgets Widgets
+
sudo git clone --mirror {$url}Wikibase Wikibase
+
sudo git clone --mirror {$url}WikibaseSolr WikibaseSolr
+
sudo git clone --mirror {$url}WikiEditor WikiEditor
+
sudo git clone --mirror {$url}WikiLove WikiLove
+
sudo git clone --mirror {$url}WikimediaMessages WikimediaMessages
+
 
+
### NOTE: mirrors are updated with git remote update, use for loop for extensions
+
 
+
# 2. THEN Create LOCAL git-clones (with hardlinks to mediawiki-git!)
+
cd /usr/share; sudo git clone --local /usr/share/mediawiki-git/core mediawiki20
+
# NOW clone individual desired extensions from LOCAL:
+
# (When cloning extension as submodules, no hardlinks would be used.)
+
# Note: extensions are cloned not parallel to core, but inside core/extensions folder
+
cd /usr/share/mediawiki20/extensions;
+
 
+
# alternatives to --local may be --shared (or perhaps --reference <repository> - but then second repo??)
+
 
+
sudo git clone --local /usr/share/mediawiki-git/extensions/AccessControl
+
sudo git clone --local /usr/share/mediawiki-git/extensions/AdminLinks
+
sudo git clone --local /usr/share/mediawiki-git/extensions/APC
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Arrays
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ArticleFeedback
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ArticleFeedbackv5
+
sudo git clone --local /usr/share/mediawiki-git/extensions/AssertEdit
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CategoryTree
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CentralAuth
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CentralNotice
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CharInsert
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CheckUser
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Cite
+
sudo git clone --local /usr/share/mediawiki-git/extensions/cldr
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ClickTracking
+
sudo git clone --local /usr/share/mediawiki-git/extensions/CodeEditor
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Collection
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ConditionalShowSection
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Configure
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ConfirmAccount
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ConfirmEdit
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ContactPage
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Contest
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ContributionReporting
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DataTransfer
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DiscussionThreading
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DismissableSiteNotice
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DoubleWiki
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DumpHTML
+
sudo git clone --local /usr/share/mediawiki-git/extensions/DynamicPageList
+
sudo git clone --local /usr/share/mediawiki-git/extensions/EmailCapture
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ExpandTemplates
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ExternalData
+
sudo git clone --local /usr/share/mediawiki-git/extensions/FlaggedRevs
+
sudo git clone --local /usr/share/mediawiki-git/extensions/FormPreloadPostCache
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Gadgets
+
sudo git clone --local /usr/share/mediawiki-git/extensions/GlobalBlocking
+
sudo git clone --local /usr/share/mediawiki-git/extensions/GlobalUsage
+
sudo git clone --local /usr/share/mediawiki-git/extensions/GlobalUserGroups
+
sudo git clone --local /usr/share/mediawiki-git/extensions/GraphViz
+
sudo git clone --local /usr/share/mediawiki-git/extensions/HeaderTabs
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ImageMap
+
sudo git clone --local /usr/share/mediawiki-git/extensions/InputBox
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Interlanguage
+
sudo git clone --local /usr/share/mediawiki-git/extensions/intersection
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Interwiki
+
sudo git clone --local /usr/share/mediawiki-git/extensions/LabeledSectionTransclusion
+
sudo git clone --local /usr/share/mediawiki-git/extensions/LiquidThreads
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Lockdown
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Loops
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Maintenance
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Maps
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Math
+
sudo git clone --local /usr/share/mediawiki-git/extensions/MediaFunctions
+
sudo git clone --local /usr/share/mediawiki-git/extensions/MobileFrontend
+
sudo git clone --local /usr/share/mediawiki-git/extensions/MoodBar
+
sudo git clone --local /usr/share/mediawiki-git/extensions/MWSearch
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Nuke
+
sudo git clone --local /usr/share/mediawiki-git/extensions/OAI
+
sudo git clone --local /usr/share/mediawiki-git/extensions/OggHandler
+
sudo git clone --local /usr/share/mediawiki-git/extensions/OpenID
+
sudo git clone --local /usr/share/mediawiki-git/extensions/OpenSearchXml
+
sudo git clone --local /usr/share/mediawiki-git/extensions/PagedTiffHandler
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ParserFunctions
+
sudo git clone --local /usr/share/mediawiki-git/extensions/PdfHandler
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Persona
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Poem
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ProofreadPage
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Quiz
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Renameuser
+
sudo git clone --local /usr/share/mediawiki-git/extensions/ReplaceText
+
sudo git clone --local /usr/share/mediawiki-git/extensions/RSS
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Scribunto
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticCompoundQueries
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticDrilldown
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticForms
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticFormsInputs
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticImageInput
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticInternalObjects
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticMaps
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticMediaWiki
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticResultFormats
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticSignup
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SemanticWatchlist
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SimpleSurvey
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SocialProfile
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SpamBlacklist
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Sudo
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Suhosin
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SwiftCloudFiles
+
sudo git clone --local /usr/share/mediawiki-git/extensions/SyntaxHighlight_GeSHi
+
sudo git clone --local /usr/share/mediawiki-git/extensions/TimedMediaHandler
+
sudo git clone --local /usr/share/mediawiki-git/extensions/TitleKey
+
sudo git clone --local /usr/share/mediawiki-git/extensions/UploadLocal
+
sudo git clone --local /usr/share/mediawiki-git/extensions/UploadWizard
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Validator
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Variables
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Vector
+
sudo git clone --local /usr/share/mediawiki-git/extensions/VipsScaler
+
sudo git clone --local /usr/share/mediawiki-git/extensions/VisualEditor
+
sudo git clone --local /usr/share/mediawiki-git/extensions/WebFonts
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Widgets
+
sudo git clone --local /usr/share/mediawiki-git/extensions/Wikibase
+
sudo git clone --local /usr/share/mediawiki-git/extensions/WikibaseSolr
+
sudo git clone --local /usr/share/mediawiki-git/extensions/WikiEditor
+
sudo git clone --local /usr/share/mediawiki-git/extensions/WikiLove
+
sudo git clone --local /usr/share/mediawiki-git/extensions/WikimediaMessages
+
 
+
# 3. Also insert the local-svn-managed extensions into the same folder:
+
# Note: www-data cannot create the folders, but must be able to write the updates (svn-post-commit hook) -> temp folder
+
# Remaining Problem: when a new svn folder is added after this initial setup to the local subversion repo,
+
#  that folder must manually chown to www-data; else svn co post-commit errors will occur.
+
cd /usr/share/mediawiki20/
+
sudo mkdir TEMP-LOCAL-svn; ## temp folder
+
sudo svn checkout file:///var/lib/svn/LocalSVNextensions ./TEMP-LOCAL-svn
+
sudo chown -R  www-data.www-data ./TEMP-LOCAL-svn
+
sudo mv ./TEMP-LOCAL-svn/* ./extensions; sudo mv ./TEMP-LOCAL-svn/.svn ./extensions
+
sudo rm ./TEMP-LOCAL-svn -r
+
 
+
# 4. Finishing touches. Widgets needs a writable folder:
+
cd /usr/share/mediawiki20/
+
sudo chown -R  www-data.www-data ./extensions/Widgets/compiled_templates;
+
# And widgets does not contain the necessary code:
+
# (Warning: require_once(/usr/share/mediawiki20/phase3/extensions/Widgets/smarty/Smarty.class.php): failed to open stream: No such file or directory in /usr/share/mediawiki20/phase3/extensions/Widgets/Widgets.php on line 53 etc.)
+
# In the absence of installation instructions, using the previous 1.18 code:
+
cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/smarty ./extensions/Widgets
+
cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/googlecode ./extensions/Widgets
+
# Note: a list of UNUSED extensions is available on earlier versions of this page
+
# (before 9 Dec. 2012); may be useful for easy copying or checking additional extensions.
+
 
+
# A second clone:
+
cd /usr/share; sudo git clone --local /usr/share/mediawiki-git/core mediawikiPP
+
cd /usr/share/mediawikiPP/extensions;
+
## (EXECUTE EXTENSION CLONE-COMMANDS, SVN, AND FINISHING FROM ABOVE with modified path HERE AS WELL)
+
 
+
 
+
----
+
 
+
==Updating mediawiki (git+svn)==
+
 
+
<syntaxhighlight lang="bash">
+
# 1. Update LOCAL-git core and extensions from WMF-git:
+
cd /usr/share/mediawiki-git/core; sudo git fetch; cd ../extensions; sudo git pull; sudo git submodule update --init --recursive;
+
# 2. Reset local mediawiki installations prior to the update:
+
# (Note: HEAD is head of current branch i.e. head after checkout REL1_20 is 1.20, not master.
+
# (Use "git branch" or "git branch -a" to check which branch is active.)
+
cd /usr/share/mediawikiPP; sudo git checkout origin/master; cd extensions; (for f in *; do cd "$f" && sudo git checkout origin/master && cd ..; done);
+
cd /usr/share/mediawiki20; sudo git checkout origin/master; cd extensions; (for f in *; do cd "$f" && sudo git checkout origin/master && cd ..; done);
+
# 3. Update local mediawiki20, mediawikiPP from LOCAL-git and LOCAL-svn with:
+
cd /usr/share/mediawiki20; sudo git pull; cd extensions; (for f in *; do cd "$f" && sudo git pull origin/master && cd ..; done); /usr/bin/svn update;
+
cd /usr/share/mediawikiPP; sudo git pull; cd extensions; (for f in *; do cd "$f" && sudo git pull origin/master && cd ..; done); /usr/bin/svn update;
+
## Note: LATER check whether the git pull commands above are really necessary. It always reports "already up-to-date" - perhaps due to the hardlinks?
+
 
+
# 4. switch to the desired version again (AFTER UPDATING), see next section...
+
</syntaxhighlight>
+
 
+
==Updating mediawiki to specific versions==
+
 
+
'''SWITCH INSTALLATIONS TO SPECIFIC TAGS:'''
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
# Note: to see all branches/tags do:
 
 
  git branch -r | sort --version-sort
 
  git branch -r | sort --version-sort
 
  git tag -l | sort --version-sort
 
  git tag -l | sort --version-sort
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
+
OR: Example "Thanks" extension:
<syntaxhighlight lang="bash">
+
* https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Thanks.git;a=heads
# Mediawiki core:
+
* https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Thanks.git;a=tags
cd /usr/share/mediawikiPP; sudo git checkout origin/REL1_19
+
cd /usr/share/mediawiki20; sudo git checkout origin/REL1_20
+
# SMW extensions:
+
# find tags online: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticMediaWiki.git;a=tags
+
# on the commend line: git tag -l | sort --version-sort
+
cd /usr/share/mediawiki20/extensions/SemanticMediaWiki; sudo git checkout tags/1.8
+
cd /usr/share/mediawiki20/extensions/SemanticCompoundQueries; sudo git checkout tags/0.3.4
+
cd /usr/share/mediawiki20/extensions/SemanticDrilldown; sudo git checkout tags/1.2.4
+
cd /usr/share/mediawiki20/extensions/SemanticForms; sudo git checkout tags/2.5.1
+
# cd /usr/share/mediawiki20/extensions/SemanticFormsInputs; sudo git checkout tags/DOES NOT EXIST YET
+
cd /usr/share/mediawiki20/extensions/SemanticMaps; sudo git checkout tags/2.0
+
cd /usr/share/mediawiki20/extensions/SemanticInternalObjects; sudo git checkout tags/0.7
+
cd /usr/share/mediawiki20/extensions/SemanticResultFormats; sudo git checkout tags/1.8
+
cd /usr/share/mediawiki20/extensions/Maps; sudo git checkout tags/2.0
+
cd /usr/share/mediawiki20/extensions/Validator; sudo git checkout tags/0.5.1
+
</syntaxhighlight>
+
 
+
 
+
<syntaxhighlight lang="bash">
+
cd /var/www/testwiki_v20;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
cd /var/www/v-practicalplants/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
sudo /usr/sbin/apache2ctl -k graceful  && sudo /etc/init.d/nginx restart
+
</syntaxhighlight>
+
 
+
 
+
------
+
 
+
 
+
After this:
+
cd /var/www/testwiki_v20; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
started to run, but terminated with error: "Database returned error "1170: BLOB/TEXT column 'acr_email' used in key specification without a key length (localhost)""
+
* creating a new db with all shared tables locally and a setting in LocalSettings: $wgSharedTables = array("interwiki"); did not help.
+
* Changed field type, see [http://www.mediawiki.org/w/index.php?title=Extension_talk:ConfirmAccount&oldid=586787#SQL_Error_1170:_BLOB.2FTEXT_column_.27acr_email.27_used_in_key_specification_without_a_key_length_.28localhost.29]* ./maintenance/update.php running through.
+
 
+
Main page loads, but Special pages cause error (in biowikifarm.net-error.log):
+
2012/10/13 00:55:52 [error] 1546#0: *723661 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'SMWSQLStore2' not found in /usr/share/mediawiki20/phase3/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php on line 56" while reading response header from upstream, client...
+
 
+
Source are SemanticForms and SemanticInternalObjects.
+
 
+
TESTING: http://biowikifarm.net/test_v20/Main_Page versus http://biowikifarm.net/test_v18/Main_Page (test with normal staging version, just for identical web server setup)
+
  
 
----
 
----
  
After waiting several weeks, the bug did not go away. Submitted bug reports:
+
<!-- internal memo: the command shell 1-line update loop was:
https://bugzilla.wikimedia.org/show_bug.cgi?id=41640
+
cd /usr/share/mediawiki20; sudo git pull; cd extensions; (for f in *; do cd "$f" && sudo git pull origin/master && cd ..; done); /usr/bin/svn update;
https://bugzilla.wikimedia.org/show_bug.cgi?id=41641
+
-->

Latest revision as of 06:05, 15 April 2013

The history of this page contains the details of the migration from mediawiki 1.18 svn to 1.20 git. The permanently relevant information has now been migrated to Mediawiki installation and Mediawiki maintenance.


How-to is here: https://www.mediawiki.org/wiki/Download_from_Git . Checking extensions: Which extensions previously obtained from WMF-Subversion (i.e. excluding those we have in local SVN) are Not in the following list of git-migrated mediawiki extensions? https://gerrit.wikimedia.org/r/#/admin/projects/

Useful resources for understanding git checkout, head, detached head, --track:

Finding tags and branches

HINT: to see available branches/tags:

 git branch -r | sort --version-sort
 git tag -l | sort --version-sort

OR: Example "Thanks" extension: