Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions docs/build-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ graph TD
B-->|pacman|C[dist folder with things in it]
```

### Checklist for updating mediawiki
- `wikiman.yaml`
- Check `mediawikiVersion` is still set to the version we want to target e.g. 1.39
- Check if `mediawikiRepoRef` is set to a specific value for a reason that still makes sense
- If not remove it
- Review `patchUrls`
- Open each patch and determine if it has now been merged into the updated version you are targeting
- If so: remove it
- If not determine if we should:
- Apply it as is
- Edit it so that is correctly applies to the newly updated code
- Remove it since it's no longer needed
- Run `./sync/wikiman/wikiman .`
- Run `./sync.sh`

### sync.sh

This script will resync the `dist` directory.
Expand Down Expand Up @@ -40,14 +55,11 @@ This needs to be run by developers when updating component versions in `wikiman.
This is run as a step in `sync.sh`

#### Syncing patches
To apply additional gerrit patches, you can specify patch URLs in the corresponding codebase part of `pacman.yaml`
To apply additional gerrit patches, you can specify patch URLs in the corresponding codebase part of `wikiman.yaml`.

Example:
```
- name: Wikibase
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~833742/revisions/15/patch?download
```

> [!WARNING]
> Currently patches will get overridden if `wikiman` is used to generate the `pacman.yaml` file!
13 changes: 13 additions & 0 deletions sync/wikiman/wikiman-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
},
"remove": {
"$ref": "#/$defs/RemoveList"
},
"patchUrls": {
"$ref": "#/$defs/PatchUrlList"
}
},
"additionalProperties": false,
Expand All @@ -88,6 +91,9 @@
},
"remove": {
"$ref": "#/$defs/RemoveList"
},
"patchUrls": {
"$ref": "#/$defs/PatchUrlList"
}
},
"additionalProperties": false,
Expand All @@ -102,6 +108,13 @@
"items": {
"type": "string"
}
},
"PatchUrlList": {
"description": "A list of gerrit URLs pointing to a base64 encoded git patch",
"type": "array",
"items": {
"type": "string"
}
}
}
}
6 changes: 6 additions & 0 deletions sync/wikiman/wikiman.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def make_artifact_entry(details: Dict[str, str], extra_remove: List[str]) -> Dic
'destination': details['destination'],
'remove' : extra_remove + details.get('remove', []),
}

if "patchUrls" in details.keys():
entry['patchUrls'] = []
for patch_url in details['patchUrls']:
entry['patchUrls'].append(patch_url)

return entry

# pylint: disable=too-many-ancestors
Expand Down
13 changes: 13 additions & 0 deletions wikiman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ extensions:
repoName: wikimedia/mediawiki-extensions-CirrusSearch
- name: WikibaseCirrusSearch
repoName: wikimedia/mediawiki-extensions-WikibaseCirrusSearch
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseCirrusSearch~1120939/revisions/2/patch?download
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseCirrusSearch~1120941/revisions/1/patch?download
- name: WikibaseLexemeCirrusSearch
repoName: wikimedia/mediawiki-extensions-WikibaseLexemeCirrusSearch
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseLexemeCirrusSearch~1120949/revisions/1/patch?download
- name: UniversalLanguageSelector
repoName: wikimedia/mediawiki-extensions-UniversalLanguageSelector
- name: cldr
Expand All @@ -62,6 +67,8 @@ extensions:
repoName: wikimedia/mediawiki-extensions-TwoColConflict
- name: OAuth
repoName: wikimedia/mediawiki-extensions-OAuth
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FOAuth~1197610/revisions/2/patch?download
- name: WikibaseLexeme
repoName: wikimedia/mediawiki-extensions-WikibaseLexeme
- name: SyntaxHighlight_GeSHi
Expand Down Expand Up @@ -92,6 +99,10 @@ extensions:
repoName: wikimedia/mediawiki-extensions-SecureLinkFixer
- name: Echo
repoName: wikimedia/mediawiki-extensions-Echo
patchUrls:
# This patch URL fixes SQLBagOStuff duplicate warnings due to bug in Echo extension.
# Remove when updated to 1.44+ (Bug: T412100).
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FEcho~1093496/revisions/1/patch?download
- name: Poem
repoName: wikimedia/mediawiki-extensions-Poem
- name: TemplateData
Expand Down Expand Up @@ -133,6 +144,8 @@ extensions:
repoRef: 3e039311504eb82f8c5c488a457b9e376b5cf7e3
## These extensions use urls directly
- name: Wikibase
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~1120952/revisions/1/patch?download
url: https://github.com/wbstack/mediawiki-tars/raw/ae333245e6fd22b888a925f088ac5637c6f9b6c1/Wikibase-1761224062-REL1_43.tar.gz
remove:
- build
Expand Down
Loading