Add recipe for phosphor-user-manager

Removed the obmc-phosphor-user and put the new one

Also, removed the usage of PREFERRED_PROVIDER and replaced by
VIRTUAL_RUNTIME for this feature

Change-Id: I6f0825f8d51eecb9c666a95d9fd702a8ea8bb08b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/common/recipes-phosphor/users/obmc-phosphor-user.bb b/common/recipes-phosphor/users/obmc-phosphor-user.bb
deleted file mode 100644
index 83b7024..0000000
--- a/common/recipes-phosphor/users/obmc-phosphor-user.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "User DBUS object"
-DESCRIPTION = "User DBUS object"
-HOMEPAGE = "http://github.com/openbmc/phosphor-networkd"
-PR = "r1"
-
-inherit allarch
-inherit obmc-phosphor-license
-inherit obmc-phosphor-dbus-service
-inherit phosphor-networkd-rev
-
-PROVIDES += "virtual/obmc-user-mgmt"
-RPROVIDES_${PN} += "virtual-obmc-user-mgmt"
-
-RDEPENDS_${PN} += " \
-        python-dbus \
-        python-pygobject \
-        python-subprocess \
-        python-pexpect"
-
-S = "${WORKDIR}/git"
-INSTALL_NAME = "userman.py"
-
-DBUS_SERVICE_${PN} += "org.openbmc.UserManager.service"
-
-# Since base_do_compile finds a makefile (from networkd) it tries to
-# compile.  Short-circuit that because we just need to copy a python
-# file in this package.
-do_compile() {
-    :
-}
-
-do_install_append() {
-echo "***installing $INSTALL_NAME"
-        install -d ${D}/${sbindir}
-        install ${S}/${INSTALL_NAME} ${D}/${sbindir}/obmc-phosphor-userd
-}
-
diff --git a/common/recipes-phosphor/users/obmc-phosphor-user/org.openbmc.UserManager.service b/common/recipes-phosphor/users/obmc-phosphor-user/org.openbmc.UserManager.service
deleted file mode 100644
index 64408b7..0000000
--- a/common/recipes-phosphor/users/obmc-phosphor-user/org.openbmc.UserManager.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Phosphor User Manager
-
-[Service]
-ExecStart=/usr/bin/env obmc-phosphor-userd
-SyslogIdentifier=obmc-phosphor-userd
-Environment="PYTHONUNBUFFERED=1"
-Restart=always
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/common/recipes-phosphor/users/phosphor-user-manager.bb b/common/recipes-phosphor/users/phosphor-user-manager.bb
new file mode 100644
index 0000000..390c51a
--- /dev/null
+++ b/common/recipes-phosphor/users/phosphor-user-manager.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Phosphor User Manager Daemon"
+DESCRIPTION = "Daemon that does user management"
+HOMEPAGE = "http://github.com/openbmc/phosphor-user-manager"
+PR = "r1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-logging"
+DEPENDS += "phosphor-dbus-interfaces"
+RDEPENDS_${PN} += "libsystemd"
+RDEPENDS_${PN} += "phosphor-logging"
+
+
+DBUS_SERVICE_${PN} += "xyz.openbmc_project.User.Manager.service"
+
+SRC_URI += "git://github.com/openbmc/phosphor-user-manager"
+SRCREV = "035a96983cdf8a11a1c2380106c11c94cb8418b2"
+S = "${WORKDIR}/git"
diff --git a/common/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service b/common/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service
new file mode 100644
index 0000000..f8926e7
--- /dev/null
+++ b/common/recipes-phosphor/users/phosphor-user-manager/xyz.openbmc_project.User.Manager.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Phosphor User Manager
+
+[Service]
+ExecStart=/usr/bin/env phosphor-user-manager
+SyslogIdentifier=phosphor-user-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}