diff --git a/README.md b/README.md index 6cc20bc..50fe75d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Free and open-source content management framework. -**Shipped version:** 7.80 +**Shipped version:** 7.84 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5d95511..e810ff3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Framework de gestion de contenu libre et open-source. -**Version incluse:** 7.80 +**Version incluse:** 7.84 ## Captures d'écran diff --git a/check_process b/check_process index 945231d..5961eb4 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,10 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" language="en" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 password="pass" install_profil="minimal" ; Checks diff --git a/conf/nginx.conf b/conf/nginx.conf index 2ce7f10..66db9bd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,11 +9,6 @@ location __PATH__/ { rewrite ^__PATH__/(.+)$ __PATH__/index.php?q=$1 last; } - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..a03c5f9 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Free and open-source content management framework. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..54cd7d8 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Framework de gestion de contenu libre et open-source. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..23eca0e --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1 @@ +* LDAP module can be installed diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..dd142e7 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1 @@ +* Le module d'authentification LDAP peut être installé diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..9e4b711 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index eb120cd..d74244a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,19 @@ "en": "Old version of a content management framework written in PHP", "fr": "Ancienne version d'un système de gestion de contenu écrit en PHP" }, - "version": "7.80~ynh2", + "version": "7.84~ynh1", "url": "https://www.drupal.org", + "upstream": { + "license": "GPL-2.0-or-later", + "website": "https://www.drupal.org", + "userdoc": "https://www.drupal.org/docs/7" + }, "license": "GPL-2.0-or-later", "maintainer": { "name": "yalh76" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -25,8 +30,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -36,8 +40,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/backup b/scripts/backup index c4314ac..89da2d0 100644 --- a/scripts/backup +++ b/scripts/backup @@ -58,7 +58,7 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # SPECIFIC BACKUP #================================================= -# BACKUP A CRON FILE +# BACKUP VARIOUS FILES #================================================= ynh_backup --src_path="/etc/cron.d/$app" diff --git a/scripts/install b/scripts/install index ded30cb..8eb7e62 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # CREATE A MYSQL DATABASE @@ -148,21 +148,21 @@ chown -R $app:www-data "$final_path" update-alternatives --set php /usr/bin/php$phpversion pushd "$final_path" - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush pm-download -y drupal-7 --drupal-project-rename=$app + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush pm-download -y drupal-7 --drupal-project-rename=$app - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app site-install $install_profil --account-name=$admin --account-pass=$password --account-mail=$admin_mail --db-url=mysql://$db_user:$db_pwd@localhost/$db_name --site-name="$app" --locale=$language --yes - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-download drush_language - #ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-download ldap - #ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-enable -y ldap_servers ldap_user ldap_authentication ldap_authorization ldap_authorization_drupal_role - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-download l10n_update - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-enable -y l10n_update - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app language-add $language - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app language-default $language - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear drush - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-update - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app core-cron + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app site-install $install_profil --account-name=$admin --account-pass=$password --account-mail=$admin_mail --db-url=mysql://$db_user:$db_pwd@localhost/$db_name --site-name="$app" --locale=$language --yes + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-download drush_language + #ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-download ldap + #ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-enable -y ldap_servers ldap_user ldap_authentication ldap_authorization ldap_authorization_drupal_role + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-download l10n_update + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-enable -y l10n_update + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app language-add $language + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app language-default $language + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear drush + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update-refresh + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-update + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app core-cron chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/remove b/scripts/remove index 516968d..f0c04b5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,14 +31,6 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -63,12 +55,20 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE THE CRON FILE +# REMOVE VARIOUS FILES #================================================= -ynh_script_progression --message="Removing the cron file..." +ynh_script_progression --message="Removing various files..." # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 8d65682..b5f79e8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,8 +39,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -59,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # RESTORE THE APP MAIN DIR @@ -86,12 +84,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC RESTORATION -#================================================= -# RESTORE THE CRON FILE -#================================================= - -ynh_restore_file --origin_path="/etc/cron.d/$app" - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -109,6 +101,13 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE VARIOUS FILES +#================================================= +ynh_script_progression --message="Restoring various files..." + +ynh_restore_file --origin_path="/etc/cron.d/$app" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6d29743..9a7577b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,18 +31,6 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -# 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 #================================================= @@ -59,13 +47,25 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -136,14 +136,14 @@ chown -R $app:www-data "$final_path" update-alternatives --set php /usr/bin/php$phpversion pushd "$final_path" - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1 - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear all - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-update -y drupal - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app cache-clear all - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1 + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app pm-update -y drupal + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app cache-clear all + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update-refresh + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app l10n-update - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0 + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0 chmod 750 "$final_path" chmod -R o-rwx "$final_path"