summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 06:25:51 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-06 07:44:12 -0400
commitff075f6ee795a590b244d70a90cc312ba1f2d83d (patch)
treea617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/recipes-phosphor/dbus/phosphor-mapper
parent3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff)
downloadtalos-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.gz
talos-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.zip
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/dbus/phosphor-mapper')
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service22
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service22
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf8
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service21
4 files changed, 73 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
new file mode 100644
index 000000000..4bd411e75
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=mapper subtree-remove %I
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+# We are using a Type=simple service instead of the normal Type=oneshot
+# since Type=oneshot can't have Restart= lines
+# https://github.com/systemd/systemd/issues/2582
+# Unfortunately Type=oneshot services halt any services which order after
+# the oneshot on the completion of ExecStart= lines. For Type=simple, the
+# halting is only until ExecStartPre lines have completed and ExecStart has
+# begun executing. Since we want to wait for the `mapper wait` process to
+# finish, it must be an ExecStartPre. All Type=simple services require an
+# ExecStart so we use `true` as a placeholder to satisfy the requirement.
+Type=simple
+RemainAfterExit=no
+Restart=on-failure
+TimeoutStartSec=infinity
+ExecStartPre=/usr/bin/env mapper subtree-remove %I
+ExecStart=/usr/bin/env true
+SyslogIdentifier=mapper
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service
new file mode 100644
index 000000000..f7744e2d8
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/mapper-wait@.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Wait for %I
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+
+[Service]
+# We are using a Type=simple service instead of the normal Type=oneshot
+# since Type=oneshot can't have Restart= lines
+# https://github.com/systemd/systemd/issues/2582
+# Unfortunately Type=oneshot services halt any services which order after
+# the oneshot on the completion of ExecStart= lines. For Type=simple, the
+# halting is only until ExecStartPre lines have completed and ExecStart has
+# begun executing. Since we want to wait for the `mapper wait` process to
+# finish, it must be an ExecStartPre. All Type=simple services require an
+# ExecStart so we use `true` as a placeholder to satisfy the requirement.
+Type=simple
+RemainAfterExit=yes
+Restart=on-failure
+TimeoutStartSec=infinity
+ExecStartPre=/usr/bin/env mapper wait %I
+ExecStart=/usr/bin/env true
+SyslogIdentifier=mapper
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf
new file mode 100644
index 000000000..3d9fcc327
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.conf
@@ -0,0 +1,8 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="root">
+ <allow own="xyz.openbmc_project.ObjectMapper"/>
+ <allow send_destination="xyz.openbmc_project.ObjectMapper"/>
+ </policy>
+</busconfig>
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service
new file mode 100644
index 000000000..aeb734da7
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Phosphor DBus Service Discovery Manager
+Before=obmc-mapper.target
+After=dbus.service
+
+[Service]
+Restart=always
+Type=dbus
+ExecStart=/usr/bin/env phosphor-mapper \
+ --path_namespaces="${{MAPPER_NAMESPACES}}" \
+ --interface_namespaces="${{MAPPER_INTERFACES}}" \
+ --blacklists="${{MAPPER_BLACKLISTS}}" \
+ --interface_blacklists="${{MAPPER_INTERFACEBLACKLISTS}}"
+SyslogIdentifier=phosphor-mapper
+BusName={BUSNAME}
+TimeoutStartSec=300
+EnvironmentFile={envfiledir}/obmc/mapper
+Environment="PYTHONUNBUFFERED=1"
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud