summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-09-19 19:13:20 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-09-20 17:02:39 +0300
commit9936f86df6fc55be042cec5eb15f6e19a9e7c890 (patch)
tree251861f6bba6451ddfe328558097f6abf438d8d6 /meta-phosphor/recipes-core
parentbb8f0657781d78264d08d324853f94bd1abc8efa (diff)
downloadopenbmc-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-core')
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files_%.bbappend7
-rw-r--r--meta-phosphor/recipes-core/busybox/busybox_%.bbappend1
-rw-r--r--meta-phosphor/recipes-core/dropbear/dropbear_%.bbappend1
-rw-r--r--meta-phosphor/recipes-core/os-release/os-release.bbappend7
-rw-r--r--meta-phosphor/recipes-core/systemd/obmc-targets.bb6
-rw-r--r--meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb11
-rw-r--r--meta-phosphor/recipes-core/systemd/systemd_%.bbappend20
7 files changed, 22 insertions, 31 deletions
diff --git a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
index 3eef9d8b5f..8ea8c16968 100644
--- a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
+++ b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
@@ -1,10 +1,7 @@
FILESEXTRAPATHS:prepend:df-obmc-ubi-fs := "${THISDIR}/${PN}/df-ubi:"
FILESEXTRAPATHS:prepend:df-phosphor-mmc := "${THISDIR}/${PN}/df-mmc:"
-
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-RDEPENDS:${PN}:append:df-obmc-ubi-fs = " preinit-mounts"
-
SRC_URI += " \
file://50-rp_filter.conf \
"
@@ -12,9 +9,9 @@ SRC_URI += " \
do_install:append() {
sed -i 's/\(\(passwd\|group\):\s*\).*/\1files systemd/' \
"${D}${sysconfdir}/nsswitch.conf"
-
install -d ${D}/srv
-
install -d ${D}/${libdir}/sysctl.d
install -D -m 644 ${WORKDIR}/50-rp_filter.conf ${D}/${libdir}/sysctl.d/50-rp_filter.conf
}
+
+RDEPENDS:${PN}:append:df-obmc-ubi-fs = " preinit-mounts"
diff --git a/meta-phosphor/recipes-core/busybox/busybox_%.bbappend b/meta-phosphor/recipes-core/busybox/busybox_%.bbappend
index f8800b45a3..ee8b6223aa 100644
--- a/meta-phosphor/recipes-core/busybox/busybox_%.bbappend
+++ b/meta-phosphor/recipes-core/busybox/busybox_%.bbappend
@@ -1,4 +1,5 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
SRC_URI += " \
file://busybox.cfg \
file://flash.cfg \
diff --git a/meta-phosphor/recipes-core/dropbear/dropbear_%.bbappend b/meta-phosphor/recipes-core/dropbear/dropbear_%.bbappend
index 5113c66bba..a3cbd1b69d 100644
--- a/meta-phosphor/recipes-core/dropbear/dropbear_%.bbappend
+++ b/meta-phosphor/recipes-core/dropbear/dropbear_%.bbappend
@@ -2,6 +2,7 @@
# has been upstreamed. This patch can be removed once we upgrade
# to yocto 2.5 or later which will pull in the latest dropbear code.
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
SRC_URI += "file://dropbearkey.service \
file://localoptions.h \
file://dropbear.default \
diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend
index 50c3787e4a..e587825723 100644
--- a/meta-phosphor/recipes-core/os-release/os-release.bbappend
+++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend
@@ -6,7 +6,6 @@
# what that means!
OS_RELEASE_ROOTPATH ?= "${COREBASE}"
-
def run_git(d, cmd):
try:
oeroot = d.getVar('OS_RELEASE_ROOTPATH', True)
@@ -16,7 +15,6 @@ def run_git(d, cmd):
except Exception as e:
bb.warn("Unexpected exception from 'git' call: %s" % e)
pass
-
# DISTRO_VERSION can be overridden by a bbappend or config, so it must be a
# weak override. But, when a variable is weakly overridden the definition
# and not the contents are used in the task-hash (for sstate reuse). We need
@@ -26,15 +24,10 @@ def run_git(d, cmd):
PHOSPHOR_OS_RELEASE_DISTRO_VERSION := "${@run_git(d, 'describe --dirty')}"
DISTRO_VERSION ??= "${PHOSPHOR_OS_RELEASE_DISTRO_VERSION}"
EXTENDED_VERSION ??= "${PHOSPHOR_OS_RELEASE_DISTRO_VERSION}"
-
VERSION = "${@'-'.join(d.getVar('VERSION_ID').split('-')[0:2])}"
-
OPENBMC_TARGET_MACHINE = "${MACHINE}"
-
OS_RELEASE_FIELDS:append = " BUILD_ID OPENBMC_TARGET_MACHINE EXTENDED_VERSION"
-
# Ensure the git commands run every time bitbake is invoked.
BB_DONT_CACHE = "1"
-
# Make os-release available to other recipes.
SYSROOT_DIRS:append = " ${sysconfdir}"
diff --git a/meta-phosphor/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/recipes-core/systemd/obmc-targets.bb
index 10631126ed..d1725995ec 100644
--- a/meta-phosphor/recipes-core/systemd/obmc-targets.bb
+++ b/meta-phosphor/recipes-core/systemd/obmc-targets.bb
@@ -1,11 +1,9 @@
SUMMARY = "Phosphor Systemd targets"
DESCRIPTION = "Provides well known Systemd synchronization points for OpenBMC."
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 obmc-phosphor-systemd
+PR = "r1"
SRC_URI += "\
file://obmc-mapper.target \
@@ -14,3 +12,5 @@ SRC_URI += "\
SYSTEMD_SERVICE:${PN} += " \
obmc-mapper.target \
"
+
+inherit allarch obmc-phosphor-systemd
diff --git a/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb
index ea9beabd5d..d19815c2fd 100644
--- a/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb
+++ b/meta-phosphor/recipes-core/systemd/phosphor-systemd-policy.bb
@@ -1,20 +1,17 @@
SUMMARY = "Phosphor systemd configuration overrides"
DESCRIPTION = "Overrides for systemd and its applications"
-PR = "r1"
-
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
DEPENDS += "systemd"
+PR = "r1"
SRC_URI += "file://service-restart-policy.conf"
SRC_URI += "file://journald-maxlevel-policy.conf"
-FILES:${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
-FILES:${PN} += "${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf"
-
-
do_install() {
install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
install -m 644 -D ${WORKDIR}/journald-maxlevel-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf
}
+
+FILES:${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
+FILES:${PN} += "${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf"
diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
index fb73ca15a7..beffdb97d0 100644
--- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
@@ -1,8 +1,4 @@
-FILES:${PN}-catalog-extralocales = "\
- ${exec_prefix}/lib/systemd/catalog/*.*.catalog \
-"
-
-PACKAGES =+ "${PN}-catalog-extralocales"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGECONFIG = "\
coredump \
hostnamed \
@@ -20,14 +16,20 @@ PACKAGECONFIG = "\
zstd \
"
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-sd-bus-Don-t-automatically-add-ObjectManager.patch"
EXTRA_OEMESON:append = " -Ddns-servers=''"
-ALTERNATIVE:${PN} += "init"
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+PACKAGES =+ "${PN}-catalog-extralocales"
+
+RRECOMMENDS:${PN}:append:openbmc-phosphor = " phosphor-systemd-policy"
+
+FILES:${PN}-catalog-extralocales = "\
+ ${exec_prefix}/lib/systemd/catalog/*.*.catalog \
+"
+
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
ALTERNATIVE_PRIORITY[init] ?= "300"
-RRECOMMENDS:${PN}:append:openbmc-phosphor = " phosphor-systemd-policy"
+ALTERNATIVE:${PN} += "init"
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"