New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wishlist] Please add documentation key to btrfsmaintenance-refresh.service #83
Comments
What do you mean documentation key? The purpose of the refresh service is documented in the README. |
This enables `systemctl help servicename` to function correctly by displaying the documentation associated with the service. Closes kdave#83
Hi,
On Tue, 11 Aug 2020 at 02:40, kdave ***@***.***> wrote:
What do you mean documentation key? The purpose of the refresh service is
documented in the README.
Documentation for systemd service files can be viewed using `systemctl help
servicename` if this field is present.
From SYSTEMD.UNIT(5):
```
Documentation=
A space-separated list of URIs referencing documentation for this unit or
its configuration. Accepted are only URIs of the types "http://", "https://",
"file:", "info:", "man:". For more information about the syntax of these
URIs, see uri(7). The URIs should be listed in order of relevance, starting
with the most relevant. It is a good idea to first reference documentation
that explains what the unit's purpose is, followed by how it is configured,
followed by any other related documentation. This option may be specified
more than once, in which case the specified list of URIs is merged. If the
empty string is assigned to this option, the list is reset and all prior
assignments will have no effect.
```
I attempted to use "file:/path/to/README.md", but it appears systemd
241 has broken "file:" URI support. That said, I've confirmed
"man:page_name(section)" works correctly.
How do you feel about making modifications to README.md to make it a
more suitable source for man page export? With this we could ship a man
page for btrfsmaintance, and it would allow `systemctl help servicename`
to function correctly on older SLED systems. IIRC the modifications are
limited to metadata/pseudoheader hints for title, section, and group,
plus a couple of restrictions on the use of more
esoteric/advanced/pretty-html-output markdown grammar. Given that
veteran admins use man, and newer ones may use "systemctl help" it seems
like a good thing all-around :-)
Thanks,
Nicholas
|
Oh, and I've received confirmation that users/sysadmins actually use this feature. Unfortunately that confirmation was an Ubuntu bug that was my fault because I added my patch without adjusting it to use Debian/Ubuntu /etc/default. Yes, facepalm! Lesson learned :-) https://bugs.launchpad.net/ubuntu/+source/btrfsmaintenance/+bug/1918000 |
This enables `systemctl help servicename` to function correctly by displaying the documentation associated with the service. The path may be different due to packaging guidelines, the Documentation key can be specified multiple times. Issue: #83 Pull-request: #92 Author: Nicholas D Steeves <nsteeves@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Hi @kdave, Sorry for the unreasonably long delay--I missed your commit If rejected, the only workaround that I can think of is generating a man page from README.md. |
No, systemctl help behaves the same. Reading just the documentation of Tools to generate manual page from markdown exist, |
Add README.md converted to the manual page format, this is acceptable by the systemd.unit directive Documentation. The conversion tool is go-md2man (2.0.0), some minor updates to the mark-down version are needed. Issue: #83 Signed-off-by: David Sterba <dsterba@suse.com>
As per documentation of 'systemctl help', only manual pages are displayed, upstream issue systemd/systemd#21369 to display anything else has been rejected. Now that we have the README formatted to manual page we can use it. Issue: #83 Signed-off-by: David Sterba <dsterba@suse.com>
btrfsmaintenance-refresh.service is missing a documentation key. Please consider adding one.
The text was updated successfully, but these errors were encountered: