aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉric Gaspar <46165813+ericgaspar@users.noreply.github.com>2023-04-14 11:23:27 +0200
committerGitHub <noreply@github.com>2023-04-14 11:23:27 +0200
commit54525b53ebc42d6cf022cdeaaf39dce4fe6198cf (patch)
tree103ae1ff17c01319153b1283db548f2c053a0538
parent1539480cda18e8beb92be44dc2fff51781922cab (diff)
parent54bd5d0c4dee202d6f27e9dfed065fa2d334cd5e (diff)
downloadmastodon_ynh-54525b53ebc42d6cf022cdeaaf39dce4fe6198cf.tar.gz
mastodon_ynh-54525b53ebc42d6cf022cdeaaf39dce4fe6198cf.tar.bz2
mastodon_ynh-54525b53ebc42d6cf022cdeaaf39dce4fe6198cf.zip
Merge pull request #378 from panomaki/testing
Upgrade to v4.1.2
-rw-r--r--README.md43
-rw-r--r--README_fr.md47
-rw-r--r--check_process12
-rw-r--r--conf/app.src4
-rw-r--r--manifest.json2
-rw-r--r--scripts/_common.sh2
-rw-r--r--sources/patches/app-blurhash-bugfix.patch60
7 files changed, 86 insertions, 84 deletions
diff --git a/README.md b/README.md
index 795d8e5..40e405e 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes.
-**Shipped version:** 4.0.2~ynh2
+**Shipped version:** 4.1.2~ynh1
**Demo:** https://joinmastodon.org/
@@ -40,6 +40,10 @@ Mastodon is a free, open-source microblogging social network. It is a decentrali
### Install
#### Using *screen* in case of disconnect
+
+Screen (or tmux) can be used to make sure your session is not interrupted in case of connection problems.
+See [tutorial](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command/) for more background information.
+
```
$ sudo apt-get install screen
$ screen
@@ -53,10 +57,45 @@ $ screen -r
### Update
-#### Using *screen* highly recommended
+##### Please use screen as the upgrade process can take a long time!
+
+#### A note about backups
+
+First of all: Mastodon uses a local cache to save media (such as posted images, videos etc.). This cache can grow huge.
+You could consider cleaning up your local cache first as otherwise your backup will be very big and you might run out of disk space:
+
+To check your space usage, on a command line run:
+
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media usage`
+
+If your cache is too big to backup, you can run the following command to clean up Attachments (the first line). Substitute X by the number of days you want to keep, e.g. 1 day. All older images will be deleted but will be refetched from the original server if necessary.
+
+First dry-run to see how much space is freed up (without actually removing):
+
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X --dry-run`
+
+If all looks good commit the cleanup:
+
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X `
+
+##### Upgrade
+
+The actual upgrade can be done using the following command:
+
+`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
+
+
+Upgrading from 3.5.3 to 4.1.2 directly has not been integration-tested. It is recommended to do a two-step upgrade:
+
+First upgrade to 4.0.2~ynh2:
+
+`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/94381183ca2d14da72234b53c9a83972ffb16e54 --debug `
+
+Check your installation. If all looks well, upgrade to 4.1.2~ynh1:
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
+
### Administrate with tooctl
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
diff --git a/README_fr.md b/README_fr.md
index 9db805c..3d52153 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales.
-**Version incluse :** 4.0.2~ynh2
+**Version incluse :** 4.1.2~ynh1
**Démo :** https://joinmastodon.org/
@@ -36,15 +36,15 @@ Mastodon est un réseau social de microblog auto-hébergé et open source. C'est
1. À la fin de l'installation, un mail est envoyé à cet utilisateur avec un mot de passe généré automatiquement.
1. Pour que votre instance Mastodon reste privée, il est important de fermer les inscriptions. Nous vous invitons à bloquer les instances distantes indésirables depuis l'interface d'administration. Vous pouvez également ajouter un texte sur votre page d'accueil dans l'administration.
-## Captures d'écran
-
-![](https://framalibre.org/sites/default/files/mastodon.png)
-
## Configuration
### Installation
#### Utilisation de *screen* en cas de déconnection
+
+Screen (or tmux) peut être utilisé pour vous assurer que votre session n'est pas interrompue en cas de problème de connection.
+Consultez ce [tutoriel](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command/) pour plus de détails.
+
```
$ sudo apt-get install screen
$ screen
@@ -55,11 +55,42 @@ Récupérer l'installation après une deconnection :
$ screen -d
$ screen -r
```
-L'utilisateur admin est créé automatiquement comme : user@domain.tld
### Mise à jour
-#### Utilisation de *screen* fortement recommandée
+**Utilisation de *screen* fortement recommandée**
+
+### Note à propos des sauvegardes
+
+Tout d'abord : Mastodon utilise un cache local pour sauvegarder les médias (comme les images, vidéos, etc). Ce cache peut devenir énorme.
+Vous devriez réfléchir à vider votre cache local avant de faire une sauvegarde, qui pourrait être énorme et vous pourriez manquer d'espace de stockage.
+
+Pour vérifier l'utilisation du stockage, en ligne de commande utilisez :
+
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media usage`
+
+Si le cache est trop gros pour être sauvegardé, vous pouvez lancer la commande suivante pour en supprimer les médias attachés. Changez `X` par le nombre de cache à conserver, par ex. 1 jour. Tous les médias plus anciens seront supprimés, mais ils pourront être rechargé du serveur d'origine si nécessaire.
+
+En premier faite un essai à blanc pour voir combien de place sera libérée (sans rien supprimer):
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X --dry-run`
+
+Si cela semble bon, effectuez le nettoyage :
+`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X `
+
+##### Upgrade
+
+La mise à niveau proprement dite peut être effectuée à l'aide de la commande suivante :
+
+`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
+
+
+Mettre à niveau de 3.5.3 en 4.1.2 directement n'a pas été testé automatiquement. Il est donc recommandé de la réaliser en 2 étapes :
+
+Mettez d'abord à niveau en 4.0.2~ynh2:
+
+`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/94381183ca2d14da72234b53c9a83972ffb16e54 --debug `
+
+Vérifiez votre installation. Si cela semble bon, mettez à niveau en 4.1.2~ynh1:
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
@@ -95,4 +126,4 @@ ou
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
```
-**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps> \ No newline at end of file
+**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
diff --git a/check_process b/check_process
index eda9f29..8714241 100644
--- a/check_process
+++ b/check_process
@@ -12,16 +12,8 @@
setup_private=1
setup_public=1
upgrade=1
- # 3.4.1~ynh1
- #upgrade=1 from_commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8
- # 3.4.1~ynh4
- #upgrade=1 from_commit=adec07db890dec787416e1b7c4493d24391d3500
- # 3.4.4~ynh1
- #upgrade=1 from_commit=4d413848bf444586e28f3658de0ebe36d6ebf059
- # 3.5.3~ynh1
- upgrade=1 from_commit=acdc124f76fb9724cb22acb18c45cf0c3c2e62b5
- # 3.5.3~ynh3
- upgrade=1 from_commit=efa2d628920edce255ff406b28a97b1dd20e3d74
+ # 4.02~ynh2
+ upgrade=1 from_commit=94381183ca2d14da72234b53c9a83972ffb16e54
backup_restore=1
multi_instance=0
change_url=0
diff --git a/conf/app.src b/conf/app.src
index dbf6513..7df3b2a 100644
--- a/conf/app.src
+++ b/conf/app.src
@@ -1,5 +1,5 @@
-SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v4.0.2.tar.gz
-SOURCE_SUM=70a4d9dcd9b746f6e9ced9b567ee5ad81e530cfaccb7f471259b917c20166309
+SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v4.1.2.tar.gz
+SOURCE_SUM=12837c7b57acc11ebd24b23a270500c8917459ecdc2a841ba452296b02bcaf29
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
diff --git a/manifest.json b/manifest.json
index 871809b..8abc517 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,7 +6,7 @@
"en": "Libre and federated social network",
"fr": "Réseau social libre et fédéré"
},
- "version": "4.0.2~ynh2",
+ "version": "4.1.2~ynh1",
"url": "https://github.com/mastodon/mastodon",
"upstream": {
"license": "AGPL-3.0-or-later",
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 1b9fd22..8fb5cec 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -9,7 +9,7 @@ pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git
build_pkg_dependencies=""
memory_needed="2560"
-ruby_version=3.0.3
+ruby_version=3.0.6
nodejs_version=16
# Workaround for Mastodon on Bullseye
diff --git a/sources/patches/app-blurhash-bugfix.patch b/sources/patches/app-blurhash-bugfix.patch
deleted file mode 100644
index e75702b..0000000
--- a/sources/patches/app-blurhash-bugfix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/Gemfile b/Gemfile
-index 7c36bc6b8..3f691d102 100644
---- a/Gemfile
-+++ b/Gemfile
-@@ -22,7 +22,8 @@
- gem 'fog-core', '<= 2.1.0'
- gem 'fog-openstack', '~> 0.3', require: false
- gem 'kt-paperclip', '~> 7.1'
--gem 'blurhash', '~> 0.1'
-+gem 'blurhash', github: 'Gargron/blurhash', ref: '870a34e01ce7d09a7bd4d700435e1764ca823246'
-+
-
- gem 'active_model_serializers', '~> 0.10'
- gem 'addressable', '~> 2.8'
-
-diff --git a/Gemfile.lock b/Gemfile.lock
-index 7c36bc6b8..3f691d102 100644
---- a/Gemfile.lock
-+++ b/Gemfile.lock
-@@ -7,6 +7,13 @@
- hkdf (~> 0.2)
- jwt (~> 2.0)
-
-+GIT
-+ remote: https://github.com/Gargron/blurhash.git
-+ revision: 870a34e01ce7d09a7bd4d700435e1764ca823246
-+ ref: 870a34e01ce7d09a7bd4d700435e1764ca823246
-+ specs:
-+ blurhash (0.1.6)
-+
- GEM
- remote: https://rubygems.org/
- specs:
-@@ -120,8 +127,6 @@
- bindata (2.4.10)
- binding_of_caller (1.0.0)
- debug_inspector (>= 0.0.1)
-- blurhash (0.1.6)
-- ffi (~> 1.14)
- bootsnap (1.13.0)
- msgpack (~> 1.2)
- brakeman (5.3.1)
-@@ -448,7 +453,7 @@
- openssl-signature_algorithm (1.2.1)
- openssl (> 2.0, < 3.1)
- orm_adapter (0.5.0)
-- ox (2.14.11)
-+ ox (2.14.13)
- parallel (1.22.1)
- parser (3.1.2.1)
- ast (~> 2.4.1)
-@@ -738,7 +743,7 @@
- aws-sdk-s3 (~> 1.114)
- better_errors (~> 2.9)
- binding_of_caller (~> 1.0)
-- blurhash (~> 0.1)
-+ blurhash!
- bootsnap (~> 1.13.0)
- brakeman (~> 5.3)
- browser