Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656988 - net-dns/getdns USE=stubby - stubby.service doesn't work on systemd
Summary: net-dns/getdns USE=stubby - stubby.service doesn't work on systemd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Quentin Retornaz
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-31 19:03 UTC by Samantha McVey
Modified: 2018-07-13 19:57 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 Samantha McVey 2018-05-31 19:03:52 UTC
Portage adds the 'stubby' user when installing the package. This is not compatibly with the .service file which says:
User=stubby
DynamicUser=yes

Since the user is being added by portage, it isn't a dynamic user. So either portage should not add the user or DynamicUser should be removed or set to no.

The systemd error:
stubby.service: Failed to update dynamic user credentials: Invalid or incomplete multibyte or wide character
Comment 1 Samantha McVey 2018-05-31 22:02:53 UTC
Also a second problem with it is that the systemd service sets the working directory to /var/cache/stubby (stubby recommends it having its own directory I think). But this directory does not exist.

systemd error:
stubby.service: Failed at step CHDIR spawning /usr/bin/stubby: No such file or directory

Setting DynamicUser=no and creating /var/cache/stubby and chowning it as user stubby makes the service work.
Comment 2 Quentin Retornaz 2018-06-08 17:07:54 UTC
Portage should not write anything in /var, so /var/cache/stubby should be created by the daemons supervisor, in our case, by stubby systemd unit.

tmpfiles.d should create this folder with the right permissions if it does not exist or permissions doesn't match. It is apparently not the case. Maybe systemd-tmpfiles unit should be enabled and started.

Is editing the service file with the following lines working?

DynamicUser=no
ExecStartPre=/bin/mkdir -p /var/cache/stubby
ExecStartPre=/bin/chown stubby:stubby /var/cache/stubby
Comment 3 Quentin Retornaz 2018-06-20 15:11:47 UTC
made a pull request https://github.com/gentoo/gentoo/pull/8920
Comment 4 Quentin Retornaz 2018-06-29 20:07:10 UTC
As the github repository is in trouble, I'll also link my commits which was in the PR:

https://github.com/CaseOf/gentoo/commit/3a6b27173163738b649753278a07ad02261b6434
https://github.com/CaseOf/gentoo/commit/bfb7faec82df7439a737c56121ef8b84763a8471
Comment 5 Quentin Retornaz 2018-07-04 13:00:19 UTC
I made a new pull request https://github.com/gentoo/gentoo/pull/9041
Comment 6 Quentin Retornaz 2018-07-13 19:57:04 UTC
fixed by https://github.com/gentoo/gentoo/pull/9041