1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Merge pull request #230 from YunoHost-Apps/testing

Mattermost 5.33.2
This commit is contained in:
Pierre de La Morinerie 2021-04-04 20:19:16 +02:00 committed by GitHub
commit 97ea36e79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 77 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
Mattermost is a self-hosted, open source instant messaging and service software. It's designed as an internal chat for organizations and businesses, and it's touted as an alternative to Slack. Mattermost is a self-hosted, open source instant messaging and service software. It's designed as an internal chat for organizations and businesses, and it's touted as an alternative to Slack.
**Shipped version:** 5.32.1 **Shipped version:** 5.33.2
## Screenshots ## Screenshots
@ -24,7 +24,7 @@ Mattermost is a self-hosted, open source instant messaging and service software.
## Documentation ## Documentation
* Official documentation: https://docs.mattermost.com/ * Official documentation: https://docs.mattermost.com/
* YunoHost documentation: https://yunohost.org/#/app_mattermost * YunoHost documentation: https://yunohost.org/en/app_mattermost
## YunoHost specific features ## YunoHost specific features

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Vue d'ensemble ## Vue d'ensemble
Mattermost est un logiciel et un service de messagerie instantanée libre auto-hébergeable. Il est conçu comme un chat interne pour les organisations et les entreprises, et il est présenté comme une alternative à Slack. Mattermost est un logiciel et un service de messagerie instantanée libre auto-hébergeable. Il est conçu comme un chat interne pour les organisations et les entreprises, et il est présenté comme une alternative à Slack.
**Version incluse :** 5.32.1 **Version incluse :** 5.33.2
## Captures d'écran ## Captures d'écran
@ -24,7 +24,7 @@ Mattermost est un logiciel et un service de messagerie instantanée libre auto-h
## Documentation ## Documentation
* Documentation officielle : https://docs.mattermost.com/ * Documentation officielle : https://docs.mattermost.com/
* Documentation YunoHost : https://yunohost.org/#/app_mattermost_fr * Documentation YunoHost : https://yunohost.org/fr/app_mattermost
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.32.1/mattermost-v5.32.1-linux-arm.tar.gz SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.33.2/mattermost-v5.33.2-linux-arm.tar.gz
SOURCE_SUM=0dccb34687c755fd2f7eed7d53fcee451500a463253e376233c1c86dd37518689d79f2ec2e20d5c21954331e00220ec5bb74e23dcc0db2b004c68ba0402a3f61 SOURCE_SUM=4eb2d69da019979c9792435e175a12b4afb19fe66e70747039d247ca4f0769a87b1b1951a90a43edd021a898dee00946cbeac9ce213e670aeb5fce3203fa4303
SOURCE_SUM_PRG=sha512sum SOURCE_SUM_PRG=sha512sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-v5.32.1-linux-arm.tar.gz SOURCE_FILENAME=mattermost-v5.33.2-linux-arm.tar.gz

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.32.1/mattermost-v5.32.1-linux-arm64.tar.gz SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v5.33.2/mattermost-v5.33.2-linux-arm64.tar.gz
SOURCE_SUM=83ded96774f3d3b178959f736f64f458d097a738f89e81d992b908173249f2745559caab799fc701ba66efd8e58bca389fbde9f612a9f61e515c11a9726d6910 SOURCE_SUM=b07ef96872348a481a62fd1ae5c91db8de83b9a03a5281f6b21f75b6c624694f8f53393fb3fa77f2a0d78ad7313a4536ad88ae122cb2957d419ec98f111430c8
SOURCE_SUM_PRG=sha512sum SOURCE_SUM_PRG=sha512sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-v5.32.1-linux-arm64.tar.gz SOURCE_FILENAME=mattermost-v5.33.2-linux-arm64.tar.gz

View file

