1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Merge branch 'testing' into pr/143

This commit is contained in:
yalh76 2020-11-06 19:49:50 +01:00
commit 996ace779e
10 changed files with 36 additions and 16 deletions

View file

@ -23,13 +23,13 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post
- Tootdon (Android + iOS)
- Tootle (iOS)
**Shipped version:** 2.0.7
**Shipped version:** 2.1.2
## Important points to read before installing
1. **Pleroma** require a dedicated **root domain**, eg. pleroma.domain.tld
1. **Pleroma** require a valid **certificate** installed on the domain. Yunohost can **install Letsencrypt certificate** on the domain from **admin web-interface** or through **command-line**.
1. This package is **multi-instance** that means you can run **multiple Pleroma instances** on a **single server**.
1. This package is currently set to **single-instance** that means you can run a **single Pleroma instance** on a **single server**.
1. The admin **password** entered when installing must **not** contain **special characters**. (See [issue #132](https://github.com/YunoHost-Apps/pleroma_ynh/issues/132))
## Screenshots

4
check_process Executable file → Normal file
View file

@ -43,6 +43,8 @@
# upgrade=1 from_commit=06f0005707e77fae566fedbd6e5e37f390df5173
# 2.0.5~ynh2
upgrade=1 from_commit=30696599937984e9879da22220253f005e290cd0
# 2.0.7~ynh1
upgrade=1 from_commit=e13745923a2e06e780e7b9d34ae084f600a9a2a2
backup_restore=1
multi_instance=0
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
@ -78,3 +80,5 @@ Notification=yes
name=2.0.5~ynh1
; commit=30696599937984e9879da22220253f005e290cd0
name=2.0.5~ynh2
; commit=e13745923a2e06e780e7b9d34ae084f600a9a2a2
name=2.0.7~ynh1

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/126024/artifacts/download
SOURCE_SUM=765faec1323d25d399ce3b34030dfccedb1d0f55a54e14e6d6dfdc7812df65f0
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/154864/artifacts/download
SOURCE_SUM=7fd88626e07d728ba7280d24a9e8d3a0dac13096a89013c1b0108506cd718efc
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=pleroma-v2.0.7-arm.zip
SOURCE_FILENAME=pleroma-v2.1.2-arm.zip

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/126026/artifacts/download
SOURCE_SUM=cefb340415978a3379564ec93f9c168c3c60bcc73032970e5a5a3dc490b4e712
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/154866/artifacts/download
SOURCE_SUM=ca1b06753bb0538bf731699c9e91fd43fee8b070a379931ac2de0610dd828bd7
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=pleroma-v2.0.7-arm64.zip
SOURCE_FILENAME=pleroma-v2.1.2-arm64.zip

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/126022/artifacts/download
SOURCE_SUM=5698798b4c38e05ca273381265dfe3988ed96344a52b2d1418c65ccf3f1dfed5
SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/154862/artifacts/download
SOURCE_SUM=1fb0554035144011f02524672c142e688645c90758055e6a043b7042a3126598
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=pleroma-v2.0.7-x86-64.zip
SOURCE_FILENAME=pleroma-v2.1.2-x86-64.zip

4
manifest.json Executable file → Normal file
View file

@ -6,7 +6,7 @@
"en": "A free, federated social networking server built on open protocols.",
"fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts."
},
"version": "2.0.7~ynh1",
"version": "2.1.2~ynh1",
"url": "https://git.pleroma.social/pleroma/pleroma",
"license": "AGPL-3.0-only",
"maintainer": [
@ -18,7 +18,7 @@
"name": "yalh76"
}],
"requirements": {
"yunohost": ">= 3.5"
"yunohost": ">= 4.0"
},
"multi_instance": false,
"services": [

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="curl unzip libncurses5 postgresql postgresql-contrib"
pkg_dependencies="curl unzip libncurses5 postgresql postgresql-contrib imagemagick ffmpeg libimage-exiftool-perl"
#=================================================
# PERSONAL HELPERS

View file

@ -31,6 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
cache=$(ynh_app_setting_get --app=$app --key=cache)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@ -75,6 +76,13 @@ ynh_print_info --message="Backing up the PostgreSQL database..."
ynh_psql_dump_db --database="$db_name" > db.sql
#=================================================
# BACKUP THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Backing up data directory..."
ynh_backup --src_path="$datadir" --is_big
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -40,7 +40,7 @@ admin_email=$(ynh_user_get_info --username=$admin --key="mail")
## Bypass package_checker name not compatible with pleroma
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
admin="test"
admin="test"
fi
app=$YNH_APP_INSTANCE_NAME
@ -227,7 +227,7 @@ pushd $final_path/$app
sleep 60
# Add user
su pleroma -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y"
su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y"
popd
#=================================================

View file

@ -109,8 +109,16 @@ previous_version="${version}"
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
# Inform the backup/restore process that it should not save the data directory
# Use only for the previous backup script that doesn't set 'is_big'
ynh_app_setting_set --app=$app --key=backup_core_only --value=1
# Backup the current version of the app
ynh_backup_before_upgrade
# Remove the option backup_core_only after the backup.
ynh_app_setting_delete --app=$app --key=backup_core_only
ynh_clean_setup () {
ynh_clean_check_starting
# restore it if the upgrade fails