Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / cluster-resource-agents / resource-agents_4.0.1.bb
1 #
2 # Copyright (C) 2019 Wind River Systems, Inc.
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
16 SUMMARY = "OCF resource agents for use by compatible cluster managers"
17 DESCRIPTION = "A set of scripts to interface with several services \
18 to operate in a High Availability environment for both Pacemaker and \
19 rgmanager service managers."
20 HOMEPAGE = "http://sources.redhat.com/cluster/wiki/"
21
22 LICENSE = "GPLv2+ & LGPLv2+ & GPLv3"
23 LICENSE_${PN} = "GPLv2+ & LGPLv2+"
24 LICENSE_${PN}-dev = "GPLv2+ & LGPLv2+"
25 LICENSE_${PN}-staticdev = "GPLv2+ & LGPLv2+"
26 LICENSE_${PN}-dbg = "GPLv2+ & LGPLv2+"
27 LICENSE_${PN}-doc = "GPLv2+ & LGPLv2+"
28 LICENSE_${PN}-extra = "GPLv3"
29 LICENSE_${PN}-extra-dbg = "GPLv3"
30 LICENSE_ldirectord = "GPLv2+"
31
32 SRC_URI = "https://codeload.github.com/ClusterLabs/resource-agents/tar.gz/v${PV};downloadfilename=${BPN}-${PV}.tar.gz \
33            file://01-disable-doc-build.patch \
34            file://02-set-OCF_ROOT_DIR-to-libdir-ocf.patch \
35            file://03-fix-header-defs-lookup.patch \
36            file://fix-install-sh-not-found.patch \
37            file://fs.sh-fix-builds-when-srcdir-and-builddir-are-sepera.patch \
38           "
39
40 SRC_URI[md5sum] = "8530431861e659d4ce2f04afcc4efc03"
41 SRC_URI[sha256sum] = "863f83c724bad3a8bcff12b9c8712406c43e010041868826cad7b78fd8cfb9fb"
42
43 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
44                     file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
45                     file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504"
46
47 DEPENDS = "cluster-glue"
48
49 # There are many tools and scripts that need bash and perl.
50 # lvm.sh requires: lvm2
51 # ip.sh requires: ethtool iproute2 iputils-arping
52 # fs.sh requires: e2fsprogs-e2fsck util-linux quota
53 # netfs.sh requires: procps util-linux nfs-utils
54 RDEPENDS_${PN} += "bash perl lvm2 \
55     ethtool iproute2 iputils-arping \
56     e2fsprogs-e2fsck util-linux quota \
57     procps nfs-utils \
58 "
59
60 inherit autotools systemd pkgconfig
61
62 EXTRA_OECONF += "--disable-fatal-warnings \
63                  --with-rsctmpdir=/var/run/heartbeat/rsctmp"
64
65 do_install_append() {
66     rm -rf "${D}${localstatedir}/run"
67     rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
68 }
69
70 # tickle_tcp is published under GPLv3, we just split it into ${PN}-extra,
71 # and it's required by portblock, so move portblock into ${PN}-extra together.
72 PACKAGES_prepend  = "${PN}-extra ${PN}-extra-dbg ldirectord "
73 FILES_${PN}-extra = "${libdir}/resource-agents/heartbeat/tickle_tcp \
74                      ${libdir}/ocf/resource.d/heartbeat/portblock \
75                      ${datadir}/resource-agents/ocft/configs/portblock \
76                     "
77 FILES_${PN}-extra-dbg += "${libdir}/resource-agents/heartbeat/.debug/tickle_tcp"
78
79 FILES_ldirectord = " \
80         ${sbindir}/ldirectord \
81         ${sysconfdir}/ha.d/resource.d/ldirectord \
82         ${sysconfdir}/init.d/ldirectord \
83         ${sysconfdir}/logrotate.d/ldirectord \
84         ${libdir}/ocf/resource.d/heartbeat/ldirectord \
85         "
86 FILES_ldirectord-doc = "${mandir}/man8/ldirectord.8*"
87
88 RDEPENDS_ldirectord += " \
89         ipvsadm \
90         libdbi-perl \
91         libdigest-hmac-perl \
92         libmailtools-perl \
93         libnet-dns-perl \
94         libsocket6-perl \
95         libwww-perl \
96         perl \
97         perl-module-getopt-long \
98         perl-module-net-ftp \
99         perl-module-net-smtp \
100         perl-module-pod-usage \
101         perl-module-posix \
102         perl-module-socket \
103         perl-module-strict \
104         perl-module-sys-hostname \
105         perl-module-sys-syslog \
106         perl-module-vars \
107         "
108
109 SYSTEMD_PACKAGES = "ldirectord"
110 SYSTEMD_SERVICE_ldirectord += "ldirectord.service"
111
112 FILES_${PN} += "${datadir}/cluster/* \
113                 ${libdir}/ocf/resource.d/heartbeat/ \
114                 ${libdir}/ocf/lib/heartbeat/* \
115                 ${libdir}/ocf/resource.d/redhat \
116                 "
117
118 FILES_${PN}-dbg += "${libdir}/ocf/resource.d/heartbeat/.debug \
119                     ${libdir}/resource-agents/heartbeat/.debug "