From 075d84e2f7d72cd5b76f985220e8086b0026c950 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 28 Jul 2023 06:12:46 +0000 Subject: [PATCH 1/8] Upgrade to v1.40.0 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 961a272..63dbc5d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "MediaWiki" description.en = "Wiki package originally for use on Wikipedia" description.fr = "Wiki développé à l’origine pour Wikipédia" -version = "1.39.3~ynh2" +version = "1.40.0~ynh1" maintainers = ["Salamandar"] @@ -67,8 +67,8 @@ ram.runtime = "50M" [resources] [resources.sources] [resources.sources.main] - url = "https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.3.tar.gz" - sha256 = "e35769343876af42496da43ae2f47224fb8c779b8f45705c4147c6ff3522cc1d" + url = "https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.0.tar.gz" + sha256 = "e9c4877718698f082d8096d8a9d16cd9aeb21ee1982a3d8b4603af7cfd158ad4" [resources.sources.ldap_groups] url = "https://github.com/wikimedia/mediawiki-extensions-LDAPGroups/archive/refs/tags/1.0.5.tar.gz" From 2797169ca97f10f2d2a834fe4bc578dfc4b007b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 3 Sep 2023 22:27:02 +0200 Subject: [PATCH 2/8] Update LocalSettings.php to 1.40 --- conf/LocalSettings.php | 26 +++++++++++++++----------- scripts/install | 2 ++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/conf/LocalSettings.php b/conf/LocalSettings.php index 38b3be3..702e110 100644 --- a/conf/LocalSettings.php +++ b/conf/LocalSettings.php @@ -1,9 +1,9 @@ "$wgResourceBasePath/resources/assets/wiki.png" ]; +$wgLogos = [ + '1x' => "$wgResourceBasePath/resources/assets/wiki.png", + 'icon' => "$wgResourceBasePath/resources/assets/change-your-logo-icon.svg", +]; ## UPO means: this is also a user preference option @@ -85,19 +89,17 @@ # with MediaWiki developers to help guide future development efforts. $wgPingback = false; -## If you use ImageMagick (or any other shell command) on a -## Linux server, this will need to be set to the name of an -## available UTF-8 locale -$wgShellLocale = "C.UTF-8"; +# Site language code, should be one of the list in ./includes/languages/data/Names.php +$wgLanguageCode = "__LANGUAGE__"; + +# Time zone +$wgLocaltimezone = "UTC"; ## Set $wgCacheDirectory to a writable directory on the web server ## to make your wiki go slightly faster. The directory should not ## be publicly accessible from the web. #$wgCacheDirectory = "$IP/cache"; -# Site language code, should be one of the list in ./languages/data/Names.php -$wgLanguageCode = "__LANGUAGE__"; - $wgSecretKey = "__SECRET__"; # Changing this will log out all existing sessions. @@ -119,15 +121,17 @@ $wgDiff3 = "/usr/bin/diff3"; ## Default skin: you can change the default skin. Use the internal symbolic -## names, ie 'vector', 'monobook': +## names, e.g. 'vector' or 'monobook': $wgDefaultSkin = "vector"; # Enabled skins. # The following skins were automatically enabled: +wfLoadSkin( 'MinervaNeue' ); wfLoadSkin( 'MonoBook' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Vector' ); + # End of automatically generated settings. # Add more configuration options below. diff --git a/scripts/install b/scripts/install index b8b9f84..868fac1 100644 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,8 @@ else scriptpath=$path fi +wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}" + "php$phpversion" "$install_dir/maintenance/install.php" --conf "$install_dir" \ --server "https://$domain" \ --scriptpath "$scriptpath" \ From b27ae896ac58b118a7c8d0039bb74f4931c54e86 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 29 Aug 2023 06:13:06 +0000 Subject: [PATCH 3/8] Update extension urls --- manifest.toml | 24 ++++++++++++------------ scripts/install | 41 ++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/manifest.toml b/manifest.toml index 63dbc5d..fd1be70 100644 --- a/manifest.toml +++ b/manifest.toml @@ -71,33 +71,33 @@ ram.runtime = "50M" sha256 = "e9c4877718698f082d8096d8a9d16cd9aeb21ee1982a3d8b4603af7cfd158ad4" [resources.sources.ldap_groups] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPGroups/archive/refs/tags/1.0.5.tar.gz" - sha256 = "26f91deb271f9062181019fb41a3bc1646e7e1f4d894a7e03bc688f3b974d234" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPGroups/archive/1f945caecde46cab9df4682051d0d0cdb9115326.tar.gz" + sha256 = "26d95e63ab997b68730b1af4493127a35487bfaf3c3f3f4bd1af039f7965717c" in_subdir = true [resources.sources.ldap_authorization] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPAuthorization/archive/refs/tags/1.1.2.tar.gz" - sha256 = "fa25468492e39fd6a308468ab81fbcf65dc856c64a5723c00c3b85a84409f1c8" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPAuthorization/archive/fbb1c3b384c3cea8b9b8b7023decaa0056860c68.tar.gz" + sha256 = "027af328f8f230f5bae0b1dd6e7ffe2e27600e12743485c303992d6fd532bd43" in_subdir = true [resources.sources.pluggable_auth] - url = "https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/archive/refs/tags/6.3.tar.gz" - sha256 = "d22ee584c6616a585d3453989f2ca6e03d1447ec378c4e76b5ccb08f0d09fc05" + url = "https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/archive/1cbf44824f08347ba4f2a9e7cfef74cc84eeb8cc.tar.gz" + sha256 = "699ae20b7144d438ece5aeffc3bcf91ad3691182e2213e1ac59a0f06e0d3c869" in_subdir = true [resources.sources.ldap_authentication2] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPAuthentication2/archive/refs/tags/1.0.5.tar.gz" - sha256 = "d2465d0bf78371cdf0fbb0a0271e05441bd2c5668235f4d8998299b66279c28a" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPAuthentication2/archive/b83f5d1a400ae6d0a7b714df580d844b7caaeed3.tar.gz" + sha256 = "d7a6da1283af06995d88ce454c6264b21bf64fc82bf1617a3ee4d04d1d01e729" in_subdir = true [resources.sources.ldap_userinfo] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPUserInfo/archive/refs/tags/1.0.2.tar.gz" - sha256 = "e59560535395947fe2b2c673efd94445425795527c852534a02af0c9506a51cd" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPUserInfo/archive/01a4b9e4f533666fbbd2b51892be47dde671238f.tar.gz" + sha256 = "180d7944acb9796bf279f1a2b04b2855669f856c2a2904b4b8242993c37f3e0e" in_subdir = true [resources.sources.ldap_provider] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPProvider/archive/refs/tags/1.0.7.tar.gz" - sha256 = "1bee8a7a94a18b1e9980487335dbc5152051e2d269be160bb18714893fa8ec91" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPProvider/archive/dc89b2fabba95e7cd16af626fe61916983659b12.tar.gz" + sha256 = "e4685ca5f5ed355a89f049507af27294d72e967879d694c10e0c0c43767b16fa" in_subdir = true [resources.system_user] diff --git a/scripts/install b/scripts/install index 868fac1..e44716b 100644 --- a/scripts/install +++ b/scripts/install @@ -61,38 +61,37 @@ ynh_add_nginx_config ynh_script_progression --message="Installing and configuring Mediawiki..." --weight=14 if [ "$path" = "/" ]; then - scriptpath="" + # MediaWiki expects a "" for the root URL which is typically assumed to be + # "/" by other application packages. Therefore, we assume end-users will do + # this as well and make sure to ensure an "" in all cases where "/" is + # specified + mediawiki_path="" else - scriptpath=$path + mediawiki_path="$path" fi wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}" -"php$phpversion" "$install_dir/maintenance/install.php" --conf "$install_dir" \ - --server "https://$domain" \ - --scriptpath "$scriptpath" \ - --dbuser "$db_name" \ - --dbpass "$db_pwd" \ - --dbname "$db_name" \ - --dbprefix "mdk_" \ - --lang "$language" \ - --pass "$password" \ - "$wiki_name" "$admin" +pushd "$install_dir" || ynh_die "Could not pushd $install_dir" + "php$phpversion" "$install_dir/maintenance/install.php" \ + --server "https://$domain" \ + --scriptpath "$mediawiki_path" \ + --dbuser "$db_name" \ + --dbpass "$db_pwd" \ + --dbname "$db_name" \ + --dbprefix "mdk_" \ + --lang "$language" \ + --pass "$password" \ + "$wiki_name" "$admin" +popd || ynh_die "Could not popd from $install_dir" #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression --message="Adding a configuration file..." -if [ "$path" = "/" ]; then - # MediaWiki expects a "" for the root URL which is typically assumed to be - # "/" by other application packages. Therefore, we assume end-users will do - # this as well and make sure to ensure an "" in all cases where "/" is - # specified - mediawiki_path="" -else - mediawiki_path="$path" -fi +# save the original LocalSettings.php for eventual debugging +mv "$install_dir/LocalSettings.php" "$install_dir/LocalSettings.php.orig" ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php" From 1b58fac19f5981948420b2fb881fd374f468a81f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 28 Jul 2023 06:12:52 +0000 Subject: [PATCH 4/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ba9c98..721ce73 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in MediaWiki is a free and open-source wiki software package written in PHP. It serves as the platform for Wikipedia and the other Wikimedia projects, used by hundreds of millions of people each month. MediaWiki is localised in over 350 languages and its reliability and robust feature set have earned it a large and vibrant community of third-party users and developers. -**Shipped version:** 1.39.3~ynh2 +**Shipped version:** 1.40.0~ynh1 **Demo:** https://www.wikipedia.org diff --git a/README_fr.md b/README_fr.md index 9a1554b..286d42a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po MediaWiki est un progiciel wiki gratuit et open-source écrit en PHP. Il sert de plate-forme pour Wikipedia et les autres projets Wikimedia, utilisés par des centaines de millions de personnes chaque mois. MediaWiki est localisé dans plus de 350 langues et sa fiabilité et son ensemble de fonctionnalités robustes lui ont valu une communauté importante et dynamique d'utilisateurs et de développeurs tiers. -**Version incluse :** 1.39.3~ynh2 +**Version incluse :** 1.40.0~ynh1 **Démo :** https://www.wikipedia.org From 935c4eb2fc639c7e46918a30a3131a6dab1c1f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 4 Sep 2023 15:08:22 +0200 Subject: [PATCH 5/8] Use php8.1, and packages array in manifest.toml --- manifest.toml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index fd1be70..8941872 100644 --- a/manifest.toml +++ b/manifest.toml @@ -108,7 +108,17 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.0-fpm php8.0-mysql php8.0-mbstring php8.0-xml php8.0-intl mariadb-server diffutils imagemagick acl" + packages = [ + "php8.1-fpm", + "php8.1-mysql", + "php8.1-mbstring", + "php8.1-xml", + "php8.1-intl", + "mariadb-server", + "diffutils", + "imagemagick", + "acl", + ] [resources.database] type = "mysql" From 4de12136b6d8a3b05d8c34390fd0e018a7c10541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 15 Sep 2023 16:27:26 +0200 Subject: [PATCH 6/8] Fix: install LocalSettings file on upgrade too --- scripts/install | 4 ++-- scripts/upgrade | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e44716b..f938d4c 100644 --- a/scripts/install +++ b/scripts/install @@ -70,8 +70,6 @@ else mediawiki_path="$path" fi -wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}" - pushd "$install_dir" || ynh_die "Could not pushd $install_dir" "php$phpversion" "$install_dir/maintenance/install.php" \ --server "https://$domain" \ @@ -93,6 +91,8 @@ ynh_script_progression --message="Adding a configuration file..." # save the original LocalSettings.php for eventual debugging mv "$install_dir/LocalSettings.php" "$install_dir/LocalSettings.php.orig" +wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}" + ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php" # This is required to update database schemas diff --git a/scripts/upgrade b/scripts/upgrade index ea73463..335274d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,6 +103,10 @@ else mediawiki_path="$path" fi +wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}" + +ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php" + # Check for admin password being too short for the new mediawiki requirements password_length=$(ynh_app_setting_get --app=$app --key=password | awk '{print length}') if (( password_length < 10 )); then From 5d1e575074c4d00f690f66f0e49d8c2c0e67c9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 15 Sep 2023 16:29:46 +0200 Subject: [PATCH 7/8] Update extensions urls --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8941872..c311423 100644 --- a/manifest.toml +++ b/manifest.toml @@ -81,8 +81,8 @@ ram.runtime = "50M" in_subdir = true [resources.sources.pluggable_auth] - url = "https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/archive/1cbf44824f08347ba4f2a9e7cfef74cc84eeb8cc.tar.gz" - sha256 = "699ae20b7144d438ece5aeffc3bcf91ad3691182e2213e1ac59a0f06e0d3c869" + url = "https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/archive/8104ed91f386ddbd03ece9a390f9b23f4f6eb4b3.tar.gz" + sha256 = "8f9648cd862ad4f24d28a595d51b82f398b7bddaec9a0a5f82058a5d4a34e08a" in_subdir = true [resources.sources.ldap_authentication2] From 80d3572a9b5607fdd5abdb05afc3e03e47d6f033 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 20 Sep 2023 06:13:43 +0000 Subject: [PATCH 8/8] Update extension urls --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index c311423..371b579 100644 --- a/manifest.toml +++ b/manifest.toml @@ -96,8 +96,8 @@ ram.runtime = "50M" in_subdir = true [resources.sources.ldap_provider] - url = "https://github.com/wikimedia/mediawiki-extensions-LDAPProvider/archive/dc89b2fabba95e7cd16af626fe61916983659b12.tar.gz" - sha256 = "e4685ca5f5ed355a89f049507af27294d72e967879d694c10e0c0c43767b16fa" + url = "https://github.com/wikimedia/mediawiki-extensions-LDAPProvider/archive/cc5cb2c1dd433695bf351c72e77775115db6cef7.tar.gz" + sha256 = "e8ca8c6f7e77836947ddbd91260922f3ba429d4201d7c80cac322dadcbcda367" in_subdir = true [resources.system_user]