Run oe-stylize on our files

In all of our recipes, we should be following yoctos lead on formatting,
order, and other things, for consistency in our meta layers.

This commit runs oe-stylize.py on all of our files.  The types of
changes being made can be seen in the commit, but amount to:

1. Setting an explicit key ordering
2. Sectioning the files appropriately
3. Applying rules checking to our files

At some point in the near future, we would turn this on as part of
repotest, but some minor changes need to be upstreamed to meta-oe (WIP)
to make that happen.

Looking for input on whether this is something we'd like to do, and
whether the diffs below look reasonable to folks.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I489dd21d38a9fe4f3ece89cc7a5e1d0463224abf
diff --git a/meta-phosphor/recipes-phosphor/dbus/dbus-perms.bb b/meta-phosphor/recipes-phosphor/dbus/dbus-perms.bb
index 9097222..025da15 100644
--- a/meta-phosphor/recipes-phosphor/dbus/dbus-perms.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/dbus-perms.bb
@@ -1,19 +1,19 @@
 SUMMARY = "Phosphor OpenBMC DBUS Permissions"
 DESCRIPTION = "Phosphor OpenBMC DBUS Permissions."
 HOMEPAGE = "http://github.com/openbmc/"
-PR = "r1"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-inherit allarch
-inherit dbus-dir
+PR = "r1"
 
 SRC_URI += "file://org.openbmc.conf"
 
-FILES:${PN}:append = " ${dbus_system_confdir}"
+inherit allarch
+inherit dbus-dir
 
 do_install:append() {
         install -d ${D}${dbus_system_confdir}
         install -m 0644 ${WORKDIR}/org.openbmc.conf \
                 ${D}${dbus_system_confdir}
 }
+
+FILES:${PN}:append = " ${dbus_system_confdir}"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
index dda33fa..22e2ee3 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces-mapper-config-native.bb
@@ -1,8 +1,7 @@
-SUMMARY="Add xyz.openbmc_project namespace to phosphor-mapper"
-DESCRIPTION="Add the xyz.openbmc_project service namespace and \
+SUMMARY = "Add xyz.openbmc_project namespace to phosphor-mapper"
+DESCRIPTION = "Add the xyz.openbmc_project service namespace and \
 xyz.openbmc_project interface prefix to the mapper \
 watch list."
-
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
 
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
index 095aa24..bcac236 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
@@ -1,24 +1,28 @@
 SUMMARY = "Phosphor DBus Interfaces"
 DESCRIPTION = "Generated bindings, using sdbus++, for the phosphor YAML"
-PR = "r1"
-PV = "1.0+git${SRCPV}"
-S = "${WORKDIR}/git"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+DEPENDS += " \
+        ${PYTHON_PN}-sdbus++-native \
+        sdbusplus \
+        systemd \
+        "
+SRCREV = "a1a46a94405db4fc29d9ad695dee44e2214e4262"
+PV = "1.0+git${SRCPV}"
+PR = "r1"
+
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces;branch=master;protocol=https"
+
+S = "${WORKDIR}/git"
 
 inherit pkgconfig meson
 inherit obmc-phosphor-utils
 inherit phosphor-dbus-yaml
 inherit python3native
 
-DEPENDS += " \
-        ${PYTHON_PN}-sdbus++-native \
-        sdbusplus \
-        systemd \
-        "
-
-SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces;branch=master;protocol=https"
-SRCREV = "a1a46a94405db4fc29d9ad695dee44e2214e4262"
+# Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
+# add them to the 'doc' subpackage.
+FILES:${PN}-doc += "${datadir}/${BPN}"
 
 # Process OBMC_ORG_YAML_SUBDIRS to create Meson config options.
 # ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true
@@ -29,14 +33,9 @@
         ])
 pdi_meson_config[vardeps] = "OBMC_ORG_YAML_SUBDIRS"
 EXTRA_OEMESON += "${@pdi_meson_config(d)}"
-
 # Remove all schemas by default regardless of the meson_options.txt config
 do_write_config:append() {
     for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
         sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
     done
 }
-
-# Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
-# add them to the 'doc' subpackage.
-FILES:${PN}-doc += "${datadir}/${BPN}"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb
index dddf9c0..093457e 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bb
@@ -1,22 +1,20 @@
+# To add additional config files, create a recipe in your layer,
+# and add it to PHOSPHOR_DBUS_MONITOR_CONFIGS with a bbappend to this recipe.
 SUMMARY = "Phosphor DBus Monitor Configuration"
 DESCRIPTION = "Meta-recipe, pulling in non-native recipes that wish to add \
 configuration files to the /usr/share/phosphor-dbus-monitor filesystem."
 HOMEPAGE = "http://github.com/openbmc/phosphor-dbus-monitor"
