phosphor-logging: Create recipe

Add phosphor-logging as a virtual package

Change-Id: I591fbf94d90d383baf962cd94c08f6b63bb1ee83
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
index 0462a1f..813b20d 100644
--- a/classes/obmc-phosphor-image.bbclass
+++ b/classes/obmc-phosphor-image.bbclass
@@ -11,6 +11,7 @@
 # - obmc-settings-mgmt                - OpenBMC settings management
 # - obmc-phosphor-system-mgmt         - Phosphor OpenBMC system management
 # - obmc-host-ipmi                    - OpenBMC Host IPMI
+# - obmc-logging                      - OpenBMC logging management
 
 inherit core-image
 inherit obmc-phosphor-license
@@ -25,6 +26,7 @@
 FEATURE_PACKAGES_obmc-settings-mgmt ?= "${@df_enabled('obmc-settings-mgmt', 'virtual-obmc-settings-mgmt', d)}"
 FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled('obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', d)}"
 FEATURE_PACKAGES_obmc-host-ipmi ?= "${@cf_enabled('obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw', d)}"
+FEATURE_PACKAGES_obmc-logging-mgmt ?= "${@cf_enabled('obmc-logging-mgmt', 'virtual-obmc-logging-mgmt', d)}"
 
 # Install entire Phosphor application stack by default
 IMAGE_FEATURES += " \
@@ -37,6 +39,7 @@
         obmc-settings-mgmt \
         obmc-system-mgmt \
         obmc-host-ipmi \
+        obmc-logging-mgmt \
         ssh-server-dropbear \
         "
 
diff --git a/common/recipes-phosphor/logging/phosphor-logging.bb b/common/recipes-phosphor/logging/phosphor-logging.bb
new file mode 100644
index 0000000..c7b2be9
--- /dev/null
+++ b/common/recipes-phosphor/logging/phosphor-logging.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Logging DBUS Object"
+DESCRIPTION = "Logging DBUS Object"
+HOMEPAGE = "https://github.com/openbmc/phosphor-logging"
+PR = "r1"
+
+inherit autotools pkgconfig
+inherit pythonnative
+inherit obmc-phosphor-license
+inherit obmc-phosphor-dbus-service
+
+DBUS_SERVICE_${PN} += "xyz.openbmc_project.Logging.service"
+
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "systemd"
+DEPENDS += "python-mako-native"
+DEPENDS += "python-pyyaml-native"
+PROVIDES += "virtual/obmc-logging-mgmt"
+RPROVIDES_${PN} += "virtual-obmc-logging-mgmt"
+
+SRC_URI += "git://github.com/openbmc/phosphor-logging"
+SRCREV = "c830e0f492c50e712c2bf1589e0282eebb4107ab"
+
+S = "${WORKDIR}/git"
+
diff --git a/common/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service b/common/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service
new file mode 100644
index 0000000..09ea947
--- /dev/null
+++ b/common/recipes-phosphor/logging/phosphor-logging/xyz.openbmc_project.Logging.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Phosphor Log Manager
+
+[Service]
+ExecStart={sbindir}/phosphor-log-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/conf/distro/include/phosphor-defaults.inc b/conf/distro/include/phosphor-defaults.inc
index 522a639..abd04b3 100644
--- a/conf/distro/include/phosphor-defaults.inc
+++ b/conf/distro/include/phosphor-defaults.inc
@@ -18,3 +18,4 @@
 PREFERRED_PROVIDER_virtual/obmc-sensor-mgmt ?= "obmc-phosphor-sensord"
 PREFERRED_PROVIDER_virtual/obmc-system-mgmt ?= "obmc-phosphor-sysd"
 PREFERRED_PROVIDER_virtual/obmc-settings-mgmt ?= "phosphor-settings"
+PREFERRED_PROVIDER_virtual/obmc-logging-mgmt ?= "phosphor-logging"
diff --git a/conf/distro/openbmc-phosphor.conf b/conf/distro/openbmc-phosphor.conf
index d950d67..22b6bc6 100644
--- a/conf/distro/openbmc-phosphor.conf
+++ b/conf/distro/openbmc-phosphor.conf
@@ -30,6 +30,7 @@
         obmc-phosphor-system-mgmt \
         obmc-host-ipmi \
         obmc-mrw \
+        obmc-logging-mgmt \
         avahi \
         ${DISTRO_FEATURES_LIBC} \
         "