From 752c2697755a8d12cd720b405dd5c5de216a1e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:38:38 +0200 Subject: [PATCH 01/11] Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4d3ccf7..85f2f64 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,8 +13,7 @@ maintainers = ["eric_G"] [upstream] license = "GPL-3.0" -website = "https://example.com" -demo = "https://demo.example.com" +website = "https://readarr.com/" admindoc = "https://wiki.servarr.com/readarr/installation/linux" code = "https://github.com/Readarr/Readarr" fund = "https://readarr.com/donate" From bb0050b2abc82e1403fbbc0d462ab17639945c88 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 4 Oct 2023 19:38:43 +0000 Subject: [PATCH 02/11] Auto-update README --- README.md | 4 +--- README_fr.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index da94848..cbc4411 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,13 @@ Readarr is an ebook and audiobook collection manager for Usenet and BitTorrent u **Shipped version:** 0.3.6.2232~ynh1 -**Demo:** https://demo.example.com - ## Screenshots ![Screenshot of Readarr](./doc/screenshots/calendar.png) ## Documentation and resources -* Official app website: +* Official app website: * Official admin documentation: * Upstream app code repository: * Report a bug: diff --git a/README_fr.md b/README_fr.md index abb38cc..6215c56 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,15 +21,13 @@ Readarr est un gestionnaire de collections de livres électroniques et de livres **Version incluse :** 0.3.6.2232~ynh1 -**Démo :** https://demo.example.com - ## Captures d’écran ![Capture d’écran de Readarr](./doc/screenshots/calendar.png) ## Documentations et ressources -* Site officiel de l’app : +* Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * Signaler un bug : From d14e466562ae005fb1044e0ddb618566727cfc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:40:06 +0200 Subject: [PATCH 03/11] Update tests.toml --- tests.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests.toml b/tests.toml index 94abb79..c81bf7c 100644 --- a/tests.toml +++ b/tests.toml @@ -3,3 +3,9 @@ test_format = 1.0 [default] + + # ------------ + # Tests to run + # ------------ + + exclude = ["install.multi"] \ No newline at end of file From 827f4d55c592b6b9069694655c49d09563df5730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:05:25 +0200 Subject: [PATCH 04/11] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index fe1be8c..495e2c1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,7 +13,7 @@ location __PATH__/ { } # Allow the API External Access via NGINX -location ^~ /readarr/api { +location ^~ __PATH__/api { auth_basic off; proxy_pass http://127.0.0.1:__PORT__; } From 1dbb443640f31cb161529af00ac16f0ec2dde57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:13:50 +0200 Subject: [PATCH 05/11] cleaning --- conf/systemd.service | 38 ++------------------------------------ doc/DESCRIPTION.md | 2 +- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index c2c4fad..62415b3 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Radarr Daemon +Description=Readarr Daemon After=network.target [Service] @@ -7,44 +7,10 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/Readarr -nobrowser -data=__DATA_DIR__ +ExecStart=__INSTALL_DIR__/Readarr -nobrowser -data=__DATA_DIR__/ TimeoutStopSec=20 KillMode=process Restart=on-failure -# Sandboxing options to harden security -# Depending on specificities of your service/app, you may need to tweak these -# .. but this should be a good baseline -# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html -NoNewPrivileges=yes -PrivateTmp=yes -PrivateDevices=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK -RestrictNamespaces=yes -RestrictRealtime=yes -DevicePolicy=closed -ProtectClock=yes -ProtectHostname=yes -ProtectProc=invisible -ProtectSystem=full -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -LockPersonality=yes -SystemCallArchitectures=native -SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged - -# Denying access to capabilities that should not be relevant for webapps -# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html -CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD -CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE -CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT -CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK -CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM -CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG -CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE -CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW -CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG - [Install] WantedBy=multi-user.target diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index c4dc93b..c567488 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -Readarr is an ebook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books from your favorite authors and will grab, sort, and rename them. Note that only one type of a given book is supported. If you want both an audiobook and ebook of a given book you will need multiple instances. \ No newline at end of file +Readarr is an eBook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available. It does not manage comics or magazines. \ No newline at end of file From 654d37b3a0f39f6b4498697d954e50f70bd5d13c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 4 Oct 2023 20:13:55 +0000 Subject: [PATCH 06/11] Auto-update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbc4411..24addac 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Readarr is an ebook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books from your favorite authors and will grab, sort, and rename them. Note that only one type of a given book is supported. If you want both an audiobook and ebook of a given book you will need multiple instances. +Readarr is an eBook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available. It does not manage comics or magazines. **Shipped version:** 0.3.6.2232~ynh1 From 30888806419a5838cf52ee4838ae232d1269943e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:25:52 +0200 Subject: [PATCH 07/11] fix --- conf/config.xml | 17 +++++++++++++++++ manifest.toml | 4 ++-- scripts/install | 10 ++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 conf/config.xml diff --git a/conf/config.xml b/conf/config.xml new file mode 100644 index 0000000..bc40bfb --- /dev/null +++ b/conf/config.xml @@ -0,0 +1,17 @@ + + info + 127.0.0.1 + False + + __PORT__ + __PATH__ + __API_KEY__ + None + BuiltIn + develop + __PORT__ + False + + False + Radarr + diff --git a/manifest.toml b/manifest.toml index 85f2f64..24211d6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,9 +61,9 @@ ram.runtime = "50M" [resources.permissions] main.url = "/" api.url = "/api" - api.show_tile = false api.allowed = "visitors" - api.auth_header = false + api.show_tile = false + api.protected = true [resources.ports] main.default = 8787 diff --git a/scripts/install b/scripts/install index 2cc10d3..afd05bb 100755 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,16 @@ yunohost service add $app --description="Book Manager and Automation" --log="/va #chmod 400 "$install_dir/some_config_file" #chown $app:$app "$install_dir/some_config_file" +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring $app..." --weight=2 + +api_key=$(ynh_string_random --length=32) +ynh_app_setting_set --app=$app --key=api_key --value=$api_key + +ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml" + #================================================= # GENERIC FINALIZATION #================================================= From 45ab157e89970e00a100825e3ad986d598b29645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:27:54 +0200 Subject: [PATCH 08/11] Update nginx.conf --- conf/nginx.conf | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 495e2c1..88f37c1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,21 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location __PATH__ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; + proxy_pass http://127.0.0.1:__PORT____PATH__; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_http_version 1.1; + proxy_no_cache $cookie_session; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + # Allow the Radarr API + location __PATH__/api { + auth_request off; + proxy_pass http://127.0.0.1:__PORT____PATH__/api; + } + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } -# Allow the API External Access via NGINX -location ^~ __PATH__/api { - auth_basic off; - proxy_pass http://127.0.0.1:__PORT__; -} From 4a95dde1437bd5bfd87727e77ca79aaf448f74e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:28:25 +0200 Subject: [PATCH 09/11] Revert "Update nginx.conf" This reverts commit 45ab157e89970e00a100825e3ad986d598b29645. --- conf/nginx.conf | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 88f37c1..495e2c1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,21 +1,19 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__ { +location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT____PATH__; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_http_version 1.1; - proxy_no_cache $cookie_session; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - # Allow the Radarr API - location __PATH__/api { - auth_request off; - proxy_pass http://127.0.0.1:__PORT____PATH__/api; - } - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + proxy_pass http://127.0.0.1:__PORT__; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; } +# Allow the API External Access via NGINX +location ^~ __PATH__/api { + auth_basic off; + proxy_pass http://127.0.0.1:__PORT__; +} From 5c838169e3efb8a58a648eba0e0f506fb0fb126b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:33:28 +0200 Subject: [PATCH 10/11] Update config.xml --- conf/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.xml b/conf/config.xml index bc40bfb..b450952 100644 --- a/conf/config.xml +++ b/conf/config.xml @@ -13,5 +13,5 @@ False False - Radarr + Readarr From 0f1805d1dc1070c42f80b2b2a2f83f3e020c89d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:36:14 +0200 Subject: [PATCH 11/11] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 24211d6..adf7a70 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ license = "GPL-3.0" website = "https://readarr.com/" admindoc = "https://wiki.servarr.com/readarr/installation/linux" code = "https://github.com/Readarr/Readarr" -fund = "https://readarr.com/donate" +fund = "https://opencollective.com/readarr" [integration] yunohost = ">= 11.2"