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

Merge pull request #11 from YunoHost-Apps/helpers

Use standard redis helpers
This commit is contained in:
Salamandar 2024-05-20 22:14:19 +02:00 committed by GitHub
commit 15904b864c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 228 additions and 66 deletions

8
ALL_README.md Normal file
View file

@ -0,0 +1,8 @@
# 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)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -1,5 +1,5 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
N.B.: This README was automatically generated by <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
It shall NOT be edited by hand.
-->
@ -9,14 +9,15 @@ It shall NOT be edited by hand.
[![Install Pagure with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[Lire ce readme en français.](./README_fr.md)*
*[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install Pagure quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
> *This package allows you to install Pagure quickly and simply on a YunoHost server.*
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
## Overview
A git-centered forge, python based using pygit2.
**Shipped version:** 5.13.3~ynh3
**Demo:** <https://pagure.io>
@ -35,9 +36,9 @@ A git-centered forge, python based using pygit2.
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
To try the testing branch, please proceed like that.
To try the `testing` branch, please proceed like that:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug

49
README_es.md Normal file
View file

@ -0,0 +1,49 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# Pagure para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/pagure.svg)](https://dash.yunohost.org/appci/app/pagure) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/pagure.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/pagure.maintain.svg)
[![Instalar Pagure con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarPagure rapidamente y simplement en un servidor YunoHost.*
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
## Descripción general
**Versión actual:** 5.13.3~ynh3
**Demo:** <https://pagure.io>
## Capturas
![Captura de Pagure](./doc/screenshots/screenshot.png)
## Documentaciones y recursos
- Sitio web oficial: <https://pagure.io/pagure>
- Documentación administrador oficial: <https://docs.pagure.org/pagure/>
- Repositorio del código fuente oficial de la aplicación : <https://pagure.io/pagure>
- Catálogo YunoHost: <https://apps.yunohost.org/app/pagure>
- Reportar un error: <https://github.com/YunoHost-Apps/pagure_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
o
sudo yunohost app upgrade pagure -u https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

49
README_eu.md Normal file
View file

@ -0,0 +1,49 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# Pagure YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/pagure.svg)](https://dash.yunohost.org/appci/app/pagure) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/pagure.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/pagure.maintain.svg)
[![Instalatu Pagure YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek Pagure YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
**Paketatutako bertsioa:** 5.13.3~ynh3
**Demoa:** <https://pagure.io>
## Pantaila-argazkiak
![Pagure(r)en pantaila-argazkia](./doc/screenshots/screenshot.png)
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://pagure.io/pagure>
- Administratzaileen dokumentazio ofiziala: <https://docs.pagure.org/pagure/>
- Jatorrizko aplikazioaren kode-gordailua: <https://pagure.io/pagure>
- YunoHost Denda: <https://apps.yunohost.org/app/pagure>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/pagure_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
edo
sudo yunohost app upgrade pagure -u https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

View file

@ -1,6 +1,6 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand.
Nota bene: ce README est automatiquement généré par <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Il NE doit PAS être modifié à la main.
-->
# Pagure pour YunoHost
@ -9,17 +9,18 @@ It shall NOT be edited by hand.
[![Installer Pagure avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[Read this readme in english.](./README.md)*
*[Lire le README dans d'autres langues.](./ALL_README.md)*
> *Ce package vous permet dinstaller Pagure rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
> *Ce package vous permet dinstaller Pagure rapidement et simplement sur un serveur YunoHost.*
> *Si vous navez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment linstaller et en profiter.*
## Vue densemble
**Version incluse :** 5.13.3~ynh3
**Démo :** <https://pagure.io>
**Version incluse:** 5.13.3~ynh3
**Démo:** <https://pagure.io>
## Captures décran
@ -27,17 +28,17 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Documentations et ressources
- Site officiel de lapp : <https://pagure.io/pagure>
- Documentation officielle de ladmin : <https://docs.pagure.org/pagure/>
- Dépôt de code officiel de lapp : <https://pagure.io/pagure>
- YunoHost Store : <https://apps.yunohost.org/app/pagure>
- Signaler un bug : <https://github.com/YunoHost-Apps/pagure_ynh/issues>
- Site officiel de lapp: <https://pagure.io/pagure>
- Documentation officielle de ladmin: <https://docs.pagure.org/pagure/>
- Dépôt de code officiel de lapp: <https://pagure.io/pagure>
- YunoHost Store: <https://apps.yunohost.org/app/pagure>
- Signaler un bug: <https://github.com/YunoHost-Apps/pagure_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
Pour essayer la branche `testing`, procédez comme suit:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
@ -45,4 +46,4 @@ ou
sudo yunohost app upgrade pagure -u https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
```
**Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>
**Plus dinfos sur le packaging dapplications:** <https://yunohost.org/packaging_apps>

49
README_gl.md Normal file
View file

@ -0,0 +1,49 @@
<!--
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON debe editarse manualmente.
-->
# Pagure para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/pagure.svg)](https://dash.yunohost.org/appci/app/pagure) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/pagure.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/pagure.maintain.svg)
[![Instalar Pagure con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[Le este README en outros idiomas.](./ALL_README.md)*
> *Este paquete permíteche instalar Pagure 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
**Versión proporcionada:** 5.13.3~ynh3
**Demo:** <https://pagure.io>
## Capturas de pantalla
![Captura de pantalla de Pagure](./doc/screenshots/screenshot.png)
## Documentación e recursos
- Web oficial da app: <https://pagure.io/pagure>
- Documentación oficial para admin: <https://docs.pagure.org/pagure/>
- Repositorio de orixe do código: <https://pagure.io/pagure>
- Tenda YunoHost: <https://apps.yunohost.org/app/pagure>
- Informar dun problema: <https://github.com/YunoHost-Apps/pagure_ynh/issues>
## Info de desenvolvemento
Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing).
Para probar a rama `testing`, procede deste xeito:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
ou
sudo yunohost app upgrade pagure -u https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
```
**Máis info sobre o empaquetado da app:** <https://yunohost.org/packaging_apps>

49
README_zh_Hans.md Normal file
View file

@ -0,0 +1,49 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# YunoHost 上的 Pagure
[![集成程度](https://dash.yunohost.org/integration/pagure.svg)](https://dash.yunohost.org/appci/app/pagure) ![工作状态](https://ci-apps.yunohost.org/ci/badges/pagure.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/pagure.maintain.svg)
[![使用 YunoHost 安装 Pagure](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pagure)
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Pagure。*
> *如果您还没有 YunoHost请参阅[指南](https://yunohost.org/install)了解如何安装它。*
## 概况
**分发版本:** 5.13.3~ynh3
**演示:** <https://pagure.io>
## 截图
![Pagure 的截图](./doc/screenshots/screenshot.png)
## 文档与资源
- 官方应用网站: <https://pagure.io/pagure>
- 官方管理文档: <https://docs.pagure.org/pagure/>
- 上游应用代码库: <https://pagure.io/pagure>
- YunoHost 商店: <https://apps.yunohost.org/app/pagure>
- 报告 bug <https://github.com/YunoHost-Apps/pagure_ynh/issues>
## 开发者信息
请向 [`testing` 分支](https://github.com/YunoHost-Apps/pagure_ynh/tree/testing) 发送拉取请求。
如要尝试 `testing` 分支,请这样操作:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
sudo yunohost app upgrade pagure -u https://github.com/YunoHost-Apps/pagure_ynh/tree/testing --debug
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -19,7 +19,7 @@ code = "https://pagure.io/pagure"
cpe = "cpe:2.3:a:redhat:pagure"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.12"
architectures = "all"
multi_instance = false
ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.

View file

@ -5,7 +5,6 @@
#=================================================
source _common.sh
source ynh_redis
source ynh_uwsgi_service__2
source /usr/share/yunohost/helpers

View file

@ -5,7 +5,6 @@
#=================================================
source _common.sh
source ynh_redis
source ynh_uwsgi_service__2
source /usr/share/yunohost/helpers

View file

@ -5,7 +5,6 @@
#=================================================
source _common.sh
source ynh_redis
source ynh_uwsgi_service__2
source /usr/share/yunohost/helpers

View file

@ -6,7 +6,6 @@
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source ../settings/scripts/ynh_redis
source ../settings/scripts/ynh_uwsgi_service__2
source /usr/share/yunohost/helpers

View file

@ -5,7 +5,6 @@
#=================================================
source _common.sh
source ynh_redis
source ynh_uwsgi_service__2
source /usr/share/yunohost/helpers

View file

@ -1,39 +0,0 @@
#!/bin/bash
# get the first available redis database
#
# usage: ynh_redis_get_free_db
# | returns: the database number to use
ynh_redis_get_free_db() {
local result max db
result=$(redis-cli INFO keyspace)
# get the num
max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+")
db=0
# default Debian setting is 15 databases
for i in $(seq 0 "$max")
do
if ! echo "$result" | grep -q "db$i"
then
db=$i
break 1
fi
db=-1
done
test "$db" -eq -1 && ynh_die --message="No available Redis databases..."
echo "$db"
}
# Create a master password and set up global settings
# Please always call this script in install and restore scripts
#
# usage: ynh_redis_remove_db database
# | arg: database - the database to erase
ynh_redis_remove_db() {
local db=$1
redis-cli -n "$db" flushall
}