Skip to content

Commit

Permalink
dlm: Build fence only when pacemaker recipe is available
Browse files Browse the repository at this point in the history
pacemaker is not in meta-networking, and therefore dlm fails
to build when meta-cgl is not included, this changeset makes
the pacemaker dependency to be optional, and disabled by default
so users who have pacemaker in the bbfiles should enable pacemaker
support via a bbappend or setting it in config metadata

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Aug 19, 2018
1 parent 2900995 commit 0b5b934
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion meta-networking/recipes-extended/dlm/dlm_4.0.7.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,24 @@ UPSTREAM_CHECK_REGEX = "dlm-(?P<pver>\d+(\.\d+)+)"
LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"

DEPENDS = "corosync systemd pacemaker"
DEPENDS = "corosync systemd"

inherit pkgconfig systemd distro_features_check

PACKAGECONFIG ??= ""

PACKAGECONFIG[pacemaker] = ",,pacemaker"

SYSTEMD_SERVICE_${PN} = "dlm.service"
SYSTEMD_AUTO_ENABLE = "enable"

export EXTRA_OEMAKE = ""

DONTBUILD = "${@bb.utils.contains('PACKAGECONFIG', 'pacemaker', '', 'fence', d)}"

do_compile_prepend() {
sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
}

do_compile () {
Expand Down

0 comments on commit 0b5b934

Please sign in to comment.