Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] tvheadend: add service
@ 2023-08-09 14:36 tcrs
  2023-11-09  1:46 ` github-actions
  2023-11-23  1:46 ` [PR PATCH] [Closed]: " github-actions
  0 siblings, 2 replies; 3+ messages in thread
From: tcrs @ 2023-08-09 14:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]

There is a new pull request by tcrs against master on the void-packages repository

https://github.com/tcrs/void-packages tvheadend-sv
https://github.com/void-linux/void-packages/pull/45506

tvheadend: add service
I installed tvheadend and had a frustrating time getting it to run as a system service. If $HOME isn't set then it will exit as it can't find its config files. $HOME isn't set for the system runsvdir as it is launched from runit but it is set if you just run runsv (or runsvdir) from a shell - so everything worked when testing but the service wouldn't work when linked into /var/service. It looks like tvheadend should output an error message when it hits this case but I couldn't see it in any log :(.

This is just what I came up with, I'm running it locally and have put it in the package for review. I haven't tried to build and install the modified package (yet). A possible alternative to setting $HOME in the service is to explicitly specify the config directory as an option. Setting $HOME has the advantage that it will use the same config files as running tvheadend from a shell, which can be useful for initial setup (-C).

Possibly the service should run with --firstrun

         -C, --firstrun
              If no user account exist then create one with no username and no
              password. Use with care as it will allow world-wide
              administrative access to your Tvheadend installation until you
              edit the access-control from within the Tvheadend UI."

That does mean the default is not very secure, but without it the default is to not be able to login (as far as I can tell anyway, I manually ran tvheadend --firstrun).

Another thing is whether the service should be run as a dedicated user (I don't bother running anything not as root on my media server). What is the void policy on that?

#### Testing the changes
- I tested the changes in this PR: **NO**



A patch file from https://github.com/void-linux/void-packages/pull/45506.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tvheadend-sv-45506.patch --]
[-- Type: text/x-diff, Size: 1282 bytes --]

From 75c996f675e6e133c232c284fd4125bbf6d16a51 Mon Sep 17 00:00:00 2001
From: Thomas Spurden <thomas@spurden.name>
Date: Wed, 9 Aug 2023 15:22:35 +0100
Subject: [PATCH] tvheadend: add service

---
 srcpkgs/tvheadend/files/tvheadend/run | 4 ++++
 srcpkgs/tvheadend/template            | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100755 srcpkgs/tvheadend/files/tvheadend/run

diff --git a/srcpkgs/tvheadend/files/tvheadend/run b/srcpkgs/tvheadend/files/tvheadend/run
new file mode 100755
index 0000000000000..d4c7ddce5f61d
--- /dev/null
+++ b/srcpkgs/tvheadend/files/tvheadend/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec 2>&1
+exec env - HOME=/root /usr/bin/tvheadend
diff --git a/srcpkgs/tvheadend/template b/srcpkgs/tvheadend/template
index e6b16d7ccf3bd..f64960fda2270 100644
--- a/srcpkgs/tvheadend/template
+++ b/srcpkgs/tvheadend/template
@@ -1,7 +1,7 @@
 # Template file for 'tvheadend'
 pkgname=tvheadend
 version=4.2.8
-revision=6
+revision=7
 build_style=gnu-configure
 configure_args="--enable-dvbscan --disable-ffmpeg_static
 --disable-hdhomerun_static --disable-bintray_cache --disable-libx264_static
@@ -22,4 +22,5 @@ CFLAGS="-fcommon"
 pre_build() {
 	sed -i '/^${PROG}:/s/check_config//' Makefile
 	sed -i 's/-Werror//' Makefile
+	vsv tvheadend
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tvheadend: add service
  2023-08-09 14:36 [PR PATCH] tvheadend: add service tcrs
@ 2023-11-09  1:46 ` github-actions
  2023-11-23  1:46 ` [PR PATCH] [Closed]: " github-actions
  1 sibling, 0 replies; 3+ messages in thread
From: github-actions @ 2023-11-09  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/45506#issuecomment-1803034228

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Closed]: tvheadend: add service
  2023-08-09 14:36 [PR PATCH] tvheadend: add service tcrs
  2023-11-09  1:46 ` github-actions
@ 2023-11-23  1:46 ` github-actions
  1 sibling, 0 replies; 3+ messages in thread
From: github-actions @ 2023-11-23  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]

There's a closed pull request on the void-packages repository

tvheadend: add service
https://github.com/void-linux/void-packages/pull/45506

Description:
I installed tvheadend and had a frustrating time getting it to run as a system service. If $HOME isn't set then it will exit as it can't find its config files. $HOME isn't set for the system runsvdir as it is launched from runit but it is set if you just run runsv (or runsvdir) from a shell - so everything worked when testing but the service wouldn't work when linked into /var/service. It looks like tvheadend should output an error message when it hits this case but I couldn't see it in any log :(.

This is just what I came up with, I'm running it locally and have put it in the package for review. I haven't tried to build and install the modified package (yet). A possible alternative to setting $HOME in the service is to explicitly specify the config directory as an option. Setting $HOME has the advantage that it will use the same config files as running tvheadend from a shell, which can be useful for initial setup (-C).

Possibly the service should run with --firstrun

         -C, --firstrun
              If no user account exist then create one with no username and no
              password. Use with care as it will allow world-wide
              administrative access to your Tvheadend installation until you
              edit the access-control from within the Tvheadend UI."

That does mean the default is not very secure, but without it the default is to not be able to login (as far as I can tell anyway, I manually ran tvheadend --firstrun).

Another thing is whether the service should be run as a dedicated user (I don't bother running anything not as root on my media server). What is the void policy on that?

#### Testing the changes
- I tested the changes in this PR: **NO**



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-23  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 14:36 [PR PATCH] tvheadend: add service tcrs
2023-11-09  1:46 ` github-actions
2023-11-23  1:46 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).