FS#74914 - [mandoc] Broken systemd unit files

Attached to Project: Community Packages
Opened by Mynacol (mynacol) - Monday, 30 May 2022, 22:11 GMT
Last edited by T.J. Townsend (blakkheim) - Monday, 22 May 2023, 21:50 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Caleb Maclennan (alerque)
T.J. Townsend (blakkheim)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I just installed mandoc. On use, mandoc complains about an "outdated mandoc.db". I found the mandoc.{service,timer} systemd unit files, which periodically update this database.

The status of the timer unit did not suggest being enabled, so I tried to enable it myself. Systemd promptly complained `The unit files have no installation config (WantedBy=, [...] settings in the [Install] section, [...]`. I checked the unit files and the timer unit indeed lacks a proper `WantedBy=` directive.

Checking the PKGBUILD I see you "enable" the unit by placing it in `multi-user.target.wants`. Normally, timer units should depend on `timers.target`.

I hope you fix these two issues. On the other side props for setting the Nice and IPSchedulingClass of the service :+1:.

Thanks and Regards!
This task depends upon

Closed by  T.J. Townsend (blakkheim)
Monday, 22 May 2023, 21:50 GMT
Reason for closing:  Fixed
Comment by T.J. Townsend (blakkheim) - Saturday, 20 May 2023, 00:01 GMT
Is this still an issue?
Comment by Mynacol (mynacol) - Saturday, 20 May 2023, 09:55 GMT
Well, the service runs as-is. But those two points fulfill user expectations and remove a systemd warning (as there is no matching install directive to the symlink).

For comparison: the man-db timer unit has the following at the bottom:
[Install]
WantedBy=timers.target

And in the PKGBUILD the timer unit is activated by placing a symlink to timers.target:
ln -s ../man-db.timer ${pkgdir}/usr/lib/systemd/system/timers.target.wants/man-db.timer
Adapted to mandoc, this should be:
ln -s ../mandoc.timer "${pkgdir}"/usr/lib/systemd/system/timers.target.wants/mandoc.timer

For me this seems to be a small and easy change and should be safe from regressions.
Comment by T.J. Townsend (blakkheim) - Sunday, 21 May 2023, 00:31 GMT
Like this?
Comment by Mynacol (mynacol) - Sunday, 21 May 2023, 08:22 GMT
Exactly, thanks!

I noticed some further sandboxing options in man-db worth evaluating, but they are out of scope for this issue.
Comment by T.J. Townsend (blakkheim) - Sunday, 21 May 2023, 12:54 GMT
It would be great if you could convince Ingo to include and maintain the systemd files in the upstream mandoc distribution, but I probably wouldn't hold my breath for that one...

I asked alerque for his input on the diff. If there's no objection, I'll commit it and close this task.
Comment by Mynacol (mynacol) - Sunday, 21 May 2023, 14:16 GMT
I almost overlooked one thing: The Install section has to go in the mandoc timer, not service unit!

I wrote to the upstream mailing list just now :)
Comment by T.J. Townsend (blakkheim) - Sunday, 21 May 2023, 17:02 GMT
Good catch. Updated diff for consideration.
Comment by Mynacol (mynacol) - Monday, 22 May 2023, 20:27 GMT
Sorry for the delay. Looks good to me 👍

Loading...