diff options
author | Ed Tanous <edtanous@google.com> | 2022-09-19 19:13:20 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-09-20 17:02:39 +0300 |
commit | 9936f86df6fc55be042cec5eb15f6e19a9e7c890 (patch) | |
tree | 251861f6bba6451ddfe328558097f6abf438d8d6 /meta-phosphor/recipes-phosphor/flash | |
parent | bb8f0657781d78264d08d324853f94bd1abc8efa (diff) | |
download | openbmc-9936f86df6fc55be042cec5eb15f6e19a9e7c890.tar.xz |
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
Diffstat (limited to 'meta-phosphor/recipes-phosphor/flash')
11 files changed, 98 insertions, 107 deletions
diff --git a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb index 4fa3ff73f8..3d7c94e78f 100644 --- a/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb +++ b/meta-phosphor/recipes-phosphor/flash/noverify-bmc-update.bb @@ -2,21 +2,21 @@ DESCRIPTION = "phosphor-ipmi-flash config to update without verifying the image" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -inherit systemd - SRC_URI += "file://noverify-bmc-update.service" SRC_URI += "file://noverify-bmc-verify.service" SRC_URI += "file://config-bmc.json" SYSTEMD_SERVICE:${PN} += "noverify-bmc-update.service" SYSTEMD_SERVICE:${PN} += "noverify-bmc-verify.service" -FILES:${PN} += "${datadir}/phosphor-ipmi-flash/config-bmc.json" + +inherit systemd do_install() { install -d ${D}${datadir}/phosphor-ipmi-flash install -m 0644 ${WORKDIR}/config-bmc.json ${D}${datadir}/phosphor-ipmi-flash - install -d ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/noverify-bmc-update.service ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/noverify-bmc-verify.service ${D}${systemd_system_unitdir} } + +FILES:${PN} += "${datadir}/phosphor-ipmi-flash/config-bmc.json" diff --git a/meta-phosphor/recipes-phosphor/flash/obmc-flash-bios_git.bb b/meta-phosphor/recipes-phosphor/flash/obmc-flash-bios_git.bb index d5e24a3d01..9dd30e3a32 100644 --- a/meta-phosphor/recipes-phosphor/flash/obmc-flash-bios_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/obmc-flash-bios_git.bb @@ -2,13 +2,14 @@ SUMMARY = "OpenBMC org.openbmc.Flash example implementation" DESCRIPTION = "A sample implementation for the org.openbmc.Flash DBUS API. \ org.openbmc.Flash provides APIs for functions like BIOS flash access control \ and updating." -PR = "r1" PV = "1.0+git${SRCPV}" +PR = "r1" + +SKELETON_DIR = "flashbios" +SYSTEMD_SERVICE:${PN} += "obmc-flash-init.service" inherit skeleton-gdbus inherit obmc-phosphor-dbus-service inherit pkgconfig -SKELETON_DIR = "flashbios" DBUS_SERVICE:${PN} += "org.openbmc.control.Flash.service" -SYSTEMD_SERVICE:${PN} += "obmc-flash-init.service" diff --git a/meta-phosphor/recipes-phosphor/flash/obmc-flash-bmc_git.bb b/meta-phosphor/recipes-phosphor/flash/obmc-flash-bmc_git.bb index cd2b555816..0c4053c26a 100644 --- a/meta-phosphor/recipes-phosphor/flash/obmc-flash-bmc_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/obmc-flash-bmc_git.bb @@ -1,7 +1,9 @@ SUMMARY = "OpenBMC BMC update utility" DESCRIPTION = "OpenBMC BMC update utility." -PR = "r1" PV = "1.0+git${SRCPV}" +PR = "r1" + +SKELETON_DIR = "pyflashbmc" inherit skeleton-python inherit obmc-phosphor-dbus-service @@ -16,5 +18,4 @@ RDEPENDS:${PN} += "\ pyphosphor-dbus \ " -SKELETON_DIR = "pyflashbmc" DBUS_SERVICE:${PN} += "org.openbmc.control.BmcFlash.service" diff --git a/meta-phosphor/recipes-phosphor/flash/obmc-mgr-download_git.bb b/meta-phosphor/recipes-phosphor/flash/obmc-mgr-download_git.bb index a6cd660587..7ba18e4ad7 100644 --- a/meta-phosphor/recipes-phosphor/flash/obmc-mgr-download_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/obmc-mgr-download_git.bb @@ -1,7 +1,9 @@ SUMMARY = "OpenBMC org.openbmc.managers.Download example implementation" DESCRIPTION = "An example implementation for the org.openbmc.managers.Download DBUS API." -PR = "r1" PV = "1.0+git${SRCPV}" +PR = "r1" + +SKELETON_DIR = "pydownloadmgr" inherit skeleton-python inherit obmc-phosphor-dbus-service @@ -13,5 +15,4 @@ RDEPENDS:${PN} += "\ pyphosphor-dbus \ " -SKELETON_DIR = "pydownloadmgr" DBUS_SERVICE:${PN} += "org.openbmc.managers.Download.service" diff --git a/meta-phosphor/recipes-phosphor/flash/obmc-op-flasher_git.bb b/meta-phosphor/recipes-phosphor/flash/obmc-op-flasher_git.bb index 8c5d263a64..4818c20ed0 100644 --- a/meta-phosphor/recipes-phosphor/flash/obmc-op-flasher_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/obmc-op-flasher_git.bb @@ -1,12 +1,12 @@ SUMMARY = "OpenPOWER flashing utility." DESCRIPTION = "A BMC/BIOS flashing utility for use on OpenPOWER system." -PR = "r1" +DEPENDS += "pflash" PV = "1.0+git${SRCPV}" +PR = "r1" + +SKELETON_DIR = "op-flasher" inherit skeleton-gdbus inherit pkgconfig -DEPENDS += "pflash" RDEPENDS:${PN} += "pflash" - -SKELETON_DIR = "op-flasher" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb index a9123b1b4a..31a06284e2 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-hostfw-image.bb @@ -1,31 +1,28 @@ SUMMARY = "Provides a host firmware image" DESCRIPTION = "Use a bbappend to add the image files" +LICENSE = "${HOSTFW_LICENSE}" +LIC_FILES_CHKSUM = "${HOSTFW_LIC_FILES_CHKSUM}" PR = "r1" inherit allarch inherit deploy -HOSTFW_LICENSE ?= "Apache-2.0" -HOSTFW_LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -LICENSE = "${HOSTFW_LICENSE}" -LIC_FILES_CHKSUM = "${HOSTFW_LIC_FILES_CHKSUM}" - do_compile() { # The image directory can be used as the source to create a filesystem to # add to the BMC image. install -d ${B}/image - # Install an image-hostfw file in the update directory to be included in # the code update tarball. install -d ${B}/update } +addtask deploy before do_build after do_compile + +HOSTFW_LICENSE ?= "Apache-2.0" +HOSTFW_LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" do_deploy() { install -d ${DEPLOYDIR}/hostfw/image install -d ${DEPLOYDIR}/hostfw/update cp -R --no-dereference --preserve=mode,links ${B}/image/ ${DEPLOYDIR}/hostfw/ cp -R --no-dereference --preserve=mode,links ${B}/update/ ${DEPLOYDIR}/hostfw/ } - -addtask deploy before do_build after do_compile diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-image-signing.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-image-signing.bb index d10eceffa0..cfacfbe65e 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-image-signing.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-image-signing.bb @@ -1,30 +1,26 @@ SUMMARY = "OpenBMC image signing public key" DESCRIPTION = "Public key information to be included in images for image verification." -PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -inherit allarch - -INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}" - DEPENDS += "openssl-native" DEPENDS += "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native', '', d)}" - -FILES:${PN} += "${sysconfdir}/activationdata/" +PR = "r1" SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv" SIGNING_KEY_TYPE = "${@os.path.splitext(os.path.basename('${SIGNING_KEY}'))[0]}" +SYSROOT_DIRS:append = " ${sysconfdir}" -do_install() { - openssl pkey -in "${SIGNING_KEY}" -pubout -out ${WORKDIR}/publickey - echo HashType=RSA-SHA256 > "${WORKDIR}/hashfunc" - - idir="${D}${sysconfdir}/activationdata/${SIGNING_KEY_TYPE}" +inherit allarch - install -d ${idir} - install -m 644 ${WORKDIR}/publickey ${idir} - install -m 644 ${WORKDIR}/hashfunc ${idir} +do_install() { + openssl pkey -in "${SIGNING_KEY}" -pubout -out ${WORKDIR}/publickey + echo HashType=RSA-SHA256 > "${WORKDIR}/hashfunc" + idir="${D}${sysconfdir}/activationdata/${SIGNING_KEY_TYPE}" + install -d ${idir} + install -m 644 ${WORKDIR}/publickey ${idir} + install -m 644 ${WORKDIR}/hashfunc ${idir} } -SYSROOT_DIRS:append = " ${sysconfdir}" +FILES:${PN} += "${sysconfdir}/activationdata/" + +INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb index d16cea3135..16f62e3fd0 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-insecure-signing-key-native.bb @@ -1,16 +1,16 @@ SUMMARY = "Insecure private key for testing and development" DESCRIPTION = "Do not use this key to sign images." -PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +PR = "r1" + +SRC_URI += "file://OpenBMC.priv" inherit allarch inherit native -SRC_URI += "file://OpenBMC.priv" - do_install() { - bbplain "Using an insecure image signing key!" - install -d ${D}${datadir} - install -m 400 ${WORKDIR}/OpenBMC.priv ${D}${datadir} + bbplain "Using an insecure image signing key!" + install -d ${D}${datadir} + install -m 400 ${WORKDIR}/OpenBMC.priv ${D}${datadir} } diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb index ffc343b931..54abc12e73 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-error-native_git.bb @@ -1,16 +1,14 @@ SUMMARY = "Copy error yaml files to known path for elog parsing" -PR = "r1" -PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +PV = "1.0+git${SRCPV}" +PR = "r1" + +S = "${WORKDIR}/git" inherit phosphor-dbus-yaml inherit native -require phosphor-software-manager.inc - -S = "${WORKDIR}/git" - do_install:append() { SRC=${S}/xyz/openbmc_project/Software/ DEST=${D}${yaml_dir}/xyz/openbmc_project/Software/ @@ -18,3 +16,5 @@ do_install:append() { install ${SRC}/*.errors.yaml ${DEST} install ${SRC}/*.metadata.yaml ${DEST} } + +require phosphor-software-manager.inc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb index 84450eb611..438487a545 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager-yaml-provider_git.bb @@ -1,10 +1,11 @@ SUMMARY = "phosphor-software-manager: install phosphor-logging yaml" -PR = "r1" -PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +PV = "1.0+git${SRCPV}" +PR = "r1" + +S = "${WORKDIR}/git" inherit phosphor-logging-yaml-provider -require phosphor-software-manager.inc -S = "${WORKDIR}/git" +require phosphor-software-manager.inc diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb index 9c71ad3528..0b020503e2 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb @@ -2,10 +2,25 @@ SUMMARY = "Phosphor Software Management" DESCRIPTION = "Phosphor Software Manager provides a set of system software \ management daemons. It is suitable for use on a wide variety of OpenBMC \ platforms." -PR = "r1" +DEPENDS += " \ + openssl \ + phosphor-dbus-interfaces \ + phosphor-logging \ + ${PYTHON_PN}-sdbus++-native \ + sdbusplus \ +" +PACKAGECONFIG[verify_signature] = " \ + -Dverify-full-signature=enabled, \ + -Dverify-full-signature=disabled" +PACKAGECONFIG[sync_bmc_files] = "-Dsync-bmc-files=enabled, -Dsync-bmc-files=disabled" +PACKAGECONFIG[usb_code_update] = "-Dusb-code-update=enabled, -Dusb-code-update=disabled, cli11" +PACKAGECONFIG[side_switch_on_boot] = "-Dside-switch-on-boot=enabled, -Dside-switch-on-boot=disabled, cli11" +PACKAGECONFIG[ubifs_layout] = "-Dbmc-layout=ubi" +PACKAGECONFIG[mmc_layout] = "-Dbmc-layout=mmc" +PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled" +PACKAGECONFIG[static-dual-image] = "-Dbmc-static-dual-image=enabled, -Dbmc-static-dual-image=disabled" PV = "1.0+git${SRCPV}" - -require ${BPN}.inc +PR = "r1" SOFTWARE_MGR_PACKAGES = " \ ${PN}-version \ @@ -17,25 +32,23 @@ SOFTWARE_MGR_PACKAGES = " \ ${PN}-usb \ ${PN}-side-switch \ " -PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}" -ALLOW_EMPTY:${PN} = "1" - -DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}" - # Set SYSTEMD_PACKAGES to empty because we do not want ${PN} and DBUS_PACKAGES # handles the rest. SYSTEMD_PACKAGES = "" - -PACKAGECONFIG[verify_signature] = " \ - -Dverify-full-signature=enabled, \ - -Dverify-full-signature=disabled" -PACKAGECONFIG[sync_bmc_files] = "-Dsync-bmc-files=enabled, -Dsync-bmc-files=disabled" -PACKAGECONFIG[usb_code_update] = "-Dusb-code-update=enabled, -Dusb-code-update=disabled, cli11" -PACKAGECONFIG[side_switch_on_boot] = "-Dside-switch-on-boot=enabled, -Dside-switch-on-boot=disabled, cli11" -PACKAGECONFIG[ubifs_layout] = "-Dbmc-layout=ubi" -PACKAGECONFIG[mmc_layout] = "-Dbmc-layout=mmc" -PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled" -PACKAGECONFIG[static-dual-image] = "-Dbmc-static-dual-image=enabled, -Dbmc-static-dual-image=disabled" +SYSTEMD_SERVICE:${PN}-updater += " \ + force-reboot.service \ + obmc-flash-bmc-setenv@.service \ + reboot-guard-disable.service \ + reboot-guard-enable.service \ + usr-local.mount \ +" +SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}" +SYSTEMD_SERVICE:${PN}-usb += "${@bb.utils.contains('PACKAGECONFIG', 'usb_code_update', 'usb-code-update@.service', '', d)}" +SYSTEMD_SERVICE:${PN}-side-switch += "${@bb.utils.contains('PACKAGECONFIG', 'side_switch_on_boot', 'phosphor-bmc-side-switch.service', '', d)}" +SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-alt@.service', '', d)}" +SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-static-mount-alt.service', '', d)}" +SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-prepare-for-sync.service', '', d)}" +S = "${WORKDIR}/git" inherit meson pkgconfig inherit obmc-phosphor-dbus-service @@ -43,17 +56,14 @@ inherit python3native inherit ${@bb.utils.contains('DISTRO_FEATURES', 'obmc-ubi-fs', 'phosphor-software-manager-ubi-fs', '', d)} inherit ${@bb.utils.contains('DISTRO_FEATURES', 'phosphor-mmc', 'phosphor-software-manager-mmc', '', d)} -DEPENDS += " \ - openssl \ - phosphor-dbus-interfaces \ - phosphor-logging \ - ${PYTHON_PN}-sdbus++-native \ - sdbusplus \ -" +EXTRA_OEMESON:append = " -Dtests=disabled" + +do_install:append() { + install -d ${D}/usr/local +} # The repo installs several scripts that depends on bash RDEPENDS:${PN} += " bash" - RDEPENDS:${PN}-updater += " \ bash \ virtual-obmc-image-manager \ @@ -82,30 +92,14 @@ FILES:${PN}-usb += "\ FILES:${PN}-side-switch += "\ ${bindir}/phosphor-bmc-side-switch \ " + +require ${BPN}.inc + +ALLOW_EMPTY:${PN} = "1" + +PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}" +DBUS_PACKAGES = "${SOFTWARE_MGR_PACKAGES}" DBUS_SERVICE:${PN}-version += "xyz.openbmc_project.Software.Version.service" DBUS_SERVICE:${PN}-download-mgr += "xyz.openbmc_project.Software.Download.service" DBUS_SERVICE:${PN}-updater += "xyz.openbmc_project.Software.BMC.Updater.service" DBUS_SERVICE:${PN}-sync += "xyz.openbmc_project.Software.Sync.service" - -SYSTEMD_SERVICE:${PN}-updater += " \ - force-reboot.service \ - obmc-flash-bmc-setenv@.service \ - reboot-guard-disable.service \ - reboot-guard-enable.service \ - usr-local.mount \ -" - -SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}" -SYSTEMD_SERVICE:${PN}-usb += "${@bb.utils.contains('PACKAGECONFIG', 'usb_code_update', 'usb-code-update@.service', '', d)}" -SYSTEMD_SERVICE:${PN}-side-switch += "${@bb.utils.contains('PACKAGECONFIG', 'side_switch_on_boot', 'phosphor-bmc-side-switch.service', '', d)}" -SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-alt@.service', '', d)}" -SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-static-mount-alt.service', '', d)}" -SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'static-dual-image', 'obmc-flash-bmc-prepare-for-sync.service', '', d)}" - -S = "${WORKDIR}/git" - -EXTRA_OEMESON:append = " -Dtests=disabled" - -do_install:append() { - install -d ${D}/usr/local -} |