2 # Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 SUMMARY = "OCF resource agents for use by compatible cluster managers"
18 DESCRIPTION = "A set of scripts to interface with several services \
19 to operate in a High Availability environment for both Pacemaker and \
20 rgmanager service managers. \
22 HOMEPAGE = "http://sources.redhat.com/cluster/wiki/"
24 LICENSE = "GPLv2+ & LGPLv2+ & GPLv3"
25 LIC_FILES_CHKSUM = " \
26 file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
27 file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
28 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
32 https://codeload.github.com/ClusterLabs/${BPN}/tar.gz/v${PV};downloadfilename=${BPN}-${PV}.tar.gz \
33 file://0001-disable-doc-build.patch \
34 file://0002-Set-OCF_ROOT_DIR-to-libdir-ocf.patch \
35 file://0003-fix-header-defs-lookup.patch \
36 file://0004-configure.ac-fix-install-sh-not-found.patch \
38 file://stx/new_ocf_return_codes.patch \
39 file://stx/ipaddr2_check_if_state.patch \
40 file://stx/copyright.patch \
41 file://stx/umount-in-namespace.patch \
42 file://stx/lvm_vg_activation.patch \
43 file://stx/pgsql.patch \
44 file://stx/Fix-VG-activity-bug-in-heartbeat-LVM-script.patch \
45 file://stx/ocf-shellfuncs_change_logtag.patch \
46 file://stx/lvm_cleanup_refs_on_stop.patch \
47 file://stx/ipaddr2_if_down.patch \
48 file://stx/ipaddr2_ignore_lo_if_state.patch \
49 file://stx/ipaddr2-avoid-failing-svc-if-down.patch \
50 file://stx/ipaddr2-use-host-scope-for-addresses-on-loopback.patch \
53 SRC_URI[md5sum] = "82e3a335f942347f1b7c27b9f8e8e984"
54 SRC_URI[sha256sum] = "decc370bce20ee7a034886eb19ddb54d823f5e95c58f4d121f53cc965147f736"
56 DEPENDS = "cluster-glue"
58 inherit autotools systemd pkgconfig
59 inherit update-alternatives
61 ALTERNATIVE_PRIORITY = "70"
62 ALTERNATIVE_${PN} = "drbd.sh"
63 ALTERNATIVE_LINK_NAME[drbd.sh] = "${datadir}/cluster/drbd.sh"
66 --disable-fatal-warnings \
70 rm -rf "${D}${localstatedir}/run"
71 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
73 mv ${D}${datadir}/cluster/drbd.sh ${D}${datadir}/cluster/drbd.sh.${PN}
75 # Create symbolic link between IPAddr and IPAddr2
76 rm -f ${D}${libdir}/ocf/resource.d/heartbeat/IPaddr
77 ln -s ${libdir}/ocf/resource.d/heartbeat/IPaddr2 ${D}${libdir}/ocf/resource.d/heartbeat/IPaddr
80 PACKAGES_prepend = " \
84 FILES_ldirectord = " \
85 ${sbindir}/ldirectord \
86 ${sysconfdir}/ha.d/resource.d/ldirectord \
87 ${sysconfdir}/init.d/ldirectord \
88 ${sysconfdir}/logrotate.d/ldirectord \
89 ${libdir}/ocf/resource.d/heartbeat/ldirectord \
93 ${datadir}/cluster/* \
94 ${datadir}/${BPN}/ocft/configs/portblock \
95 ${libdir}/ocf/resource.d/heartbeat/ \
96 ${libdir}/ocf/lib/heartbeat/* \
97 ${libdir}/ocf/resource.d/redhat \
98 ${libdir}/tmpfiles.d/ \
101 FILES_${PN}-dbg += " \
102 ${libdir}/ocf/resource.d/heartbeat/.debug \
103 ${libdir}/${BPN}/heartbeat/.debug \
106 # There are many tools and scripts that need bash and perl.
107 # lvm.sh requires: lvm2
108 # ip.sh requires: ethtool iproute2 iputils-arping
109 # fs.sh requires: e2fsprogs-e2fsck util-linux quota
110 # netfs.sh requires: procps util-linux nfs-utils
111 RDEPENDS_${PN} += " \
113 ethtool iproute2 iputils-arping \
114 e2fsprogs-e2fsck util-linux quota \
118 RDEPENDS_ldirectord += " \
121 libdigest-hmac-perl \
127 perl-module-getopt-long \
128 perl-module-net-ftp \
129 perl-module-net-smtp \
130 perl-module-pod-usage \
134 perl-module-sys-hostname \
135 perl-module-sys-syslog \
139 SYSTEMD_PACKAGES += "ldirectord"
140 SYSTEMD_SERVICE_${PN} += "resource-agents-deps.target"
141 SYSTEMD_SERVICE_ldirectord += "ldirectord.service"