@ -3,7 +3,7 @@
"SiteURL": "__URL__", "SiteURL": "__URL__",
"WebsocketURL": "", "WebsocketURL": "",
"LicenseFileLocation": "", "LicenseFileLocation": "",
"ListenAddress": "__PORT__", "ListenAddress": "127.0.0.1:__PORT__",
"ConnectionSecurity": "", "ConnectionSecurity": "",
"TLSCertFile": "", "TLSCertFile": "",
"TLSKeyFile": "", "TLSKeyFile": "",
@ -108,6 +108,7 @@
"EnableOpenServer": false, "EnableOpenServer": false,
"EnableUserDeactivation": false, "EnableUserDeactivation": false,
"RestrictCreationToDomains": "", "RestrictCreationToDomains": "",
"EnableCustomUserStatuses": true,
"EnableCustomBrand": false, "EnableCustomBrand": false,
"CustomBrandText": "", "CustomBrandText": "",
"CustomDescriptionText": "", "CustomDescriptionText": "",
@ -144,11 +145,12 @@
}, },
"SqlSettings": { "SqlSettings": {
"DriverName": "mysql", "DriverName": "mysql",
"DataSource": "__DB_USER__:__DB_PASS__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8", "DataSource": "__DB_USER__:__DB_PWD__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8",
"DataSourceReplicas": [], "DataSourceReplicas": [],
"DataSourceSearchReplicas": [], "DataSourceSearchReplicas": [],
"MaxIdleConns": 20, "MaxIdleConns": 20,
"ConnMaxLifetimeMilliseconds": 3600000, "ConnMaxLifetimeMilliseconds": 3600000,
"ConnMaxIdleTimeMilliseconds": 300000,
"MaxOpenConns": 300, "MaxOpenConns": 300,
"Trace": false, "Trace": false,
"AtRestEncryptKey": "", "AtRestEncryptKey": "",
@ -185,7 +187,7 @@
"EnableFile": true, "EnableFile": true,
"FileLevel": "INFO", "FileLevel": "INFO",
"FileJson": true, "FileJson": true,
"FileLocation": "__LOG__", "FileLocation": "__LOGS_PATH__",
"AdvancedLoggingConfig": "" "AdvancedLoggingConfig": ""
}, },
"PasswordSettings": { "PasswordSettings": {
@ -199,9 +201,9 @@
"EnableFileAttachments": true, "EnableFileAttachments": true,
"EnableMobileUpload": true, "EnableMobileUpload": true,
"EnableMobileDownload": true, "EnableMobileDownload": true,
"MaxFileSize": 52428800, "MaxFileSize": 104857600,
"DriverName": "local", "DriverName": "local",
"Directory": "__DATA__", "Directory": "__DATA_PATH__",
"EnablePublicLink": false, "EnablePublicLink": false,
"PublicLinkSalt": "", "PublicLinkSalt": "",
"InitialFont": "nunito-bold.ttf", "InitialFont": "nunito-bold.ttf",
@ -224,12 +226,12 @@
"UseChannelInEmailNotifications": false, "UseChannelInEmailNotifications": false,
"RequireEmailVerification": false, "RequireEmailVerification": false,
"FeedbackName": "Mattermost notification", "FeedbackName": "Mattermost notification",
"FeedbackEmail": "__FEEDBACK__", "FeedbackEmail": "no-reply@__DOMAIN__",
"ReplyToAddress": "", "ReplyToAddress": "",
"FeedbackOrganization": "", "FeedbackOrganization": "",
"EnableSMTPAuth": false, "EnableSMTPAuth": false,
"SMTPUsername": "mattermost", "SMTPUsername": "mattermost",
"SMTPPassword": "__USER_PW__", "SMTPPassword": "__SMTP_USER_PWD__",
"SMTPServer": "localhost", "SMTPServer": "localhost",
"SMTPPort": "25", "SMTPPort": "25",
"SMTPServerTimeout": 10, "SMTPServerTimeout": 10,
@ -437,7 +439,8 @@
"BindAddress": "", "BindAddress": "",
"AdvertiseAddress": "", "AdvertiseAddress": "",
"UseIpAddress": true, "UseIpAddress": true,
"UseExperimentalGossip": false, "UseExperimentalGossip": true,
"EnableGossipCompression": true,
"EnableExperimentalGossipEncryption": false, "EnableExperimentalGossipEncryption": false,
"ReadOnlyConfig": true, "ReadOnlyConfig": true,
"GossipPort": 8074, "GossipPort": 8074,
@ -565,10 +568,15 @@
"TestBoolFeature": false, "TestBoolFeature": false,
"CloudDelinquentEmailJobsEnabled": false, "CloudDelinquentEmailJobsEnabled": false,
"CollapsedThreads": false, "CollapsedThreads": false,
"PluginIncidentManagement": "1.3.2" "CustomUserStatuses": true,
"PluginIncidentManagement": "1.4.0"
}, },
"ImportSettings": { "ImportSettings": {
"Directory": "./import", "Directory": "./import",
"RetentionDays": 30 "RetentionDays": 30
},
"ExportSettings": {
"Directory": "./export",
"RetentionDays": 30
} }
} }

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://releases.mattermost.com/5.32.1/mattermost-5.32.1-linux-amd64.tar.gz SOURCE_URL=https://releases.mattermost.com/5.33.2/mattermost-5.33.2-linux-amd64.tar.gz
SOURCE_SUM=9117ab9777d8453ae8b63f3a008152a2bdc6a638400640a67a0a359acf479a44 SOURCE_SUM=36faac7bdf70044beed46e7cc9af755b50ac6c1b6531377be9a7a3edcd65191f
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-5.32.1-linux-amd64.tar.gz SOURCE_FILENAME=mattermost-5.33.2-linux-amd64.tar.gz

