Talk:Download from Git

Jump to navigation Jump to search

About this board

Liuxinyu970226 (talkcontribs)

Are those "translations" of commands really work in Git softwares?

Reply to "Why "install-dir" are translatable?"
Omotecho (talkcontribs)
Reply to "Translation: source needs update"

What external libraries that MediaWiki requires are no longer in this "core" git repository?

3
Orestn (talkcontribs)

The "Fetch external libraries" section states that "external libraries that MediaWiki requires are no longer in this "core" git repository".

Which libraries are no longer included?

These instructions are given to install these needed libraries "composer install --no-dev". My understanding of composer is that --no-dev tells composer to skip installing packages listed in require-dev. How then would a command that tells composer to skip installing certain packages cause it to install additional required libraries?

Orestn (talkcontribs)

Ah, I hadn't paid attention to the part in the documentation that says "switch to your core directory" before running composer install.

I had been running "composer install" in the project root folder. This folder has a composer.json which requires mediawiki/core.

I see now that there is another composer.json file in the vendor/mediawiki/core folder and that running composer install in this folder brings in additional libraries.

I still don't understand why running composer install at the project root doesn't resolve all dependencies when it installs mediawiki/core.

Legoktm (talkcontribs)

> I had been running "composer install" in the project root folder. This folder has a composer.json which requires mediawiki/core.

What is your project root folder? Where did you get this folder from, and why does it have a composer.json that requires "mediawiki/core"??

Reply to "What external libraries that MediaWiki requires are no longer in this "core" git repository?"
91.65.247.81 (talkcontribs)

I cloned several extensions into .../extensions. Thereafter I tried to be a real smart ass by trying to switch all of them to the 1.23 branch. I did as instructed "git submodule update --init --recursive" followed by "git submodule foreach 'git checkout -b REL1_23 origin/REL1_23 || :" The I run update.php and get the following message: This version of the CharInsert extension requires MediaWiki 1.25+. That's awesome but does not help me since I want to do 1.23. Any hint appreciated.

91.65.247.81 (talkcontribs)

Even if I go to /extensions/CharInsert and do "git checkout -b REL1_23 origin/REL1_23" the update.php script tells me This version of the CharInsert extension requires MediaWiki 1.25+???

91.65.247.81 (talkcontribs)

I just found out that I messed something with CharInsert while trying to to what is described in my first post. So if I do "git checkout -b REL1_23 origin/REL1_23" in every exension's folder I am cool. So how do I save time and do it for all of them in one go. This will be great.

91.65.247.81 (talkcontribs)

The internet tells me to do something like "git submodule foreach --recursive git checkout -b REL1_23 origin/REL1_23" This does not work either. Still looking for a solution to not having to do it for say 50 extensions ... or is it that git is just a flawed system. There must be a trick I guess.

91.65.247.81 (talkcontribs)

Probably this only works if you download the whole lot of extensions and not an isolated set of say 50. I guess git is funny ha ha Let's do the solos :)

MarkAHershberger (talkcontribs)

It doesn't sound like you used submodules to initially install the extensions, did you?

91.65.247.81 (talkcontribs)

No I did not, but did not realize this in the heat of the action. There should be a note about it.

MarkAHershberger (talkcontribs)

I just used the exact commands you gave and successfully set up gerrit. In fact, I did

   $ cd skins; git submodule foreach git review -s

and had success. Well, it did fail on the WPtouch skin, for some reason, but setting the gerrit remote in that directory manually allowed it to continue.

To set the gerrit remote in that directory:

   $ cd WPTouch; git remote add gerrit URL
Reply to "So how do I ... ????"
Spas.Z.Spasov (talkcontribs)

I'm just trying to downloading all extensions, following this sequence:

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git
cd extensions
git submodule update --init --recursive

The problem is that some extensions asks for authentication. I've made account in https://gerrit.wikimedia.org but it is 'Unauthorized' and result is:

