diff --git a/README.md b/README.md index d7a2c85..0f148f5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ MediaWiki is a free and open source software wiki package written in PHP, originally for use on Wikipedia. -**Shipped version:** 1.35.1 +**Shipped version:** 1.35.2 **Shipped extension versions:** * [LDAPAuthentication2](https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2) @@ -41,7 +41,7 @@ How to configure this app: ## Documentation * Official documentation: https://www.mediawiki.org - * YunoHost documentation: https://yunohost.org/#/app_mediawiki + * YunoHost documentation: https://yunohost.org/en/app_mediawiki ## YunoHost specific features @@ -53,8 +53,8 @@ How to configure this app: #### Supported architectures - * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mediawiki%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mediawiki/) - * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mediawiki%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mediawiki/) + * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mediawiki.svg)](https://ci-apps.yunohost.org/ci/apps/mediawiki/) + * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mediawiki.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mediawiki/) ## Limitations diff --git a/README_fr.md b/README_fr.md index 09cf321..6f1ed8b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install MediaWiki est un moteur de wiki pour le Web. Il est utilisé par l’ensemble des projets de la Fondation Wikimedia. -**Version de Mediawiki:** 1.35.1 +**Version de Mediawiki:** 1.35.2 **Versions d'extension livrées:** * [LDAPAuthentication2](https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2) @@ -41,7 +41,7 @@ Comment configurer cette application : ## Documentation * Documentation officielle : https://www.mediawiki.org - * Documentation YunoHost : https://yunohost.org/#/app_mediawiki + * Documentation YunoHost : https://yunohost.org/fr/app_mediawiki ## Caractéristiques spécifiques YunoHost @@ -53,8 +53,8 @@ Comment configurer cette application : #### Architectures supportées - * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mediawiki%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mediawiki/) - * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mediawiki%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mediawiki/) + * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mediawiki.svg)](https://ci-apps.yunohost.org/ci/apps/mediawiki/) + * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mediawiki.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mediawiki/) ## Limitations diff --git a/check_process b/check_process index fbd9f6d..17a5503 100644 --- a/check_process +++ b/check_process @@ -16,17 +16,15 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=1cea793f85ad8251a08adaf852b780bc0a0f9a20 backup_restore=1 multi_instance=1 incorrect_path=1 - port_already_use=0 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none ;;; Upgrade options - ; commit= - name= + ; commit=1cea793f85ad8251a08adaf852b780bc0a0f9a20 + name=Add script to easily update extensions manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&language=fr&password=pass&port=666&wiki_name=YnhCiMediaWiki diff --git a/conf/app.src b/conf/app.src index 2fb283d..9d1b984 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.tar.gz -SOURCE_SUM=8e65a61d4a16ea6f3e60a2828483f8d50047b89f94f1313fcc2da113fdabe315 +SOURCE_URL=https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.2.tar.gz +SOURCE_SUM=bffa58d9b76667d4131b4b46f106ba0008d85d60a18c70b674cc322a24818c1d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 2dae114..643e1a8 100644 --- a/manifest.json +++ b/manifest.json @@ -4,9 +4,9 @@ "packaging_format": 1, "description": { "en": "A free and open source software wiki package written in PHP, originally for use on Wikipedia.", - "fr": "Un wiki à base de logiciels libres Open source, développé à l’origine pour Wikipédia ." + "fr": "Un wiki à base de logiciels libres Open source, développé à l’origine pour Wikipédia." }, - "version": "1.35.1~ynh1", + "version": "1.35.2~ynh1", "url": "https://www.mediawiki.org", "license": "GPL-2.0-or-later", "maintainer": { @@ -14,7 +14,7 @@ "email": "felix@piedallu.me" }, "requirements": { - "yunohost": ">= 3.7.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -27,38 +27,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for MediaWiki", - "fr": "Choisissez un nom de domaine pour MediaWiki" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for MediaWiki", - "fr": "Choisissez un chemin pour MediaWiki" - }, "example": "/wiki", "default": "/wiki" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l'administrateur" - }, "example": "johndoe" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public wiki ?", - "fr": "Est-ce un wiki public ?" - }, "help": { "en": "Visibility of the wiki pages", "fr": "La visibilité des pages du wiki" @@ -78,10 +62,6 @@ { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "help": { "en": "The password for the wiki administrator. It needs to be solid or the installation process will fail.", "fr": "Le mot de passe de l'administrateur du wiki. Il doit être solide, sinon l'installation échouera." diff --git a/pull_request_template.md b/pull_request_template.md index 8a7ddee..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,12 +11,6 @@ - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. -## Validation +## Package_check results --- -- [ ] **Code review** : -- [ ] **Approval (LGTM)** : -*Code review and approval have to be from a member of @YunoHost-Apps/apps-group* -- **CI succeeded** : -[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/mediawiki_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/mediawiki_ynh%20PR-NUM-/) -*Please replace '-NUM-' in this link by the PR number.* -When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/backup b/scripts/backup index b2b62a6..4870919 100755 --- a/scripts/backup +++ b/scripts/backup @@ -34,11 +34,6 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= @@ -62,9 +57,6 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= ynh_print_info --message="Backing up the MySQL database..." -### (However, things like MySQL dumps *do* take some time to run, though the -### copy of the generated dump to the archive still happens later) - ynh_mysql_dump_db --database="$db_name" > db.sql #================================================= diff --git a/scripts/install b/scripts/install index 4e6f18d..4b0fc92 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,6 @@ ynh_app_setting_set --app="$app" --key=domain --value="$domain" ynh_app_setting_set --app="$app" --key=path --value="$path_url" ynh_app_setting_set --app="$app" --key=admin --value="$admin" ynh_app_setting_set --app="$app" --key=admin_password --value="$admin_password" -ynh_app_setting_set --app="$app" --key=is_public --value="$is_public" ynh_app_setting_set --app="$app" --key=language --value="$language" ynh_app_setting_set --app="$app" --key=wiki_name --value="$wiki_name" @@ -183,7 +182,7 @@ chown -R "$app:$app" "$final_path" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ "$is_public" -eq 1 ]; then diff --git a/scripts/restore b/scripts/restore index c7e7a1f..b1442b8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -101,7 +101,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 637afd0..5f55034 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app="$app" --key=domain) path_url=$(ynh_app_setting_get --app="$app" --key=path) admin=$(ynh_app_setting_get --app="$app" --key=admin) -is_public=$(ynh_app_setting_get --app="$app" --key=is_public) final_path=$(ynh_app_setting_get --app="$app" --key=final_path) language=$(ynh_app_setting_get --app="$app" --key=language) wiki_name=$(ynh_app_setting_get --app="$app" --key=wiki_name) @@ -37,15 +36,6 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=mysqlpwd) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app="$app" --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app="$app" --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name="$app") @@ -58,6 +48,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app="$app" --key=final_path --value="$final_path" fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -92,7 +89,7 @@ ynh_setup_source --dest_dir="$final_path/extensions/" --source_id="pluggable_aut #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -115,7 +112,7 @@ ynh_system_user_create --username="$app" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=1 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated php-fpm config ynh_add_fpm_config @@ -187,27 +184,10 @@ fi # Set permissions on app files chown -R "$app:$app" "$final_path" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Upgrade from the legacy permissions system -protected_uris=$(ynh_app_setting_get --app="$app" --key=protected_uris) -if [ -n "${protected_uris}" ]; then - ynh_app_setting_delete --app="$app" --key=protected_uris -fi - -# Make app public if necessary -if [ $is_public -eq 1 ]; then - # Allow public access on / - ynh_permission_update --permission "main" --add "visitors" -fi - #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload