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

Merge branch 'testing' into auto-helpers-2.1

This commit is contained in:
eric_G 2024-08-31 22:30:40 +02:00 committed by GitHub
commit 4a515f5433
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 127 additions and 42 deletions

View file

@ -5,4 +5,5 @@
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Lemmy for YunoHost
[![Integration level](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![Working status](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Working status](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Install Lemmy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Shipped version:** 0.18.2~ynh3
**Shipped version:** 0.19.5~ynh2
**Demo:** <https://lemmy.ml/>

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Lemmy para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Instalar Lemmy con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -19,7 +19,7 @@ No se debe editar a mano.
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Versión actual:** 0.18.2~ynh3
**Versión actual:** 0.19.5~ynh2
**Demo:** <https://lemmy.ml/>

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Lemmy YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Instalatu Lemmy YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -19,7 +19,7 @@ EZ editatu eskuz.
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Paketatutako bertsioa:** 0.18.2~ynh3
**Paketatutako bertsioa:** 0.19.5~ynh2
**Demoa:** <https://lemmy.ml/>

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Lemmy pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Niveau dintégration](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Installer Lemmy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Lemmy est similaire à des sites comme Reddit, Lobste.rs ou Hacker News : vous vous abonnez aux forums qui vous intéressent, publiez des liens et des discussions, puis votez et commentez-les. Dans les coulisses, c'est très différent ; n'importe qui peut facilement exécuter un serveur, et tous ces serveurs sont fédérés (pensez au courrier électronique) et connectés au même univers, appelé Fediverse.
**Version incluse:** 0.18.2~ynh3
**Version incluse:** 0.19.5~ynh2
**Démo:** <https://lemmy.ml/>

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Lemmy para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Instalar Lemmy con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -19,7 +19,7 @@ NON debe editarse manualmente.
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Versión proporcionada:** 0.18.2~ynh3
**Versión proporcionada:** 0.19.5~ynh2
**Demo:** <https://lemmy.ml/>

50
README_id.md Normal file
View file

@ -0,0 +1,50 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# Lemmy untuk YunoHost
[![Tingkat integrasi](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![Pasang Lemmy dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang Lemmy secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**Versi terkirim:** 0.19.5~ynh2
**Demo:** <https://lemmy.ml/>
## Tangkapan Layar
![Tangkapan Layar pada Lemmy](./doc/screenshots/screenshot1.webp)
## Dokumentasi dan sumber daya
- Website aplikasi resmi: <https://join-lemmy.org/>
- Dokumentasi admin resmi: <https://join-lemmy.org/docs/en/>
- Depot kode aplikasi hulu: <https://github.com/LemmyNet/lemmy>
- Gudang YunoHost: <https://apps.yunohost.org/app/lemmy>
- Laporkan bug: <https://github.com/YunoHost-Apps/lemmy_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/lemmy_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/lemmy_ynh/tree/testing --debug
atau
sudo yunohost app upgrade lemmy -u https://github.com/YunoHost-Apps/lemmy_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Lemmy
[![集成程度](https://dash.yunohost.org/integration/lemmy.svg)](https://dash.yunohost.org/appci/app/lemmy) ![工作状态](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/lemmy.svg)](https://ci-apps.yunohost.org/ci/apps/lemmy/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/lemmy.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/lemmy.maintain.svg)
[![使用 YunoHost 安装 Lemmy](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lemmy)
@ -19,7 +19,7 @@
Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.
**分发版本:** 0.18.2~ynh3
**分发版本:** 0.19.5~ynh2
**演示:** <https://lemmy.ml/>

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
packaging_format = 2
id = "lemmy"
@ -5,7 +7,7 @@ name = "Lemmy"
description.en = "Link aggregator/Reddit clone for the fediverse"
description.fr = "Agrégateur de liens/clone Reddit pour le fedivers"
version = "0.18.2~ynh3"
version = "0.19.5~ynh2"
maintainers = []
@ -40,17 +42,26 @@ ram.runtime = "50M"
[resources]
[resources.sources]
[resources.sources.main]
url = "https://github.com/jjlin/docker-image-extract/archive/b664b29a1de37d25f732e885e1331a8e90f67dcd.tar.gz"
sha256 = "7b2c8baeec6e9a67c905d4d55e4dc0944815cf55bd6bf11fadbb6eb8990b4912"
autoupdate.upstream = "https://github.com/jjlin/docker-image-extract"
autoupdate.strategy = "latest_github_commit"
[resources.sources.main]
url = "https://github.com/LemmyNet/lemmy/archive/refs/tags/0.19.5.tar.gz"
sha256 = "55fc078688867ce662416f6eaf1fabe33d6a9551226abbc341ec4b42dcf78610"
# Actually not used, just here for autoupdate
prefetch = false
autoupdate.strategy = "latest_github_release"
[resources.sources.lemmy-translations]
url = "https://github.com/LemmyNet/lemmy-translations/archive/f1602a5993c426d56ebb7c98a8453fbfb482e9a7.tar.gz"
sha256 = "570d3f8c1ab13dbf72fd2f2f6d7a930a5fd7233259fbd0f1b156205524f0e4c3"
autoupdate.upstream = "https://github.com/LemmyNet/lemmy-translations/"
autoupdate.strategy = "latest_github_commit"
[resources.sources.docker-image-extract]
url = "https://github.com/jjlin/docker-image-extract/archive/4273b2796da5055e431b4db5efe29a71bba12b45.tar.gz"
sha256 = "8e582bb186bdb1053051ad6be8829ebb4af418cb4e43005efc9d7749e0269cba"
autoupdate.upstream = "https://github.com/jjlin/docker-image-extract"
autoupdate.strategy = "latest_github_commit"
[resources.sources.lemmy-translations]
url = "https://github.com/LemmyNet/lemmy-translations/archive/088a27703ffa65e069dfbf341ee9bd44ec4c45c5.tar.gz"
sha256 = "b504c50878a7914bdc49ea578a8c4855152de6f50a94c3cf053954ef903cd93e"
autoupdate.upstream = "https://github.com/LemmyNet/lemmy-translations/"
autoupdate.strategy = "latest_github_commit"
[resources.ports]
main.default = 8536
@ -72,7 +83,7 @@ ram.runtime = "50M"
pictrs.allowed = "visitors"
pictrs.show_tile = false
pictrs.protected = true
api.url = "/api"
api.allowed = "visitors"
api.auth_header = false
@ -86,10 +97,19 @@ ram.runtime = "50M"
inbox.protected = true
[resources.apt]
packages = "postgresql, espeak, rsync, libfuse2, libimage-exiftool-perl, ffmpeg"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn"
packages = [
"postgresql",
"espeak",
"rsync",
"libfuse2",
"libimage-exiftool-perl",
"ffmpeg",
]
[resources.apt.extras.yarn]
repo = "deb https://dl.yarnpkg.com/debian/ stable main"
key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
packages = "yarn"
[resources.database]
type = "postgresql"

View file

@ -18,7 +18,7 @@ ynh_backup "$install_dir"
ynh_backup "$data_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -34,7 +34,6 @@ ynh_setup_source --dest_dir="$install_dir/build-pict-rs/"
#=================================================
ynh_script_progression "Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_config_add_nginx
#=================================================
@ -51,27 +50,28 @@ popd
ynh_script_progression "Making install..."
# Install lemmy-ui
pushd $install_dir/build-lemmy-ui
./docker-image-extract dessalines/lemmy-ui:$(ynh_app_upstream_version)
pushd "$install_dir/build-lemmy-ui"
./docker-image-extract "dessalines/lemmy-ui:$(ynh_app_upstream_version)"
popd
mkdir -p "$install_dir/lemmy-ui/"
rsync -a "$install_dir/build-lemmy-ui/output/app/" "$install_dir/lemmy-ui/"
ynh_safe_rm "$install_dir/build-lemmy-ui"
# Install lemmy
pushd $install_dir/build-lemmy
./docker-image-extract dessalines/lemmy:$(ynh_app_upstream_version)
pushd "$install_dir/build-lemmy"
./docker-image-extract "dessalines/lemmy:$(ynh_app_upstream_version)"
popd
mkdir -p "$install_dir/lemmy/"
mv -f "$install_dir/build-lemmy/output/app/lemmy" "$install_dir/lemmy/lemmy"
ynh_safe_rm "$install_dir/build-lemmy"
# Install pict-rs
pushd $install_dir/build-pict-rs
./docker-image-extract asonix/pictrs:$PICTRS_VERSION
pushd "$install_dir/build-pict-rs"
./docker-image-extract "asonix/pictrs:$PICTRS_VERSION"
popd
mkdir -p "$install_dir/pict-rs/"
mv -f "$install_dir/build-pict-rs/output/usr/local/bin/pict-rs" "$install_dir/pict-rs/pict-rs"
ynh_safe_rm "$install_dir/build-pict-rs"
# (Dirty) Install ImageMagick
@ -91,7 +91,7 @@ ynh_config_add --template="lemmy.hjson" --destination="$install_dir/config/confi
# Pict-RS configuration
ynh_config_add --template="pict-rs.toml" --destination="$install_dir/pict-rs/pict-rs.toml"
chmod 400 "$install_dir/pict-rs/pict-rs.toml"
chown $app:$app "$install_dir/pict-rs/pict-rs.toml"
chown "$app:$app" "$install_dir/pict-rs/pict-rs.toml"
# ImageMagick configuration
mkdir -p "$install_dir/.config/ImageMagick"
@ -100,7 +100,7 @@ ynh_config_add --template="policy.xml" --destination="$install_dir/.config/Image
chown -R $app:$app "$install_dir/.config"
#=================================================
# SETUP SYSTEMD
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression "Configuring $app's systemd service..."

View file

@ -23,6 +23,7 @@ then
ynh_script_progression "Removing $app-pict-rs service integration..."
yunohost service remove $app-pict-rs
fi
ynh_remove_systemd_config --service="$app-ui"
ynh_config_remove_systemd
ynh_config_remove_systemd$app-ui

View file

@ -3,6 +3,17 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling NodeJS..." --weight=1
# Define and install dependencies
ynh_install_nodejs --nodejs_version="$NODEJS_VERSION"
ynh_use_nodejs
ln -fs /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -46,7 +57,7 @@ ynh_psql_db_shell " < "./db.sql""
ynh_psql_db_shell <<< "CREATE EXTENSION IF NOT EXISTS pgcrypto;"
#=================================================
# RESTORE SYSTEMD
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Restoring $app's systemd service..."

View file

@ -47,7 +47,7 @@ ynh_nodejs_install
ln -fs /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
#=================================================
# NGINX CONFIGURATION
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading NGINX web server configuration..."
@ -113,8 +113,9 @@ ynh_config_add --template="lemmy.hjson" --destination="$install_dir/config/confi
mkdir -p "$install_dir/pict-rs"
chown $app:$app "$install_dir/pict-rs"
ynh_config_add --template="pict-rs.toml" --destination="$install_dir/pict-rs/pict-rs.toml"
chmod 400 "$install_dir/pict-rs/pict-rs.toml"
chown $app:$app "$install_dir/pict-rs/pict-rs.toml"
chown "$app:$app" "$install_dir/pict-rs/pict-rs.toml"
# ImageMagick configuration
mkdir -p "$install_dir/.config/ImageMagick"
@ -124,7 +125,7 @@ ynh_config_add --template="policy.xml" --destination="$install_dir/.config/Image
chown -R $app:$app "$install_dir/.config"
#=================================================
# CREATE EXTENSION IF NOT EXISTS pgcrypto
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Creating pgcrypto extension if needed..."
@ -164,6 +165,7 @@ yunohost service add $app-pict-rs --description="Simple image hosting service fo
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd services..." --weight=1
# TMP rebuild sharp
pushd $install_dir/lemmy-ui