$ git submodule update --init --recursive
Cloning into 'Notifications'...
Username for 'https://gerrit.wikimedia.org': Spas.Z.Spasov
Password for 'https://Spas.Z.Spasov@gerrit.wikimedia.org':
remote: Unauthorized
fatal: Authentication failed for 'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Notifications.git/'
fatal: clone of 'https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Notifications.git' into submodule path 'Notifications' failed

(I found that extension '2ColConflict' also make this trouble...)

Could someone help me get through this?

Jaideraf (talkcontribs)

Same problem to me. Notifications asks username and password.

Jaideraf (talkcontribs)

@Spas.Z.Spasov I did

cd extensions/
git submodule foreach 'git checkout -b REL1_28 origin/REL1_28 || :'
git submodule update --init --recursive

And now it works.

Spas.Z.Spasov (talkcontribs)

Thank you! I will try it these days. And will report also.

Reply to "Problem with 'git submodule update'"
Frimelle (talkcontribs)

I was recently installing MediaWiki with someone who did it for the first time. The skins part was what I saw them struggling most with.

I think that's mainly because:

  • It's so late in the manual
  • It doesn't mention anywhere before you'll have to install skins (if it's supposed to stay where it is, it should be mentioned before that the step is necessary)
  • The section itself links to another tutorial, for beginners it would be nicer to have a quick "How to set up the Vector skin and here is a link to how to work with all the other skins if you know what they do already"

I would like to change it in the way suggested but am open for feedback. Therefore I thought I mention it here and see if there are other/opposing opinions.

BDavis (WMF) (talkcontribs)

The proposed changes sound reasonable to me. Many of our docs are written by people with very deep knowledge of how our software is intended to be used. That perspective often leads to docs that very precisely correct but not necessarily easy to follow. Copy editing always welcome! The worst thing that could possibly happen is a revert. :)

Reply to "Download skins section"
Jidanni (talkcontribs)
  • User sees section 'Download for development'.
  • User wants section 'Download not for development'.
  • User researches the advice "git clone --depth 1, then e.g., git pull (--depth=1 too?) monthly".
  • After several years user finds du -sh showing
1.5G    mediawiki/
1.4G    mediawiki/.git
  • User does not need history filling up his disks!
80.197.69.174 (talkcontribs)
Reply to "Download not for development"
Purodha (talkcontribs)

If you want to download all skins for development, one might be tempted to:

       git clone ssh://purodha@gerrit.wikimedia.org:29418/mediawiki/skins.git
       cd skins
       git review -s
       git submodule update --init --recursive

That creates a set of files but they cannot be used to submit amendments. If you try:

       cd <someskin>
       git review -s

you get:

       Problems encountered installing commit-msg hook
       /.../<someskin>/.git/hooks/commit-msg: Not a directory
       protocol error: expected control record

and attempts to use:

       git review ...

so as to submit patches yields similar error messages.

Please document a correct working way to solve the problem.

Reply to "Using Git to download MediaWiki skins"

Skin installation: do not checkout master branch

4
FelixKaiser (talkcontribs)

I've just upgrated to version 1.24 from 1.22. Do do so I needed to install a skin, since it doesn't come with MW. I've spent 3 hours fixing an error in Vector's skin display, because the guide tells you to install the master branch only.

I've now however understand that for the skin also, one should install the REL1_24 branch, using git checkout -b REL1_24 origin/REL1_24

It seems at this time, the master branch was buggy or incompatible. If you understand the release process better than I do and think I am correct, would you be so kind to amend the documentation? Thanks.

Nemo bis (talkcontribs)

MediaWiki from Git is pretty much unusable these days, with all the dependencies. Do you have strong reasons to use Git instead of the tarball?

Frimelle (talkcontribs)
John.james (talkcontribs)

wasn't obvious to me anyway. I just spent three hours before figuring out that there were branches for the skins too. whoops. I was bold and added to the documentation.

Reply to "Skin installation: do not checkout master branch"
FelixKaiser (talkcontribs)

This guide does not talk about necessary file access rights for Mediawiki to run after installation in this way. Installing Mediawiki without these rights will not succeed, which is why I think it should be added.

Reply to "Mention access rights"