diff --git a/README.md b/README.md index 26faf3e..ce4adee 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:** 8.9.15 +**Shipped version:** 8.9.20 ## Screenshots diff --git a/README_fr.md b/README_fr.md index b7e1aed..5acef93 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:** 8.9.15 +**Version incluse:** 8.9.20 ## Captures d'écran diff --git a/check_process b/check_process index 5a10d82..5dca74e 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 @@ -21,6 +21,8 @@ upgrade=1 from_commit=08ca36cc16691ed64a11034c810f5adefb21186a # 8.9.7~ynh2 upgrade=1 from_commit=69b57e0d7cd862e4e5aef0bfc2bc2634874602c4 + # 8.9.15~ynh1 + upgrade=1 from_commit=06baed57a0650ec9a9e4e0f3348298065c1207f2 backup_restore=1 multi_instance=1 port_already_use=0 @@ -35,3 +37,5 @@ Notification=all name=8.9.7~ynh1 ; commit=69b57e0d7cd862e4e5aef0bfc2bc2634874602c4 name=8.9.7~ynh2 + ; commit=06baed57a0650ec9a9e4e0f3348298065c1207f2 + name=8.9.15~ynh1 diff --git a/conf/app.src b/conf/app.src index a6a23b5..173695b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/drupal-composer/drupal-project/archive/ec0f41171516c18357ca4cda9068ee4cdeabaa19.tar.gz -SOURCE_SUM=aa94ea1e8a0cc382afb8e9f66b56af02ca7c60817403efc0e7b2a89c3dea09b8 +SOURCE_URL=https://github.com/drupal-composer/drupal-project/archive/d2e7410c8453ff18462278836c76e56b9a973585.tar.gz +SOURCE_SUM=22862785f6d83486f3aca1d748f80e00497074591efec93ad20a694ce60f1ced SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index f9fefba..442848d 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..f2c5c2e --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Free and open-source content management framework. \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..f4e231b --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Framework de gestion de contenu libre et open-source. \ No newline at end of file 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..d28e467 --- /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..30f2680 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index 6c8450c..6478b87 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,20 @@ "en": "A content management framework written in PHP", "fr": "Un système de gestion de contenu écrit en PHP" }, - "version": "8.9.15~ynh1", + "version": "8.9.20~ynh1", "url": "https://www.drupal.org", + "upstream": { + "license": "GPL-2.0-or-later", + "website": "https://www.drupal.org", + "admindoc": "https://www.drupal.org/docs/8", + "code": "https://github.com/drupal-composer/drupal-project" + }, "license": "GPL-2.0-or-later", "maintainer": { "name": "yalh76" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -25,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -36,8 +41,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/backup b/scripts/backup index f2401c9..236d57f 100644 --- a/scripts/backup +++ b/scripts/backup @@ -55,7 +55,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 667a52a..87f8800 100644 --- a/scripts/install +++ b/scripts/install @@ -72,7 +72,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 @@ -157,7 +157,7 @@ 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 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 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 popd update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} diff --git a/scripts/remove b/scripts/remove index 51b5697..b1182e4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,14 +32,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 #================================================= @@ -64,8 +56,24 @@ 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 VARIOUS FILES +#================================================= +ynh_script_progression --message="Removing various files..." + +# Remove a cron file +ynh_secure_remove --file="/etc/cron.d/$app" + #================================================= # REMOVE SWAP #================================================= @@ -73,14 +81,6 @@ ynh_script_progression --message="Removing swap..." ynh_del_swap -#================================================= -# REMOVE THE CRON FILE -#================================================= -ynh_script_progression --message="Removing the cron file..." - -# Remove a cron file -ynh_secure_remove --file="/etc/cron.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 8d4dfb4..296d915 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,8 +37,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 " @@ -57,7 +55,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 @@ -73,7 +71,7 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring PHP-FPM configuration..." +ynh_script_progression --message="Restoring the PHP-FPM configuration..." # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -84,20 +82,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC RESTORATION -#================================================= -# RESTORE THE CRON FILE -#================================================= -ynh_script_progression --message="Restoring the cron file..." - -ynh_restore_file --origin_path="/etc/cron.d/$app" - -#================================================= -# ADD SWAP -#================================================= -ynh_script_progression --message="Adding swap..." - -ynh_add_swap --size=$swap_needed - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -115,6 +99,20 @@ 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" + +#================================================= +# ADD SWAP +#================================================= +ynh_script_progression --message="Adding swap..." + +ynh_add_swap --size=$swap_needed + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 69841dd..a372969 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,18 +32,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 #================================================= @@ -60,13 +48,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 @@ -137,12 +137,12 @@ 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.prod state:set system.maintenance_mode 1 --input-format=integer - ynh_exec_warn_less sudo -u $app env PATH=$PATH php composer.phar update drupal/core webflo/drupal-core-require-dev --with-dependencies - ynh_exec_warn_less sudo -u $app env PATH=$PATH php composer.phar update --with-dependencies - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod -y updatedb - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod cache:rebuild - ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 0 --input-format=integer + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 1 --input-format=integer + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH php composer.phar update drupal/core webflo/drupal-core-require-dev --with-dependencies + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH php composer.phar update --with-dependencies + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod -y updatedb + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod cache:rebuild + ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 0 --input-format=integer popd update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}