1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opentracker_ynh.git synced 2024-09-03 19:46:34 +02:00
This commit is contained in:
eric_G 2024-06-20 12:53:28 +02:00 committed by GitHub
commit c3af7d8b44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 234 additions and 62 deletions

View file

@ -1,6 +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)
- [Leggi il “README” in italiano](README_it.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -9,7 +9,7 @@ It shall NOT be edited by hand.
[![Install OpenTracker with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=opentracker)
*[Read this README is other languages.](./ALL_README.md)*
*[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install OpenTracker 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.*

43
README_es.md Normal file
View file

@ -0,0 +1,43 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# OpenTracker para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/opentracker.svg)](https://dash.yunohost.org/appci/app/opentracker) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/opentracker.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/opentracker.maintain.svg)
[![Instalar OpenTracker con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=opentracker)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarOpenTracker 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
Bittorrent tracker
**Versión actual:** 1.0~ynh4
**Demo:** <https://dispatch.khlieng.com/connect>
## Documentaciones y recursos
- Sitio web oficial: <http://erdgeist.org/arts/software/opentracker/>
- Documentación administrador oficial: <http://erdgeist.org/arts/software/opentracker/>
- Catálogo YunoHost: <https://apps.yunohost.org/app/opentracker>
- Reportar un error: <https://github.com/YunoHost-Apps/opentracker_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing --debug
o
sudo yunohost app upgrade opentracker -u https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

43
README_eu.md Normal file
View file

@ -0,0 +1,43 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# OpenTracker YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/opentracker.svg)](https://dash.yunohost.org/appci/app/opentracker) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/opentracker.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/opentracker.maintain.svg)
[![Instalatu OpenTracker YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=opentracker)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek OpenTracker YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
Bittorrent tracker
**Paketatutako bertsioa:** 1.0~ynh4
**Demoa:** <https://dispatch.khlieng.com/connect>
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <http://erdgeist.org/arts/software/opentracker/>
- Administratzaileen dokumentazio ofiziala: <http://erdgeist.org/arts/software/opentracker/>
- YunoHost Denda: <https://apps.yunohost.org/app/opentracker>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/opentracker_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing --debug
edo
sudo yunohost app upgrade opentracker -u https://github.com/YunoHost-Apps/opentracker_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

43
README_zh_Hans.md Normal file
View file

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

View file

@ -1,7 +1,5 @@
# $Id$
CC?=gcc
# Linux flavour
# PREFIX?=/opt/diet
# LIBOWFAT_HEADERS=$(PREFIX)/include
@ -18,16 +16,26 @@ LIBOWFAT_HEADERS=$(PREFIX)/libowfat
LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
BINDIR?=$(PREFIX)/bin
STRIP?=strip
FEATURES+=-DWANT_V6
#FEATURES+=-DWANT_V4_ONLY
#FEATURES+=-DWANT_ACCESSLIST_BLACK
#FEATURES+=-DWANT_ACCESSLIST_WHITE
#FEATURES+=-DWANT_DYNAMIC_ACCESSLIST
#FEATURES+=-DWANT_SYNC_LIVE
#FEATURES+=-DWANT_IP_FROM_QUERY_STRING
FEATURES+=-DWANT_COMPRESSION_GZIP
#FEATURES+=-DWANT_COMPRESSION_GZIP_ALWAYS
# If you want gzip support to be compiled in, uncomment the next include.
# You can further modify the behaviour by setting DWANT_COMPRESSION_GZIP_ALWAYS
# in Makefile.gzip
include Makefile.gzip
# If you want zstd support to be compiled in, uncomment the next include.
# You can further modify the behaviour by setting DWANT_COMPRESSION_ZSTD_ALWAYS
# in Makefile.zstd
#include Makefile.zstd
#FEATURES+=-DWANT_LOG_NETWORKS
#FEATURES+=-DWANT_RESTRICT_STATS
#FEATURES+=-DWANT_IP_FROM_PROXY
@ -39,13 +47,24 @@ FEATURES+=-DWANT_COMPRESSION_GZIP
#FEATURES+=-DWANT_DEV_RANDOM
FEATURES+=-DWANT_FULLSCRAPE
# You need libowfat version 0.34 to allow for automatic release of chunks during
# full scrape transfer, if you rely on an older versions, enable this flag
#FEATURES+=-DWANT_NO_AUTO_FREE
# Is enabled on BSD systems by default in trackerlogic.h
# on Linux systems the include Makefile adds -lbsd
#include Makefile.arc4random
#FEATURES+=-D_DEBUG_HTTPERROR
#FEATURES+=-D_DEBUG_RANDOMTORRENTS
GIT_VERSION=$(shell sh -c 'command -v git >/dev/null && test -d .git && git rev-parse HEAD || echo _git_or_commit_not_found_')
OPTS_debug=-D_DEBUG -g -ggdb # -pg -fprofile-arcs -ftest-coverage
OPTS_production=-O3
CFLAGS+=-I$(LIBOWFAT_HEADERS) -Wall -pipe -Wextra #-ansi -pedantic
LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread -lpthread -lz
CFLAGS+=-I$(LIBOWFAT_HEADERS) -DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread -Wextra #-ansi -pedantic
LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread
BINARY =opentracker
HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_vector.h ot_clean.h ot_udp.h ot_iovec.h ot_fullscrape.h ot_accesslist.h ot_http.h ot_livesync.h ot_rijndael.h
@ -66,7 +85,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
$(BINARY): $(OBJECTS) $(HEADERS)
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
strip $@
$(STRIP) $@
$(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
$(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
proxy: $(OBJECTS_proxy) $(HEADERS)
@ -84,4 +103,5 @@ clean:
rm -rf opentracker opentracker.debug *.o *~
install:
install -m 755 opentracker $(BINDIR)
install -m 755 opentracker $(DESTDIR)$(BINDIR)

View file

@ -2,7 +2,7 @@
#
# I) Address opentracker will listen on, using both, tcp AND udp family
# (note, that port 6969 is implicite if ommitted).
# (note, that port 6969 is implicit if omitted).
#
# If no listen option is given (here or on the command line), opentracker
# listens on 0.0.0.0:6969 tcp and udp.
@ -44,17 +44,65 @@
# listing, so choose one of those options at compile time. File format
# is straight forward: "<hex info hash>\n<hex info hash>\n..."
#
# IIa) You can enable dynamic changesets to accesslists by enabling
# WANT_DYNAMIC_ACCESSLIST.
#
# The suggested way to work with dynamic changeset lists is to keep a
# main accesslist file that is loaded when opentracker (re)starts and
# reloaded infrequently (hourly or daily).
#
# All changes to the accesslist (e.g. from a web frontend) should be
# both appended to or removed from that file and sent to opentracker. By
# keeping dynamic changeset lists, you can avoid reloading huge
# accesslists whenever just a single entry is added or removed.
#
# Any info_hash (format see above) written to the fifo_add file will be
# kept on a dynamic add-changeset, removed from the dynamic
# delete-changeset and treated as if it was in the main accesslist file.
# The semantic of the respective dynamic changeset depends on whether
# WANT_ACCESSLIST_WHITE or WANT_ACCESSLIST_BLACK is enabled.
#
# access.fifo_add /var/run/opentracker/adder.fifo
#
# Any info_hash (format see above) written to the fifo_delete file will
# be kept on a dynamic delete-changeset, removed from the dynamic
# add-changeset and treated as if it was not in the main accesslist
# file.
#
# access.fifo_delete /var/run/opentracker/deleter.fifo
#
# If you reload the accesslist by sending SIGHUP to the tracker process,
# the dynamic lists are flushed, as opentracker assumes thoses lists are
# merged into the main accesslist.
#
# NOTE: While you can have multiple writers sending lines to the fifos,
# any writes larger than PIPE_BUF (see your limits.h, minimally 512
# bytes but usually 4096) may be interleaved with data sent by other
# writers. This can lead to unparsable lines of info_hashes.
#
# IIb)
# If you do not want to grant anyone access to your stats, enable the
# WANT_RESTRICT_STATS option in Makefile and bless the ip addresses
# allowed to fetch stats here.
# or network allowed to fetch stats here.
#
# access.stats 192.168.0.23
# access.stats 10.1.1.23
#
# There is another way of hiding your stats. You can obfuscate the path
# to them. Normally it is located at /stats but you can configure it to
# appear anywhere on your tracker.
#
# access.stats_path stats
#
# II
# If opentracker lives behind one or multiple reverse proxies,
# every http connection appears to come from these proxies. In order to
# take the X-Forwarded-For address instead, compile opentracker with the
# WANT_IP_FROM_PROXY option and set your proxy addresses or networkss here.
#
# access.proxy 10.0.1.23
# access.proxy 192.0.0.0/8
#
# III) Live sync uses udp multicast packets to keep a cluster of opentrackers
# synchronized. This option tells opentracker which port to listen for

View file

@ -7,7 +7,7 @@ description.fr = "Tracker Bittorrent"
version = "1.0~ynh4"
maintainers = ["liberodark"]
maintainers = []
[upstream]
license = "Beerware"
@ -16,7 +16,7 @@ demo = "https://dispatch.khlieng.com/connect"
admindoc = "http://erdgeist.org/arts/software/opentracker/"
[integration]
yunohost = ">= 11.1.20"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = false
ldap = false

View file

@ -15,11 +15,17 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Installing OpenTracker..." --weight=5
git clone git://erdgeist.org/opentracker "$install_dir" --quiet
cp ../conf/Makefile $install_dir/Makefile
cp ../conf/opentracker.conf.sample $install_dir/opentracker.conf
ynh_add_config --template="Makefile" --destination="$install_dir/Makefile"
ynh_add_config --template="opentracker.conf.sample" --destination="$install_dir/opentracker.conf"
pushd $install_dir
ynh_exec_warn_less make
popd
popd
# Set permissions to app files
chown -R $app: $install_dir
chmod +x $install_dir/$app
#=================================================
# SETUP SYSTEMD
@ -29,16 +35,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to app files
chown -R $app: $install_dir
chmod +x $install_dir/$app
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
@ -46,11 +42,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd"

View file

@ -22,11 +22,6 @@ then
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2
# Remove the dedicated systemd config
ynh_remove_systemd_config

View file

@ -9,12 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -27,18 +21,16 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
ynh_secure_remove --file="$install_dir"
# Download, check integrity, uncompress and patch the source from app.src
git clone git://erdgeist.org/opentracker "$install_dir" --quiet
cp ../conf/Makefile $install_dir/Makefile
cp ../conf/opentracker.conf.sample $install_dir/opentracker.conf
pushd $install_dir
ynh_exec_warn_less make
popd
ynh_secure_remove --file="$install_dir"
# Download, check integrity, uncompress and patch the source from app.src
git clone git://erdgeist.org/opentracker "$install_dir" --quiet
cp ../conf/Makefile $install_dir/Makefile
cp ../conf/opentracker.conf.sample $install_dir/opentracker.conf
pushd $install_dir
ynh_exec_warn_less make
popd
fi
#=================================================
@ -66,11 +58,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
#=================================================