From 789af71b67c06acd84d65eeff5e77bd7b9ab79b5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 Apr 2024 07:44:42 +0000 Subject: [PATCH 01/41] Auto-update READMEs --- README.md | 20 ++++++++++++++++++++ README_eu.md | 20 ++++++++++++++++++++ README_fr.md | 20 ++++++++++++++++++++ README_gl.md | 20 ++++++++++++++++++++ README_zh_Hans.md | 20 ++++++++++++++++++++ 5 files changed, 100 insertions(+) diff --git a/README.md b/README.md index cc2e060..50f828d 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md index 34380e6..4efcfb8 100644 --- a/README_eu.md +++ b/README_eu.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index 34d04eb..64b8cf5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index 8a061bf..ac4156c 100644 --- a/README_gl.md +++ b/README_gl.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a7296d3..518b03f 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt 的截图](./doc/screenshots/screenshot.png) +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## 文档与资源 - 官方应用网站: From d57385cf013449ba1f04df1516272c69ab3d576c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 Apr 2024 19:26:59 +0000 Subject: [PATCH 02/41] Auto-update READMEs --- README.md | 5 +++++ README_eu.md | 5 +++++ README_fr.md | 5 +++++ README_gl.md | 5 +++++ README_zh_Hans.md | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/README.md b/README.md index 50f828d..829a27b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,11 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## :red_circle: Antifeatures + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md index 4efcfb8..3fed80c 100644 --- a/README_eu.md +++ b/README_eu.md @@ -81,6 +81,11 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## :red_circle: Ezaugarri zalantzagarriak + +- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. +- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia. + ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index 64b8cf5..6ef1fbf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -81,6 +81,11 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## :red_circle: Anti-fonctionnalités + +- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. +- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README. + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index ac4156c..b533915 100644 --- a/README_gl.md +++ b/README_gl.md @@ -81,6 +81,11 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## :red_circle: Caraterísticas cuestionables + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 518b03f..fa5e209 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -81,6 +81,11 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## :red_circle: 负面特征 + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## 文档与资源 - 官方应用网站: From 5e710fc89fd39a17b567d8d262ab0a38a2eb4a21 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 27 Apr 2024 16:32:26 +0000 Subject: [PATCH 03/41] Auto-update READMEs --- README.md | 29 +++++++++++++++++++++++++++-- README_eu.md | 29 +++++++++++++++++++++++++++-- README_fr.md | 29 +++++++++++++++++++++++++++-- README_gl.md | 29 +++++++++++++++++++++++++++-- README_zh_Hans.md | 29 +++++++++++++++++++++++++++-- 5 files changed, 135 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cc2e060..e65f726 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Shipped version:** 0.0~ynh3 +**Shipped version:** 0.0~ynh4 **Demo:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Antifeatures + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md index 34380e6..b434ab6 100644 --- a/README_eu.md +++ b/README_eu.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Paketatutako bertsioa:** 0.0~ynh3 +**Paketatutako bertsioa:** 0.0~ynh4 **Demoa:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Ezaugarri zalantzagarriak + +- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. +- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia. + ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index 34d04eb..209f5fc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Version incluse :** 0.0~ynh3 +**Version incluse :** 0.0~ynh4 **Démo :** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Anti-fonctionnalités + +- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. +- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README. + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index 8a061bf..2d1b3c2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Versión proporcionada:** 0.0~ynh3 +**Versión proporcionada:** 0.0~ynh4 **Demo:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Caraterísticas cuestionables + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a7296d3..0131192 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**分发版本:** 0.0~ynh3 +**分发版本:** 0.0~ynh4 **演示:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt 的截图](./doc/screenshots/screenshot.png) +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: 负面特征 + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## 文档与资源 - 官方应用网站: From b5e0f424f9b5cc4861e04a4056a86b790130cedb Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 30 Apr 2024 14:12:49 +0200 Subject: [PATCH 04/41] reworked install paths new paths are now defined in _common.sh like this ``` flohmarkt_install="/opt/${id}/${domain}${url_path}/src" flohmarkt_venv_dir="/opt/${id}/${domain}${url_path}/venv" ``` giving a nice layout following the domain and path the flohmarkt uses as its URL. Activated path resource in manifest.toml to let the admin choose a path different from '/'. --- conf/systemd.service | 9 +++++---- manifest.toml | 13 ++++++------- scripts/_common.sh | 7 +++++++ scripts/install | 24 ++++++++++++++---------- scripts/upgrade | 14 +++++++------- 5 files changed, 39 insertions(+), 28 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 96467e7..35cf147 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,10 +6,11 @@ After=network.target couchdb.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__INSTALL_DIR__/__APP__ -Environment="VENV_DIR=__INSTALL_DIR__/venv/" -ExecStart=/bin/bash -c "/opt/flohmarkt/venv/bin/uvicorn --host 127.0.0.1 --port 8000 --reload flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" -StandardOutput=append:/var/log/__APP__/__APP__.log +WorkingDirectory=__FLOHMARKT_INSTALL__ +Environment="VENV_DIR=__FLOHMARKT_VENV_DIR__" +ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --host 127.0.0.1 --port 8000 --reload flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" +# nicer logfile naming https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/38 +StandardOutput=append:/var/log/__ID__/__APP__.log StandardError=inherit # Sandboxing options to harden security diff --git a/manifest.toml b/manifest.toml index 3e76fa7..5cb1493 100644 --- a/manifest.toml +++ b/manifest.toml @@ -54,13 +54,12 @@ ram.runtime = "100M" # ask admin on which domain to run flohmarkt type = "domain" -# https://codeberg.org/ChriChri/flohmarkt_ynh/issues/4 -# [install.path] -# # ask admin under which path flohmarkt will be reachable -# # e.g. 'https://doma.in/path' - might not work, needs to be tested: -# # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/4 -# type = "path" -# default = "/" + [install.path] + # ask admin under which path flohmarkt will be reachable + # e.g. 'https://doma.in/path' - might not work, needs to be tested: + # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/4 + type = "path" + default = "/" [install.init_main_permission] # who will be able to access the apps URL after installation? diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..92bb029 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,13 @@ # COMMON VARIABLES #================================================= +# replace '/' by nothing for the path +if [ "$path" == '/' ]; then url_path=''; else url_path=$path; fi +# directory flohmarkts software is installed to +flohmarkt_install="/opt/${id}/${domain}${url_path}/src" +# diretory the venv for flohmarkt is installed to +flohmarkt_venv_dir="/opt/${id}/${domain}${url_path}/venv" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 7e79ec3..1f84a76 100755 --- a/scripts/install +++ b/scripts/install @@ -6,7 +6,11 @@ source /usr/share/yunohost/helpers # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/9 # check if couchdb is already installed -if [[ -e /opt/couchdb ]] || pgrep epmd > /dev/null || pgrep beam.smp || dpkg-query -W couchdb > /dev/null 2>&1; +# if there's a couchdb configuration file for flohmarkt we'll assume that couchdb +# had been installed by flohmarkt and we thus can savely do whatever we want to it +# with the resulting damage hopefully only influencing flohmarkt instances +if [[ -e /opt/couchdb ]] || pgrep epmd > /dev/null || pgrep beam.smp || dpkg-query -W couchdb > /dev/null 2>&1 \ + && ![[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; then ynh_die --message="CouchDB already installed on this host - will not proceed." exit 1 @@ -58,20 +62,20 @@ systemctl restart couchdb systemctl status couchdb # get flohmarkt -ynh_setup_source --dest_dir="$install_dir/$app/" +ynh_setup_source --dest_dir="$flohmarkt_install" # setup python environment for flohmarkt -ynh_secure_remove "$install_dir/venv" -python3 -m venv --without-pip "$install_dir/venv" +ynh_secure_remove "$flohmarkt_venv_dir" +python3 -m venv --without-pip "$flohmarkt_venv_dir" # install python dependencies ( set +o nounset - source "$install_dir/venv/bin/activate" + source "$flohmarkt_venv_dir/bin/activate" set -o nounset set -x - $install_dir/venv/bin/python3 -m ensurepip - $install_dir/venv/bin/pip3 install -r "$install_dir/$app/requirements.txt" + $flohmarkt_venv_dir/bin/python3 -m ensurepip + $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_install/requirements.txt" ) # JwtSecret @@ -83,14 +87,14 @@ password_couchdb_flohmarkt=$(ynh_string_random --length=31 --filter='A-Za-z0-9_. ynh_app_setting_set --app=$app --key=password_couchdb_flohmarkt --value="$password_couchdb_flohmarkt" # generate flohmarkt.conf -ynh_add_config --template="../conf/flohmarkt.conf" --destination="$install_dir/$app/flohmarkt.conf" +ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_install/flohmarkt.conf" # setup couchdb ( set +o nounset - source "$install_dir/venv/bin/activate" + source "$flohmarkt_venv_dir/bin/activate" set -o nounset - cd "$install_dir/$app" + cd "$flohmarkt_install" # initialize_couchdb seems to re-try on connect problems endlessly blocking the yunohost api # give it 45 seconds to finish and then fail # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/13 diff --git a/scripts/upgrade b/scripts/upgrade index e36f6c7..8b2e17b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,30 +46,30 @@ systemctl status couchdb # install upgrade for flohmarkt ynh_script_progression --message="Upgrading flohmarkt..." --weight=4 -ynh_setup_source --dest_dir="$install_dir/$app/" +ynh_setup_source --dest_dir="$flohmarkt_install/" ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=5 # upgrade python environment / install new dependencies ( set +o nounset - source "$install_dir/venv/bin/activate" + source "$flohmarkt_venv_dir/bin/activate" set -o nounset set -x - $install_dir/venv/bin/python3 -m ensurepip - $install_dir/venv/bin/pip3 install -r "$install_dir/$app/requirements.txt" + $flohmarkt_venv_dir/bin/python3 -m ensurepip + $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_install/requirements.txt" ) # upgrade flohmarkt.conf ynh_script_progression --message="Upgrading flohmarkt configuration..." --weight=1 -ynh_add_config --template="../conf/flohmarkt.conf" --destination="$install_dir/$app/flohmarkt.conf" +ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_install/flohmarkt.conf" ynh_script_progression --message="Upgrading flohmarkt couchdb..." --weight=10 # run initialize_couchdb.py ( set +o nounset - source "$install_dir/venv/bin/activate" + source "$flohmarkt_venv_dir/bin/activate" set -o nounset - cd "$install_dir/$app" + cd "$flohmarkt_install" # initialize_couchdb seems to re-try on connect problems endlessly blocking the yunohost api # give it 45 seconds to finish and then fail # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/13 From 87377238820cd7df9b3e955d342eaa4c9e43dd76 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 30 Apr 2024 14:22:32 +0200 Subject: [PATCH 05/41] rename main to testing updated DEVELOPMENT.md to prepare --- doc/DEVELOPMENT.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/DEVELOPMENT.md b/doc/DEVELOPMENT.md index c9acee1..e3d1dc5 100644 --- a/doc/DEVELOPMENT.md +++ b/doc/DEVELOPMENT.md @@ -29,24 +29,26 @@ To do so we'll push the according changes to the [flohmarkt repository at github One **pitfall** doing so is that we can't rely on the yunohost CI for testing for our codeberg repository this way. If need'll be and developers would like to use yunohost as their base for active work on flohmarkt we might release another app **flohmarkt-devel_ynh** in future that closely follows the repository we use for development. -#### master and main +#### master, main and testing The development startet on codeberg on a branch named **main**. That worked all the way until the repository got mirrored to github to be included into the yunohost app catalog. The last change that needed to be done for flohmarkt to appear on the catalog has been to change the name of the branch to **master** for the workflows on github to recognize it for catalog inclusion. Short: for **historic** reason we use the branch **main** on codeberg and publish the versions for the catalog as **master** on github. +Because of https://github.com/YunoHost-Apps/flohmarkt_ynh/pull/2#issuecomment-2081108150 we decided to name the working branch on codeberg **testing** which also signals that this is not the place to install from if testing and development is not wanted. + ### pushing to github -* make sure the local git and the codeberg git are in sync on their main branch +* make sure the local git and the codeberg git are in sync on their testing branch * tag a new version on codeberg `.-ynh`, e.g. `0.01-ynh5`. `.` is the flohmarkt version. `ynhX` is the version of the integration into flohmarkt (this repo). * new flohmarkt version: only `manifest.toml` changed to point to the newer source archive → change `.-ynh` according to the new flohmarkt version * changes in integration: scripts, conf files or `doc/*` changed → increment `` to signal a new version of the yunohost integration -* try to push the local main branch to github which might fail - * there might for some reason exist an old main branch that had not been deleted after the PR to the github master branch - check carefully and delete the existing main branch -* on github open an PR from the main branch into the master branch - * the PR can be tested on the CI workflow if a comment containing `!testme` is added to the PR +* push the local testing branch to github, if this fails: + * there might for some reason exist an old testing branch that had not been deleted after the PR to the github master branch - check carefully and delete the existing testing branch +* on github open an PR from the testing branch into the master branch + * test the PR on the CI workflow by commenting it containing `!testme` on one line by itself to the PR * the PR will be included after * it successfully ran through the CI workflow (results will show up inside the PR) * it has been reviewed From e73534d4cdbd572321951c4ab295c6926061146c Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 30 Apr 2024 19:48:43 +0200 Subject: [PATCH 06/41] new source, upgrade test * changed source to actual one * changed upgrade from version in tests.toml --- manifest.toml | 4 ++-- tests.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 5cb1493..43b638e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -108,8 +108,8 @@ ram.runtime = "100M" # This will pre-fetch the asset which can then be deployed during the install/upgrade scripts with : # ynh_setup_source --dest_dir="$install_dir" # You can also define other assets than "main" and add --source_id="foobar" in the previous command - url = "https://codeberg.org/flohmarkt/flohmarkt/archive/4a3f243d090549c66ffece46222b0f1cc358e91e.tar.gz" - sha256 = "d59bb3bbbaf7c98d9f8bae46d9a2b2ccc407d674f51140a3d868a6afdf862e73" + url = "https://codeberg.org/flohmarkt/flohmarkt/archive/6b396428ee52acba99483487e34eb0b258e339eb.tar.gz" + sha256 = "2167a94e209764fd7fde06b77e6b2fe845ed493f0fdab1dc19053ecd7d89d60f" # These infos are used by https://github.com/YunoHost/apps/blob/master/tools/autoupdate_app_sources/autoupdate_app_sources.py # to auto-update the previous asset urls and sha256sum + manifest version diff --git a/tests.toml b/tests.toml index 6b5f680..64f5e94 100644 --- a/tests.toml +++ b/tests.toml @@ -9,5 +9,5 @@ test_format = 1.0 args.password_couchdb_admin = "TestPasswordCouchDBadmin" args.password_couchdb_flohmarkt = "TestPasswordCouchDBflohmarkt" - test_upgrade_from.9df93bc48e.name = "Upgrade from ynh2" + test_upgrade_from.217fc0e.name = "Upgrade from ynh4" From b6d9fac30f7e572c31d775ab187f4b4d7173afae Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Mon, 6 May 2024 07:47:13 +0200 Subject: [PATCH 07/41] New file- and pathnames Quiet a ride, but on my test system it installs and removes. Upgrade will not work, yet. Renaming is missing. Multiple installs should work. --- conf/05-flohmarkt.ini | 1 - conf/flohmarkt.conf | 7 ++++- conf/systemd.service | 6 ++--- doc/DEVELOPMENT.md | 11 ++++---- manifest.toml | 9 +++---- scripts/_common.sh | 63 +++++++++++++++++++++++++++++++++++++++---- scripts/backup | 10 +++---- scripts/install | 36 +++++++++++++++---------- scripts/remove | 45 +++++++++++++++++-------------- scripts/restore | 16 +++++------ scripts/upgrade | 27 ++++++++++++------- 11 files changed, 155 insertions(+), 76 deletions(-) diff --git a/conf/05-flohmarkt.ini b/conf/05-flohmarkt.ini index 808d3c0..b6d6553 100644 --- a/conf/05-flohmarkt.ini +++ b/conf/05-flohmarkt.ini @@ -2,5 +2,4 @@ ; prevent non admin users to be able to access the list of all databases admin_only_all_dbs = true -; Defines the port number to listen: port = __PORT_COUCHDB__ diff --git a/conf/flohmarkt.conf b/conf/flohmarkt.conf index 61de2d0..f42af97 100644 --- a/conf/flohmarkt.conf +++ b/conf/flohmarkt.conf @@ -6,7 +6,12 @@ JwtSecret = __JWTSECRET__ DataPath = __DATA_DIR__ [Database] -Server = http://__APP__:__PASSWORD_COUCHDB_FLOHMARKT__@127.0.0.1:__PORT_COUCHDB__/ +UseHttps = 0 +Host = 127.0.0.1 +User = __APP__ +Password = __PASSWORD_COUCHDB_FLOHMARKT__ +Port = __PORT_COUCHDB__ +Database = __APP__ [SMTP] Server = 127.0.0.1 diff --git a/conf/systemd.service b/conf/systemd.service index 35cf147..79938cb 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,11 +6,11 @@ After=network.target couchdb.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FLOHMARKT_INSTALL__ +WorkingDirectory=__FLOHMARKT_APP_DIR__ Environment="VENV_DIR=__FLOHMARKT_VENV_DIR__" -ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --host 127.0.0.1 --port 8000 --reload flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" +ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --host 127.0.0.1 --port __PORT__ flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" # nicer logfile naming https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/38 -StandardOutput=append:/var/log/__ID__/__APP__.log +StandardOutput=append:__FLOHMARKT_LOGFILE__ StandardError=inherit # Sandboxing options to harden security diff --git a/doc/DEVELOPMENT.md b/doc/DEVELOPMENT.md index e3d1dc5..2a17e81 100644 --- a/doc/DEVELOPMENT.md +++ b/doc/DEVELOPMENT.md @@ -23,7 +23,7 @@ Your opinion is appreciated on this topic. The codeberg repository is meant to be bleeding edge and we'll try to follow the HEAD of [flohmarkts](https://codeberg.org/flohmarkt/flohmarkt) repository closely. -Once in a while we'll reach the point to tag a new `-ynhX` version for changes of the yunohost integration or we'll want to release a new version of flohmarkt or both. +Once in a while we'll reach the point to tag a new `~ynhX` version for changes of the yunohost integration or we'll want to release a new version of flohmarkt or both. To do so we'll push the according changes to the [flohmarkt repository at github](https://github.com/YunoHost-Apps/flohmarkt_ynh) to make upgrades available to the yunohost community. @@ -40,10 +40,11 @@ Because of https://github.com/YunoHost-Apps/flohmarkt_ynh/pull/2#issuecomment-20 ### pushing to github * make sure the local git and the codeberg git are in sync on their testing branch -* tag a new version on codeberg `.-ynh`, e.g. `0.01-ynh5`. `.` is the flohmarkt version. `ynhX` is the version of the integration into flohmarkt (this repo). - * new flohmarkt version: only `manifest.toml` changed to point to the newer source archive - → change `.-ynh` according to the new flohmarkt version - * changes in integration: scripts, conf files or `doc/*` changed +* tag a new version on codeberg `.~ynh`, e.g. `0.01~ynh5`. `.` is the flohmarkt version. `ynhX` is the version of the integration into flohmarkt (this repo). + * new flohmarkt version: `manifest.toml` changed to point to the newer source archive + → change `.~ynh` according to the new flohmarkt version + → reset `X` in `~ynh` to `0` + * **only** changes in integration, **no new flohmarkt version in manifest.toml** → increment `` to signal a new version of the yunohost integration * push the local testing branch to github, if this fails: * there might for some reason exist an old testing branch that had not been deleted after the PR to the github master branch - check carefully and delete the existing testing branch diff --git a/manifest.toml b/manifest.toml index 43b638e..a8a7072 100644 --- a/manifest.toml +++ b/manifest.toml @@ -108,8 +108,8 @@ ram.runtime = "100M" # This will pre-fetch the asset which can then be deployed during the install/upgrade scripts with : # ynh_setup_source --dest_dir="$install_dir" # You can also define other assets than "main" and add --source_id="foobar" in the previous command - url = "https://codeberg.org/flohmarkt/flohmarkt/archive/6b396428ee52acba99483487e34eb0b258e339eb.tar.gz" - sha256 = "2167a94e209764fd7fde06b77e6b2fe845ed493f0fdab1dc19053ecd7d89d60f" + url = "https://codeberg.org/flohmarkt/flohmarkt/archive/2c5ea313d9b04dad25649335f415af5ca484f262.tar.gz" + sha256 = "ce08228e2e9e650925c53094bf9c02bac8cdcb03a931f262034802ce6541e1f7" # These infos are used by https://github.com/YunoHost/apps/blob/master/tools/autoupdate_app_sources/autoupdate_app_sources.py # to auto-update the previous asset urls and sha256sum + manifest version @@ -134,9 +134,8 @@ ram.runtime = "100M" [resources.install_dir] dir = "/opt/flohmarkt" - [resources.data_dir] - # This will create/remove the data dir as /home/yunohost.app/$app - # and store the corresponding setting $data_dir + # [resources.data_dir] + # we'll take care of this inside the install script and save it to the settings [resources.permissions] # This will configure SSOwat permission for $domain/$path/ diff --git a/scripts/_common.sh b/scripts/_common.sh index 92bb029..3459cd3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,17 +4,70 @@ # COMMON VARIABLES #================================================= -# replace '/' by nothing for the path -if [ "$path" == '/' ]; then url_path=''; else url_path=$path; fi +## new filenames starting 0.00~ynh5 +# make a filename/service name from domain/path +if [[ "$path" == /* ]]; then + url_path="${path:1}" +fi +if [[ "__${url_path}__" == '____' ]]; then + flohmarkt_filename="$domain" +else + flohmarkt_filename="$domain-${url_path}" +fi +# just in case we append $app to make it really unique +# this filename is used for logfile name and systemd.service name +flohmarkt_filename="${flohmarkt_filename//[^A-Za-z0-9._-]/_}_${app}" +# # directory flohmarkts software is installed to -flohmarkt_install="/opt/${id}/${domain}${url_path}/src" -# diretory the venv for flohmarkt is installed to -flohmarkt_venv_dir="/opt/${id}/${domain}${url_path}/venv" +# contains ./venv and ./src as sub-directories +flohmarkt_install="/opt/${id}/${domain}/${url_path}" +flohmarkt_venv_dir="${flohmarkt_install}/venv" +flohmarkt_app_dir="${flohmarkt_install}/app" +# directory containing logfiles +flohmarkt_log_dir="/var/log/${id}/${flohmarkt_filename}" +# filename for logfiles - ¡ojo! if not ends with .log will be interpreted +# as a directory by ynh_use_logrotate +# https://github.com/YunoHost/issues/issues/2383 +flohmarkt_logfile="${flohmarkt_log_dir}/${app}.log" +# flohmarkt data_dir follows the naming convention above +# its saved to settings during install +flohmarkt_data_dir="/home/yunohost.app/${flohmarkt_filename}" + +## old filenames before 0.00~ynh5 - for reference and needed to +# migrate (see below) +flohmarkt_old_install="$install_dir/$app/" +flohmarkt_old_venv_dir="$install_dir/venv" +flohmarkt_old_log_dir="/var/log/$app/" +flohmarkt_old_logfile="$app" +flohmarkt_old_service="$app" #================================================= # PERSONAL HELPERS #================================================= +# move files and directories to their new places +flohmarkt_ynh_upgrade_path_ynh5() { + # flohmarkt and couchdb are already stopped in upgrade script + # move install_dir + # move venv_dir + # move data_dir + # move systemd.service + # move logfiles + # update settings for above + + false + # there's still some work open - see above +} + +# to follow the naming convention including information about domain +# and path we do create the data_dir here and save it during install +# to the settings of this flohmarkt instance +flohmarkt_ynh_create_data_dir() { + mkdir -p $data_dir + chown $app: $data_dir + chmod 750 $data_dir +} + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index afe4b97..f00fac9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -4,19 +4,19 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers ynh_print_info --message="Declaring files to be backed up..." -ynh_backup --src_path="$install_dir" +ynh_backup --src_path="$flohmarkt_install" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" -ynh_backup --src_path="/etc/systemd/system/$app.service" -ynh_backup --src_path="/var/log/$app" +ynh_backup --src_path="/etc/systemd/system/$flohmarkt_filename.service" +ynh_backup --src_path="${flohmarkt_logfile}*" # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..." -yunohost service stop flohmarkt +yunohost service stop $flohmarkt_filename systemctl stop couchdb # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/24 @@ -29,7 +29,7 @@ systemctl stop couchdb # if this becomes a pain we'll need to stop deleting this directories on 'remove' # ynh_backup --src_path="$data_dir" --is_big # ynh_backup --src_path="/var/lib/couchdb" --is_big -ynh_backup --src_path="$data_dir" +ynh_backup --src_path="$flohmarkt_data_dir" ynh_backup --src_path="/var/lib/couchdb" ynh_print_info --message="...done. Starting couchdb and flohmarkt." diff --git a/scripts/install b/scripts/install index 1f84a76..f7da705 100755 --- a/scripts/install +++ b/scripts/install @@ -16,6 +16,12 @@ then exit 1 fi +# create and setup $data_dir +data_dir="${flohmarkt_data_dir}" +ynh_script_progression --message="Creating data_dir '$data_dir'..." --weight=2 +ynh_app_setting_set --app=$app --key=data_dir --value="$data_dir" +flohmarkt_ynh_create_data_dir + # INITIALIZE AND STORE SETTINGS # todo: do we need to store the password un-encrypted somewhere on the system? # → there's no way to get the admin password later if sometimes in the future deleting @@ -62,7 +68,7 @@ systemctl restart couchdb systemctl status couchdb # get flohmarkt -ynh_setup_source --dest_dir="$flohmarkt_install" +ynh_setup_source --dest_dir="$flohmarkt_app_dir" # setup python environment for flohmarkt ynh_secure_remove "$flohmarkt_venv_dir" @@ -75,7 +81,7 @@ python3 -m venv --without-pip "$flohmarkt_venv_dir" set -o nounset set -x $flohmarkt_venv_dir/bin/python3 -m ensurepip - $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_install/requirements.txt" + $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt" ) # JwtSecret @@ -87,24 +93,24 @@ password_couchdb_flohmarkt=$(ynh_string_random --length=31 --filter='A-Za-z0-9_. ynh_app_setting_set --app=$app --key=password_couchdb_flohmarkt --value="$password_couchdb_flohmarkt" # generate flohmarkt.conf -ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_install/flohmarkt.conf" +ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_app_dir/flohmarkt.conf" # setup couchdb ( set +o nounset source "$flohmarkt_venv_dir/bin/activate" set -o nounset - cd "$flohmarkt_install" + cd "$flohmarkt_app_dir" # initialize_couchdb seems to re-try on connect problems endlessly blocking the yunohost api # give it 45 seconds to finish and then fail # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/13 - timeout 45 python3 initialize_couchdb.py $password_couchdb_admin $password_couchdb_flohmarkt + timeout 45 python3 initialize_couchdb.py $password_couchdb_admin ) # SETUP LOGROTATE ynh_script_progression --message="Configuring log rotation..." --weight=2 # Use logrotate to manage application logfile(s) -ynh_use_logrotate +ynh_use_logrotate --logfile=$flohmarkt_logfile # NGINX CONFIGURATION ynh_script_progression --message="Configuring NGINX web server..." --weight=3 @@ -114,19 +120,21 @@ ynh_add_nginx_config # systemd.service ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config +ynh_add_systemd_config --service=$flohmarkt_filename # integrate into yunohost ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="A decentral federated small advertisement platform" --log="/var/log/$app/$app.log" +yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" # logfile contains possibly the secret setup URL -mkdir -m755 -p "/var/log/$app" -touch "/var/log/$app/$app.log" -chmod 640 "/var/log/$app/$app.log" +mkdir -m755 -p "$flohmarkt_log_dir" +touch "$flohmarkt_logfile" +chmod 640 "$flohmarkt_logfile" # start service -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$flohmarkt_filename --action="start" +# https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/44 +# --line_match="INFO: Application startup complete." # SETUP FAIL2BAN ynh_script_progression --message="Configuring Fail2Ban..." --weight=3 -ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex='INFO: +:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5 +ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: +:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5 -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of $id completed" --last diff --git a/scripts/remove b/scripts/remove index 9d71d4f..3b54eb9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,36 +18,40 @@ ynh_script_progression --message="Removing system configurations related to $app # Stop flohmarkt service ynh_script_progression --message="Stopping $app..." --weight=2 -yunohost service stop $app +yunohost service stop $flohmarkt_filename # 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 $flohmarkt_filename >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=2 - yunohost service remove $app + yunohost service remove $flohmarkt_filename fi -ynh_script_progression --message="Stopping couchdb..." --weight=2 -systemctl stop couchdb - -ynh_script_progression --message="Removing databases..." --weight=2 -# remove flohmarkt database and database user -# ynh_script_progression --message="removing flohmarkt couchdb user and database" --weight=2 -# @@ wie komme ich hier an das admin-password, falls ich es brauche? -# * brauche ich es? → ja -# db: -# curl -X DELETE 'http://127.0.0.1:5984/flohmarkt' --user ':' -# user: -# curl -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt?rev=`curl -sX GET 'http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt' --user 'admin:bla42fasel' | jq -r ._rev`" --user ':' -# @@ todo improve this like above -# https://codeberg.org/ChriChri/flohmarkt_ynh/issues/12 -ynh_secure_remove --file=/var/lib/couchdb +## This needs to be rewritten: Only delete the database of the instance being removed +# https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 +# ynh_script_progression --message="Stopping couchdb..." --weight=2 +# systemctl stop couchdb +# +# ynh_script_progression --message="Removing databases..." --weight=2 +# # remove flohmarkt database and database user +# # ynh_script_progression --message="removing flohmarkt couchdb user and database" --weight=2 +# # @@ wie komme ich hier an das admin-password, falls ich es brauche? +# # * brauche ich es? → ja +# # db: +# # curl -X DELETE 'http://127.0.0.1:5984/flohmarkt' --user ':' +# # user: +# # curl -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt?rev=`curl -sX GET 'http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt' --user 'admin:bla42fasel' | jq -r ._rev`" --user ':' +# # @@ todo improve this like above +# # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/12 +# ynh_secure_remove --file=/var/lib/couchdb # Remove the app-specific logrotate config ynh_remove_logrotate -# remove log directory -ynh_secure_remove --file="/var/log/$app/$app.log" +# remove logfiles directory +# https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/29 +# can only remove a subdir or one file +ynh_secure_remove --file="${flohmarkt_log_dir}" # Remove the dedicated NGINX config ynh_remove_nginx_config @@ -56,6 +60,7 @@ ynh_remove_nginx_config ynh_remove_fail2ban_config # Remove home +# https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/29 ynh_script_progression --message="Removing data directory..." --weight=2 ynh_secure_remove --file=$data_dir diff --git a/scripts/restore b/scripts/restore index c3de18a..e381609 100755 --- a/scripts/restore +++ b/scripts/restore @@ -56,16 +56,16 @@ mkdir -p $data_dir # If the logfile(or maybe just -directory?) is missing the service will not start # on a fresh install, because directory and/or file do not exist. ynh_script_progression --message="Restoring log directory and logfiles..." --weight=1 -ynh_restore_file --origin_path="/var/log/$app" --not_mandatory -mkdir -p -m755 "/var/log/$app" -touch "/var/log/$app/$app.log" +ynh_restore_file --origin_path="$flohmarkt_log_dir" --not_mandatory +mkdir -p -m755 "$flohmarkt_log_dir" +touch "$flohmarkt_logfile" # logfile contains possibly the secret setup URL -chmod 640 "/var/log/$app/$app.log" +chmod 640 "$flohmarkt_logfile" # RESTORE FAIL2BAN CONFIGURATION ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=2 -ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" -ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" +ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$flohmarkt_logfile.conf" +ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$flohmarkt_logfile.conf" ynh_systemd_action --action=restart --service_name=fail2ban # RESTORE THE NGINX CONFIGURATION @@ -78,9 +78,9 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" # restore flohmarkt systemd service and integrate service into yunohost ynh_script_progression --message="Restoring flohmarkt.service and integrating service into YunoHost..." --weight=1 -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +ynh_restore_file --origin_path="/etc/systemd/system/$flohmarkt_filename.service" ynh_systemd_action --action=enable -yunohost service add $app --description="A decentral federated small advertisement platform" --log="/var/log/$app/$app.log" +yunohost service add $app --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" ynh_systemd_action --action=start --line_match="INFO: Application startup complete." # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 8b2e17b..1550954 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,15 @@ ynh_systemd_action --service_name=$app --action="stop" # stop couchdb ynh_systemd_action --service_name=couchdb --action="stop" +# Upgrade ynh4 → ynh5, change of paths and filenames +# https://matrix.to/#/!PauySEslPVuJCJCwlZ:matrix.org/$auU_rSL6MACt9wkyFGlCQbO8ivFlU0ztYW74TimZdcM?via=matrix.org&via=aria-net.org&via=sans-nuage.fr +# and follow-ups +if ynh_compare_current_package_version --comparision lt --version 0.00~ynh5 && + ( [[ $upgrade_type == UPGRADE_PACKAGE ]] || [[ $upgrade_type == UPGRADE_APP ]] ) +then + flohmarkt_ynh_upgrade_path_ynh5 +fi + # upgrade couchdb ynh_script_progression --message="Upgrading CouchDB..." --weight=50 echo "\ @@ -46,9 +55,9 @@ systemctl status couchdb # install upgrade for flohmarkt ynh_script_progression --message="Upgrading flohmarkt..." --weight=4 -ynh_setup_source --dest_dir="$flohmarkt_install/" +ynh_setup_source --dest_dir="$flohmarkt_app_dir/" -ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=5 +ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=6 # upgrade python environment / install new dependencies ( set +o nounset @@ -56,12 +65,12 @@ ynh_script_progression --message="Upgrading flohmarkt python dependencies..." -- set -o nounset set -x $flohmarkt_venv_dir/bin/python3 -m ensurepip - $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_install/requirements.txt" + $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt" ) # upgrade flohmarkt.conf ynh_script_progression --message="Upgrading flohmarkt configuration..." --weight=1 -ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_install/flohmarkt.conf" +ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_app_dir/flohmarkt.conf" ynh_script_progression --message="Upgrading flohmarkt couchdb..." --weight=10 # run initialize_couchdb.py @@ -69,7 +78,7 @@ ynh_script_progression --message="Upgrading flohmarkt couchdb..." --weight=10 set +o nounset source "$flohmarkt_venv_dir/bin/activate" set -o nounset - cd "$flohmarkt_install" + cd "$flohmarkt_app_dir" # initialize_couchdb seems to re-try on connect problems endlessly blocking the yunohost api # give it 45 seconds to finish and then fail # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/13 @@ -78,10 +87,10 @@ ynh_script_progression --message="Upgrading flohmarkt couchdb..." --weight=10 # systemd service upgrade ynh_script_progression --message="Upgrading flohmarkt systemd service..." --weight=1 -ynh_add_systemd_config +ynh_add_systemd_config --service=$flohmarkt_filename # INTEGRATE SERVICE IN YUNOHOST ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="A decentral federated small advertisement platform" --log="/var/log/$app/$app.log" +yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" # upgrade logrotate ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 @@ -94,10 +103,10 @@ ynh_add_nginx_config # UPGRADE FAIL2BAN ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=3 -ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex='INFO: +:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5 +ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: +:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5 # start flohmarkt ynh_script_progression --message="Starting flohmarkt..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --line_match="INFO: Application startup complete." +ynh_systemd_action --service_name=$flohmarkt_filename --action="start" --line_match="INFO: Application startup complete." ynh_script_progression --message="Upgrade of $app completed" --last From b943dfa6f178081a161c1f207251cfcd2d9b699f Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 7 May 2024 12:18:36 +0200 Subject: [PATCH 08/41] paths and filenames - part II adjusted paths after trying, thinking and talking to people in the matrix room again. --- conf/05-flohmarkt.ini | 2 +- conf/flohmarkt.conf | 3 ++- manifest.toml | 18 +++++++++--------- scripts/_common.sh | 25 ++++++++----------------- scripts/install | 18 +++++++++++------- scripts/remove | 26 ++++++++++---------------- 6 files changed, 41 insertions(+), 51 deletions(-) diff --git a/conf/05-flohmarkt.ini b/conf/05-flohmarkt.ini index b6d6553..c85771c 100644 --- a/conf/05-flohmarkt.ini +++ b/conf/05-flohmarkt.ini @@ -2,4 +2,4 @@ ; prevent non admin users to be able to access the list of all databases admin_only_all_dbs = true -port = __PORT_COUCHDB__ +; port = __##PORT_COUCHDB__ diff --git a/conf/flohmarkt.conf b/conf/flohmarkt.conf index f42af97..a32025b 100644 --- a/conf/flohmarkt.conf +++ b/conf/flohmarkt.conf @@ -10,7 +10,8 @@ UseHttps = 0 Host = 127.0.0.1 User = __APP__ Password = __PASSWORD_COUCHDB_FLOHMARKT__ -Port = __PORT_COUCHDB__ +# Port = __##PORT_COUCHDB__ +Port = 5984 Database = __APP__ [SMTP] diff --git a/manifest.toml b/manifest.toml index a8a7072..aa5b064 100644 --- a/manifest.toml +++ b/manifest.toml @@ -28,8 +28,7 @@ code = "https://codeberg.org/flohmarkt/flohmarkt" yunohost = ">= 11.2.11" architectures = "all" # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/11 -# multi_instance = true -multi_instance = false +multi_instance = true # the "ldap" key corresponds to wether or not a user *can* login on the app using # its YunoHost credentials. @@ -108,8 +107,8 @@ ram.runtime = "100M" # This will pre-fetch the asset which can then be deployed during the install/upgrade scripts with : # ynh_setup_source --dest_dir="$install_dir" # You can also define other assets than "main" and add --source_id="foobar" in the previous command - url = "https://codeberg.org/flohmarkt/flohmarkt/archive/2c5ea313d9b04dad25649335f415af5ca484f262.tar.gz" - sha256 = "ce08228e2e9e650925c53094bf9c02bac8cdcb03a931f262034802ce6541e1f7" + url = "https://codeberg.org/flohmarkt/flohmarkt/archive/78b2cc137d7c88d961e12dcb5017b17257bc4a71.tar.gz" + sha256 = "4acbfe20372583fdf75f4eea7b9c29d9ae20d04283559578f5e33f8347570c33" # These infos are used by https://github.com/YunoHost/apps/blob/master/tools/autoupdate_app_sources/autoupdate_app_sources.py # to auto-update the previous asset urls and sha256sum + manifest version @@ -132,10 +131,8 @@ ram.runtime = "100M" # @@ how to create a couchdb user if needed? in install-script manually? [resources.install_dir] - dir = "/opt/flohmarkt" - # [resources.data_dir] - # we'll take care of this inside the install script and save it to the settings + [resources.data_dir] [resources.permissions] # This will configure SSOwat permission for $domain/$path/ @@ -149,13 +146,16 @@ ram.runtime = "100M" # uvicorn running the flohmarkt app will be started listening to this port # if 'main.default' is already in use another random port will be used main.default = 8000 - couchdb.default = 5984 + # we'll rely on couchdb choosing the default port to listen to + # otherwise I'll set a new port for each flohmarkt that will be installed until the + # installation of couchdb is reworked by making it possible to do as a pure dependency + # couchdb.default = 5984 [resources.apt] # python dependencies shall be installed in a venv using pip. # moreutils is needed for `ts` used in systemd.service - packages = "python3-pip python3-full curl apt-transport-https gnupg moreutils" + packages = "python3-pip python3-full curl apt-transport-https gnupg moreutils curl" # repo for couchdb - doesn't work, yet # extras.couchdb.repo = "deb https://apache.jfrog.io/artifactory/couchdb-deb/ __YNH_DEBIAN_VERSION__ main" # extras.couchdb.key = "https://couchdb.apache.org/repo/keys.asc" diff --git a/scripts/_common.sh b/scripts/_common.sh index 3459cd3..1bd4059 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,24 +14,24 @@ if [[ "__${url_path}__" == '____' ]]; then else flohmarkt_filename="$domain-${url_path}" fi -# just in case we append $app to make it really unique # this filename is used for logfile name and systemd.service name -flohmarkt_filename="${flohmarkt_filename//[^A-Za-z0-9._-]/_}_${app}" -# +# and for symlinking install_dir and data_dir +flohmarkt_filename="${YNH_APP_ID}_${flohmarkt_filename//[^A-Za-z0-9._-]/_}" # directory flohmarkts software is installed to # contains ./venv and ./src as sub-directories -flohmarkt_install="/opt/${id}/${domain}/${url_path}" +flohmarkt_install="$install_dir" +flohmarkt_sym_install="$( dirname $flohmarkt_install )/$flohmarkt_filename" flohmarkt_venv_dir="${flohmarkt_install}/venv" flohmarkt_app_dir="${flohmarkt_install}/app" # directory containing logfiles -flohmarkt_log_dir="/var/log/${id}/${flohmarkt_filename}" +flohmarkt_log_dir="/var/log/${YNH_APP_ID}/${flohmarkt_filename}" # filename for logfiles - ¡ojo! if not ends with .log will be interpreted # as a directory by ynh_use_logrotate # https://github.com/YunoHost/issues/issues/2383 flohmarkt_logfile="${flohmarkt_log_dir}/${app}.log" -# flohmarkt data_dir follows the naming convention above -# its saved to settings during install -flohmarkt_data_dir="/home/yunohost.app/${flohmarkt_filename}" +# flohmarkt data_dir +flohmarkt_data_dir="$data_dir" +flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename" ## old filenames before 0.00~ynh5 - for reference and needed to # migrate (see below) @@ -59,15 +59,6 @@ flohmarkt_ynh_upgrade_path_ynh5() { # there's still some work open - see above } -# to follow the naming convention including information about domain -# and path we do create the data_dir here and save it during install -# to the settings of this flohmarkt instance -flohmarkt_ynh_create_data_dir() { - mkdir -p $data_dir - chown $app: $data_dir - chmod 750 $data_dir -} - #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index f7da705..4e5f9e9 100755 --- a/scripts/install +++ b/scripts/install @@ -16,12 +16,6 @@ then exit 1 fi -# create and setup $data_dir -data_dir="${flohmarkt_data_dir}" -ynh_script_progression --message="Creating data_dir '$data_dir'..." --weight=2 -ynh_app_setting_set --app=$app --key=data_dir --value="$data_dir" -flohmarkt_ynh_create_data_dir - # INITIALIZE AND STORE SETTINGS # todo: do we need to store the password un-encrypted somewhere on the system? # → there's no way to get the admin password later if sometimes in the future deleting @@ -68,10 +62,12 @@ systemctl restart couchdb systemctl status couchdb # get flohmarkt +# suspecting that this deletes all other sources for YNH_APP_ID ynh_setup_source --dest_dir="$flohmarkt_app_dir" # setup python environment for flohmarkt ynh_secure_remove "$flohmarkt_venv_dir" + python3 -m venv --without-pip "$flohmarkt_venv_dir" # install python dependencies @@ -129,7 +125,7 @@ mkdir -m755 -p "$flohmarkt_log_dir" touch "$flohmarkt_logfile" chmod 640 "$flohmarkt_logfile" # start service -ynh_systemd_action --service_name=$flohmarkt_filename --action="start" +ynh_systemd_action --service_name=$flohmarkt_filename --action="start" --line_match='INFO: *Application startup complete.' --log_path="$flohmarkt_logfile" --timeout=30 # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/44 # --line_match="INFO: Application startup complete." @@ -137,4 +133,12 @@ ynh_systemd_action --service_name=$flohmarkt_filename --action="start" ynh_script_progression --message="Configuring Fail2Ban..." --weight=3 ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: +:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5 +# symlink data_dir and install_dir to make it easier to find the +# files for a certain domain/path +ln -s "$flohmarkt_install" "$flohmarkt_sym_install" +ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" + +# debug +env + ynh_script_progression --message="Installation of $id completed" --last diff --git a/scripts/remove b/scripts/remove index 3b54eb9..e36a509 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,23 +27,13 @@ then yunohost service remove $flohmarkt_filename fi -## This needs to be rewritten: Only delete the database of the instance being removed # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 -# ynh_script_progression --message="Stopping couchdb..." --weight=2 -# systemctl stop couchdb -# -# ynh_script_progression --message="Removing databases..." --weight=2 -# # remove flohmarkt database and database user -# # ynh_script_progression --message="removing flohmarkt couchdb user and database" --weight=2 -# # @@ wie komme ich hier an das admin-password, falls ich es brauche? -# # * brauche ich es? → ja -# # db: -# # curl -X DELETE 'http://127.0.0.1:5984/flohmarkt' --user ':' -# # user: -# # curl -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt?rev=`curl -sX GET 'http://127.0.0.1:5984/_users/org.couchdb.user%3Aflohmarkt' --user 'admin:bla42fasel' | jq -r ._rev`" --user ':' -# # @@ todo improve this like above -# # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/12 -# ynh_secure_remove --file=/var/lib/couchdb +ynh_script_progression --message="Removing database and database user..." --weight=2 +# remove DB +curl -s -X DELETE 'http://127.0.0.1:5984/flohmarkt' --user "admin:${password_couchdb_admin}" +# remove DB user for this instance: +# get rev for the user and then delete user/rev +curl -s -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}?rev=$( curl -sX GET "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}" --user "admin:${password_couchdb_admin}" | jq -r ._rev)" --user "admin:${password_couchdb_admin}" # Remove the app-specific logrotate config ynh_remove_logrotate @@ -68,6 +58,10 @@ ynh_secure_remove --file=$data_dir ynh_script_progression --message="Removing data directory..." --weight=2 ynh_remove_systemd_config +# remove symlinks +ynh_secure_remove "$flohmarkt_sym_install" +ynh_secure_remove "$flohmarkt_sym_data_dir" + #================================================= # END OF SCRIPT #================================================= From 6287cd77254aa94347eb802abd7a4e92d5e454ea Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 8 May 2024 11:18:05 +0200 Subject: [PATCH 09/41] Upgrade paths/filename part III now it works on my test system... --- scripts/_common.sh | 73 +++++++++++++++++++++++++++++++++++++--------- scripts/install | 16 ++-------- scripts/upgrade | 19 +++++------- tests.toml | 7 ++--- 4 files changed, 73 insertions(+), 42 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1bd4059..d0c8c96 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -35,28 +35,75 @@ flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename" ## old filenames before 0.00~ynh5 - for reference and needed to # migrate (see below) -flohmarkt_old_install="$install_dir/$app/" -flohmarkt_old_venv_dir="$install_dir/venv" -flohmarkt_old_log_dir="/var/log/$app/" -flohmarkt_old_logfile="$app" -flohmarkt_old_service="$app" +flohmarkt_old_install="/opt/flohmarkt" +flohmarkt_old_venv_dir="${flohmarkt_old_install}/venv" +flohmarkt_old_app_dir="${flohmarkt_old_install}/flohmarkt" +flohmarkt_old_log_dir="/var/log/flohmarkt/" +flohmarkt_old_logfile="flohmarkt" +flohmarkt_old_service="flohmarkt" #================================================= # PERSONAL HELPERS #================================================= +# create venv +flohmarkt_ynh_create_venv() { + python3 -m venv --without-pip "$flohmarkt_venv_dir" +} + +# install requirements.txt in venv +flohmarkt_ynh_venv_requirements() { + ( + set +o nounset + source "$flohmarkt_venv_dir/bin/activate" + set -o nounset + set -x + $flohmarkt_venv_dir/bin/python3 -m ensurepip + $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt" + ) +} + # move files and directories to their new places flohmarkt_ynh_upgrade_path_ynh5() { # flohmarkt and couchdb are already stopped in upgrade script - # move install_dir - # move venv_dir - # move data_dir - # move systemd.service - # move logfiles + + # move app_dir into new 'app' folder + mv "$flohmarkt_install/flohmarkt" "$flohmarkt_app_dir" + + # yunohost seems to move the venv dir automatically, but this + # doesn't work, because the paths inside the venv are not adjusted + # delete the old, not working venv and create a new one: + ynh_secure_remove --file="$flohmarkt_venv_dir" + flohmarkt_ynh_create_venv + flohmarkt_ynh_venv_requirements + # remove old $install_dir + ynh_secure_remove --file="$flohmarkt_old_install" + + # move logfile directory + mkdir -p "$flohmarkt_log_dir" + mv ${flohmarkt_old_log_dir}/${flohmarkt_old_logfile}.* "$flohmarkt_log_dir" + # update settings for above - - false - # there's still some work open - see above + # @@ automatically done? maybe? + + # remove systemd.service - will be generated newly by upgrade + # ynh_remove_systemd_config --service="$flohmarkt_old_service" + ynh_systemd_action --action=stop --service_name="$flohmarkt_old_service" + ynh_systemd_action --action=disable --service_name="$flohmarkt_old_service" + ynh_secure_remove --file="/etc/systemd/system/multi-user.target.wants/flohmarkt.service" + ynh_secure_remove --file="/etc/systemd/system/flohmarkt.service" + # funktioniert nicht? issue? + #ynh_systemd_action --action=daemon-reload + # DEBUG + systemctl daemon-reload flohmarkt + # WARNING Too many arguments. + systemctl daemon-reload + # unit flohmarkt is automatically appended and therefor this fails: + #ynh_systemd_action --action=reset-failed + systemctl reset-failed + + # create symlinks + ln -s "$flohmarkt_install" "$flohmarkt_sym_install" + ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" } #================================================= diff --git a/scripts/install b/scripts/install index 4e5f9e9..a923a99 100755 --- a/scripts/install +++ b/scripts/install @@ -67,18 +67,8 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir" # setup python environment for flohmarkt ynh_secure_remove "$flohmarkt_venv_dir" - -python3 -m venv --without-pip "$flohmarkt_venv_dir" - -# install python dependencies -( - set +o nounset - source "$flohmarkt_venv_dir/bin/activate" - set -o nounset - set -x - $flohmarkt_venv_dir/bin/python3 -m ensurepip - $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt" -) +flohmarkt_ynh_create_venv +flohmarkt_ynh_venv_requirements # JwtSecret # workaround for https://github.com/YunoHost/issues/issues/2379 @@ -126,8 +116,6 @@ touch "$flohmarkt_logfile" chmod 640 "$flohmarkt_logfile" # start service ynh_systemd_action --service_name=$flohmarkt_filename --action="start" --line_match='INFO: *Application startup complete.' --log_path="$flohmarkt_logfile" --timeout=30 -# https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/44 -# --line_match="INFO: Application startup complete." # SETUP FAIL2BAN ynh_script_progression --message="Configuring Fail2Ban..." --weight=3 diff --git a/scripts/upgrade b/scripts/upgrade index 1550954..70e93be 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,10 @@ source /usr/share/yunohost/helpers # UPGRADE_SAME upgrade_type=$(ynh_check_app_version_changed) +# show variables - used from installed or from to be upgraded version? +# variables of the new upgrade version are used +# env + ynh_script_progression --message="Stopping flohmarkt and CouchDB..." --weight=5 # stop flohmarkt ynh_systemd_action --service_name=$app --action="stop" @@ -18,8 +22,8 @@ ynh_systemd_action --service_name=couchdb --action="stop" # Upgrade ynh4 → ynh5, change of paths and filenames # https://matrix.to/#/!PauySEslPVuJCJCwlZ:matrix.org/$auU_rSL6MACt9wkyFGlCQbO8ivFlU0ztYW74TimZdcM?via=matrix.org&via=aria-net.org&via=sans-nuage.fr # and follow-ups -if ynh_compare_current_package_version --comparision lt --version 0.00~ynh5 && - ( [[ $upgrade_type == UPGRADE_PACKAGE ]] || [[ $upgrade_type == UPGRADE_APP ]] ) +if ynh_compare_current_package_version --comparison lt --version 0.00~ynh5 && + ( [[ "$upgrade_type" == UPGRADE_PACKAGE ]] || [[ "$upgrade_type" == UPGRADE_APP ]] ) then flohmarkt_ynh_upgrade_path_ynh5 fi @@ -59,14 +63,7 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir/" ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=6 # upgrade python environment / install new dependencies -( - set +o nounset - source "$flohmarkt_venv_dir/bin/activate" - set -o nounset - set -x - $flohmarkt_venv_dir/bin/python3 -m ensurepip - $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt" -) +flohmarkt_ynh_venv_requirements # upgrade flohmarkt.conf ynh_script_progression --message="Upgrading flohmarkt configuration..." --weight=1 @@ -107,6 +104,6 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: + Date: Wed, 8 May 2024 16:14:04 +0200 Subject: [PATCH 10/41] corrections to backup/restore --- doc/POST_INSTALL.md | 13 +++++++++++++ doc/PRE_INSTALL.md | 12 ++++++------ scripts/_common.sh | 17 +++++++++++++++++ scripts/backup | 4 ++-- scripts/install | 10 ++++++---- scripts/restore | 13 +++++++------ scripts/upgrade | 7 +++++-- 7 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 doc/POST_INSTALL.md diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..9dd1c39 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1,13 @@ +## finishing setup + +To finish your flohmarkt setup you'll need to open its setup URL. + +You can find the setup URL in the logfile __FLOHMARKT_LOGFILE__ if you look for entries like this: + +``` +2024-05-06 16:30:24 Flohmarkt is not initialized yet. Please go to +2024-05-06 16:30:24 https://YOUR_URL/setup/SECRET +2024-05-06 16:30:24 in order to complete the setup process +``` + +(YOUR_URL will reflect the DOMAIN/PATH you chose for installation and SECRET is a random string) diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md index 91c309b..562a666 100644 --- a/doc/PRE_INSTALL.md +++ b/doc/PRE_INSTALL.md @@ -1,17 +1,17 @@ -## Warning: Exclusive use of couchdb +## use of couchdb -flohmarkt expects to install CouchDB from the Apache repository for its own, exclusive use. Installation might break already existing installs of CouchDB. +flohmarkt expects to install CouchDB from the Apache repository for its use. Installation of flohmarkt might break already existing installs of CouchDB. **flohmarkt will probably not install if you're already running an instance of a couchdb** https://codeberg.org/flohmarkt/flohmarkt_ynh/src/commit/7721103bac61787f31a4b2f2ae695c65d4f26fc9/scripts/install#L9 https://codeberg.org/ChriChri/flohmarkt_ynh/issues/9 -## Exclusive use of (sub)domain +## multiple flohmarkt on the same subdomain -flohmarkt expects to bei installed on its own (sub)domain. +The installation will allow you to **test** this. The feature is not well tested, yet, and installing multiple productive flohmarkts in the same domain might not work on the fediverse. -https://codeberg.org/ChriChri/flohmarkt_ynh/issues/4 . +Feedback is more than welcome! ## No integration in yunohost user database" @@ -19,7 +19,7 @@ flohmarkt mainanins its own user database in CouchDB. Users have to register to https://codeberg.org/ChriChri/flohmarkt_ynh/issues/5 . -## removing after installation +## removing **Warning:** This might break any existing installation of couchdb (there's an couchdb app to install just couchdb and expose its port via nginx reverse-proxy and possibly other software installing a couchdb). This could happen if you installed the couchdb app after you installed flohmarkt. diff --git a/scripts/_common.sh b/scripts/_common.sh index d0c8c96..0d5b70d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -46,6 +46,23 @@ flohmarkt_old_service="flohmarkt" # PERSONAL HELPERS #================================================= +# set file permissions and owner for installation +flohmarkt_ynh_set_permission() { + # install dir - only root needs to write and $app reads + chown root:$app -R "$flohmarkt_install" + chmod g-w,o-rwx -R "$flohmarkt_install" +} + +flohmarkt_ynh_start_service() { + ynh_systemd_action --service_name=$flohmarkt_filename --action="start" \ + --line_match='INFO: *Application startup complete.' --log_path="$flohmarkt_logfile" \ + --timeout=30 +} + +flohmarkt_ynh_stop_service() { + ynh_systemd_action --service_name=$app --action="stop" +} + # create venv flohmarkt_ynh_create_venv() { python3 -m venv --without-pip "$flohmarkt_venv_dir" diff --git a/scripts/backup b/scripts/backup index f00fac9..856f3b5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -11,7 +11,7 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" ynh_backup --src_path="/etc/systemd/system/$flohmarkt_filename.service" -ynh_backup --src_path="${flohmarkt_logfile}*" +ynh_backup --src_path="${flohmarkt_log_dir}" # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state @@ -34,6 +34,6 @@ ynh_backup --src_path="/var/lib/couchdb" ynh_print_info --message="...done. Starting couchdb and flohmarkt." systemctl start couchdb -yunohost service start flohmarkt +flohmarkt_ynh_start_service ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index a923a99..971c760 100755 --- a/scripts/install +++ b/scripts/install @@ -110,12 +110,14 @@ ynh_add_systemd_config --service=$flohmarkt_filename # integrate into yunohost ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" + # logfile contains possibly the secret setup URL mkdir -m755 -p "$flohmarkt_log_dir" touch "$flohmarkt_logfile" chmod 640 "$flohmarkt_logfile" -# start service -ynh_systemd_action --service_name=$flohmarkt_filename --action="start" --line_match='INFO: *Application startup complete.' --log_path="$flohmarkt_logfile" --timeout=30 + +# set file permissions for install dir +flohmarkt_ynh_set_permission # SETUP FAIL2BAN ynh_script_progression --message="Configuring Fail2Ban..." --weight=3 @@ -126,7 +128,7 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: + Date: Wed, 8 May 2024 16:31:52 +0200 Subject: [PATCH 11/41] deleted autogenerated README_* --- README_eu.md | 85 ----------------------------------------------- README_fr.md | 85 ----------------------------------------------- README_gl.md | 85 ----------------------------------------------- README_zh_Hans.md | 85 ----------------------------------------------- 4 files changed, 340 deletions(-) delete mode 100644 README_eu.md delete mode 100644 README_fr.md delete mode 100644 README_gl.md delete mode 100644 README_zh_Hans.md diff --git a/README_eu.md b/README_eu.md deleted file mode 100644 index 34380e6..0000000 --- a/README_eu.md +++ /dev/null @@ -1,85 +0,0 @@ - - -# flohmarkt YunoHost-erako - -[![Integrazio maila](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) - -[![Instalatu flohmarkt YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) - -*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* - -> *Pakete honek flohmarkt YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* -> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* - -## Aurreikuspena - -## A decentral federated small advertisement platform - -flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. - -Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). - -To register it's necessary to provide an email address to which a confirmation link is send. - -Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. - -## Federation - -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". - -The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. - -Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. - -It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. - -## Federation between flohmarkts - -At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. - -This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. - -This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. - -## More information - -Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. - -* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) -* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) -* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) - - -**Paketatutako bertsioa:** 0.0~ynh3 - -**Demoa:** - -## Pantaila-argazkiak - -![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) - -## Dokumentazioa eta baliabideak - -- Aplikazioaren webgune ofiziala: -- Erabiltzaileen dokumentazio ofiziala: -- Administratzaileen dokumentazio ofiziala: -- Jatorrizko aplikazioaren kode-gordailua: -- YunoHost Denda: -- Eman errore baten berri: - -## Garatzaileentzako informazioa - -Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). - -`testing` abarra probatzeko, ondorengoa egin: - -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -edo -sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -``` - -**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md deleted file mode 100644 index 34d04eb..0000000 --- a/README_fr.md +++ /dev/null @@ -1,85 +0,0 @@ - - -# flohmarkt pour YunoHost - -[![Niveau d’intégration](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) - -[![Installer flohmarkt avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) - -*[Lire le README dans d'autres langues.](./ALL_README.md)* - -> *Ce package vous permet d’installer flohmarkt rapidement et simplement sur un serveur YunoHost.* -> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* - -## Vue d’ensemble - -## A decentral federated small advertisement platform - -flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. - -Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). - -To register it's necessary to provide an email address to which a confirmation link is send. - -Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. - -## Federation - -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". - -The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. - -Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. - -It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. - -## Federation between flohmarkts - -At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. - -This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. - -This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. - -## More information - -Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. - -* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) -* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) -* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) - - -**Version incluse :** 0.0~ynh3 - -**Démo :** - -## Captures d’écran - -![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) - -## Documentations et ressources - -- Site officiel de l’app : -- Documentation officielle utilisateur : -- Documentation officielle de l’admin : -- Dépôt de code officiel de l’app : -- YunoHost Store : -- Signaler un bug : - -## Informations pour les développeurs - -Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). - -Pour essayer la branche `testing`, procédez comme suit : - -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -ou -sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -``` - -**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md deleted file mode 100644 index 8a061bf..0000000 --- a/README_gl.md +++ /dev/null @@ -1,85 +0,0 @@ - - -# flohmarkt para YunoHost - -[![Nivel de integración](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) - -[![Instalar flohmarkt con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) - -*[Le este README en outros idiomas.](./ALL_README.md)* - -> *Este paquete permíteche instalar flohmarkt de xeito rápido e doado nun servidor YunoHost.* -> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* - -## Vista xeral - -## A decentral federated small advertisement platform - -flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. - -Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). - -To register it's necessary to provide an email address to which a confirmation link is send. - -Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. - -## Federation - -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". - -The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. - -Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. - -It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. - -## Federation between flohmarkts - -At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. - -This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. - -This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. - -## More information - -Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. - -* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) -* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) -* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) - - -**Versión proporcionada:** 0.0~ynh3 - -**Demo:** - -## Capturas de pantalla - -![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) - -## Documentación e recursos - -- Web oficial da app: -- Documentación oficial para usuarias: -- Documentación oficial para admin: -- Repositorio de orixe do código: -- Tenda YunoHost: -- Informar dun problema: - -## Info de desenvolvemento - -Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). - -Para probar a rama `testing`, procede deste xeito: - -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -ou -sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -``` - -**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md deleted file mode 100644 index a7296d3..0000000 --- a/README_zh_Hans.md +++ /dev/null @@ -1,85 +0,0 @@ - - -# YunoHost 的 flohmarkt - -[![集成程度](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![工作状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) - -[![使用 YunoHost 安装 flohmarkt](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) - -*[阅读此 README 的其它语言版本。](./ALL_README.md)* - -> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 flohmarkt。* -> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* - -## 概况 - -## A decentral federated small advertisement platform - -flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. - -Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). - -To register it's necessary to provide an email address to which a confirmation link is send. - -Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. - -## Federation - -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". - -The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. - -Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. - -It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. - -## Federation between flohmarkts - -At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. - -This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. - -This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. - -## More information - -Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. - -* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) -* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) -* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) - - -**分发版本:** 0.0~ynh3 - -**演示:** - -## 截图 - -![flohmarkt 的截图](./doc/screenshots/screenshot.png) - -## 文档与资源 - -- 官方应用网站: -- 官方用户文档: -- 官方管理文档: -- 上游应用代码库: -- YunoHost 商店: -- 报告 bug: - -## 开发者信息 - -请向 [`testing` 分支](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing) 发送拉取请求。 - -如要尝试 `testing` 分支,请这样操作: - -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -或 -sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug -``` - -**有关应用打包的更多信息:** From 703ec83ba086b694a477ac547edf00b7bda8893b Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Thu, 9 May 2024 13:59:24 +0200 Subject: [PATCH 12/41] increased ynh4 to ynh5 this will be the release - wherever I messed up the counting ;-) --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index aa5b064..b588479 100644 --- a/manifest.toml +++ b/manifest.toml @@ -6,7 +6,7 @@ id = "flohmarkt" name = "flohmarkt" description.en = "A decentral federated small ads platform" -version = "0.0~ynh4" +version = "0.0~ynh5" maintainers = ["Chris Vogel"] From eafaed5b8bd4e154fbbc847c2d0e5eac79153910 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Thu, 9 May 2024 14:00:54 +0200 Subject: [PATCH 13/41] version naming same as in manifest --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 12f225e..d20d8bc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ ynh_systemd_action --service_name=couchdb --action="stop" # Upgrade ynh4 → ynh5, change of paths and filenames # https://matrix.to/#/!PauySEslPVuJCJCwlZ:matrix.org/$auU_rSL6MACt9wkyFGlCQbO8ivFlU0ztYW74TimZdcM?via=matrix.org&via=aria-net.org&via=sans-nuage.fr # and follow-ups -if ynh_compare_current_package_version --comparison lt --version 0.00~ynh5 && +if ynh_compare_current_package_version --comparison lt --version 0.0~ynh5 && ( [[ "$upgrade_type" == UPGRADE_PACKAGE ]] || [[ "$upgrade_type" == UPGRADE_APP ]] ) then flohmarkt_ynh_upgrade_path_ynh5 From 03c9d5e3e205f44e9f979187d1e938bf49c6297e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 9 May 2024 12:02:03 +0000 Subject: [PATCH 14/41] Auto-update READMEs --- README.md | 29 +++++++++++- README_eu.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_gl.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 467 insertions(+), 2 deletions(-) create mode 100644 README_eu.md create mode 100644 README_fr.md create mode 100644 README_gl.md create mode 100644 README_zh_Hans.md diff --git a/README.md b/README.md index cc2e060..802ebd8 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Shipped version:** 0.0~ynh3 +**Shipped version:** 0.0~ynh5 **Demo:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Antifeatures + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..add47e0 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,110 @@ + + +# flohmarkt YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalatu flohmarkt YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek flohmarkt YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Paketatutako bertsioa:** 0.0~ynh5 + +**Demoa:** + +## Pantaila-argazkiak + +![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Ezaugarri zalantzagarriak + +- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. +- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia. + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +edo +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..e890133 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,110 @@ + + +# flohmarkt pour YunoHost + +[![Niveau d’intégration](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Installer flohmarkt avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Lire le README dans d'autres langues.](./ALL_README.md)* + +> *Ce package vous permet d’installer flohmarkt rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* + +## Vue d’ensemble + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Version incluse :** 0.0~ynh5 + +**Démo :** + +## Captures d’écran + +![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) + +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Anti-fonctionnalités + +- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. +- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README. + +## Documentations et ressources + +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Pour essayer la branche `testing`, procédez comme suit : + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..9ff35fb --- /dev/null +++ b/README_gl.md @@ -0,0 +1,110 @@ + + +# flohmarkt para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalar flohmarkt con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar flohmarkt de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Versión proporcionada:** 0.0~ynh5 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) + +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Debes considerar + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..55c1abb --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,110 @@ + + +# YunoHost 上的 flohmarkt + +[![集成程度](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![工作状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![使用 YunoHost 安装 flohmarkt](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 flohmarkt。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**分发版本:** 0.0~ynh5 + +**演示:** + +## 截图 + +![flohmarkt 的截图](./doc/screenshots/screenshot.png) + +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: 负面特征 + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +或 +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From c3973976ccee3b15fd69c85bee47bd554429fa60 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 09:15:22 +0200 Subject: [PATCH 15/41] improvements to upgrade --- conf/05-flohmarkt.ini | 2 -- conf/flohmarkt.conf | 1 - conf/systemd.service | 2 ++ scripts/_common.sh | 37 ++++++++++++++++++++++++++++++++++++- scripts/install | 22 +++++----------------- scripts/restore | 25 +++---------------------- scripts/upgrade | 27 ++++++++------------------- 7 files changed, 54 insertions(+), 62 deletions(-) diff --git a/conf/05-flohmarkt.ini b/conf/05-flohmarkt.ini index c85771c..206698c 100644 --- a/conf/05-flohmarkt.ini +++ b/conf/05-flohmarkt.ini @@ -1,5 +1,3 @@ [chttpd] ; prevent non admin users to be able to access the list of all databases admin_only_all_dbs = true - -; port = __##PORT_COUCHDB__ diff --git a/conf/flohmarkt.conf b/conf/flohmarkt.conf index a32025b..14daab3 100644 --- a/conf/flohmarkt.conf +++ b/conf/flohmarkt.conf @@ -10,7 +10,6 @@ UseHttps = 0 Host = 127.0.0.1 User = __APP__ Password = __PASSWORD_COUCHDB_FLOHMARKT__ -# Port = __##PORT_COUCHDB__ Port = 5984 Database = __APP__ diff --git a/conf/systemd.service b/conf/systemd.service index 79938cb..2820248 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,6 +9,8 @@ Group=__APP__ WorkingDirectory=__FLOHMARKT_APP_DIR__ Environment="VENV_DIR=__FLOHMARKT_VENV_DIR__" ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --host 127.0.0.1 --port __PORT__ flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" +Restart=on-failure +RestartSec=5s # nicer logfile naming https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/38 StandardOutput=append:__FLOHMARKT_LOGFILE__ StandardError=inherit diff --git a/scripts/_common.sh b/scripts/_common.sh index 0d5b70d..e5b93ce 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -53,14 +53,49 @@ flohmarkt_ynh_set_permission() { chmod g-w,o-rwx -R "$flohmarkt_install" } +# start flohmarkt service flohmarkt_ynh_start_service() { ynh_systemd_action --service_name=$flohmarkt_filename --action="start" \ --line_match='INFO: *Application startup complete.' --log_path="$flohmarkt_logfile" \ --timeout=30 } +# stop flohmarkt service flohmarkt_ynh_stop_service() { - ynh_systemd_action --service_name=$app --action="stop" + ynh_systemd_action --service_name=$flohmarkt_filename --action="stop" +} + +# start couchdb and wait for success +flohmarkt_ynh_start_couchdb() { + ynh_systemd_action --service_name=couchdb --action="start" --timeout=30 \ + --log_path="/var/log/couchdb/couchdb.log" \ + --line_match='Apache CouchDB has started on http://127.0.0.1' +} + +# stop couchdb +flohmarkt_ynh_stop_couchdb() { + ynh_systemd_action --service_name=couchdb --action="stop" --timeout=30 \ + --log_path="/var/log/couchdb/couchdb.log" \ + --line_match='SIGTERM received - shutting down' +} + +# install or upgrade couchdb +flohmarkt_ynh_up_inst_couchdb() { + echo "\ + couchdb couchdb/mode select standalone + couchdb couchdb/mode seen true + couchdb couchdb/bindaddress string 127.0.0.1 + couchdb couchdb/bindaddress seen true + couchdb couchdb/cookie string $couchdb_magic_cookie + couchdb couchdb/adminpass password $password_couchdb_admin + couchdb couchdb/adminpass seen true + couchdb couchdb/adminpass_again password $password_couchdb_admin + couchdb couchdb/adminpass_again seen true" | debconf-set-selections + DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb + ynh_install_extra_app_dependencies \ + --repo="deb https://apache.jfrog.io/artifactory/couchdb-deb/ $(lsb_release -c -s) main" \ + --key="https://couchdb.apache.org/repo/keys.asc" \ + --package="couchdb" } # create venv diff --git a/scripts/install b/scripts/install index 971c760..eb7fd65 100755 --- a/scripts/install +++ b/scripts/install @@ -33,22 +33,11 @@ ynh_script_progression --message="Installing CouchDB..." --weight=60 couchdb_magic_cookie=$(ynh_string_random --length=23 --filter='A-Za-z0-9_') ynh_app_setting_set --app=$app --key=couchdb_magic_cookie --value="$couchdb_magic_cookie" -echo "\ -couchdb couchdb/mode select standalone -couchdb couchdb/mode seen true -couchdb couchdb/bindaddress string 127.0.0.1 -couchdb couchdb/bindaddress seen true -couchdb couchdb/cookie string $couchdb_magic_cookie -couchdb couchdb/adminpass password $password_couchdb_admin -couchdb couchdb/adminpass seen true -couchdb couchdb/adminpass_again password $password_couchdb_admin -couchdb couchdb/adminpass_again seen true" | debconf-set-selections -DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb +# update couchdb dpkg +flohmarkt_ynh_up_inst_couchdb -ynh_install_extra_app_dependencies \ - --repo="deb https://apache.jfrog.io/artifactory/couchdb-deb/ $(lsb_release -c -s) main" \ - --key="https://couchdb.apache.org/repo/keys.asc" \ - --package="couchdb" +# stop couchdb +flohmarkt_ynh_stop_couchdb # add couchdb configuration ynh_script_progression --message="Adding a configuration file..." --weight=2 @@ -58,8 +47,7 @@ chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini # restart couchdb to pick up changes -systemctl restart couchdb -systemctl status couchdb +flohmarkt_ynh_start_couchdb # get flohmarkt # suspecting that this deletes all other sources for YNH_APP_ID diff --git a/scripts/restore b/scripts/restore index 2c27d3f..9921e58 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,26 +10,8 @@ ynh_restore_file --origin_path="/var/lib/couchdb" # reinstall couchdb ynh_script_progression --message="Reinstalling couchdb..." --weight=40 - -echo "\ -couchdb couchdb/mode select standalone -couchdb couchdb/mode seen true -couchdb couchdb/bindaddress string 127.0.0.1 -couchdb couchdb/bindaddress seen true -couchdb couchdb/cookie string $couchdb_magic_cookie -couchdb couchdb/adminpass password $password_couchdb_admin -couchdb couchdb/adminpass seen true -couchdb couchdb/adminpass_again password $password_couchdb_admin -couchdb couchdb/adminpass_again seen true" | debconf-set-selections -DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb - -ynh_install_extra_app_dependencies \ - --repo="deb https://apache.jfrog.io/artifactory/couchdb-deb/ $(lsb_release -c -s) main" \ - --key="https://couchdb.apache.org/repo/keys.asc" \ - --package="couchdb" - -# stop couchdb -systemctl stop couchdb +flohmarkt_ynh_up_inst_couchdb +flohmarkt_ynh_stop_couchdb # add couchdb configuration ynh_script_progression --message="Adding a configuration file..." --weight=2 @@ -38,8 +20,7 @@ chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini # start couchdb -systemctl start couchdb -systemctl status couchdb +flohmarkt_ynh_start_couchdb # RESTORE THE APP MAIN DIR ynh_script_progression --message="Restoring the app main directory..." --weight=10 diff --git a/scripts/upgrade b/scripts/upgrade index d20d8bc..76e394f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,7 @@ ynh_script_progression --message="Stopping flohmarkt and CouchDB..." --weight=5 # stop flohmarkt flohmarkt_ynh_stop_service # stop couchdb -ynh_systemd_action --service_name=couchdb --action="stop" +flohmarkt_ynh_stop_couchdb # Upgrade ynh4 → ynh5, change of paths and filenames # https://matrix.to/#/!PauySEslPVuJCJCwlZ:matrix.org/$auU_rSL6MACt9wkyFGlCQbO8ivFlU0ztYW74TimZdcM?via=matrix.org&via=aria-net.org&via=sans-nuage.fr @@ -30,21 +30,11 @@ fi # upgrade couchdb ynh_script_progression --message="Upgrading CouchDB..." --weight=50 -echo "\ -couchdb couchdb/mode select standalone -couchdb couchdb/mode seen true -couchdb couchdb/bindaddress string 127.0.0.1 -couchdb couchdb/bindaddress seen true -couchdb couchdb/cookie string $couchdb_magic_cookie -couchdb couchdb/adminpass password $password_couchdb_admin -couchdb couchdb/adminpass seen true -couchdb couchdb/adminpass_again password $password_couchdb_admin -couchdb couchdb/adminpass_again seen true" | debconf-set-selections -DEBIAN_FRONTEND=noninteractive # apt-get install -y --force-yes couchdb -ynh_install_extra_app_dependencies \ - --repo="deb https://apache.jfrog.io/artifactory/couchdb-deb/ $(lsb_release -c -s) main" \ - --key="https://couchdb.apache.org/repo/keys.asc" \ - --package="couchdb" +flohmarkt_ynh_up_inst_couchdb + +# stop couchdb +ynh_script_progression --message="Stop couchdb before updating configuration file..." --weight=1 +flohmarkt_ynh_stop_couchdb # upgrade couchdb config ynh_script_progression --message="Updating couchdb configuration file..." --weight=1 @@ -52,10 +42,9 @@ ynh_add_config --template="../conf/05-flohmarkt.ini" --destination="/opt/couchdb chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini -# start couchdb to pick up changes +# start couchdb ynh_script_progression --message="Starting couchdb..." --weight=1 -ynh_systemd_action --service_name=couchdb --action="start" -systemctl status couchdb +flohmarkt_ynh_start_couchdb # install upgrade for flohmarkt ynh_script_progression --message="Upgrading flohmarkt..." --weight=4 From 46896e78fc95c885247d76676e1b504ada80a959 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 07:16:05 +0000 Subject: [PATCH 16/41] Auto-update READMEs --- README.md | 29 +++++++++++- README_eu.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_gl.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 467 insertions(+), 2 deletions(-) create mode 100644 README_eu.md create mode 100644 README_fr.md create mode 100644 README_gl.md create mode 100644 README_zh_Hans.md diff --git a/README.md b/README.md index cc2e060..802ebd8 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Shipped version:** 0.0~ynh3 +**Shipped version:** 0.0~ynh5 **Demo:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Antifeatures + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..add47e0 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,110 @@ + + +# flohmarkt YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalatu flohmarkt YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek flohmarkt YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Paketatutako bertsioa:** 0.0~ynh5 + +**Demoa:** + +## Pantaila-argazkiak + +![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Ezaugarri zalantzagarriak + +- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. +- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia. + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +edo +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..e890133 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,110 @@ + + +# flohmarkt pour YunoHost + +[![Niveau d’intégration](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Installer flohmarkt avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Lire le README dans d'autres langues.](./ALL_README.md)* + +> *Ce package vous permet d’installer flohmarkt rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* + +## Vue d’ensemble + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Version incluse :** 0.0~ynh5 + +**Démo :** + +## Captures d’écran + +![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) + +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Anti-fonctionnalités + +- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. +- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README. + +## Documentations et ressources + +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Pour essayer la branche `testing`, procédez comme suit : + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..9ff35fb --- /dev/null +++ b/README_gl.md @@ -0,0 +1,110 @@ + + +# flohmarkt para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalar flohmarkt con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar flohmarkt de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Versión proporcionada:** 0.0~ynh5 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) + +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Debes considerar + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..55c1abb --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,110 @@ + + +# YunoHost 上的 flohmarkt + +[![集成程度](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![工作状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![使用 YunoHost 安装 flohmarkt](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 flohmarkt。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**分发版本:** 0.0~ynh5 + +**演示:** + +## 截图 + +![flohmarkt 的截图](./doc/screenshots/screenshot.png) + +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: 负面特征 + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +或 +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From 5cca8a21eca66e7ed66a96816db59539648d8045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 May 2024 10:21:52 +0200 Subject: [PATCH 17/41] fix linter --- doc/ADMIN.md | 19 +++++++++++++++++++ doc/DISCLAIMER.md | 17 ----------------- scripts/restore | 2 +- 3 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 doc/DISCLAIMER.md diff --git a/doc/ADMIN.md b/doc/ADMIN.md index bd1e1fc..9173cdc 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -5,3 +5,22 @@ Flohmarkt is not initialized yet. Please go to https://flohmarkt.test/setup/ in order to complete the setup process ``` + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 98f0738..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,17 +0,0 @@ -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) diff --git a/scripts/restore b/scripts/restore index 9921e58..2cd0c78 100755 --- a/scripts/restore +++ b/scripts/restore @@ -62,7 +62,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_script_progression --message="Restoring flohmarkt.service and integrating service into YunoHost..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/$flohmarkt_filename.service" ynh_systemd_action --action=enable --service_name=$flohmarkt_filename -yunohost service add $app --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" +yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" flohmarkt_ynh_start_service # RELOAD NGINX From 01ab9d666589c1771fda5776410db379091d1765 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 11:07:42 +0200 Subject: [PATCH 18/41] ironing out errors and warnings --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index eb7fd65..bac6fc6 100755 --- a/scripts/install +++ b/scripts/install @@ -100,11 +100,13 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" # logfile contains possibly the secret setup URL +ynh_script_progression --message="Setting permissions on logfile..." --weight=2 mkdir -m755 -p "$flohmarkt_log_dir" touch "$flohmarkt_logfile" chmod 640 "$flohmarkt_logfile" # set file permissions for install dir +ynh_script_progression --message="Setting permissions on install directory..." --weight=2 flohmarkt_ynh_set_permission # SETUP FAIL2BAN @@ -113,10 +115,14 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: + Date: Fri, 10 May 2024 09:08:12 +0000 Subject: [PATCH 19/41] Auto-update READMEs --- README.md | 29 +++++++++++- README_eu.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_gl.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 467 insertions(+), 2 deletions(-) create mode 100644 README_eu.md create mode 100644 README_fr.md create mode 100644 README_gl.md create mode 100644 README_zh_Hans.md diff --git a/README.md b/README.md index cc2e060..802ebd8 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Registered users can access a simple form to publish there small ads. The small ## Federation -To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account". +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. @@ -53,7 +53,7 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so * [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) -**Shipped version:** 0.0~ynh3 +**Shipped version:** 0.0~ynh5 **Demo:** @@ -61,6 +61,31 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Antifeatures + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + ## Documentation and resources - Official app website: diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..add47e0 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,110 @@ + + +# flohmarkt YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalatu flohmarkt YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek flohmarkt YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Paketatutako bertsioa:** 0.0~ynh5 + +**Demoa:** + +## Pantaila-argazkiak + +![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Ezaugarri zalantzagarriak + +- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. +- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia. + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +edo +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..e890133 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,110 @@ + + +# flohmarkt pour YunoHost + +[![Niveau d’intégration](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Installer flohmarkt avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Lire le README dans d'autres langues.](./ALL_README.md)* + +> *Ce package vous permet d’installer flohmarkt rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* + +## Vue d’ensemble + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Version incluse :** 0.0~ynh5 + +**Démo :** + +## Captures d’écran + +![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) + +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Anti-fonctionnalités + +- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. +- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README. + +## Documentations et ressources + +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Pour essayer la branche `testing`, procédez comme suit : + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..9ff35fb --- /dev/null +++ b/README_gl.md @@ -0,0 +1,110 @@ + + +# flohmarkt para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![Instalar flohmarkt con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar flohmarkt de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**Versión proporcionada:** 0.0~ynh5 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) + +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: Debes considerar + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +ou +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..55c1abb --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,110 @@ + + +# YunoHost 上的 flohmarkt + +[![集成程度](https://dash.yunohost.org/integration/flohmarkt.svg)](https://dash.yunohost.org/appci/app/flohmarkt) ![工作状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/flohmarkt.maintain.svg) + +[![使用 YunoHost 安装 flohmarkt](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flohmarkt) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 flohmarkt。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +## A decentral federated small advertisement platform + +flohmarkt provides its own http server that can be used stand-alone to show small ads that registered users may publish. + +Registration works through the server itself and can be switched off (to run a server for e.g. only one person or only the persons that had been registered until that moment). + +To register it's necessary to provide an email address to which a confirmation link is send. + +Registered users can access a simple form to publish there small ads. The small ads can be looked at by anybody who is able to reach the website. + +## Federation + +To communicate with someone who published a small ad the server hints to an unregistred user _"To answer this offer please log in or create an account. OR use another fediverse-account"._ + +The small add visited turns out to be a _note_ in the fediverse. It's url can be opened with your favourite fediverse client at the server you're already registered to. You then can boost the small ad like any other note you read. + +Or you can use your account to answer the author of the small ad if - and only if - you mark your note as 'private' aka 'direct'. This way you can contact the person. + +It's also possible to follow accounts on flohmarkt servers like any other account in the fediverse to get new small ads published by that account in your timeline. + +## Federation between flohmarkts + +At time of installation the software asks for the coordinates of the community it should be for and the radius it should be used in. + +This is an offer to help make the goods that might be offered travel less far. A flohmarkt can manually federate with other flohmarkts in its range showing all their goods on its page. + +This is not ment to be a restriction, but a nudging to build local communities. These would have the advantage that people could trust each other more, because trades face-to-face could be more common. + +## More information + +Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good source of information. + +* [presentation at ChaosCamp 2023](https://media.ccc.de/v/camp2023-57168-flohmarkt#l=eng&t=213) +* [list of known instances on the wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances) +* [Service compatibility chart](https://codeberg.org/flohmarkt/flohmarkt/wiki/Service-compatibility-chart) + + +**分发版本:** 0.0~ynh5 + +**演示:** + +## 截图 + +![flohmarkt 的截图](./doc/screenshots/screenshot.png) + +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + +## :red_circle: 负面特征 + +- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. +- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +或 +sudo yunohost app upgrade flohmarkt -u https://github.com/YunoHost-Apps/flohmarkt_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From e21ccf23f7917eebdeb89912221c1d7ca7b3a641 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 09:17:31 +0000 Subject: [PATCH 20/41] Auto-update READMEs --- README.md | 20 -------------------- README_eu.md | 20 -------------------- README_fr.md | 20 -------------------- README_gl.md | 20 -------------------- README_zh_Hans.md | 20 -------------------- 5 files changed, 100 deletions(-) diff --git a/README.md b/README.md index 802ebd8..298cf48 100644 --- a/README.md +++ b/README.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Antifeatures - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_eu.md b/README_eu.md index add47e0..a9fba4c 100644 --- a/README_eu.md +++ b/README_eu.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) -## Ezespena / informazio garrantzitsua - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Ezaugarri zalantzagarriak - **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. diff --git a/README_fr.md b/README_fr.md index e890133..b16b0d2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Anti-fonctionnalités - **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. diff --git a/README_gl.md b/README_gl.md index 9ff35fb..c7d4fd2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) -## Avisos / información importante - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Debes considerar - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 55c1abb..b2798af 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt 的截图](./doc/screenshots/screenshot.png) -## 免责声明 / 重要信息 - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: 负面特征 - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. From 4970b86bda97a936d7be1826e480887f32bb8754 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 11:24:58 +0200 Subject: [PATCH 21/41] restore DISCLAIMER --- doc/DISCLAIMER.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/DISCLAIMER.md diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..98f0738 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,17 @@ +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) From 3ce18dfa9d36cfaa1bd3345d79ba58d55dcd0ca9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 09:26:28 +0000 Subject: [PATCH 22/41] Auto-update READMEs --- README.md | 20 ++++++++++++++++++++ README_eu.md | 20 ++++++++++++++++++++ README_fr.md | 20 ++++++++++++++++++++ README_gl.md | 20 ++++++++++++++++++++ README_zh_Hans.md | 20 ++++++++++++++++++++ 5 files changed, 100 insertions(+) diff --git a/README.md b/README.md index 298cf48..802ebd8 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) +## Disclaimers / important information + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## :red_circle: Antifeatures - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_eu.md b/README_eu.md index a9fba4c..add47e0 100644 --- a/README_eu.md +++ b/README_eu.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) +## Ezespena / informazio garrantzitsua + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## :red_circle: Ezaugarri zalantzagarriak - **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. diff --git a/README_fr.md b/README_fr.md index b16b0d2..e890133 100644 --- a/README_fr.md +++ b/README_fr.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) +## Avertissements / informations importantes + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## :red_circle: Anti-fonctionnalités - **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. diff --git a/README_gl.md b/README_gl.md index c7d4fd2..9ff35fb 100644 --- a/README_gl.md +++ b/README_gl.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) +## Avisos / información importante + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## :red_circle: Debes considerar - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_zh_Hans.md b/README_zh_Hans.md index b2798af..55c1abb 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -61,6 +61,26 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt 的截图](./doc/screenshots/screenshot.png) +## 免责声明 / 重要信息 + +## support + +For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). + +To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). + +## bugs, requesting features + +Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues + +## upstream repository + +The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . + +Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. + +More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) + ## :red_circle: 负面特征 - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. From 17f3faca1559919d4baf73842e0a683df851e91f Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 11:49:24 +0200 Subject: [PATCH 23/41] remove unneeded file --- run-uvicorn.example | 55 --------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 run-uvicorn.example diff --git a/run-uvicorn.example b/run-uvicorn.example deleted file mode 100644 index a203da5..0000000 --- a/run-uvicorn.example +++ /dev/null @@ -1,55 +0,0 @@ -/opt/flohmarkt/venv/bin/uvicorn --host 127.0.0.1 --port 8000 --reload --log-config logger.json flohmarkt.web:start - -Fehler: - -Traceback (most recent call last): - File "/usr/lib/python3.9/logging/config.py", line 385, in resolve - found = self.importer(used) -ModuleNotFoundError: No module named 'pythonjsonlogger' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "/usr/lib/python3.9/logging/config.py", line 543, in configure - formatters[name] = self.configure_formatter( - File "/usr/lib/python3.9/logging/config.py", line 655, in configure_formatter - result = self.configure_custom(config) - File "/usr/lib/python3.9/logging/config.py", line 470, in configure_custom - c = self.resolve(c) - File "/usr/lib/python3.9/logging/config.py", line 398, in resolve - raise v - File "/usr/lib/python3.9/logging/config.py", line 385, in resolve - found = self.importer(used) -ValueError: Cannot resolve 'pythonjsonlogger.jsonlogger.JsonFormatter': No module named 'pythonjsonlogger' - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "/opt/flohmarkt/venv/bin/uvicorn", line 8, in - sys.exit(main()) - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__ - return self.main(*args, **kwargs) - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main - rv = self.invoke(ctx) - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke - return ctx.invoke(self.callback, **ctx.params) - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke - return __callback(*args, **kwargs) - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/uvicorn/main.py", line 404, in main - run( - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/uvicorn/main.py", line 506, in run - config = Config( - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/uvicorn/config.py", line 299, in __init__ - self.configure_logging() - File "/opt/flohmarkt/venv/lib/python3.9/site-packages/uvicorn/config.py", line 411, in configure_logging - logging.config.dictConfig(loaded_config) - File "/usr/lib/python3.9/logging/config.py", line 809, in dictConfig - dictConfigClass(config).configure() - File "/usr/lib/python3.9/logging/config.py", line 546, in configure - raise ValueError('Unable to configure ' -ValueError: Unable to configure formatter 'json' - -(venv) root@yt:/opt/flohmarkt/flohmarkt# pip install python-json-logger -Requirement already satisfied: python-json-logger in /usr/lib/python3.9/site-packages (2.0.7) - -Ausgabe in json will ich eigentlich auch nicht falls das in der config steht. Der Kram ist aber so dokumentiert, dass ich ihn nicht verstehe... From 1b0e3e3846336e89f2a3873db4d0184139a80d1b Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 11:50:25 +0200 Subject: [PATCH 24/41] remove un-needed file --- logger.json | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 logger.json diff --git a/logger.json b/logger.json deleted file mode 100644 index cc0676e..0000000 --- a/logger.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": 1, - "disable_existing_loggers": false, - "formatters": { - "json": { - "()": "pythonjsonlogger.jsonlogger.JsonFormatter", - "fmt": "%(asctime)s %(name)s %(levelname)s %(message)s" - } - }, - "handlers": { - "stderr": { - "formatter": "json", - "class": "logging.StreamHandler", - "stream": "ext://sys.stderr" - }, - "stdout": { - "formatter": "json", - "class": "logging.StreamHandler", - "stream": "ext://sys.stdout" - } - }, - "loggers": { - "uvicorn": {"handlers": ["stderr"], "level": "INFO", "propagate": false}, - "uvicorn.error": {"level": "INFO"}, - "uvicorn.access": {"handlers": ["stdout"], "level": "INFO", "propagate": false} - } -} From 4daa678ca40bfae0e7ed48a43124c69fbcb32495 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 13:07:21 +0200 Subject: [PATCH 25/41] testing --- doc/DISCLAIMER.md | 17 ----------------- scripts/install | 6 ++++-- 2 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 doc/DISCLAIMER.md diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 98f0738..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,17 +0,0 @@ -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) diff --git a/scripts/install b/scripts/install index bac6fc6..5b91e33 100755 --- a/scripts/install +++ b/scripts/install @@ -102,8 +102,9 @@ yunohost service add $flohmarkt_filename --description="A decentral federated sm # logfile contains possibly the secret setup URL ynh_script_progression --message="Setting permissions on logfile..." --weight=2 mkdir -m755 -p "$flohmarkt_log_dir" -touch "$flohmarkt_logfile" -chmod 640 "$flohmarkt_logfile" +touch "$flohmarkt_logfile"a +chown root:$app "$flohmarkt_logfile" +chmod 660 "$flohmarkt_logfile" # set file permissions for install dir ynh_script_progression --message="Setting permissions on install directory..." --weight=2 @@ -121,6 +122,7 @@ ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" # start service ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1 +ps axuf ls -l $flohmarkt_logfile /bin/bash /usr/bin/bash || true ynh_script_progression --message="Starting flohmarkt..." --weight=10 flohmarkt_ynh_start_service From a97f31a50b41a9c38f219f6a268be8edf8f88b0e Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 13:11:02 +0200 Subject: [PATCH 26/41] gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab1a32b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +README* From 223ea4058e5f3636750a0d57147a08944ea239e0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 11:11:25 +0000 Subject: [PATCH 27/41] Auto-update READMEs --- README.md | 20 -------------------- README_eu.md | 20 -------------------- README_fr.md | 20 -------------------- README_gl.md | 20 -------------------- README_zh_Hans.md | 20 -------------------- 5 files changed, 100 deletions(-) diff --git a/README.md b/README.md index 802ebd8..298cf48 100644 --- a/README.md +++ b/README.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Screenshot of flohmarkt](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Antifeatures - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_eu.md b/README_eu.md index add47e0..a9fba4c 100644 --- a/README_eu.md +++ b/README_eu.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) -## Ezespena / informazio garrantzitsua - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Ezaugarri zalantzagarriak - **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasuneko arazoak izan ditzazke. diff --git a/README_fr.md b/README_fr.md index e890133..b16b0d2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Capture d’écran de flohmarkt](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Anti-fonctionnalités - **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité. diff --git a/README_gl.md b/README_gl.md index 9ff35fb..c7d4fd2 100644 --- a/README_gl.md +++ b/README_gl.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![Captura de pantalla de flohmarkt](./doc/screenshots/screenshot.png) -## Avisos / información importante - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: Debes considerar - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 55c1abb..b2798af 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -61,26 +61,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so ![flohmarkt 的截图](./doc/screenshots/screenshot.png) -## 免责声明 / 重要信息 - -## support - -For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). - -To get help for **flohmarkt** itself please look at its [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki), [open an issue](https://codeberg.org/flohmarkt/flohmarkt/issues) with your request or join the [IRC channel flohmarkt](https://web.libera.chat/?nick=GithubGuest?#flohmarkt) on [libera.chat](https://libera.chat/). - -## bugs, requesting features - -Please use the issue tracker at https://codeberg.org/flohmarkt/flohmarkt_ynh/issues - -## upstream repository - -The yunohost integration of **flohmarkt** is developed by the flohmarkt organization on https://codeberg.org/ . - -Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in development. - -More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) - ## :red_circle: 负面特征 - **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability. From 183fab287fb9fc0a3f3e867f609bad18acd93fe1 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 13:12:35 +0200 Subject: [PATCH 28/41] moved to POST_INSTALL --- doc/ADMIN.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 9173cdc..f5d23a1 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,11 +1,3 @@ -After installation, look at /var/log/flohmarkt/flohmarkt.log to find the setup URL. The message should look like this: - -``` -Flohmarkt is not initialized yet. Please go to - https://flohmarkt.test/setup/ - in order to complete the setup process -``` - ## support For questions about running flohmarkt on yunohost please use the [yunohost support matrix channel](https://yunohost.org/en/chat_rooms#help-and-support-chat-roo) or the [forum](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455?u=chrichri). From cd2eea1abbc2d7ec0bc1829b2a4204bc5ec4e64d Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 13:24:10 +0200 Subject: [PATCH 29/41] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 5b91e33..3cb3114 100755 --- a/scripts/install +++ b/scripts/install @@ -102,7 +102,7 @@ yunohost service add $flohmarkt_filename --description="A decentral federated sm # logfile contains possibly the secret setup URL ynh_script_progression --message="Setting permissions on logfile..." --weight=2 mkdir -m755 -p "$flohmarkt_log_dir" -touch "$flohmarkt_logfile"a +touch "$flohmarkt_logfile" chown root:$app "$flohmarkt_logfile" chmod 660 "$flohmarkt_logfile" From 101ad9f73e97f83de1cf94eb3d62265d18565dd2 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Fri, 10 May 2024 20:07:51 +0200 Subject: [PATCH 30/41] RAM, factory option for uvicorn --- conf/systemd.service | 2 +- manifest.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 2820248..697a162 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__FLOHMARKT_APP_DIR__ Environment="VENV_DIR=__FLOHMARKT_VENV_DIR__" -ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --host 127.0.0.1 --port __PORT__ flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" +ExecStart=/bin/bash -c "__FLOHMARKT_VENV_DIR__/bin/uvicorn --factory --host 127.0.0.1 --port __PORT__ flohmarkt.web:start 2>&1 | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%S'" Restart=on-failure RestartSec=5s # nicer logfile naming https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/38 diff --git a/manifest.toml b/manifest.toml index b588479..e09ec27 100644 --- a/manifest.toml +++ b/manifest.toml @@ -44,7 +44,7 @@ ldap = false sso = false # **estimate** minimum disk and RAM requirements -disk = "100M" +disk = "200M" ram.build = "200M" ram.runtime = "100M" From 1beb2622e9291f5e949ed4ee2d02345f00781f63 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 12 May 2024 15:41:47 +0000 Subject: [PATCH 31/41] Auto-update READMEs --- ALL_README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ALL_README.md b/ALL_README.md index a01b345..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lee el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) From b7292ff44e8da5165e00caae1e66559ea37a375f Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Mon, 13 May 2024 12:29:10 +0200 Subject: [PATCH 32/41] debugging added find reason for warnings --- scripts/install | 6 +++++- scripts/remove | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 3cb3114..cc9ab52 100755 --- a/scripts/install +++ b/scripts/install @@ -1,5 +1,7 @@ #!/bin/bash +ps axf # debug + # IMPORT GENERIC HELPERS source _common.sh source /usr/share/yunohost/helpers @@ -93,11 +95,13 @@ ynh_add_nginx_config # systemd.service ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ps axf # debug # Create a dedicated systemd config ynh_add_systemd_config --service=$flohmarkt_filename # integrate into yunohost ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" +ps axf # debug # logfile contains possibly the secret setup URL ynh_script_progression --message="Setting permissions on logfile..." --weight=2 @@ -122,7 +126,7 @@ ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" # start service ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1 -ps axuf +ps axuf # debug ls -l $flohmarkt_logfile /bin/bash /usr/bin/bash || true ynh_script_progression --message="Starting flohmarkt..." --weight=10 flohmarkt_ynh_start_service diff --git a/scripts/remove b/scripts/remove index e36a509..54aaac9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -24,7 +24,7 @@ yunohost service stop $flohmarkt_filename if ynh_exec_warn_less yunohost service status $flohmarkt_filename >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=2 - yunohost service remove $flohmarkt_filename + ynh_remove_systemd_config --service=$flohmarkt_filename fi # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 @@ -67,3 +67,6 @@ ynh_secure_remove "$flohmarkt_sym_data_dir" #================================================= ynh_script_progression --message="Removal of $app completed" --last + +# debug +ps -axf From 74f40685b53b4875507e6d87d92e50da64eabf66 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 14 May 2024 09:53:23 +0200 Subject: [PATCH 33/41] french description, added yunohost service remove --- manifest.toml | 1 + scripts/remove | 1 + 2 files changed, 2 insertions(+) diff --git a/manifest.toml b/manifest.toml index e09ec27..8ee3751 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,6 +5,7 @@ packaging_format = 2 id = "flohmarkt" name = "flohmarkt" description.en = "A decentral federated small ads platform" +description.fr = "Plateforme de petites annonces fédérées décentralisées" version = "0.0~ynh5" diff --git a/scripts/remove b/scripts/remove index 54aaac9..1e0268a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -25,6 +25,7 @@ if ynh_exec_warn_less yunohost service status $flohmarkt_filename >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=2 ynh_remove_systemd_config --service=$flohmarkt_filename + yunohost service remove $flohmarkt_filename fi # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 From 01a864eef12c6430982545b275afa8882eb4871d Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 14 May 2024 14:13:41 +0200 Subject: [PATCH 34/41] export/import couchdb 1st try --- scripts/_common.sh | 47 ++ scripts/backup | 17 +- scripts/couchdb-dump/LICENSE | 23 + scripts/couchdb-dump/README.md | 70 +++ scripts/couchdb-dump/couchdb-dump.sh | 780 +++++++++++++++++++++++++++ scripts/install | 5 - scripts/remove | 8 +- scripts/restore | 29 +- 8 files changed, 949 insertions(+), 30 deletions(-) create mode 100644 scripts/couchdb-dump/LICENSE create mode 100644 scripts/couchdb-dump/README.md create mode 100755 scripts/couchdb-dump/couchdb-dump.sh diff --git a/scripts/_common.sh b/scripts/_common.sh index e5b93ce..431abaa 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -98,6 +98,53 @@ flohmarkt_ynh_up_inst_couchdb() { --package="couchdb" } +flohmarkt_ynh_dump_couchdb() { + ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug + ../settings/scripts/couchdb-dump/couchdb-dump.sh -b -H 127.0.0.1 -d "${app}" \ + -u admin -p "${password_couchdb_admin}" > "${YNH_CWD}/${app}.json" || true +} + +flohmarkt_ynh_delete_couchdb_user() { + # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/46 - more than one revision? + local couchdb_user_revision=$( curl -sX GET "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}" \ + --user "admin:${password_couchdb_admin}" | jq -r ._rev ) + curl -s -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}?rev=${couchdb_user_revision}" \ + --user "admin:${password_couchdb_admin}" +} + +flohmarkt_ynh_delete_couchdb_db() { + curl -s -X DELETE "http://127.0.0.1:5984/${app}" --user "admin:${password_couchdb_admin}" +} + +flohmarkt_ynh_import_couchdb() { + ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug + ../settings/scripts/couchdb-dump/couchdb-dump.sh -r -c -H 127.0.0.1 -d "${app}" \ + -u admin -p "${password_couchdb_admin}" > "${YNH_CWD}/${app}.json" || true +} + +flohmarkt_ynh_create_couchdb_user() { + curl -X PUT "http://127.0.0.1:5984/_users/org.couchdb.user:${app}" --user "admin:${password_couchdb_admin}"\ + -H "Accept: application/json" -H "Content-Type: application/json" \ + -d "\{\"name\": \"${app}\", \"${password_couchdb_flohmarkt}\": \"\", \"roles\": \[\], \"type\": \"user\"\}" +} + +flohmarkt_ynh_couchdb_user_permissions() { + curl -X PUT "http://127.0.0.1:5984/${app}/_security" --user "admin:${password_couchdb_admin}"\ + -H "Accept: application/json" -H "Content-Type: application/json" \ + -d "\{\"members\":\{\"names\": \[\"${app}\"\],\"roles\": \[\"editor\"\]\}\}" + +} + +flohmarkt_ynh_restore_couchdb() { + # @@ todo for now we'll make sure dbuser and db do not exist + flohmarkt_ynh_delete_couchdb_user || true + flohmarkt_ynh_delete_couchdb_db || true + + flohmarkt_ynh_import_couchdb + flohmarkt_ynh_create_couchdb_user + flohmarkt_ynh_couchdb_user_permissions +} + # create venv flohmarkt_ynh_create_venv() { python3 -m venv --without-pip "$flohmarkt_venv_dir" diff --git a/scripts/backup b/scripts/backup index 856f3b5..2bd5042 100755 --- a/scripts/backup +++ b/scripts/backup @@ -16,8 +16,8 @@ ynh_backup --src_path="${flohmarkt_log_dir}" # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..." -yunohost service stop $flohmarkt_filename -systemctl stop couchdb +flohmarkt_ynh_stop_service +flohmarkt_ynh_stop_couchdb # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/24 # since this might be re-installed as a dependency during 'remove' and @@ -28,12 +28,15 @@ systemctl stop couchdb # # if this becomes a pain we'll need to stop deleting this directories on 'remove' # ynh_backup --src_path="$data_dir" --is_big -# ynh_backup --src_path="/var/lib/couchdb" --is_big ynh_backup --src_path="$flohmarkt_data_dir" -ynh_backup --src_path="/var/lib/couchdb" -ynh_print_info --message="...done. Starting couchdb and flohmarkt." -systemctl start couchdb +ynh_print_info --message="Starting couchdb..." +flohmarkt_ynh_start_couchdb + +ynh_print_info --message="Dumping couchdb..." +flohmarkt_ynh_dump_couchdb + +ynh_print_info --message="Starting flohmarkt..." flohmarkt_ynh_start_service -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app." diff --git a/scripts/couchdb-dump/LICENSE b/scripts/couchdb-dump/LICENSE new file mode 100644 index 0000000..4371187 --- /dev/null +++ b/scripts/couchdb-dump/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2015 Daniele Bailo - daniele@danielebailo.it - www.danielebailo.it + Darren Gibbard - dalgibbard@gmail.com - dgunix.com + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/scripts/couchdb-dump/README.md b/scripts/couchdb-dump/README.md new file mode 100644 index 0000000..25afc9f --- /dev/null +++ b/scripts/couchdb-dump/README.md @@ -0,0 +1,70 @@ +Couchdb-dump (& restore) +============ + +It works on LINUX/UNIX, Bash based systems (MacOSx) + +**Bash command line script to EASILY Backup & Restore a CouchDB database** + + * Needs bash (plus curl, tr, file, split, awk, sed) + * Dumped database is output to a file (configurable). + +## Quickstart (& quickend) +* Backup: + +```bash couchdb-dump.sh -b -H 127.0.0.1 -d my-db -f dumpedDB.json -u admin -p password``` + +* Restore: + +```bash couchdb-dump.sh -r -H 127.0.0.1 -d my-db -f dumpedDB.json -u admin -p password``` + +## Why do you need it? +Surprisingly, there is not a straightforward way to dump a CouchDB database. Often you are suggested to replicate it or to dump it with the couchdb `_all_docs` directive. + +**But, using the `_all_docs` directive provides you with JSON which cannot be directly re-import back into CouchDB**. + +Hence, the goal of this script(s) is to give you a simple way to Dump & Restore your CouchDB database. + +## NOTE + +Attachments in Database documents are only supported in CouchDB 1.6+ + +## Usage +``` +Usage: ./couchdb-dump.sh [-b|-r] -H -d -f [-u ] [-p ] [-P ] [-l ] [-t ] [-a ] + -b Run script in BACKUP mode. + -r Run script in RESTORE mode. + -H CouchDB Hostname or IP. Can be provided with or without 'http(s)://' + -d CouchDB Database name to backup/restore. + -f File to Backup-to/Restore-from. + -P Provide a port number for CouchDB [Default: 5984] + -u Provide a username for auth against CouchDB [Default: blank] + -- can also set with 'COUCHDB_USER' environment var + -p Provide a password for auth against CouchDB [Default: blank] + -- can also set with 'COUCHDB_PASS' environment var + -l Number of lines (documents) to Restore at a time. [Default: 5000] (Restore Only) + -t Number of CPU threads to use when parsing data [Default: nProcs-1] (Backup Only) + -a Number of times to Attempt import before failing [Default: 3] (Restore Only) + -c Create DB on demand, if they are not listed. + -q Run in quiet mode. Suppress output, except for errors and warnings. + -z Compress output file (Backup Only) + -T Add datetime stamp to output file name (Backup Only) + -V Display version information. + -h Display usage information. + +Example: ./couchdb-dump.sh -b -H 127.0.0.1 -d mydb -f dumpedDB.json -u admin -p password +``` + +### Bonus 1! Full Database Compaction +In the past, we've used this script to greatly compress a bloated database. +In our use case, we had non-sequential IDs which cause CouchDB's B-Tree to balloon out of control, even with daily compactions. + +**How does this fix work?** +When running the export, all of the documents are pulled out in "ID Order"- When re-importing these (now sorted) documents again, the B-Tree can be created in a much more efficient manner. We've seen 15GB database files, containing only 2.1GB of raw JSON, reduced to 2.5GB on disk after import! + +### Bonus 2! Purge Historic and Deleted Data +CouchDB is an append-only database. When you delete records, the metadata is maintained for future reference, and is never fully deleted. All documents also retain a historic revision count. +With the above points in mind; the export and import does not include Deleted documents, or old revisions; therefore, using this script, you can export and re-import your data, cleansing it of any previously (logically) deleted data! + +If you pair this with deletion and re-creation of replication rules (using the 'update_seq' parameter to avoid re-pulling the entire DB/deleted documents from a remote node) you can manually compress and clean out an entire cluster of waste, node-by-node. +Note though; after creating all the rules with a fixed update_seq, once completed to the entire cluster, you will need to destroy and recreate all replication rules without the fixed update_seq - else, when restarting a node etc, replication will restart from the old seq. + diff --git a/scripts/couchdb-dump/couchdb-dump.sh b/scripts/couchdb-dump/couchdb-dump.sh new file mode 100755 index 0000000..2a5c796 --- /dev/null +++ b/scripts/couchdb-dump/couchdb-dump.sh @@ -0,0 +1,780 @@ +#!/bin/bash +## +# AUTHOR: DANIELE BAILO +# https://github.com/danielebailo +# www.danielebailo.it +# +# Contributors: +# * dalgibbard - http://github.com/dalgibbard +# * epos-eu - http://github.com/epos-eu +# * maximilianhuber - http://github.com/maximilianhuber +# * ahodgkinson - http://github.com/ahodgkinson (quiet-mode, timestamp, compress) +## + +## This script allow for the Backup and Restore of a CouchDB Database. +## Backups are produced in a format that can be later uploaded with the bulk docs directive (as used by this script) + +## USAGE +## * To Backup: +## ** example: ./couchdb-dump.sh -b -H 127.0.0.1 -d mydb -u admin -p password -f mydb.json +## * To Restore: +## ** example: ./couchdb-dump.sh -r -H 127.0.0.1 -d mydb -u admin -p password -f mydb.json + + +###################### CODE STARTS HERE ################### +scriptversionnumber="1.1.10" + +##START: FUNCTIONS +usage(){ + echo + echo "Usage: $0 [-b|-r] -H -d -f [-u ] [-p ] [-P ] [-l ] [-t ] [-a ]" + echo -e "\t-b Run script in BACKUP mode." + echo -e "\t-r Run script in RESTORE mode." + echo -e "\t-H CouchDB Hostname or IP. Can be provided with or without 'http(s)://'" + echo -e "\t-d CouchDB Database name to backup/restore." + echo -e "\t-f File to Backup-to/Restore-from." + echo -e "\t-P Provide a port number for CouchDB [Default: 5984]" + echo -e "\t-u Provide a username for auth against CouchDB [Default: blank]" + echo -e "\t -- can also set with 'COUCHDB_USER' environment var" + echo -e "\t-p Provide a password for auth against CouchDB [Default: blank]" + echo -e "\t -- can also set with 'COUCHDB_PASS' environment var" + echo -e "\t-l Number of lines (documents) to Restore at a time. [Default: 5000] (Restore Only)" + echo -e "\t-t Number of CPU threads to use when parsing data [Default: nProcs-1] (Backup Only)" + echo -e "\t-a Number of times to Attempt import before failing [Default: 3] (Restore Only)" + echo -e "\t-c Create DB on demand, if they are not listed." + echo -e "\t-q Run in quiet mode. Suppress output, except for errors and warnings." + echo -e "\t-z Compress output file (Backup Only)" + echo -e "\t-T Add datetime stamp to output file name (Backup Only)" + echo -e "\t-V Display version information." + echo -e "\t-h Display usage information." + echo + echo "Example: $0 -b -H 127.0.0.1 -d mydb -f dumpedDB.json -u admin -p password" + echo + exit 1 +} + +scriptversion(){ + echo + echo -e "\t** couchdb-dump version: $scriptversionnumber **" + echo + echo -e "\t URL:\thttps://github.com/danielebailo/couchdb-dump" + echo + echo -e "\t Authors:" + echo -e "\t Daniele Bailo (bailo.daniele@gmail.com)" + echo -e "\t Darren Gibbard (dalgibbard@gmail.com)" + echo -e "\t Maximilian Huber (maximilian.huber@tngtech.com)" + echo + exit 1 +} + +checkdiskspace(){ +## This function checks available diskspace for a required path, vs space required +## Example call: checkdiskspace /path/to/file/to/create 1024 + location=$1 + KBrequired=$2 + if [ "x$location" = "x" ]||[ "x$KBrequired" = "x" ]; then + echo "... ERROR: checkdiskspace() was not passed the correct arguments." + exit 1 + fi + + stripdir=${location%/*} + KBavail=$(df -P -k ${stripdir} | tail -n 1 | awk '{print$4}' | $sed_cmd -e 's/K$//') + + if [ $KBavail -ge $KBrequired ]; then + return 0 + else + echo + echo "... ERROR: Insufficient Disk Space Available:" + echo " * Full Path: ${location}" + echo " * Affected Directory: ${stripdir}" + echo " * Space Available: ${KBavail} KB" + echo " * Total Space Required: ${KBrequired} KB" + echo " * Additional Space Req: $(expr $KBrequired - $KBavail) KB" + echo + exit 1 + fi +} +## END FUNCTIONS + +# Catch no args: +if [ "x$1" = "x" ]; then + usage +fi + +# Default Args +username="" +password="" +backup=false +restore=false +port=5984 +OPTIND=1 +lines=5000 +attempts=3 +createDBsOnDemand=false +verboseMode=true +compress=false +timestamp=false + +while getopts ":h?H:d:f:u:p:P:l:t:a:c?q?z?T?V?b?B?r?R?" opt; do + case "$opt" in + h) usage;; + b|B) backup=true ;; + r|R) restore=true ;; + H) url="$OPTARG" ;; + d) db_name="$OPTARG" ;; + f) file_name="$OPTARG" ;; + u) username="${OPTARG}";; + p) password="${OPTARG}";; + P) port="${OPTARG}";; + l) lines="${OPTARG}" ;; + t) threads="${OPTARG}" ;; + a) attempts="${OPTARG}";; + c) createDBsOnDemand=true;; + q) verboseMode=false;; + z) compress=true;; + T) timestamp=true;; + V) scriptversion;; + :) echo "... ERROR: Option \"-${OPTARG}\" requires an argument"; usage ;; + *|\?) echo "... ERROR: Unknown Option \"-${OPTARG}\""; usage;; + esac +done + +# If quiet option: Setup echo mode and curl '--silent' opt +if [ "$verboseMode" = true ]; then + curlSilentOpt="" + echoVerbose=true +else + curlSilentOpt="--silent" + echoVerbose=false +fi + +# Trap unexpected extra args +shift $((OPTIND-1)) +[ "$1" = "--" ] && shift +if [ ! "x$@" = "x" ]; then + echo "... ERROR: Unknown Option \"$@\"" + usage +fi + +# Handle invalid backup/restore states: +if [ $backup = true ]&&[ $restore = true ]; then + echo "... ERROR: Cannot pass both '-b' and '-r'" + usage +elif [ $backup = false ]&&[ $restore = false ]; then + echo "... ERROR: Missing argument '-b' (Backup), or '-r' (Restore)" + usage +fi +# Handle empty args +# url +if [ "x$url" = "x" ]; then + echo "... ERROR: Missing argument '-H '" + usage +fi +# db_name +if [ "x$db_name" = "x" ]; then + echo "... ERROR: Missing argument '-d '" + usage +fi +# file_name +if [ "x$file_name" = "x" ]; then + echo "... ERROR: Missing argument '-f '" + usage +fi +file_name_orig=$file_name + +# Get OS TYPE (Linux for Linux, Darwin for MacOSX) +os_type=`uname -s` + +# Pick sed or gsed +if [ "$os_type" = "FreeBSD" ]||[ "$os_type" = "Darwin" ]; then + sed_cmd="gsed"; +else + sed_cmd="sed"; +fi +## Make sure it's installed +echo | $sed_cmd 's/a//' >/dev/null 2>&1 +if [ ! $? = 0 ]; then + echo "... ERROR: please install $sed_cmd (gnu-sed) and ensure it is in your path" + exit 1 +fi + +# Validate thread count +## If we're on a Mac, use sysctl +if [ "$os_type" = "Darwin" ]; then + cores=`sysctl -n hw.ncpu` +## If we're on FreeBSD, use sysctl +elif [ "$os_type" = "FreeBSD" ]; then + cores=`sysctl kern.smp.cpus | awk -F ": " '{print $2}'`; +## Check if nproc available- set cores=1 if not +elif ! type nproc >/dev/null; then + cores=1 +## Otherwise use nproc +else + cores=`nproc` +fi +if [ ! "x$threads" = "x" ]; then + if [ $threads -gt $cores ]; then + echo "... WARN: Thread setting of $threads is more than CPU count. Setting to $cores" + threads=$cores + else + $echoVerbose && echo "... INFO: Setting parser threads to $threads" + fi +else + threads=`expr $cores - 1` +fi + +# Validate Attempts, set to no-retry if zero/invalid. +case $attempts in + ''|0|*[!0-9]*) echo "... WARN: Retry Attempt value of \"$attempts\" is invalid. Disabling Retry-on-Error."; attempts=1 ;; + *) true ;; +esac + +## Manage the passing of http/https for $url: +# Note; if the user wants to use 'https://' on a non-443 port they must specify it exclusively in the '-H ' arg. +if [ ! "`echo $url | grep -c http`" = 1 ]; then + if [ "$port" == "443" ]; then + url="https://$url"; + else + url="http://$url"; + fi +fi + +# Manage the addition of port +# If a port isn't already on our URL... +if [ ! "`echo $url | egrep -c ":[0-9]*$"`" = "1" ]; then + # add it. + url="$url:$port" +fi + +# Check for empty user/pass and try reading in from Envvars +if [ "x$username" = "x" ]; then + username="$COUCHDB_USER" +fi +if [ "x$password" = "x" ]; then + password="$COUCHDB_PASS" +fi + +## Manage the addition of user+pass if needed: +# Ensure, if one is set, both are set. +if [ ! "x${username}" = "x" ]; then + if [ "x${password}" = "x" ]; then + echo "... ERROR: Password cannot be blank, if username is specified." + usage + fi +elif [ ! "x${password}" = "x" ]; then + if [ "x${username}" = "x" ]; then + echo "... ERROR: Username cannot be blank, if password is specified." + usage + fi +fi + +# Check for sed option +sed_edit_in_place='-i.sedtmp' +if [ "$os_type" = "Darwin" ]; then + sed_regexp_option='E' +else + sed_regexp_option='r' +fi +# Allow for self-signed/invalid certs if method is HTTPS: +if [ "`echo $url | grep -ic "^https://"`" = "1" ]; then + curlopt="-k" +fi + +if [ ! "x${username}" = "x" ]&&[ ! "x${password}" = "x" ]; then + curlopt="${curlopt} -u ${username}:${password}" +fi + +## Check for curl +curl --version >/dev/null 2>&1 || ( echo "... ERROR: This script requires 'curl' to be present."; exit 1 ) + +# Check for tr +echo | tr -d "" >/dev/null 2>&1 || ( echo "... ERROR: This script requires 'tr' to be present."; exit 1 ) + +##### SETUP OUR LARGE VARS FOR SPLIT PROCESSING (due to limitations in split on Darwin/BSD) +AZ2="`echo {a..z}{a..z}`" +AZ3="`echo {a..z}{a..z}{a..z}`" + +### If user selected BACKUP, run the following code: +if [ $backup = true ]&&[ $restore = false ]; then + ################################################################# + ##################### BACKUP START ############################## + ################################################################# + + # If -T (timestamp) option, append datetime stamp ("-YYYYMMDD-hhmmss") before file extension + if [ "$timestamp" = true ]; then + datetime=`date "+%Y%m%d-%H%M%S"` # Format: YYYYMMDD-hhmmss + # Check for file_name extension, if so add the timestamp before it + if [[ $file_name =~ \.[a-zA-Z0-9][a-zA-Z0-9_]* ]]; then + file_name_ext=` echo "$file_name" | $sed_cmd 's/.*\.//'` # Get text after last '.' + file_name_base=`echo "$file_name" | $sed_cmd "s/\.${file_name_ext}$//"` # file_name without '.' & extension + file_name="$file_name_base-$datetime.$file_name_ext" + else # Otherwise add timestamp to the end of file_name + file_name="$file_name-$datetime" + fi + fi + $echoVerbose && echo "... INFO: Output file ${file_name}" + + # Check if output already exists: + if [ -f ${file_name} ]; then + echo "... ERROR: Output file ${file_name} already exists." + exit 1 + fi + + # Grab our data from couchdb + curl ${curlSilentOpt} ${curlopt} -X GET "$url/$db_name/_all_docs?include_docs=true&attachments=true" -o ${file_name} + # Check for curl errors + if [ ! $? = 0 ]; then + echo "... ERROR: Curl encountered an issue whilst dumping the database." + rm -f ${file_name} 2>/dev/null + exit 1 + fi + # Check for export errors + ERR_CHECK="`head -n 1 ${file_name} | grep '^{"error'`" + if [ ! "x${ERR_CHECK}" = "x" ]; then + echo "... ERROR: CouchDB reported: $ERR_CHECK" + exit 1 + fi + + # CouchDB has a tendancy to output Windows carriage returns in it's output - + # This messes up us trying to sed things at the end of lines! + if grep -qU $'\x0d' $file_name; then + $echoVerbose && echo "... INFO: File may contain Windows carriage returns- converting..." + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + tr -d '\r' < ${file_name} > ${file_name}.tmp + if [ $? = 0 ]; then + mv ${file_name}.tmp ${file_name} + if [ $? = 0 ]; then + $echoVerbose && echo "... INFO: Completed successfully." + else + echo "... ERROR: Failed to overwrite ${file_name} with ${file_name}.tmp" + exit 1 + fi + else + echo ".. ERROR: Failed to convert file." + exit 1 + fi + fi + + ## Now we parse the output file to make it suitable for re-import. + $echoVerbose && echo "... INFO: Amending file to make it suitable for Import." + $echoVerbose && echo "... INFO: Stage 1 - Document filtering" + + # If the input file is larger than 250MB, multi-thread the parsing: + if [ $(du -P -k ${file_name} | awk '{print$1}') -ge 256000 ]&&[ ! $threads -le 1 ]; then + filesize=$(du -P -k ${file_name} | awk '{print$1}') + KBreduction=$(($((`wc -l ${file_name} | awk '{print$1}'` * 80)) / 1024)) + filesize=`expr $filesize + $(expr $filesize - $KBreduction)` + checkdiskspace "${file_name}" $filesize + $echoVerbose && echo "... INFO: Multi-Threaded Parsing Enabled." + if [ -f ${file_name}.thread000000 ]; then + echo "... ERROR: Split files \"${file_name}.thread*\" already present. Please remove before continuing." + exit 1 + elif [ -f ${file_name}.tmp ]; then + echo "... ERROR: Tempfile ${file_name}.tmp already present. Please remove before continuing." + exit 1 + fi + + ### SPLIT INTO THREADS + split_cal=$(( $((`wc -l ${file_name} | awk '{print$1}'` / $threads)) + $threads )) + #split --numeric-suffixes --suffix-length=6 -l ${split_cal} ${file_name} ${file_name}.thread + split -a 2 -l ${split_cal} ${file_name} ${file_name}.thread + if [ ! "$?" = "0" ]; then + echo "... ERROR: Unable to create split files." + exit 1 + fi + + # Capture if someone happens to breach the defined limits of AZ2 var. If this happens, we'll need to switch it out for AZ3 ... + if [[ $threads -gt 650 ]]; then + echo "Whoops- we hit a maximum limit here... \$AZ2 only allows for a maximum of 650 cores..." + exit 1 + fi + + count=0 + for suffix in ${AZ2}; do + (( count++ )) + if [[ $count -gt $threads ]]; then + break + fi + PADNAME="${file_name}.thread${suffix}" + $sed_cmd ${sed_edit_in_place} 's/{"id".*,"doc"://g' ${PADNAME} & + done + wait + count=0 + for suffix in ${AZ2}; do + (( count++ )) + if [[ $count -gt $threads ]]; then + break + fi + PADNAME="${file_name}.thread${suffix}" + cat ${PADNAME} >> ${file_name}.tmp + rm -f ${PADNAME} ${PADNAME}.sedtmp + (( NUM++ )) + done + if [ `wc -l ${file_name} | awk '{print$1}'` = `wc -l ${file_name}.tmp | awk '{print$1}'` ]; then + mv ${file_name}{.tmp,} + if [ ! $? = 0 ]; then + echo "... ERROR: Failed to overwrite ${file_name}" + exit 1 + fi + else + echo "... ERROR: Multi-threaded data parsing encountered an error." + exit 1 + fi + + else + # Estimating 80byte saving per line... probably a little conservative depending on keysize. + KBreduction=$(($((`wc -l ${file_name} | awk '{print$1}'` * 80)) / 1024)) + filesize=$(du -P -k ${file_name} | awk '{print$1}') + filesize=`expr $filesize - $KBreduction` + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} 's/{"id".*,"doc"://g' $file_name && rm -f ${file_name}.sedtmp + if [ ! $? = 0 ];then + echo "Stage failed." + exit 1 + fi + fi + + $echoVerbose && echo "... INFO: Stage 2 - Duplicate curly brace removal" + # Approx 1Byte per line removed + KBreduction=$((`wc -l ${file_name} | awk '{print$1}'` / 1024)) + filesize=$(du -P -k ${file_name} | awk '{print$1}') + filesize=`expr $filesize - $KBreduction` + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} 's/}},$/},/g' ${file_name} && rm -f ${file_name}.sedtmp + if [ ! $? = 0 ];then + echo "Stage failed." + exit 1 + fi + $echoVerbose && echo "... INFO: Stage 3 - Header Correction" + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} '1s/^.*/{"new_edits":false,"docs":[/' ${file_name} && rm -f ${file_name}.sedtmp + if [ ! $? = 0 ];then + echo "Stage failed." + exit 1 + fi + $echoVerbose && echo "... INFO: Stage 4 - Final document line correction" + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} 's/}}$/}/g' ${file_name} && rm -f ${file_name}.sedtmp + if [ ! $? = 0 ];then + echo "Stage failed." + exit 1 + fi + + # If -z (compress) option then compress output file + if [ "$compress" = true ]; then + $echoVerbose && echo "... INFO: Stage 5 - File compression" + gzip $file_name + file_name="$file_name.gz" + fi + + $echoVerbose && echo "... INFO: Export completed successfully. File available at: ${file_name}" + exit 0 + +### Else if user selected Restore: +elif [ $restore = true ]&&[ $backup = false ]; then + ################################################################# + ##################### RESTORE START ############################# + ################################################################# + # Check if input exists: + if [ ! -f ${file_name} ]; then + echo "... ERROR: Input file ${file_name} not found." + exit 1 + fi + + #### VALIDATION END + + $echoVerbose && echo "... INFO: Checking for database" + attemptcount=0 + A=0 + until [ $A = 1 ]; do + (( attemptcount++ )) + existing_dbs=$(curl $curlSilentOpt $curlopt -X GET "${url}/_all_dbs") + if [ ! $? = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: Curl failed to get the list of databases - Stopping" + exit 1 + else + echo "... WARN: Curl failed to get the list of databases - Attempt ${attemptcount}/${attempts}. Retrying..." + sleep 1 + fi + else + A=1 + fi + done + if [[ ! "$existing_dbs" = "["*"]" ]]; then + echo "... WARN: Curl failed to get the list of databases - Continuing" + if [ "x$existing_dbs" = "x" ]; then + echo "... WARN: Curl just returned: $existing_dbs" + fi + elif [[ ! "$existing_dbs" = *"\"${db_name}\""* ]]; then + # database was not listed as existing databasa + if [ $createDBsOnDemand = true ]; then + attemptcount=0 + A=0 + until [ $A = 1 ]; do + (( attemptcount++ )) + curl $curlSilentOpt $curlopt -X PUT "${url}/${db_name}" -o tmp.out + # If curl threw an error: + if [ ! $? = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: Curl failed to create the database ${db_name} - Stopping" + if [ -f tmp.out ]; then + echo -n "... ERROR: Error message was: " + cat tmp.out + else + echo ".. ERROR: See above for any errors" + fi + exit 1 + else + echo "... WARN: Curl failed to create the database ${db_name} - Attempt ${attemptcount}/${attempts}. Retrying..." + sleep 1 + fi + # If curl was happy, but CouchDB returned an error in the return JSON: + elif [ ! "`head -n 1 tmp.out | grep -c '^{"error":'`" = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: CouchDB Reported: `head -n 1 tmp.out`" + exit 1 + else + echo "... WARN: CouchDB Reported an error during db creation - Attempt ${attemptcount}/${attempts} - Retrying..." + sleep 1 + fi + # Otherwise, if everything went well, delete our temp files. + else + rm tmp.out + A=1 + fi + done + else + echo "... ERROR: corresponding database ${db_name} not yet created - Stopping" + $echoVerbose && echo "... HINT: you could add the -c flag to create the database automatically" + exit 1 + fi + fi + + ## Stop bash mangling wildcard... + set -o noglob + # Manage Design Documents as a priority, and remove them from the main import job + $echoVerbose && echo "... INFO: Checking for Design documents" + # Find all _design docs, put them into another file + design_file_name=${file_name}-design + grep '^{"_id":"_design' ${file_name} > ${design_file_name} + + # Count the design file (if it even exists) + DESIGNS="`wc -l ${design_file_name} 2>/dev/null | awk '{print$1}'`" + # If there's no design docs for import... + if [ "x$DESIGNS" = "x" ]||[ "$DESIGNS" = "0" ]; then + # Cleanup any null files + rm -f ${design_file_name} 2>/dev/null + $echoVerbose && echo "... INFO: No Design Documents found for import." + else + $echoVerbose && echo "... INFO: Duplicating original file for alteration" + # Duplicate the original DB file, so we don't mangle the user's input file: + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + cp -f ${file_name}{,-nodesign} + # Re-set file_name to be our new file. + file_name=${file_name}-nodesign + # Remove these design docs from (our new) main file. + $echoVerbose && echo "... INFO: Stripping _design elements from regular documents" + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} '/^{"_id":"_design/d' ${file_name} && rm -f ${file_name}.sedtmp + # Remove the final document's trailing comma + $echoVerbose && echo "... INFO: Fixing end document" + line=$(expr `wc -l ${file_name} | awk '{print$1}'` - 1) + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + $sed_cmd ${sed_edit_in_place} "${line}s/,$//" ${file_name} && rm -f ${file_name}.sedtmp + + $echoVerbose && echo "... INFO: Inserting Design documents" + designcount=0 + # For each design doc... + while IFS="" read -r; do + line="${REPLY}" + # Split the ID out for use as the import URL path + URLPATH=$(echo $line | awk -F'"' '{print$4}') + # Scrap the ID and Rev from the main data, as well as any trailing ',' + echo "${line}" | $sed_cmd -${sed_regexp_option}e "s@^\{\"_id\":\"${URLPATH}\",\"_rev\":\"[0-9]*-[0-9a-zA-Z_\-]*\",@\{@" | $sed_cmd -e 's/,$//' > ${design_file_name}.${designcount} + # Fix Windows CRLF + if grep -qU $'\x0d' ${design_file_name}.${designcount}; then + $echoVerbose && echo "... INFO: File contains Windows carriage returns- converting..." + filesize=$(du -P -k ${design_file_name}.${designcount} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + tr -d '\r' < ${design_file_name}.${designcount} > ${design_file_name}.${designcount}.tmp + if [ $? = 0 ]; then + mv ${design_file_name}.${designcount}.tmp ${design_file_name}.${designcount} + if [ $? = 0 ]; then + $echoVerbose && echo "... INFO: Completed successfully." + else + echo "... ERROR: Failed to overwrite ${design_file_name}.${designcount} with ${design_file_name}.${designcount}.tmp" + exit 1 + fi + else + echo ".. ERROR: Failed to convert file." + exit 1 + fi + fi + + # Insert this file into the DB + A=0 + attemptcount=0 + until [ $A = 1 ]; do + (( attemptcount++ )) + curl $curlSilentOpt ${curlopt} -T ${design_file_name}.${designcount} -X PUT "${url}/${db_name}/${URLPATH}" -H 'Content-Type: application/json' -o ${design_file_name}.out.${designcount} + # If curl threw an error: + if [ ! $? = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: Curl failed trying to restore ${design_file_name}.${designcount} - Stopping" + exit 1 + else + echo "... WARN: Import of ${design_file_name}.${designcount} failed - Attempt ${attemptcount}/${attempts}. Retrying..." + sleep 1 + fi + # If curl was happy, but CouchDB returned an error in the return JSON: + elif [ ! "`head -n 1 ${design_file_name}.out.${designcount} | grep -c '^{"error":'`" = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: CouchDB Reported: `head -n 1 ${design_file_name}.out.${designcount}`" + exit 1 + else + echo "... WARN: CouchDB Reported an error during import - Attempt ${attemptcount}/${attempts} - Retrying..." + sleep 1 + fi + # Otherwise, if everything went well, delete our temp files. + else + A=1 + rm -f ${design_file_name}.out.${designcount} + rm -f ${design_file_name}.${designcount} + fi + done + # Increase design count - mainly used for the INFO at the end. + (( designcount++ )) + # NOTE: This is where we insert the design lines exported from the main block + done < <(cat ${design_file_name}) + $echoVerbose && echo "... INFO: Successfully imported ${designcount} Design Documents" + fi + set +o noglob + + # If the size of the file to import is less than our $lines size, don't worry about splitting + if [ `wc -l $file_name | awk '{print$1}'` -lt $lines ]; then + $echoVerbose && echo "... INFO: Small dataset. Importing as a single file." + A=0 + attemptcount=0 + until [ $A = 1 ]; do + (( attemptcount++ )) + curl $curlSilentOpt $curlopt -T $file_name -X POST "$url/$db_name/_bulk_docs" -H 'Content-Type: application/json' -o tmp.out + if [ "`head -n 1 tmp.out | grep -c '^{"error":'`" -eq 0 ]; then + $echoVerbose && echo "... INFO: Imported ${file_name_orig} Successfully." + rm -f tmp.out + rm -f ${file_name_orig}-design + rm -f ${file_name_orig}-nodesign + exit 0 + else + if [ $attemptcount = $attempts ]; then + echo "... ERROR: Import of ${file_name_orig} failed." + if [ -f tmp.out ]; then + echo -n "... ERROR: Error message was: " + cat tmp.out + else + echo ".. ERROR: See above for any errors" + fi + rm -f tmp.out + exit 1 + else + echo "... WARN: Import of ${file_name_orig} failed - Attempt ${attemptcount}/${attempts} - Retrying..." + sleep 1 + fi + fi + done + # Otherwise, it's a large import that requires bulk insertion. + else + $echoVerbose && echo "... INFO: Block import set to ${lines} lines." + if [ -f ${file_name}.splitaaa ]; then + echo "... ERROR: Split files \"${file_name}.split*\" already present. Please remove before continuing." + exit 1 + fi + importlines=`cat ${file_name} | grep -c .` + + # Due to the file limit imposed by the pre-calculated AZ3 variable, max split files is 15600 (alpha x 3positions) + if [[ `expr ${importlines} / ${lines}` -gt 15600 ]]; then + echo "... ERROR: Pre-processed split variable limit of 15600 files reached." + echo " Please increase the '-l' parameter (Currently: $lines) and try again." + exit 1 + fi + + $echoVerbose && echo "... INFO: Generating files to import" + filesize=$(du -P -k ${file_name} | awk '{print$1}') + checkdiskspace "${file_name}" $filesize + ### Split the file into many + split -a 3 -l ${lines} ${file_name} ${file_name}.split + if [ ! "$?" = "0" ]; then + echo "... ERROR: Unable to create split files." + exit 1 + fi + HEADER="`head -n 1 $file_name`" + FOOTER="`tail -n 1 $file_name`" + + count=0 + for PADNUM in $AZ3; do + PADNAME="${file_name}.split${PADNUM}" + if [ ! -f ${PADNAME} ]; then + echo "... INFO: Import Cycle Completed." + break + fi + + if [ ! "`head -n 1 ${PADNAME}`" = "${HEADER}" ]; then + $echoVerbose && echo "... INFO: Adding header to ${PADNAME}" + filesize=$(du -P -k ${PADNAME} | awk '{print$1}') + checkdiskspace "${PADNAME}" $filesize + $sed_cmd ${sed_edit_in_place} "1i${HEADER}" ${PADNAME} && rm -f ${PADNAME}.sedtmp + else + $echoVerbose && echo "... INFO: Header already applied to ${PADNAME}" + fi + if [ ! "`tail -n 1 ${PADNAME}`" = "${FOOTER}" ]; then + $echoVerbose && echo "... INFO: Adding footer to ${PADNAME}" + filesize=$(du -P -k ${PADNAME} | awk '{print$1}') + checkdiskspace "${PADNAME}" $filesize + $sed_cmd ${sed_edit_in_place} '$s/,$//g' ${PADNAME} && rm -f ${PADNAME}.sedtmp + echo "${FOOTER}" >> ${PADNAME} + else + $echoVerbose && echo "... INFO: Footer already applied to ${PADNAME}" + fi + + $echoVerbose && echo "... INFO: Inserting ${PADNAME}" + A=0 + attemptcount=0 + until [ $A = 1 ]; do + (( attemptcount++ )) + curl $curlSilentOpt $curlopt -T ${PADNAME} -X POST "$url/$db_name/_bulk_docs" -H 'Content-Type: application/json' -o tmp.out + if [ ! $? = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: Curl failed trying to restore ${PADNAME} - Stopping" + exit 1 + else + echo "... WARN: Failed to import ${PADNAME} - Attempt ${attemptcount}/${attempts} - Retrying..." + sleep 1 + fi + elif [ ! "`head -n 1 tmp.out | grep -c '^{"error":'`" = 0 ]; then + if [ $attemptcount = $attempts ]; then + echo "... ERROR: CouchDB Reported: `head -n 1 tmp.out`" + exit 1 + else + echo "... WARN: CouchDB Reported and error during import - Attempt ${attemptcount}/${attempts} - Retrying..." + sleep 1 + fi + else + A=1 + rm -f ${PADNAME} + rm -f tmp.out + (( count++ )) + fi + done + + $echoVerbose && echo "... INFO: Successfully Imported `expr ${count}` Files" + A=1 + rm -f ${file_name_orig}-design + rm -f ${file_name_orig}-nodesign + done + fi +fi diff --git a/scripts/install b/scripts/install index cc9ab52..7e87e81 100755 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -ps axf # debug - # IMPORT GENERIC HELPERS source _common.sh source /usr/share/yunohost/helpers @@ -95,13 +93,11 @@ ynh_add_nginx_config # systemd.service ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ps axf # debug # Create a dedicated systemd config ynh_add_systemd_config --service=$flohmarkt_filename # integrate into yunohost ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $flohmarkt_filename --description="A decentral federated small advertisement platform" --log="$flohmarkt_logfile" -ps axf # debug # logfile contains possibly the secret setup URL ynh_script_progression --message="Setting permissions on logfile..." --weight=2 @@ -126,7 +122,6 @@ ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir" # start service ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1 -ps axuf # debug ls -l $flohmarkt_logfile /bin/bash /usr/bin/bash || true ynh_script_progression --message="Starting flohmarkt..." --weight=10 flohmarkt_ynh_start_service diff --git a/scripts/remove b/scripts/remove index 1e0268a..cf498dd 100755 --- a/scripts/remove +++ b/scripts/remove @@ -31,10 +31,9 @@ fi # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 ynh_script_progression --message="Removing database and database user..." --weight=2 # remove DB -curl -s -X DELETE 'http://127.0.0.1:5984/flohmarkt' --user "admin:${password_couchdb_admin}" +flohmarkt_ynh_remove_couchdb # remove DB user for this instance: -# get rev for the user and then delete user/rev -curl -s -X DELETE "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}?rev=$( curl -sX GET "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}" --user "admin:${password_couchdb_admin}" | jq -r ._rev)" --user "admin:${password_couchdb_admin}" +flohmarkt_ynh_delete_dbuser # Remove the app-specific logrotate config ynh_remove_logrotate @@ -68,6 +67,3 @@ ynh_secure_remove "$flohmarkt_sym_data_dir" #================================================= ynh_script_progression --message="Removal of $app completed" --last - -# debug -ps -axf diff --git a/scripts/restore b/scripts/restore index 2cd0c78..32ef1b4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -3,24 +3,29 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -# restore couchdb directory -ynh_script_progression --message="Restoring couchdb directory..." --weight=1 -# argh, need this for a single database -ynh_restore_file --origin_path="/var/lib/couchdb" - # reinstall couchdb ynh_script_progression --message="Reinstalling couchdb..." --weight=40 flohmarkt_ynh_up_inst_couchdb -flohmarkt_ynh_stop_couchdb # add couchdb configuration -ynh_script_progression --message="Adding a configuration file..." --weight=2 -ynh_restore_file --origin_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" -chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini -chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini +if ![[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; then + ynh_script_progression --message="Adding a configuration file..." --weight=2 -# start couchdb -flohmarkt_ynh_start_couchdb + flohmarkt_ynh_stop_couchdb + + ynh_restore_file --origin_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" + chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini + chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini + + ynh_script_progression --message="Starting couchdb..." --weight=4 + flohmarkt_ynh_start_couchdb +else + ynh_script_progression --message="CouchDB configuration file already exists." --weight=1 +fi + +# restore couchdb from json +ynh_script_progression --message="Importing couchdb from json backup..." --weight=8 +flohmarkt_ynh_restore_couchdb # RESTORE THE APP MAIN DIR ynh_script_progression --message="Restoring the app main directory..." --weight=10 From ef2b69ecc242b2f49d4377cff8404b22208e6128 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 14 May 2024 14:24:13 +0200 Subject: [PATCH 35/41] correct couchdb-dump.sh call --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 431abaa..e224aa2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -101,7 +101,7 @@ flohmarkt_ynh_up_inst_couchdb() { flohmarkt_ynh_dump_couchdb() { ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug ../settings/scripts/couchdb-dump/couchdb-dump.sh -b -H 127.0.0.1 -d "${app}" \ - -u admin -p "${password_couchdb_admin}" > "${YNH_CWD}/${app}.json" || true + -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" } flohmarkt_ynh_delete_couchdb_user() { @@ -119,7 +119,7 @@ flohmarkt_ynh_delete_couchdb_db() { flohmarkt_ynh_import_couchdb() { ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug ../settings/scripts/couchdb-dump/couchdb-dump.sh -r -c -H 127.0.0.1 -d "${app}" \ - -u admin -p "${password_couchdb_admin}" > "${YNH_CWD}/${app}.json" || true + -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" } flohmarkt_ynh_create_couchdb_user() { From 935a8e78448dd1398326ef535bbdb3d2a52860ce Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Tue, 14 May 2024 20:40:51 +0200 Subject: [PATCH 36/41] 1st time working backup/restore :) --- scripts/_common.sh | 27 +++++++++++++++------------ scripts/remove | 8 ++++++-- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e224aa2..82a659c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -99,9 +99,14 @@ flohmarkt_ynh_up_inst_couchdb() { } flohmarkt_ynh_dump_couchdb() { - ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug ../settings/scripts/couchdb-dump/couchdb-dump.sh -b -H 127.0.0.1 -d "${app}" \ - -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" + -q -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" +} + +flohmarkt_ynh_import_couchdb() { + ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh ${YNH_CWD}/${app}.json + ../settings/scripts/couchdb-dump/couchdb-dump.sh -r -c -H 127.0.0.1 -d "${app}" \ + -q -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" } flohmarkt_ynh_delete_couchdb_user() { @@ -116,27 +121,25 @@ flohmarkt_ynh_delete_couchdb_db() { curl -s -X DELETE "http://127.0.0.1:5984/${app}" --user "admin:${password_couchdb_admin}" } -flohmarkt_ynh_import_couchdb() { - ls -l ../settings/scripts/couchdb-dump/couchdb-dump.sh # debug - ../settings/scripts/couchdb-dump/couchdb-dump.sh -r -c -H 127.0.0.1 -d "${app}" \ - -u admin -p "${password_couchdb_admin}" -f "${YNH_CWD}/${app}.json" -} - flohmarkt_ynh_create_couchdb_user() { - curl -X PUT "http://127.0.0.1:5984/_users/org.couchdb.user:${app}" --user "admin:${password_couchdb_admin}"\ + curl -s -X PUT "http://127.0.0.1:5984/_users/org.couchdb.user:${app}" --user "admin:${password_couchdb_admin}"\ -H "Accept: application/json" -H "Content-Type: application/json" \ - -d "\{\"name\": \"${app}\", \"${password_couchdb_flohmarkt}\": \"\", \"roles\": \[\], \"type\": \"user\"\}" + -d "{\"name\": \"${app}\", \"password\": \"${password_couchdb_flohmarkt}\", \"roles\": [], \"type\": \"user\"}" } flohmarkt_ynh_couchdb_user_permissions() { - curl -X PUT "http://127.0.0.1:5984/${app}/_security" --user "admin:${password_couchdb_admin}"\ + curl -s -X PUT "http://127.0.0.1:5984/${app}/_security" --user "admin:${password_couchdb_admin}"\ -H "Accept: application/json" -H "Content-Type: application/json" \ - -d "\{\"members\":\{\"names\": \[\"${app}\"\],\"roles\": \[\"editor\"\]\}\}" + -d "{\"members\":{\"names\": [\"${app}\"],\"roles\": [\"editor\"]}}" } flohmarkt_ynh_restore_couchdb() { # @@ todo for now we'll make sure dbuser and db do not exist + # matrix: + # Is there a way to interact with the admin during the scripts/* run? + # absolutely not, and it's by design. + # at bear minimum if you use the manifest v2 and app helpers, the script should fail. flohmarkt_ynh_delete_couchdb_user || true flohmarkt_ynh_delete_couchdb_db || true diff --git a/scripts/remove b/scripts/remove index cf498dd..a3aadce 100755 --- a/scripts/remove +++ b/scripts/remove @@ -31,22 +31,26 @@ fi # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/12 ynh_script_progression --message="Removing database and database user..." --weight=2 # remove DB -flohmarkt_ynh_remove_couchdb +flohmarkt_ynh_delete_couchdb_db # remove DB user for this instance: -flohmarkt_ynh_delete_dbuser +flohmarkt_ynh_delete_couchdb_user # Remove the app-specific logrotate config +ynh_script_progression --message="Removing logrotate configuration..." --weight=2 ynh_remove_logrotate # remove logfiles directory # https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/29 # can only remove a subdir or one file +ynh_script_progression --message="Removing logfiles..." --weight=2 ynh_secure_remove --file="${flohmarkt_log_dir}" # Remove the dedicated NGINX config +ynh_script_progression --message="Removing nginx configuration..." --weight=2 ynh_remove_nginx_config # Remove the dedicated Fail2Ban config +ynh_script_progression --message="Removing fail2ban configuration..." --weight=2 ynh_remove_fail2ban_config # Remove home From 664e7475f1115262fa9944036e6f7d1e5c6e73d5 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 15 May 2024 07:50:15 +0200 Subject: [PATCH 37/41] fixed 2 syntax errors --- scripts/install | 2 +- scripts/restore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7e87e81..7b17293 100755 --- a/scripts/install +++ b/scripts/install @@ -10,7 +10,7 @@ source /usr/share/yunohost/helpers # had been installed by flohmarkt and we thus can savely do whatever we want to it # with the resulting damage hopefully only influencing flohmarkt instances if [[ -e /opt/couchdb ]] || pgrep epmd > /dev/null || pgrep beam.smp || dpkg-query -W couchdb > /dev/null 2>&1 \ - && ![[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; + && ! [[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; then ynh_die --message="CouchDB already installed on this host - will not proceed." exit 1 diff --git a/scripts/restore b/scripts/restore index 32ef1b4..9c15abd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -8,7 +8,7 @@ ynh_script_progression --message="Reinstalling couchdb..." --weight=40 flohmarkt_ynh_up_inst_couchdb # add couchdb configuration -if ![[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; then +if ! [[ -e /opt/couchdb/etc/local.d/05-flohmarkt.ini ]]; then ynh_script_progression --message="Adding a configuration file..." --weight=2 flohmarkt_ynh_stop_couchdb From 5e4c3fdd39da693ea8b6cbf507aa77f5e35a9849 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 15 May 2024 13:30:26 +0200 Subject: [PATCH 38/41] small corrections during backup/restore tests --- scripts/backup | 6 +----- scripts/remove | 4 ++-- scripts/restore | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/backup b/scripts/backup index 2bd5042..337c00f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,9 +15,8 @@ ynh_backup --src_path="${flohmarkt_log_dir}" # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state -ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..." +ynh_print_info --message="Stopping flohmarkt to backup data..." flohmarkt_ynh_stop_service -flohmarkt_ynh_stop_couchdb # https://codeberg.org/ChriChri/flohmarkt_ynh/issues/24 # since this might be re-installed as a dependency during 'remove' and @@ -30,9 +29,6 @@ flohmarkt_ynh_stop_couchdb # ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="$flohmarkt_data_dir" -ynh_print_info --message="Starting couchdb..." -flohmarkt_ynh_start_couchdb - ynh_print_info --message="Dumping couchdb..." flohmarkt_ynh_dump_couchdb diff --git a/scripts/remove b/scripts/remove index a3aadce..a56f99f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -63,8 +63,8 @@ ynh_script_progression --message="Removing data directory..." --weight=2 ynh_remove_systemd_config # remove symlinks -ynh_secure_remove "$flohmarkt_sym_install" -ynh_secure_remove "$flohmarkt_sym_data_dir" +ynh_secure_remove --file="$flohmarkt_sym_install" +ynh_secure_remove --file="$flohmarkt_sym_data_dir" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 9c15abd..55bdaba 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,7 @@ ynh_restore_file --origin_path="$flohmarkt_install" # RESTORE THE DATA DIRECTORY ynh_script_progression --message="Restoring the data directory..." --weight=1 -ynh_restore_file --origin_path="$flohmarkt_data_dir=" --not_mandatory +ynh_restore_file --origin_path="$flohmarkt_data_dir" --not_mandatory mkdir -p $data_dir # restore logfiles From f1bfdd1283ce375a89e931a626f16a46b8a69f78 Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 15 May 2024 13:38:45 +0200 Subject: [PATCH 39/41] changed logfile path and added symlinks issue #49 --- scripts/_common.sh | 5 +++-- scripts/backup | 4 ++++ scripts/install | 1 + scripts/remove | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 82a659c..0b3bab2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -24,11 +24,12 @@ flohmarkt_sym_install="$( dirname $flohmarkt_install )/$flohmarkt_filename" flohmarkt_venv_dir="${flohmarkt_install}/venv" flohmarkt_app_dir="${flohmarkt_install}/app" # directory containing logfiles -flohmarkt_log_dir="/var/log/${YNH_APP_ID}/${flohmarkt_filename}" +flohmarkt_log_dir="/var/log/${app}" +flohmarkt_sym_log_dir="/var/log/${flohmarkt_filename}" # filename for logfiles - ¡ojo! if not ends with .log will be interpreted # as a directory by ynh_use_logrotate # https://github.com/YunoHost/issues/issues/2383 -flohmarkt_logfile="${flohmarkt_log_dir}/${app}.log" +flohmarkt_logfile="${flohmarkt_log_dir}/app.log" # flohmarkt data_dir flohmarkt_data_dir="$data_dir" flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename" diff --git a/scripts/backup b/scripts/backup index 337c00f..2a84c68 100755 --- a/scripts/backup +++ b/scripts/backup @@ -12,6 +12,10 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" ynh_backup --src_path="/etc/systemd/system/$flohmarkt_filename.service" ynh_backup --src_path="${flohmarkt_log_dir}" +ynh_backup --src_path="$flohmarkt_sym_install" +ynh_backup --src_path="$flohmarkt_sym_data_dir" +ynh_backup --src_path="$flohmarkt_sym_log_dir" + # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state diff --git a/scripts/install b/scripts/install index 7b17293..b9c7e3d 100755 --- a/scripts/install +++ b/scripts/install @@ -119,6 +119,7 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: + Date: Wed, 15 May 2024 20:48:18 +0200 Subject: [PATCH 40/41] check for old db(user), added information information added about the state of the integration Release candidate for ynh5 --- doc/POST_INSTALL.md | 2 +- doc/PRE_INSTALL.md | 10 +++++++++- scripts/_common.sh | 45 +++++++++++++++++++++++++++++++++------------ scripts/install | 6 ++++++ 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 9dd1c39..c12d50a 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -2,7 +2,7 @@ To finish your flohmarkt setup you'll need to open its setup URL. -You can find the setup URL in the logfile __FLOHMARKT_LOGFILE__ if you look for entries like this: +You can find the setup URL in flohmarkts logfile in /var/log/flohmarkt… if you look for entries like this: ``` 2024-05-06 16:30:24 Flohmarkt is not initialized yet. Please go to diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md index 562a666..cf1d4e8 100644 --- a/doc/PRE_INSTALL.md +++ b/doc/PRE_INSTALL.md @@ -7,13 +7,19 @@ flohmarkt expects to install CouchDB from the Apache repository for its use. Ins https://codeberg.org/flohmarkt/flohmarkt_ynh/src/commit/7721103bac61787f31a4b2f2ae695c65d4f26fc9/scripts/install#L9 https://codeberg.org/ChriChri/flohmarkt_ynh/issues/9 +## choosing a sender email address + +flohmarkt will send email and you'll be asked for an address used as the sender in these emails. yunohost will try to configure your chosen address as an allowed sender, but for the time being **this will only work if the sender address is not in use otherwise** - e.g. as an alias. + +This [issue](https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/50) contains information about the problem. + ## multiple flohmarkt on the same subdomain The installation will allow you to **test** this. The feature is not well tested, yet, and installing multiple productive flohmarkts in the same domain might not work on the fediverse. Feedback is more than welcome! -## No integration in yunohost user database" +## No integration in yunohost user database flohmarkt mainanins its own user database in CouchDB. Users have to register to flohmarkt to get an account. Registration cannot be restricted to yunohost users. @@ -21,6 +27,8 @@ https://codeberg.org/ChriChri/flohmarkt_ynh/issues/5 . ## removing +Removing a flohmarkt instance will **delete all of its data** for the time being. If you remove a flohmarkt **we strongly suggest to make a backup** beforehand. This [issue](https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/29) describes how we'll handle `remove` with and without `--purge` in the future. + **Warning:** This might break any existing installation of couchdb (there's an couchdb app to install just couchdb and expose its port via nginx reverse-proxy and possibly other software installing a couchdb). This could happen if you installed the couchdb app after you installed flohmarkt. https://codeberg.org/flohmarkt/flohmarkt_ynh/src/commit/7721103bac61787f31a4b2f2ae695c65d4f26fc9/scripts/remove#L44 diff --git a/scripts/_common.sh b/scripts/_common.sh index 0b3bab2..dd28f4a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -40,7 +40,6 @@ flohmarkt_old_install="/opt/flohmarkt" flohmarkt_old_venv_dir="${flohmarkt_old_install}/venv" flohmarkt_old_app_dir="${flohmarkt_old_install}/flohmarkt" flohmarkt_old_log_dir="/var/log/flohmarkt/" -flohmarkt_old_logfile="flohmarkt" flohmarkt_old_service="flohmarkt" #================================================= @@ -126,6 +125,8 @@ flohmarkt_ynh_create_couchdb_user() { curl -s -X PUT "http://127.0.0.1:5984/_users/org.couchdb.user:${app}" --user "admin:${password_couchdb_admin}"\ -H "Accept: application/json" -H "Content-Type: application/json" \ -d "{\"name\": \"${app}\", \"password\": \"${password_couchdb_flohmarkt}\", \"roles\": [], \"type\": \"user\"}" + # @@ check answer something like + # {"ok":true,"id":"org.couchdb.user:flohmarkt","rev":"35-9865694604ab384388eea0f978a6e728"} } flohmarkt_ynh_couchdb_user_permissions() { @@ -135,14 +136,38 @@ flohmarkt_ynh_couchdb_user_permissions() { } +flohmarkt_ynh_exists_couchdb_user() { + if [[ $( curl -sX GET "http://127.0.0.1:5984/_users/org.couchdb.user%3A${app}" \ + --user "admin:${password_couchdb_admin}" | jq .error ) == '"not_found"' ]] + then + false + else + true + fi +} + +flohmarkt_ynh_exists_couchdb_db() { + if [[ $( curl -sX GET "http://127.0.0.1:5984/flohmarkt__22" --user admin:blafasel \ + | jq .error ) == '"not_found"' ]] + then + false + else + true + fi + +} + +# check whether old couchdb user or database exist before creating the new ones +flohmarkt_ynh_check_old_couchdb() { + if flohmarkt_ynh_exists_couchdb_user; then + ynh_die --ret_code=100 --message="CouchDB user '$app' exists already. Stopping install." + elif flohmarkt_ynh_exists_couchdb_db; then + ynh_die --ret_code=100 --message="CouchDB database '$app' exists already. Stopping install." + fi +} + flohmarkt_ynh_restore_couchdb() { - # @@ todo for now we'll make sure dbuser and db do not exist - # matrix: - # Is there a way to interact with the admin during the scripts/* run? - # absolutely not, and it's by design. - # at bear minimum if you use the manifest v2 and app helpers, the script should fail. - flohmarkt_ynh_delete_couchdb_user || true - flohmarkt_ynh_delete_couchdb_db || true + flohmarkt_ynh_check_old_couchdb flohmarkt_ynh_import_couchdb flohmarkt_ynh_create_couchdb_user @@ -184,10 +209,6 @@ flohmarkt_ynh_upgrade_path_ynh5() { # move logfile directory mkdir -p "$flohmarkt_log_dir" - mv ${flohmarkt_old_log_dir}/${flohmarkt_old_logfile}.* "$flohmarkt_log_dir" - - # update settings for above - # @@ automatically done? maybe? # remove systemd.service - will be generated newly by upgrade # ynh_remove_systemd_config --service="$flohmarkt_old_service" diff --git a/scripts/install b/scripts/install index b9c7e3d..9b966fc 100755 --- a/scripts/install +++ b/scripts/install @@ -47,13 +47,16 @@ chown root:couchdb /opt/couchdb/etc/local.d/05-flohmarkt.ini chmod 640 /opt/couchdb/etc/local.d/05-flohmarkt.ini # restart couchdb to pick up changes +ynh_script_progression --message="Starting CouchDB..." --weight=2 flohmarkt_ynh_start_couchdb # get flohmarkt # suspecting that this deletes all other sources for YNH_APP_ID +ynh_script_progression --message="Downloading flohmarkt..." --weight=2 ynh_setup_source --dest_dir="$flohmarkt_app_dir" # setup python environment for flohmarkt +ynh_script_progression --message="Creating python venv..." --weight=2 ynh_secure_remove "$flohmarkt_venv_dir" flohmarkt_ynh_create_venv flohmarkt_ynh_venv_requirements @@ -67,9 +70,12 @@ password_couchdb_flohmarkt=$(ynh_string_random --length=31 --filter='A-Za-z0-9_. ynh_app_setting_set --app=$app --key=password_couchdb_flohmarkt --value="$password_couchdb_flohmarkt" # generate flohmarkt.conf +ynh_script_progression --message="Adding flohmarkt.conf configuration..." --weight=2 ynh_add_config --template="../conf/flohmarkt.conf" --destination="$flohmarkt_app_dir/flohmarkt.conf" # setup couchdb +ynh_script_progression --message="Setup couchdb database and user for flohmarkt..." --weight=2 +flohmarkt_ynh_check_old_couchdb ( set +o nounset source "$flohmarkt_venv_dir/bin/activate" From 93b7ec25b83439c28268d471ec8284589cc29e3d Mon Sep 17 00:00:00 2001 From: Chris Vogel Date: Wed, 15 May 2024 21:15:09 +0200 Subject: [PATCH 41/41] still found errors on the way to ynh5 --- doc/ADMIN.md | 9 +++++++++ doc/POST_INSTALL.md | 2 +- scripts/_common.sh | 2 +- scripts/remove | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index f5d23a1..74abb4d 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -16,3 +16,12 @@ Please refer to https://codeberg.org/flohmarkt/flohmarkt_ynh/ to take part in de More about development of **flohmarkt**s yunohost integration can be found in [DEVELOPMENT.md](DEVELOPMENT.md) +## removing this app + +Removing a flohmarkt instance will **delete all of its data** for the time being. If you remove a flohmarkt **we strongly suggest to make a backup** beforehand. This [issue](https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/29) describes how we'll handle `remove` with and without `--purge` in the future. + +**Warning:** This might break any existing installation of couchdb (there's an couchdb app to install just couchdb and expose its port via nginx reverse-proxy and possibly other software installing a couchdb). This could happen if you installed the couchdb app after you installed flohmarkt. + +https://codeberg.org/flohmarkt/flohmarkt_ynh/src/commit/7721103bac61787f31a4b2f2ae695c65d4f26fc9/scripts/remove#L44 + +When installing flohmarkt on a a domain and letting it talk to other ActivityPub instances it will propagate a key associated to your domain. If you remove your flohmarkt from that domain and loose that key other instances might not want to talk to you anymore after you installed flohmarkt again on the same domain generating a new key. diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index c12d50a..894f413 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -2,7 +2,7 @@ To finish your flohmarkt setup you'll need to open its setup URL. -You can find the setup URL in flohmarkts logfile in /var/log/flohmarkt… if you look for entries like this: +You can find the setup URL in flohmarkts logfile in /var/log/__APP__ if you look for entries like this: ``` 2024-05-06 16:30:24 Flohmarkt is not initialized yet. Please go to diff --git a/scripts/_common.sh b/scripts/_common.sh index dd28f4a..4a9880e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -147,7 +147,7 @@ flohmarkt_ynh_exists_couchdb_user() { } flohmarkt_ynh_exists_couchdb_db() { - if [[ $( curl -sX GET "http://127.0.0.1:5984/flohmarkt__22" --user admin:blafasel \ + if [[ $( curl -sX GET "http://127.0.0.1:5984/flohmarkt__22" --user "admin:${password_couchdb_admin}" \ | jq .error ) == '"not_found"' ]] then false diff --git a/scripts/remove b/scripts/remove index 9fd895d..f132a20 100755 --- a/scripts/remove +++ b/scripts/remove @@ -65,8 +65,11 @@ ynh_remove_systemd_config # remove symlinks ynh_script_progression --message="Removing symlinks..." --weight=2 ynh_secure_remove --file="$flohmarkt_sym_install" +rm "$flohmarkt_sym_install" || true ynh_secure_remove --file="$flohmarkt_sym_data_dir" +rm "$flohmarkt_sym_data_dir" || true ynh_secure_remove --file="$flohmarkt_sym_log_dir" +rm "$flohmarkt_sym_log_dir" || true #================================================= # END OF SCRIPT