webui: add new IMAGE_FEATURE

Lots of machines bring the webui in via an RDEPENDS on something
like the "extras" package. The webui for most OpenBMC machines is a
standard feature (as seen in the amount of .bbappend files used to bring
it in) so lets make it an official image feature.

Do not include this new image feature by default in all OpenBMC images
as building the package is non-standard in how it builds. It directly
calls NPM to install required packages so it can not be built offline
and it complicates the software bill of materials.

Tested:
- Confirmed that system1 has webui by default with this when including
  the new IMAGE_FEATURE

Change-Id: Icc9fd5d1025f7c385b0aa0f6a9dd74e3a7354c7b
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 9ecd14d..b5d2650 100644
--- a/meta-phosphor/classes/obmc-phosphor-image.bbclass
+++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass
@@ -31,6 +31,7 @@
 # - obmc-telemetry                    - OpenBMC telemetry solution
 # - obmc-user-mgmt                    - OpenBMC user management
 # - obmc-user-mgmt-ldap               - OpenBMC LDAP users
+# - obmc-webui                        - OpenBMC Web User Interface
 
 inherit core-image
 inherit obmc-phosphor-utils
@@ -68,6 +69,13 @@
 FEATURE_PACKAGES_obmc-user-mgmt-ldap ?= "packagegroup-obmc-apps-user-mgmt-ldap"
 FEATURE_PACKAGES_obmc-dmtf-pmci ?= "packagegroup-obmc-apps-dmtf-pmci"
 
+# Note that the webui is not included by default in OpenBMC
+# images due to its non-standard build process. It utilizes
+# npm during the build, resulting in an inability to build
+# this package offline and making the software bill of materials
+# incorrect.
+FEATURE_PACKAGES_obmc-webui ?= "packagegroup-obmc-apps-webui"
+
 # FIXME: phosphor-net-ipmi depends on phosphor-ipmi-host !?!? and
 # cannot be built on core-qemu machines because of the dependency
 # tree under phosphor-ipmi-host
diff --git a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
index 0247389..1bd5516 100644
--- a/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
+++ b/meta-phosphor/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bb
@@ -32,6 +32,7 @@
         ${PN}-user-mgmt \
         ${PN}-user-mgmt-ldap \
         ${PN}-dmtf-pmci \
+        ${PN}-webui \
         "
 
 SUMMARY:${PN}-bmc-state-mgmt = "BMC state management"
@@ -207,3 +208,8 @@
 RDEPENDS:${PN}-dmtf-pmci = " \
         ${@bb.utils.contains('DISTRO_FEATURES', 'mctp', 'mctp', '', d)} \
         "
+
+SUMMARY:${PN}-webui = "Web User Interface support"
+RDEPENDS:${PN}-webui = " \
+        webui-vue \
+        "