add systemd best practices to contributing doc
Some discussion arose recently on systemd and the proper way to set
dependencies on other D-Bus services. This commit adds a section to the
contributing guide to summarize the results of that discussion.
Change-Id: I5e9b921d775645b70d2102346c5d5a7df4eefff6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ab6b8fa..08bad52 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -407,6 +407,25 @@
- Ensure that your code compiles without warnings, especially for changes to the
kernel.
+## Best practices for Systemd usage
+
+- Systemd services should be contained within the OpenBMC repository they are
+ associated with
+
+- Systemd services should list their dependencies using Wants/After to ensure
+ required service are started
+
+- If your repository provides a shared library, it should appropriately handle
+ any D-Bus dependencies it has
+
+ This may be clear documentation on what type of error or exception is returned
+ or it may be ensuring the required D-Bus service is automatically activated
+ upon calling it.
+
+- See this
+ [doc](https://github.com/openbmc/docs/blob/master/architecture/openbmc-systemd.md)
+ for more information on OpenBMC and its use of Systemd
+
## Pace of Review
Contributors who are used to code reviews by their team internal to their own