Remove legacy settings service

xyz.openbmc_project.Settings has replaced this function

Resolves openbmc/openbmc#2339

Change-Id: Ifec6a2fda088c4631e3835d3276a54e09b5d7147
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass
index 5e90ce8..5391257 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -45,11 +45,10 @@
 FEATURE_PACKAGES_obmc-logging-mgmt ?= "${@df_enabled(d, 'obmc-logging-mgmt', 'virtual-obmc-logging-mgmt')}"
 FEATURE_PACKAGES_obmc-net-ipmi ?= "${@df_enabled(d, 'obmc-net-ipmi', 'virtual-obmc-net-ipmi')}"
 FEATURE_PACKAGES_obmc-sensors ?= "packagegroup-obmc-apps-sensors"
-FEATURE_PACKAGES_obmc-settings-mgmt ?= "${@df_enabled(d, 'obmc-settings-mgmt', 'virtual-obmc-settings-mgmt')}"
 FEATURE_PACKAGES_obmc-software ?= "packagegroup-obmc-apps-software"
 FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled(d, 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt')}"
 FEATURE_PACKAGES_obmc-debug-collector ?= "packagegroup-obmc-apps-debug-collector"
-FEATURE_PACKAGES_obmc-settings ?= "packagegroup-obmc-apps-settings"
+FEATURE_PACKAGES_obmc-settings-mgmt ?= "packagegroup-obmc-apps-settings"
 FEATURE_PACKAGES_obmc-network-mgmt ?= "packagegroup-obmc-apps-network"
 FEATURE_PACKAGES_obmc-user-mgmt ?= "packagegroup-obmc-apps-user-mgmt"
 
@@ -70,14 +69,13 @@
         obmc-logging-mgmt \
         obmc-net-ipmi \
         obmc-sensors \
-        obmc-settings-mgmt \
         obmc-software \
         obmc-system-mgmt \
         obmc-user-mgmt \
         ssh-server-dropbear \
         obmc-debug-collector \
         obmc-network-mgmt \
-        obmc-settings \
+        obmc-settings-mgmt \
         ${@mf_enabled(d, 'obmc-ubi-fs', 'read-only-rootfs')} \
         "
 
diff --git a/meta-phosphor/common/recipes-phosphor/datetime/phosphor-time-manager.bb b/meta-phosphor/common/recipes-phosphor/datetime/phosphor-time-manager.bb
index 2a476f0..1e09799 100644
--- a/meta-phosphor/common/recipes-phosphor/datetime/phosphor-time-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/datetime/phosphor-time-manager.bb
@@ -15,7 +15,7 @@
 DEPENDS += "sdbusplus-native"
 DEPENDS += "phosphor-logging"
 DEPENDS += "phosphor-dbus-interfaces"
-RDEPENDS_${PN} += "virtual-obmc-settings-mgmt"
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_obmc-settings-mgmt}"
 RDEPENDS_${PN} += "network"
 RDEPENDS_${PN} += "libmapper"
 RDEPENDS_${PN} += "libsystemd"
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index 91ceff9..563ed26 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -47,7 +47,8 @@
 
 SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service phosphor-ipmi-host.service"
 
-RRECOMMENDS_${PN} += "virtual-obmc-settings-mgmt"
+RRECOMMENDS_${PN} += "${VIRTUAL-RUNTIME_obmc-settings-mgmt}"
+
 
 require ${PN}.inc
 
diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
index a70b272..3f10e11 100644
--- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
+++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
@@ -11,9 +11,6 @@
 After=mapper-wait@-xyz-openbmc_project-control-host0-restriction_mode.service
 Wants=clear-once.service
 After=clear-once.service
-# TODO openbmc/openbmc#2008 - remove wants/after on the old settings below
-Wants=mapper-wait@-org-openbmc-settings-host0.service
-After=mapper-wait@-org-openbmc-settings-host0.service
 
 [Service]
 Restart=always
diff --git a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
index f014f17..fef72dc 100644
--- a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
+++ b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
@@ -112,7 +112,7 @@
 
 SUMMARY_${PN}-settings = "Settings applications"
 RDEPENDS_${PN}-settings = " \
-        ${VIRTUAL-RUNTIME_obmc-settings-mgr} \
+        ${VIRTUAL-RUNTIME_obmc-settings-mgmt} \
         "
 
 SUMMARY_${PN}-network = "BMC Network Manager"
