Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533380 - net-misc/tlsdate - add systemd support / tlsdated.conf
Summary: net-misc/tlsdate - add systemd support / tlsdated.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2014-12-23 09:53 UTC by Christian Roessner
Modified: 2016-11-20 05:34 UTC (History)
3 users (show)

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


Attachments
tlsdated.conf (tlsdated.conf,45 bytes, text/plain)
2014-12-23 09:54 UTC, Christian Roessner
Details
tlsdate.service (tlsdate.service,282 bytes, text/plain)
2014-12-23 09:55 UTC, Christian Roessner
Details
tlsdated.service (tlsdated.service,214 bytes, text/plain)
2014-12-23 09:55 UTC, Christian Roessner
Details
tlsdated.service (tlsdated.service,290 bytes, text/plain)
2014-12-23 13:12 UTC, Christian Roessner
Details
tlsdated tmpfiles.d conf file (tlsdated.tmpfiles.conf,45 bytes, text/plain)
2015-04-16 21:50 UTC, Dominik Kriegner
Details
tlsdated defaults file (tlsdated.default,114 bytes, text/plain)
2015-04-16 21:51 UTC, Dominik Kriegner
Details
patch file for upstream's systemd service file (tlsdated-service.patch,374 bytes, patch)
2015-04-16 21:52 UTC, Dominik Kriegner
Details | Diff
updated ebuild to install systemd service file (tlsdate-0.0.12-r3.ebuild,2.17 KB, text/plain)
2015-04-16 21:55 UTC, Dominik Kriegner
Details
patch file for upstream's systemd service file (tlsdated-service.patch,550 bytes, patch)
2015-04-17 07:54 UTC, Dominik Kriegner
Details | Diff
updated ebuild for version 0.0.13 (tlsdate-0.0.13-r1.ebuild,2.11 KB, text/plain)
2016-01-26 12:10 UTC, Dominik Kriegner
Details
patch file for upstreams systemd service file (tlsdate-0.0.13-tlsdated-service.patch,564 bytes, patch)
2016-01-26 12:12 UTC, Dominik Kriegner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Roessner 2014-12-23 09:53:36 UTC
tlsdate does not provide any system files. I have tried to convert the files from ntpdate.service and ntpd.service to the tlsdate pendants.

I must admit that I still am not a system specialist, so the files provided may need optimizations.

Reproducible: Always
Comment 1 Christian Roessner 2014-12-23 09:54:44 UTC
Created attachment 392254 [details]
tlsdated.conf

/usr/lib/tmpfiles.d
Comment 2 Christian Roessner 2014-12-23 09:55:18 UTC
Created attachment 392256 [details]
tlsdate.service
Comment 3 Christian Roessner 2014-12-23 09:55:44 UTC
Created attachment 392258 [details]
tlsdated.service
Comment 4 Christian Roessner 2014-12-23 10:01:24 UTC
Depending on https://bugs.gentoo.org/show_bug.cgi?id=533378, paths might need to be updated.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-23 12:31:58 UTC
It's called systemd. Not system.
Comment 6 Christian Roessner 2014-12-23 13:12:29 UTC
Created attachment 392272 [details]
tlsdated.service

I checked the original source and found that they already have provided a systemd file. I investigated it and modified it to work with Gentoo.

It is working with =net-misc/tlsdate-0.0.12

I disabled the ExecReload and ExecStop statements fund in the original file, as the turn out to kill the main process, instead of reloading/restarting.
Comment 7 SpanKY gentoo-dev 2015-01-29 20:56:45 UTC
Comment on attachment 392272 [details]
tlsdated.service

lets patch the source service file rather than create a new one.  that'll help stave off bitrot and upstream tweaks things.
Comment 8 Dominik Kriegner 2015-04-16 21:50:05 UTC
Created attachment 401402 [details]
tlsdated tmpfiles.d conf file
Comment 9 Dominik Kriegner 2015-04-16 21:51:28 UTC
Created attachment 401404 [details]
tlsdated defaults file
Comment 10 Dominik Kriegner 2015-04-16 21:52:30 UTC
Created attachment 401406 [details, diff]
patch file for upstream's systemd service file
Comment 11 Dominik Kriegner 2015-04-16 21:55:14 UTC
Created attachment 401408 [details]
updated ebuild to install systemd service file

ebuild was updated to EAPI=5 
further it is installing the patched upstream systemd service file along with the needed config files (tmpfiles.d conf, and default file for /etc/default)
Comment 12 Mike Gilbert gentoo-dev 2015-04-16 21:56:48 UTC
Comment on attachment 401406 [details, diff]
patch file for upstream's systemd service file

This patch could easily be sent upstream instead.
Comment 13 Dominik Kriegner 2015-04-16 22:02:05 UTC
I agree that the patch can be sent upstream. I will open an issue on github.

The bigger problem, however is that when run as systemd service tlsdated seems to fail to set the time for some reason I do not understand. I observe the error message as in a Debian-bug [1] in the system logs:

[tlsdate-monitor] execve() failed: No such file or directory

and the time is not set correctly. When the deamon is run on the command line it works normally. So I am afraid something is not fully correct in the way the service is started?

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778776
Comment 14 Dominik Kriegner 2015-04-16 23:01:44 UTC
upstream pull-request for the systemd service file patch:

https://github.com/ioerror/tlsdate/pull/171
Comment 15 SpanKY gentoo-dev 2015-04-17 04:50:37 UTC
(In reply to Dominik Kriegner from comment #13)

random guess: tlsdated iirc does not search $PATH.  you must pass it the full path to tlsdate for it to work.
Comment 16 Dominik Kriegner 2015-04-17 07:54:44 UTC
Created attachment 401438 [details, diff]
patch file for upstream's systemd service file

It turned out the reason for failing to set the time was a bit more subtle. The curly brackets in the upstream systemd service file seem to cause all this troubles.

I updated the patch accordingly. There is already an upstream report [1] about this to which I have added a comment.

[1] https://github.com/ioerror/tlsdate/pull/162
Comment 17 Agostino Sarubbo gentoo-dev 2016-01-25 09:53:09 UTC
any news here?
Comment 18 SpanKY gentoo-dev 2016-01-25 21:17:48 UTC
i don't use systemd, so i don't generally care about it, nor can i test it.  if someone who does use systemd can validate these, feel free to add them to the tree.

glancing at the attachments, only feedback i have is:
- the patch to the service file should follow normal ${P}-xxx.patch naming conventions
- the patch header needs to be cleaned up per http://dev.gentoo.org/~vapier/clean-patches
Comment 19 Dominik Kriegner 2016-01-26 12:10:36 UTC
Created attachment 423912 [details]
updated ebuild for version 0.0.13

ebuild was updated to current version including the fixes from this bug report
Comment 20 Dominik Kriegner 2016-01-26 12:12:26 UTC
Created attachment 423914 [details, diff]
patch file for upstreams systemd service file

cleaned patch for systemd service file, adding reference to this and the relevant upstream bug.

unfortunately this patch is not yet merged upstream.
Comment 21 Pacho Ramos gentoo-dev 2016-01-26 19:56:54 UTC
Changes look to to me (and also to upstream) -> I would go ahead and commit (I cannot do it right now :S)
Comment 22 Zac Medico gentoo-dev 2016-11-20 05:34:28 UTC
(In reply to Dominik Kriegner from comment #19)
> Created attachment 423912 [details]
> updated ebuild for version 0.0.13

Thanks, I've applied your changes:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c17bfa27ffd29237d81154a3d181f631ac0f0f4