Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 720720 - media-tv/tvheadend: systemd service file broken
Summary: media-tv/tvheadend: systemd service file broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-02 20:27 UTC by Thomas Schneider
Modified: 2020-05-10 22:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schneider 2020-05-02 20:27:16 UTC
In media-tv/tvheadend-4.2.8, the service file is broken.  It reads:
> ExecStart=/usr/bin/tvheadend -p /run/tvheadend/tvheadend.pid -c "${TVHEADEND_CONFIG}" ${TVHEADEND_OPTIONS}
A ${name} variable will _not_ be split, and the line is _not_ parsed by a shell, so argv becomes `[…]-c\0"/etc/tvheadend"\0--foo --bar --baz`, instead of the intended `[…]-c\0/etc/tvheadend\0--foo\0--bar\0--baz`.
Solution:
> ExecStart=/usr/bin/tvheadend -p /run/tvheadend/tvheadend.pid -c ${TVHEADEND_CONFIG} $TVHEADEND_OPTIONS
This removes the quotes around ${TVHEADEND_CONFIG} (which will be one argument even if one makes the questionable choice to have paths with spaces) and the braces in $TVHEADEND_OPTIONS, so that it will be split on spaces like one would expect.
Comment 1 Larry the Git Cow gentoo-dev 2020-05-10 22:18:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b4d221c8a5c4aee7a1330beba243636767d6dfc

commit 2b4d221c8a5c4aee7a1330beba243636767d6dfc
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2020-05-10 22:17:32 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2020-05-10 22:17:32 +0000

    media-tv/tvheadend: Fix bad quoting in systemd service file
    
    Closes: https://bugs.gentoo.org/720720
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 media-tv/tvheadend/files/tvheadend.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)