-PR = "r1"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+DEPENDS += "${PHOSPHOR_DBUS_MONITOR_CONFIGS}"
+PR = "r1"
 
 inherit phosphor-dbus-monitor
 
-PHOSPHOR_DBUS_MONITOR_CONFIGS ??= ""
-
-# To add additional config files, create a recipe in your layer,
-# and add it to PHOSPHOR_DBUS_MONITOR_CONFIGS with a bbappend to this recipe.
-
-DEPENDS += "${PHOSPHOR_DBUS_MONITOR_CONFIGS}"
-
 do_install() {
     mkdir -p ${D}${config_dir}
 }
 
 FILES:${PN} += "${config_dir}"
+
+PHOSPHOR_DBUS_MONITOR_CONFIGS ??= ""
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
index 2ca40fe..e9fcf6c 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-monitor_git.bb
@@ -1,24 +1,9 @@
 SUMMARY = "Phosphor DBus Monitor"
 DESCRIPTION = "Phosphor DBus Monitor is a general purpose DBus application \
 that watches DBus traffic for events and takes actions based on those events."
-PR = "r1"
-PV = "1.0+git${SRCPV}"
 HOMEPAGE = "http://github.com/openbmc/phosphor-dbus-monitor"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://github.com/openbmc/phosphor-dbus-monitor;branch=master;protocol=https"
-SRCREV = "04267b4ff02aeb9a7cc15676c38fd760575c53bd"
-
-inherit meson \
-        pkgconfig \
-        python3native \
-        phosphor-dbus-monitor \
-        obmc-phosphor-systemd
-
-PACKAGE_BEFORE_PN = "phosphor-msl-verify"
-SYSTEMD_PACKAGES = "${PN} phosphor-msl-verify"
-SYSTEMD_SERVICE:phosphor-msl-verify = "phosphor-msl-verify.service"
-
 DEPENDS += " \
         ${PN}-config \
         phosphor-logging \
@@ -31,11 +16,26 @@
         ${PYTHON_PN}-setuptools-native \
         ${PYTHON_PN}-mako-native \
         "
+SRCREV = "04267b4ff02aeb9a7cc15676c38fd760575c53bd"
+PV = "1.0+git${SRCPV}"
+PR = "r1"
 
-FILES:phosphor-msl-verify = "${bindir}/phosphor-msl-verify"
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-monitor;branch=master;protocol=https"
 
+SYSTEMD_PACKAGES = "${PN} phosphor-msl-verify"
+SYSTEMD_SERVICE:phosphor-msl-verify = "phosphor-msl-verify.service"
 S = "${WORKDIR}/git"
 
+inherit meson \
+        pkgconfig \
+        python3native \
+        phosphor-dbus-monitor \
+        obmc-phosphor-systemd
+
 EXTRA_OEMESON = " \
         -DYAML_PATH=${STAGING_DIR_HOST}${config_dir} \
         "
+
+FILES:phosphor-msl-verify = "${bindir}/phosphor-msl-verify"
+
+PACKAGE_BEFORE_PN = "phosphor-msl-verify"
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
index 2682ba3..c74144b 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-legacy-namespace-mapper-config-native.bb
@@ -1,7 +1,6 @@
-SUMMARY="Add org.openbmc namespace to phosphor-mapper"
-DESCRIPTION="Add the legacy org.openbmc service namespace and \
+SUMMARY = "Add org.openbmc namespace to phosphor-mapper"
+DESCRIPTION = "Add the legacy org.openbmc service namespace and \
 org.openbmc interface prefix to the mapper watch list."
-
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
 
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
index ca88023..1ee9b86 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper-config-native.bb
@@ -1,38 +1,33 @@
-SUMMARY = "Phosphor Mapper Configuration"
-DESCRIPTION = "Meta-recipe, pulling in native recipes that wish to add \
-configuration files to the native /usr/share/phosphor-mapper filesystem."
-HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
-PR = "r1"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-inherit phosphor-mapper
-inherit native
-
-PHOSPHOR_MAPPER_CONFIGS = " \
-        phosphor-dbus-interfaces-mapper-config-native \
-        phosphor-legacy-namespace-mapper-config-native \
-        "
-
-DEPENDS += "${PHOSPHOR_MAPPER_CONFIGS}"
-
 # To add namespaces and blacklists to the mapper configuration,
 # create a native recipe in your layer, and add it to
 # PHOSPHOR_MAPPER_CONFIGS with a bbappend to this recipe.
 # Recipes should set one of the variables below.
 # Consult phosphor-mapper.bbclass for additional information.
