TVHeadend 4.3 has been released nearly a year ago. Everything seems to work except that commit c4919ded3309089 needs to be added ontop to get the systemd flag working. I don't think systemd support (watchdog) is fully working with 4.3. The following changes where needed to get the service file working. For some reason with systemd 236 the comments on a line aren't accepted any longer, ProtectSystem=strict prevents tvheadend to write its own config files in /etc and using -f + forking causes a start failure. diff --git a/media-tv/tvheadend/files/tvheadend.confd b/media-tv/tvheadend/files/tvheadend.confd index 8be4a5dadce..2b0e2c73d14 100644 --- a/media-tv/tvheadend/files/tvheadend.confd +++ b/media-tv/tvheadend/files/tvheadend.confd @@ -11,4 +11,4 @@ TVHEADEND_GROUP="video" TVHEADEND_CONFIG="/etc/tvheadend" # Other options you want to pass to Tvheadend. -TVHEADEND_OPTIONS="" +TVHEADEND_OPTIONS="-C" diff --git a/media-tv/tvheadend/files/tvheadend.service b/media-tv/tvheadend/files/tvheadend.service index 2d0573ca910..e639c92d13b 100644 --- a/media-tv/tvheadend/files/tvheadend.service +++ b/media-tv/tvheadend/files/tvheadend.service @@ -1,21 +1,24 @@ [Unit] -Description=tvheadend +Description=Tvheadend - a TV streaming server and DVR After=network.target [Service] -Type=forking +Type=simple +TimeoutStartSec=5m +TimeoutStopSec=20s User=tvheadend Group=video +EnvironmentFile=/etc/conf.d/tvheadend RuntimeDirectory=tvheadend PIDFile=/run/tvheadend/tvheadend.pid -ExecStart=/usr/bin/tvheadend -6 -f -p /run/tvheadend.pid -C -c /etc/tvheadend +ExecStart=/usr/bin/tvheadend -p /run/tvheadend/tvheadend.pid -c $TVHEADEND_CONFIG $TVHEADEND_OPTIONS Restart=always -RestartSec=5 +RestartSec=5s DevicePolicy=closed -DeviceAllow=char-DVB rw # DVB devices -DeviceAllow=char-drm rw # GPUs for transcoding +DeviceAllow=char-DVB rw +DeviceAllow=char-drm rw RestrictAddressFamilies=AF_INET AF_INET6 -ProtectSystem=strict +ProtectSystem=yes ProtectHome=yes NoNewPrivileges=yes
4.3 is marked as a development release, only the even numbered releases are considered stable. If you really want the latest then we do have 9999, which reportedly works well. I will look at your suggestion for 9999 but I don't use systemd so I won't be able to test it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8085f241c486d2e44a04f6e6f65b778a86325b21 commit 8085f241c486d2e44a04f6e6f65b778a86325b21 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2018-09-02 11:19:36 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2018-09-02 11:43:08 +0000 media-tv/tvheadend: Fix systemd service unit I haven't tested this as I don't use systemd. Closes: https://bugs.gentoo.org/654346 Package-Manager: Portage-2.3.48, Repoman-2.3.10 media-tv/tvheadend/files/tvheadend.service | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)