From bd9931fca466705c69b8dd13a946bed88fe0f906 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sat, 22 Apr 2017 16:26:22 -0400 Subject: Rename phosphor-fan-presence A number of fan related applications are hosted by a single git repository. Rename the recipe from phosphor-fan-presence to phosphor-fan to cut down on confusion. Change-Id: Ie9cdabb96d070c2f3666ff83c7ca37b0f152a2b3 Signed-off-by: Brad Bishop --- .../classes/phosphor-fan-presence.bbclass | 1 - meta-phosphor/classes/phosphor-fan.bbclass | 1 + .../fans/phosphor-fan-presence-example-native.bb | 6 +- .../fans/phosphor-fan-presence-mrw-native.bb | 2 +- .../recipes-phosphor/fans/phosphor-fan-presence.bb | 50 ----------------- .../fans/phosphor-fan-presence.inc | 5 -- .../phosphor-fan-presence-tach@.service | 12 ---- .../common/recipes-phosphor/fans/phosphor-fan.bb | 64 ++++++++++++++++++++++ .../common/recipes-phosphor/fans/phosphor-fan.inc | 5 ++ .../phosphor-fan-presence-tach@.service | 12 ++++ 10 files changed, 86 insertions(+), 72 deletions(-) delete mode 100644 meta-phosphor/classes/phosphor-fan-presence.bbclass create mode 100644 meta-phosphor/classes/phosphor-fan.bbclass delete mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb delete mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc delete mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service create mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb create mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc create mode 100644 meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service (limited to 'meta-phosphor') diff --git a/meta-phosphor/classes/phosphor-fan-presence.bbclass b/meta-phosphor/classes/phosphor-fan-presence.bbclass deleted file mode 100644 index b59f1f567..000000000 --- a/meta-phosphor/classes/phosphor-fan-presence.bbclass +++ /dev/null @@ -1 +0,0 @@ -presence_datadir="${datadir}/phosphor-fan-presence" diff --git a/meta-phosphor/classes/phosphor-fan.bbclass b/meta-phosphor/classes/phosphor-fan.bbclass new file mode 100644 index 000000000..b59f1f567 --- /dev/null +++ b/meta-phosphor/classes/phosphor-fan.bbclass @@ -0,0 +1 @@ +presence_datadir="${datadir}/phosphor-fan-presence" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb index c97865ee2..02e68167e 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb @@ -1,11 +1,11 @@ SUMMARY = "Phosphor Fan Presence Detection example data" PR = "r1" -require phosphor-fan-presence.inc +require phosphor-fan.inc inherit native inherit obmc-phosphor-license -inherit phosphor-fan-presence +inherit phosphor-fan PROVIDES += "virtual/phosphor-fan-presence-config" @@ -13,5 +13,5 @@ S = "${WORKDIR}/git" do_install() { DEST=${D}${presence_datadir} - install -D ${S}/example/fan-detect.yaml ${DEST}/config.yaml + install -D ${S}/presence/example/fan-detect.yaml ${DEST}/config.yaml } diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb index 267fc9296..9d19847f3 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb @@ -3,7 +3,7 @@ PR = "r1" inherit native inherit obmc-phosphor-license -inherit phosphor-fan-presence +inherit phosphor-fan DEPENDS += " \ mrw-native \ diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb deleted file mode 100644 index 201849a08..000000000 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "Phosphor Fan Presence" -DESCRIPTION = "Phosphor fan presence provides a set of fan presence \ -daemons to monitor fan presence changes by different methods of \ -presence detection." -PR = "r1" - -require ${PN}.inc - -inherit autotools pkgconfig pythonnative -inherit obmc-phosphor-systemd -inherit phosphor-fan-presence - -DEPENDS += "autoconf-archive-native" -DEPENDS += "python-pyyaml-native" -DEPENDS += "python-mako-native" -DEPENDS += "sdbusplus" -DEPENDS += "phosphor-logging" -DEPENDS += "virtual/phosphor-fan-presence-config" -DEPENDS += "libevdev" - -FAN_PRESENCE_PACKAGES = " \ - ${PN}-tach \ -" -PACKAGES_remove = "${PN}" -PACKAGES += "${FAN_PRESENCE_PACKAGES} phosphor-chassis-cooling-type" - -# Remove when this package has content -ALLOW_EMPTY_phosphor-chassis-cooling-type = "1" - -SYSTEMD_PACKAGES = "${FAN_PRESENCE_PACKAGES}" -RDEPENDS_${PN}-dev = "${FAN_PRESENCE_PACKAGES} phosphor-chassis-cooling-type" - -RDEPENDS_${PN}-tach += "sdbusplus" - -RDEPENDS_phosphor-chassis-cooling-type += "libevdev" - -# Needed to install into the obmc-host-start target -TMPL = "phosphor-fan-presence-tach@.service" -INSTFMT = "phosphor-fan-presence-tach@{0}.service" -TGTFMT = "obmc-host-start@{0}.target" -FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" - -FILES_${PN}-tach = "${sbindir}/phosphor-fan-presence-tach" -SYSTEMD_SERVICE_${PN}-tach += "${TMPL}" -SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" - -S = "${WORKDIR}/git" - -EXTRA_OECONF = \ - "FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc deleted file mode 100644 index e251c83c0..000000000 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence.inc +++ /dev/null @@ -1,5 +0,0 @@ -HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" -SRCREV = "2b44a6c0b282cf50c563a175535c4c32f55a81dc" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service deleted file mode 100644 index 8324fdb0c..000000000 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Phosphor Fan Presence Tach Daemon -Wants=obmc-power-on@%i.target -After=obmc-power-on@%i.target -Conflicts=obmc-host-stop@%i.target - -[Service] -Restart=on-failure -ExecStart={sbindir}/phosphor-fan-presence-tach - -[Install] -RequiredBy=obmc-host-start@%i.target diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb new file mode 100644 index 000000000..406dc6d70 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb @@ -0,0 +1,64 @@ +SUMMARY = "Phosphor Fan" +DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \ +control applications." +PR = "r1" + +require ${PN}.inc + +inherit autotools pkgconfig pythonnative +inherit obmc-phosphor-systemd +inherit phosphor-fan + +S = "${WORKDIR}/git" + +# Common build dependencies +DEPENDS += "autoconf-archive-native" +DEPENDS += "python-pyyaml-native" +DEPENDS += "python-mako-native" +DEPENDS += "sdbusplus" +DEPENDS += "phosphor-logging" + +# Package configuration +FAN_PACKAGES = " \ + ${PN}-presence-tach \ + ${PN}-control \ + phosphor-chassis-cooling-type \ +" +PACKAGES_remove = "${PN}" +PACKAGES += "${FAN_PACKAGES}" +PACKAGECONFIG ??= "presence control cooling-type" +SYSTEMD_PACKAGES = "${FAN_PACKAGES}" +RDEPENDS_${PN}-dev = "${FAN_PACKAGES}" +RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}" + +# -------------------------------------- +# ${PN}-presence-tach specific configuration +PACKAGECONFIG[presence] = " \ + --enable-presence \ + FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ + --disable-presence, \ + virtual/phosphor-fan-presence-config \ + , \ +" +RDEPENDS_${PN}-presence-tach += "sdbusplus" + +# Needed to install into the obmc-host-start target +TMPL = "phosphor-fan-presence-tach@.service" +INSTFMT = "phosphor-fan-presence-tach@{0}.service" +TGTFMT = "obmc-host-start@{0}.target" +FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" + +FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" +SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}" +SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" + +# -------------------------------------- +# ${PN}-control specific configuration +PACKAGECONFIG[control] = "--enable-control,--disable-control,," +FILES_${PN}-control = "${sbindir}/phosphor-fan-control" + +# -------------------------------------- +# phosphor-chassis-cooling-type specific configuration +PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev," +RDEPENDS_phosphor-chassis-cooling-type += "libevdev" +FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc new file mode 100644 index 000000000..06edd1f28 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.inc @@ -0,0 +1,5 @@ +HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +SRC_URI += "git://github.com/bradbishop/phosphor-fan-presence" +SRCREV = "b9f3361f3bd47400b2d94d5e471508aa6233cf42" diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service new file mode 100644 index 000000000..8324fdb0c --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Phosphor Fan Presence Tach Daemon +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Conflicts=obmc-host-stop@%i.target + +[Service] +Restart=on-failure +ExecStart={sbindir}/phosphor-fan-presence-tach + +[Install] +RequiredBy=obmc-host-start@%i.target -- cgit v1.2.1