+SUMMARY = "Phosphor Mapper Configuration"
+DESCRIPTION = "Meta-recipe, pulling in native recipes that wish to add \
+configuration files to the native /usr/share/phosphor-mapper filesystem."
+HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+DEPENDS += "${PHOSPHOR_MAPPER_CONFIGS}"
+PR = "r1"
 
-# Add services to be monitored.
-PHOSPHOR_MAPPER_SERVICE = ""
-
-# Add interfaces to be monitored.
-PHOSPHOR_MAPPER_INTERFACE = ""
-
-# Blacklist services from being monitored.
-PHOSPHOR_MAPPER_SERVICE_BLACKLIST = ""
+inherit phosphor-mapper
+inherit native
 
 do_install() {
         install -d ${D}/${namespace_dir}
         install -d ${D}/${interface_dir}
         install -d ${D}/${serviceblacklist_dir}
 }
+
+PHOSPHOR_MAPPER_CONFIGS = " \
+        phosphor-dbus-interfaces-mapper-config-native \
+        phosphor-legacy-namespace-mapper-config-native \
+        "
+# Add services to be monitored.
+PHOSPHOR_MAPPER_SERVICE = ""
+# Add interfaces to be monitored.
+PHOSPHOR_MAPPER_INTERFACE = ""
+# Blacklist services from being monitored.
+PHOSPHOR_MAPPER_SERVICE_BLACKLIST = ""
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
index 4d49516..6925d71 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-mapper_git.bb
@@ -1,43 +1,43 @@
 SUMMARY = "Phosphor DBUS Object Manager"
 DESCRIPTION = "Phosphor DBUS object manager."
 HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
-PR = "r1"
-PV = "1.0+git${SRCPV}"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
-
-inherit meson pkgconfig
-inherit obmc-phosphor-dbus-service
-inherit obmc-phosphor-systemd
-inherit phosphor-mapperdir
-
 DEPENDS += "systemd"
 DEPENDS += "boost"
 DEPENDS += "libtinyxml2"
 DEPENDS += "sdbusplus"
 DEPENDS += "phosphor-logging"
 DEPENDS += "${PN}-config-native"
+SRCREV = "1e94e60b4fb6f6e1ebe42eeeeaf52a070ae11c30"
+PV = "1.0+git${SRCPV}"
+PR = "r1"
 
-DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"
+SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
+
 SYSTEMD_SERVICE:${PN} += " \
         mapper-wait@.service \
         mapper-subtree-remove@.service \
         "
-SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
-
-SRCREV = "1e94e60b4fb6f6e1ebe42eeeeaf52a070ae11c30"
-
 S = "${WORKDIR}/git"
 
+inherit meson pkgconfig
+inherit obmc-phosphor-dbus-service
+inherit obmc-phosphor-systemd
+inherit phosphor-mapperdir
+
 EXTRA_OEMESON += "-Dtests=disabled"
 
+do_install[postfuncs] += "do_emit_env"
+
+PACKAGES_DYNAMIC += "^libmapper.*"
+
+FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
+
 python populate_packages:prepend () {
     mapperlibdir = d.getVar("libdir", True)
     do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
 }
-PACKAGES_DYNAMIC += "^libmapper.*"
-FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
-
 # Construct a systemd environment file with mapper commandline
 # from the native sysroot /usr/share/phosphor-mapper filesystem.
 python do_emit_env() {
@@ -46,25 +46,21 @@
     services = []
     for s in os.listdir(path):
         services.append('.'.join(s.split('-')))
-
     path = d.getVar('STAGING_DIR_NATIVE', True) + \
         d.getVar('interface_dir', True)
     interfaces = []
     for i in os.listdir(path):
         interfaces.append('.'.join(i.split('-')))
-
     path = d.getVar('STAGING_DIR_NATIVE', True) + \
         d.getVar('serviceblacklist_dir', True)
     service_blacklists = []
     for x in os.listdir(path):
         service_blacklists.append('.'.join(x.split('-')))
-
     path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
     path.append('obmc')
     path.append('mapper')
     parent = os.path.join(*path[:-1])
     path = os.path.join(*path)
-
     if not os.path.exists(parent):
         os.makedirs(parent)
     with open(path, 'w+') as fd:
@@ -76,4 +72,4 @@
         fd.write('\n')
 }
 
-do_install[postfuncs] += "do_emit_env"
+DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"