diff --git a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings.bb b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings.bb
deleted file mode 100644
index 8e94d8f..0000000
--- a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Settings DBUS object"
-DESCRIPTION = "Settings DBUS object"
-HOMEPAGE = "http://github.com/openbmc/phosphor-settingsd"
-PR = "r1"
-
-inherit allarch
-inherit obmc-phosphor-license
-inherit setuptools
-inherit obmc-phosphor-dbus-service
-inherit pythonnative
-
-include phosphor-settings-manager.inc
-
-DBUS_SERVICE_${PN} = "org.openbmc.settings.Host.service"
-
-DEPENDS += "python-pyyaml-native"
-RDEPENDS_${PN} += "python-dbus python-pygobject python-ipy"
-PROVIDES += "virtual/obmc-settings-mgmt"
-RPROVIDES_${PN} += "virtual-obmc-settings-mgmt"
-
-SRC_URI += "file://merge_settings.py"
-
-S = "${WORKDIR}/git"
-
-# Collect files in SRC_URI that end in ".override.yml" and call a script that
-# writes their contents over that of settings.yaml, which is then updated to
-# the merged data values.
-# This doesn't correctly handle globs in ".override.yml" entries in SRC_URI.
-python do_merge_settings () {
-    import subprocess
-
-    # TODO: Perform the merge in a temporary directory?
-    workdir = d.getVar('WORKDIR', True)
-    cmd = []
-    cmd.append(os.path.join(workdir, 'merge_settings.py'))
-    cmd.append(os.path.join(d.getVar('S', True), 'settings.yaml'))
-
-    fetch = bb.fetch2.Fetch([], d)
-    override_urls = [url for url in fetch.urls if url.endswith('.override.yml')]
-    for url in override_urls:
-        bb.debug(2, 'Overriding with source: ' + url)
-        local_base = os.path.basename(fetch.localpath(url))
-        filename = os.path.join(workdir, local_base)
-        cmd.append(filename)
-
-    # Invoke the script and don't catch any resulting exception.
-    subprocess.check_call(cmd)
-}
-# python-pyyaml-native is installed by do_configure, so put this task after
-addtask merge_settings after do_configure before do_compile
diff --git a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings/org.openbmc.settings.Host.service b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings/org.openbmc.settings.Host.service
deleted file mode 100644
index fbb64d5..0000000
--- a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings/org.openbmc.settings.Host.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Phosphor Settings Manager
-Before=mapper-wait@-org-openbmc-settings-host0.service
-Wants=obmc-mapper.target
-After=obmc-mapper.target
-
-[Service]
-ExecStart=/usr/bin/env settings_manager.py
-SyslogIdentifier=settings_manager.py
-Environment="PYTHONUNBUFFERED=1"
-Restart=always
-Type=dbus
-BusName={BUSNAME}
-Nice=19
-TimeoutStartSec=180s
-
-[Install]
-WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-phosphor/conf/distro/include/phosphor-defaults.inc b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
index 3158c8f..f55c4f6 100644
--- a/meta-phosphor/conf/distro/include/phosphor-defaults.inc
+++ b/meta-phosphor/conf/distro/include/phosphor-defaults.inc
@@ -112,7 +112,6 @@
 # Provide support for monitoring BMC core dumps
 VIRTUAL-RUNTIME_obmc-dump-monitor ?= "phosphor-debug-collector-monitor"
 
-PREFERRED_PROVIDER_virtual/obmc-settings-mgmt ?= "phosphor-settings"
 PREFERRED_PROVIDER_virtual/obmc-system-mgmt ?= "obmc-phosphor-sysd"
 PREFERRED_PROVIDER_virtual/obmc-wsgihost ?= "phosphor-gevent"
 
@@ -123,10 +122,10 @@
 VIRTUAL-RUNTIME_phosphor-hwmon-config ?= \
     "${@cf_enabled(d, 'obmc-mrw', 'phosphor-hwmon-config-mrw')}"
 
-# obmc-settings-mgr
+# obmc-settings-mgmt
 #
 # Provides a manager for user settings.
-VIRTUAL-RUNTIME_obmc-settings-mgr ?= "phosphor-settings-manager"
+VIRTUAL-RUNTIME_obmc-settings-mgmt ?= "phosphor-settings-manager"
 
 # obmc-network-manager
 #