Add recipe for the new settings manager
Change-Id: I28b3454c0066649b0c163616247f9ca1bbf3abb3
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/common/recipes-phosphor/settings/phosphor-settings-defaults.bb b/common/recipes-phosphor/settings/phosphor-settings-defaults.bb
new file mode 100644
index 0000000..37b8d4e
--- /dev/null
+++ b/common/recipes-phosphor/settings/phosphor-settings-defaults.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Default settings"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-settings-manager
+
+SRC_URI += "file://defaults.yaml"
+
+PROVIDES += "virtual/phosphor-settings-defaults"
+
+S = "${WORKDIR}"
+
+do_install() {
+ DEST=${D}${settings_datadir}
+ install -d ${DEST}
+ install defaults.yaml ${DEST}
+}
diff --git a/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml b/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
new file mode 100644
index 0000000..b054bb2
--- /dev/null
+++ b/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
@@ -0,0 +1,32 @@
+/xyz/openbmc_project/control/host0/auto_reboot:
+ Interface: xyz.openbmc_project.Control.Boot.RebootPolicy
+ Defaults:
+ AutoReboot: 'false'
+
+/xyz/openbmc_project/control/host0/boot_source:
+ Interface: xyz.openbmc_project.Control.Boot.Source
+ Defaults:
+ BootSource: Source::Sources::Default
+
+/xyz/openbmc_project/control/host0/boot_mode:
+ Interface: xyz.openbmc_project.Control.Boot.Mode
+ Defaults:
+ BootMode: Mode::Modes::Regular
+
+/xyz/openbmc_project/control/host0/power_cap:
+ Interface: xyz.openbmc_project.Control.Power.Cap
+
+/xyz/openbmc_project/control/host0/power_restore_policy:
+ Interface: xyz.openbmc_project.Control.Power.RestorePolicy
+ Defaults:
+ PowerRestorePolicy: RestorePolicy::Policy::Restore
+
+/xyz/openbmc_project/time/owner:
+ Interface: xyz.openbmc_project.Time.Owner
+ Defaults:
+ TimeOwner: Owner::Owners::BMC
+
+/xyz/openbmc_project/time/sync_method:
+ Interface: xyz.openbmc_project.Time.Synchronization
+ Defaults:
+ TimeSyncMethod: Synchronization::Method::NTP
diff --git a/common/recipes-phosphor/settings/phosphor-settings-manager.bb b/common/recipes-phosphor/settings/phosphor-settings-manager.bb
new file mode 100644
index 0000000..56db58b
--- /dev/null
+++ b/common/recipes-phosphor/settings/phosphor-settings-manager.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Phosphor Settings Manager"
+DESCRIPTION = "Phosphor Settings Manager is an application that creates \
+d-bus objects to represent various user settings."
+PR = "r1"
+
+inherit autotools
+inherit obmc-phosphor-dbus-service
+inherit pythonnative
+inherit phosphor-settings-manager
+
+require phosphor-settings-manager.inc
+
+DBUS_SERVICE_${PN} = "xyz.openbmc_project.Settings.service"
+
+DEPENDS += "python-pyyaml-native"
+DEPENDS += "python-mako-native"
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "virtual/phosphor-settings-defaults"
+DEPENDS += "sdbusplus sdbusplus-native"
+DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native"
+
+RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ SETTINGS_YAML=${STAGING_DIR_NATIVE}${settings_datadir}/defaults.yaml \
+ "
diff --git a/common/recipes-phosphor/settings/phosphor-settings-manager.inc b/common/recipes-phosphor/settings/phosphor-settings-manager.inc
new file mode 100644
index 0000000..53287e8
--- /dev/null
+++ b/common/recipes-phosphor/settings/phosphor-settings-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-settingsd"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+SRC_URI += "git://github.com/openbmc/phosphor-settingsd"
+SRCREV = "89872291c360dfb33824738c066a2171c3306910"
diff --git a/common/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service b/common/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service
new file mode 100644
index 0000000..8b4be9c
--- /dev/null
+++ b/common/recipes-phosphor/settings/phosphor-settings-manager/xyz.openbmc_project.Settings.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor Settings Daemon
+
+[Service]
+ExecStart={sbindir}/phosphor-settings-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}