View file

@ -34,6 +34,7 @@ location __PATH__/ {
#proxy_cache_use_stale timeout; #proxy_cache_use_stale timeout;
#proxy_cache_lock on; #proxy_cache_lock on;
proxy_pass http://127.0.0.1:__PORT__; proxy_pass http://127.0.0.1:__PORT__;
# Yunohost addition: redirect HTTP to HTTPS # Yunohost addition: redirect HTTP to HTTPS
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://releases.mattermost.com/5.32.1/mattermost-team-5.32.1-linux-amd64.tar.gz SOURCE_URL=https://releases.mattermost.com/5.33.2/mattermost-team-5.33.2-linux-amd64.tar.gz
SOURCE_SUM=86fd99e49b6ed687004d46813e51fd91e761a87dff58fa2878e752728fac555a SOURCE_SUM=d9498dc7b474f80029830cfa1f55221d76c0dd603e38273f7019a97830eba2f5
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=mattermost-team-5.32.1-linux-amd64.tar.gz SOURCE_FILENAME=mattermost-team-5.33.2-linux-amd64.tar.gz

View file

@ -6,7 +6,7 @@
"en": "Open source collaboration platform built for developers", "en": "Open source collaboration platform built for developers",
"fr": "Plateforme de collaboration open source conçue pour les développeurs" "fr": "Plateforme de collaboration open source conçue pour les développeurs"
}, },
"version": "5.32.1~ynh1", "version": "5.33.2~ynh1",
"url": "http://www.mattermost.org/", "url": "http://www.mattermost.org/",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"maintainer": { "maintainer": {

View file

@ -42,7 +42,7 @@ ynh_backup --src_path="$final_path"
# BACKUP THE APP DATA # BACKUP THE APP DATA
#================================================= #=================================================
ynh_backup --src_path="/home/yunohost.app/$app" ynh_backup --src_path="/home/yunohost.app/$app" --is_big
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION

View file

@ -122,7 +122,7 @@ ynh_store_file_checksum --file="$final_path/config/config.json"
ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Started Mattermost" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -54,7 +54,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=6
ynh_app_setting_set --app=$app --key=domain --value=$domain 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=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=password --value=$password ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=language --value=$language
@ -138,21 +137,10 @@ ynh_use_logrotate
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." --weight=3 ynh_script_progression --message="Modifying a config file..." --weight=3
cp ../conf/config.json $final_path/config/config.json smtp_user_pwd=$(ynh_string_random --length=24)
url=https://$domain$path_url
# Main config File ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json"
ynh_replace_string --match_string="__URL__" --replace_string="https://$domain$path_url" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__PORT__" --replace_string="127.0.0.1:$port" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__DATA__" --replace_string="$data_path" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__FEEDBACK__" --replace_string="no-reply@${domain}" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__USER_PW__" --replace_string="$(ynh_string_random --length=24)" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__LOG__" --replace_string="$logs_path" --target_file="$final_path/config/config.json"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/config/config.json"
ynh_store_file_checksum --file="$final_path/config/config.json"
#================================================= #=================================================
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
@ -203,7 +191,7 @@ yunohost service add $app --description="Collaboration platform built for develo
ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Mattermost" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -27,7 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# REMOVE SERVICE FROM ADMIN PANEL # REMOVE SERVICE FROM ADMIN PANEL
#================================================= #=================================================
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service..." --weight=1 ynh_script_progression --message="Removing $app service..." --weight=1
@ -58,7 +58,8 @@ ynh_script_progression --message="Removing $app main directory..." --weight=6
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
ynh_secure_remove --file="/home/yunohost.app/$app" # We don't delete this dir as it is marked as is-big
# ynh_secure_remove --file="/home/yunohost.app/$app"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION

View file

@ -70,7 +70,7 @@ ynh_system_user_create --username=$app
# RESTORE THE APP DATA # RESTORE THE APP DATA
#================================================= #=================================================
ynh_restore_file --origin_path="/home/yunohost.app/$app" ynh_restore_file --origin_path="/home/yunohost.app/$app" --not_mandatory
chown -R $app: "/home/yunohost.app/$app" chown -R $app: "/home/yunohost.app/$app"
#================================================= #=================================================
@ -115,7 +115,7 @@ yunohost service add $app --description="Collaboration platform built for develo
ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Mattermost" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
#================================================= #=================================================
# RESTORE THE LOGROTATE CONFIGURATION # RESTORE THE LOGROTATE CONFIGURATION

View file

@ -28,7 +28,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language) language=$(ynh_app_setting_get --app=$app --key=language)
@ -47,14 +46,6 @@ upgrade_type=$(ynh_check_app_version_changed)
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
# Convert is_public from "Yes"/"No" to 1 / 0
if [[ $is_public == "Yes" ]]; then
is_public=1
elif [[ $is_public == "No" ]]; then
is_public=0
fi
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
# Save the port used if not present # Save the port used if not present
if [ -z "$port" ]; then if [ -z "$port" ]; then
port=8065 port=8065
@ -78,6 +69,13 @@ if [ -z "$db_name" ]; then
ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi 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 # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -155,22 +153,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# SPECIFIC UPGRADE STEPS
#=================================================
# # Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash)
# # https://docs.mattermost.com/administration/changelog.html#release-v3-8-3
# ynh_replace_string --match_string "\"FileLocation\": \"/var/log/mattermost.log\"" --replace_string "\"FileLocation\": \"/var/log\"" --target_file "$config_file"
# # Move log files to a directory (rather than directly in /var/log)
# # See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61
# mkdir -p "$logs_path"
# ynh_replace_string --match_string "\"FileLocation\": \"/var/log\"" --replace_string "\"FileLocation\": \"$logs_path\"" --target_file "$config_file"
# if [ -f "/var/log/${app}.log" ]; then
# mv "/var/log/${app}.log" "$logs_path/"
# fi
#================================================= #=================================================
# CREATE DIRECTORY FOR DATA # CREATE DIRECTORY FOR DATA
#================================================= #=================================================
@ -212,7 +194,7 @@ yunohost service add $app --description="Collaboration platform built for develo
ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Started Mattermost" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX