[15:52:11] Hello, I hope I found the right place to ask a somehow special configuration question regarding $wgLocalFileRepo. [15:52:34] I actually do not want to configure my own local file repo. I simply want to change a property of the default repo. [15:52:36] How can I change the fileMode property of the default file repo to 0664 (instead of 0644)? I found the place for patching this but I do not like patches. [15:59:47] can you not just set it directly in your local configuration file? [16:02:56] I would do that if only I could find the default file repo (could not find an API for that :| [16:05:02] https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/filebackend.php#L263 for an example, just set the properties you want in LocalSettings.php or wherever you have your local settings [16:06:10] I assume (but don't know for sure) that default values will be picked up for anything you didn't set [16:07:39] hmm it appears that Setup.php will not do what is desired, if you define only some properties, it won't fill in the rest. unfortunate [16:07:58] I already found sth. similar and tried it. Not all imager-related features were working then. Apparently I have to configure many values where I do not know/understand the semantics. [16:08:28] yes, true. [16:09:20] https://www.mediawiki.org/wiki/Manual:$wgLocalFileRepo I would check the Setup code for what's most current, but if you have to steal the default and define yourown repo, it would at least get the job done [16:09:28] I know that's not what you asked fooor. [16:09:30] *for [16:10:30] hmmm [16:10:56] the load order might be: Setup.php and then LocalSettings.php later. try just adding the property and see [16:12:58] if this is the only way, I might even prefer the patch in https://doc.wikimedia.org/mediawiki-core/REL1_43/php/FileBackendGroup_8php_source.html#l00149 [16:13:33] thank you for you proposals apergos [16:14:08] good luck, let us know what you finally did [16:15:52] emwiemaikel: I’d try something like this https://gist.github.com/lucaswerkmeister/1cef0352e48756ed15ca0bcf6eafc23e [16:16:09] by the time $wgExtensionFunctions are run, the Setup.php code initializing the variable should’ve run already [16:16:33] (might be prudent to add something like if $wgLocalFileRepo['class'] == 'LocalRepo' or whatever just in case something else touches the variable) [16:16:51] thanks for the assist Lucas_WMDE [16:18:20] apergos: I had the advantage of having seen the question earlier in #wikimedia-dev so I had some more time to think about it ;) [16:18:31] sweet! [16:19:06] I used to camp in that channel but it's so high traffic due to the bot commit posts that I gave it up [16:20:04] yeah I have it muted and only saw the human message by chance [16:20:17] but I still look at it occasionally, sometimes the flyby patches are also interesting [16:20:29] theyare,,, ti's why I used to camp in there. but it just wasn't sustainable [16:21:03] *nod* [16:21:32] OMG Lucas_WMDE that might actually work, will try it right now -- Jogging has to wait ;) [16:21:38] :D [16:29:13] You guys are amazing. It works like a charm -- at least for my test case. Will need to do some more testing. But for now I am happy. [16:29:32] \o/ [16:30:06] Lucas_WMDE you might want to fix your code to use 0664 (octal) instead of 664 (decimal) ;) [16:30:18] ah :D [16:31:14] done, kinda ;) [18:07:49] should probably use MediaWikiServices for that [18:09:04] extension functions run relatively early and the chance of RepoGroup having been initialized by then is small [18:09:07] but still safer [20:27:09] We could also make it simpler for ene users by allowing what is expected to work, to actually work, eg set/override keys in LocalSettings [20:28:02] we could create the array directly in MainConfigSchema instead of boolean false, leaving null for keys that have dynamic defaults based on other settings, and then in Setup.php only ??= assign those keys instead of replacing [21:32:48] that would be nice, it's what I would expect to work, as you say [21:44:52] * Krinkle writes a patch [21:46:55] feel free to add me on cc [21:47:19] I won't see it until tomorrow (nearly midnight here and III should try to sleep shortly) [21:49:34] Will do! [21:51:23] <3