diff --git a/README.md b/README.md index a01b85c..91e0e58 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Mobilizon aims to solve existing platform's problems to organize events in a dec Mobilizon is a tool that helps you find, create and organise events. You can also create a page for your group where the members will be able to organise together. -**Shipped version:** 1.1.4 +**Shipped version:** 1.2.1 ## Important points to read before installing diff --git a/check_process b/check_process index b1bba6f..03f68a2 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) + domain="domain.tld" + admin="john" language="fr" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 password="password" name="My_Mobilizon" ; Checks @@ -16,6 +16,8 @@ upgrade=1 # 1.1.3~ynh1 upgrade=1 from_commit=87d34001dd0b77aed4fa7be2911bc04f58b069ee + # 1.1.4~ynh1 + upgrade=1 from_commit=ca8f3ab279d550cb6be44d0fec4c7f36fcae8798 backup_restore=1 multi_instance=1 port_already_use=0 @@ -26,3 +28,5 @@ Notification=all ;;; Upgrade options ; commit=87d34001dd0b77aed4fa7be2911bc04f58b069ee name=1.1.3~ynh1 + ; commit=ca8f3ab279d550cb6be44d0fec4c7f36fcae8798 + name=1.1.4~ynh1 diff --git a/conf/app.src b/conf/app.src index 14cd636..5792561 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/1.1.4/mobilizon-1.1.4.tar.gz -SOURCE_SUM=0d778d1ab390e0525bb3bb7383298011ea19d89075955622cf23e61e2899acd2 +SOURCE_URL=https://framagit.org/framasoft/mobilizon/-/archive/1.2.1/mobilizon-1.2.1.tar.gz +SOURCE_SUM=b35f63b56e5ad3275b0d1d4459a8fd88bc671a422d7414d31d32f71069decced SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=mobilizon-1.1.4.tar.gz +SOURCE_FILENAME=mobilizon-1.2.1.tar.gz SOURCE_EXTRACT=true diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..7016c78 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,8 @@ +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * **Mobilizon** require a dedicated **root domain**, eg. mobilizon.domain.tld + * To connect as **Mobilizon** administrator, use the email address and password of the user you choose during install + * By default registrations are closed + * All YunoHost users are allowed to connect + +* Other infos that people should be aware of, such as: + * Configuration can be made in the Mobilizon administration panel. \ No newline at end of file diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot1.jpg b/doc/screenshots/screenshot1.jpg new file mode 100644 index 0000000..415dcf8 Binary files /dev/null and b/doc/screenshots/screenshot1.jpg differ diff --git a/manifest.json b/manifest.json index 86747db..5fb84f7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,8 +6,15 @@ "en": "A decentralized and federated platform to organize events", "fr": "Une plateforme décentralisée et fédérée pour organiser des événements" }, - "version": "1.1.4~ynh1", + "version": "1.2.1~ynh1", "url": "https://joinmobilizon.org/", + "upstream": { + "license": "AGPL-3.0-or-later", + "website": "https://joinmobilizon.org/", + "demo": "https://demo.mobilizon.org", + "userdoc": "https://docs.joinmobilizon.org", + "code": "https://framagit.org/framasoft/mobilizon/" + }, "license": "AGPL-3.0-or-later", "maintainer": { "name": "yalh76" diff --git a/scripts/backup b/scripts/backup index e637692..4795b27 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -43,6 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup --src_path="$datadir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= @@ -57,12 +63,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - -ynh_backup --src_path="$datadir" --is_big - #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/install b/scripts/install index d66b0ca..5e0d05c 100644 --- a/scripts/install +++ b/scripts/install @@ -88,7 +88,7 @@ ynh_install_extra_app_dependencies --repo="deb http://packages.erlang-solutions. 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 yunohost user create ${app}_notifs --firstname "Mobilizon" --lastname "Notifications" --mail ${app}_notifs@$domain --password "$ynh_user_password" -q 0 yunohost user update ${app}_notifs --add-mailalias $app@$domain --add-mailforward $admin_email @@ -134,17 +134,14 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP #================================================= -# CREATE THE DATA DIRECTORY +# CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating the data directory..." +ynh_script_progression --message="Creating a data directory..." -# Define app's data directory -datadir="/home/yunohost.app/${app}" +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir -ynh_app_setting_set --app=$app --key=datadir --value="$datadir" - -# Create app folders -mkdir -p "$datadir/" +mkdir -p $datadir mkdir -p "$datadir/uploads/" chmod 750 "$datadir" diff --git a/scripts/restore b/scripts/restore index 147bb5d..966f0b8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -63,7 +63,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 yunohost user create ${app}_notifs --firstname "Mobilizon" --lastname "Notifications" --mail ${app}_notifs@$domain --password "$ynh_user_password" -q 0 yunohost user update ${app}_notifs --add-mailalias $app@$domain --add-mailforward $admin_email @@ -80,23 +80,21 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" #================================================= -# SPECIFIC RESTORATION +# RESTORE THE DATA DIRECTORY #================================================= -# RECREATE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Recreating the data directory..." +ynh_script_progression --message="Restoring the data directory..." -# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. ynh_restore_file --origin_path="$datadir" --not_mandatory -# Create app folders -mkdir -p "$datadir/" +mkdir -p $datadir mkdir -p "$datadir/uploads/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:$app "$datadir" +#================================================= +# SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4604a14..8df49f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,27 +41,6 @@ abort_if_up_to_date # previous function is what defines 'version', more precisely the 'previous version' previous_version="${version}" -#================================================= -# 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 - -if ! ynh_permission_exists --permission="admin"; then - # Create the required permissions - ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin -fi - -ynh_secure_remove --file="$final_path/$app/priv/data/GeoLite2-City.mmdb" - -ynh_secure_remove --file="/usr/share/GeoIP" - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -86,6 +65,27 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped" +#================================================= +# 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 + +if ! ynh_permission_exists --permission="admin"; then + # Create the required permissions + ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin +fi + +ynh_secure_remove --file="$final_path/$app/priv/data/GeoLite2-City.mmdb" + +ynh_secure_remove --file="/usr/share/GeoIP" + #================================================= # UPGRADE FROM PREVIOUS VERSION #================================================= @@ -125,7 +125,7 @@ fi 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 #================================================= # CREATE DATADIR FOLDER @@ -259,7 +259,7 @@ fi #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a config file..." +ynh_script_progression --message="Updating a configuration file..." config="$final_path/$app/config/prod.secret.exs"