summaryrefslogtreecommitdiff
path: root/meta-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/classes/phosphor-mapper.bbclass16
-rw-r--r--meta-phosphor/classes/phosphor-mapperdir.bbclass2
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb1
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb1
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb7
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper/xyz.openbmc_project.ObjectMapper.service4
-rw-r--r--meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb16
7 files changed, 43 insertions, 4 deletions
diff --git a/meta-phosphor/classes/phosphor-mapper.bbclass b/meta-phosphor/classes/phosphor-mapper.bbclass
index 7bafecb79..97da8503d 100644
--- a/meta-phosphor/classes/phosphor-mapper.bbclass
+++ b/meta-phosphor/classes/phosphor-mapper.bbclass
@@ -7,17 +7,23 @@
# interfaces it will keep track of.
#
# The Phosphor layer by default configures the mapper to
-# watch xyz.openbmc_project interfaces and paths only. This
-# configuration file is intended to be inherited by
-# native recipes in other layers that wish to add namespaces
+# watch xyz.openbmc_project services, interfaces and paths
+# only. This configuration file is intended to be inherited
+# by native recipes in other layers that wish to add namespaces
# or interfaces to the mapper watchlist.
# Add path namespaces to be monitored:
# PHOSPHOR_MAPPER_NAMESPACE_append = " /foo/bar"
+# Add service namespaces to be monitored:
+# PHOSPHOR_MAPPER_SERVICE_append = " foo.bar"
+
# Add interfaces to be monitored:
# PHOSPHOR_MAPPER_INTERFACE_append = " foo.bar"
+# Blacklist services from being monitored:
+# PHOSPHOR_MAPPER_SERVICE_BLACKLIST_append = " foo.bar"
+
inherit phosphor-mapperdir
inherit obmc-phosphor-utils
@@ -34,9 +40,13 @@ python phosphor_mapper_do_postinst() {
pass
process_var(d, 'PHOSPHOR_MAPPER_NAMESPACE', 'namespace_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE', 'service_dir')
process_var(d, 'PHOSPHOR_MAPPER_INTERFACE', 'interface_dir')
+ process_var(d, 'PHOSPHOR_MAPPER_SERVICE_BLACKLIST', 'serviceblacklist_dir')
}
do_install[vardeps] += "PHOSPHOR_MAPPER_NAMESPACE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE"
do_install[vardeps] += "PHOSPHOR_MAPPER_INTERFACE"
+do_install[vardeps] += "PHOSPHOR_MAPPER_SERVICE_BLACKLIST"
do_install[postfuncs] += "phosphor_mapper_do_postinst"
diff --git a/meta-phosphor/classes/phosphor-mapperdir.bbclass b/meta-phosphor/classes/phosphor-mapperdir.bbclass
index 33962f257..ed686287a 100644
--- a/meta-phosphor/classes/phosphor-mapperdir.bbclass
+++ b/meta-phosphor/classes/phosphor-mapperdir.bbclass
@@ -1,2 +1,4 @@
namespace_dir="${datadir}/phosphor-mapper/namespace"
+service_dir="${datadir}/phosphor-mapper/service"
interface_dir="${datadir}/phosphor-mapper/interface"
+serviceblacklist_dir="${datadir}/phosphor-mapper/serviceblacklist"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
index c39e0a34f..e87f22546 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
@@ -8,4 +8,5 @@ inherit native
inherit obmc-phosphor-license
PHOSPHOR_MAPPER_NAMESPACE_append = " /xyz/openbmc_project"
+PHOSPHOR_MAPPER_SERVICE_append = " xyz.openbmc_project"
PHOSPHOR_MAPPER_INTERFACE_append = " xyz.openbmc_project"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
index 67199f9f0..69c777944 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
@@ -7,4 +7,5 @@ inherit native
inherit obmc-phosphor-license
PHOSPHOR_MAPPER_NAMESPACE_append = " /org/openbmc"
+PHOSPHOR_MAPPER_SERVICE_append = " org.openbmc"
PHOSPHOR_MAPPER_INTERFACE_append = " org.openbmc"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
index dcc5bd3c1..9e2f43f24 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
@@ -24,10 +24,17 @@ DEPENDS += "${PHOSPHOR_MAPPER_CONFIGS}"
# Add path namespaces to be monitored.
PHOSPHOR_MAPPER_NAMESPACE = ""
+# Add services to be monitored.
+PHOSPHOR_MAPPER_SERVICE = ""
+
# Add interfaces to be monitored.
PHOSPHOR_MAPPER_INTERFACE = ""
+# Blacklist services from being monitored.
+PHOSPHOR_MAPPER_SERVICE_BLACKLIST = ""
+
do_install() {
install -d ${D}/${namespace_dir}
install -d ${D}/${interface_dir}
+ install -d ${D}/${serviceblacklist_dir}
}
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
index 394e0edd1..69fb1e212 100644
--- 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
@@ -8,7 +8,9 @@ Restart=always
Type=dbus
ExecStart=/usr/bin/env phosphor-mapper \
--path_namespaces="${{MAPPER_NAMESPACES}}" \
- --interface_namespaces="${{MAPPER_INTERFACES}}"
+ --service_namespaces="${{MAPPER_SERVICES}}" \
+ --interface_namespaces="${{MAPPER_INTERFACES}}" \
+ --service_blacklists="${{MAPPER_SERVICEBLACKLISTS}}"
SyslogIdentifier=phosphor-mapper
BusName={BUSNAME}
TimeoutStartSec=300
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
index 9e0e7c243..c4c7f51f8 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
@@ -59,11 +59,23 @@ python do_emit_env() {
paths.append(os.sep.join(p.split('-')))
path = d.getVar('STAGING_DIR_NATIVE', True) + \
+ d.getVar('service_dir', True)
+ services = []
+ for s in os.listdir(path):
+ services.append('.'.join(s.split('-')))
+
+ path = d.getVar('STAGING_DIR_NATIVE', True) + \
d.getVar('interface_dir', True)
interfaces = []
for i in os.listdir(path):
interfaces.append('.'.join(i.split('-')))
+ path = d.getVar('STAGING_DIR_NATIVE', True) + \
+ d.getVar('serviceblacklist_dir', True)
+ service_blacklists = []
+ for x in os.listdir(path):
+ service_blacklists.append('.'.join(x.split('-')))
+
path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
path.append('obmc')
path.append('mapper')
@@ -75,8 +87,12 @@ python do_emit_env() {
with open(path, 'w+') as fd:
fd.write('MAPPER_NAMESPACES="{}"'.format(' '.join(paths)))
fd.write('\n')
+ fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
+ fd.write('\n')
fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
fd.write('\n')
+ fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
+ fd.write('\n')
}
do_install[postfuncs] += "do_emit_env"