blob: 9e2d86b9a634eef24150c9c8ebc69302e674b894 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver"
2
3DESCRIPTION = "It provides tools to manage multipath devices \
4by instructing the device-mapper kernel module what to do. These \
5tools include: \
61. multipath - Scan the system for multipath devices and assemble them.\
72. multipathd - Detects when paths fail and execs multipath to update \
8things.\
93. mpathpersist - Persistent reservation management feature allows \
10cluster management software to manage persistent reservation through \
11mpath device. It processes management requests from callers and hides \
12the management task details. It also handles persistent reservation \
13management of data path life cycle and state changes.\
144. kpartx - This tool, derived from util-linux's partx, reads partition \
15tables on specified device and create device maps over partitions \
16segments detected. It is called from hotplug upon device maps creation \
17and deletion"
18
19HOMEPAGE = "http://christophe.varoqui.free.fr/"
20
21DEPENDS = "libdevmapper \
Brad Bishop0f291cc2019-09-01 15:16:57 -040022 lvm2 \
Brad Bishop19323692019-04-05 15:28:33 -040023 libaio \
24 liburcu \
25 readline \
26 udev \
27 json-c \
28 "
29
30LICENSE = "GPLv2"
31
32SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
33 file://multipathd.oe \
34 file://multipath.conf.example \
35 file://0021-RH-fixup-udev-rules-for-redhat.patch \
36 file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \
37 file://0023-RH-don-t-start-without-a-config-file.patch \
38 file://0024-RH-use-rpm-optflags-if-present.patch \
39 file://0025-RH-add-mpathconf.patch \
40 file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \
41 file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \
42 file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \
43 file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \
44 file://0030-Always-use-devmapper.patch \
45 file://0031-Always-use-devmapper-for-kpartx.patch \
46 "
47
48LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
49
Brad Bishop2d39a062019-10-28 08:33:36 -040050SRCREV = "6c3bd369b23e959700527e0e2e6d5b2a1bd36294"
Brad Bishop19323692019-04-05 15:28:33 -040051
52S = "${WORKDIR}/git"
53
54inherit systemd pkgconfig
55
56SYSTEMD_SERVICE_${PN} = "multipathd.service"
57SYSTEMD_AUTO_ENABLE = "disable"
58
59TARGET_CC_ARCH += "${LDFLAGS}"
60
61# multipath-tools includes a copy of the valgrind.h header
62# file and uses the macros to suppress some false positives. However,
63# that only works on ARM when thumb is disabled. Otherwise one gets:
64# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
65# ../Makefile.inc:66: recipe for target 'debug.o' failed
66ARM_INSTRUCTION_SET_armv4 = "arm"
67ARM_INSTRUCTION_SET_armv5 = "arm"
68
69# The exact version of SYSTEMD does not matter but should be greater than 209.
70#
71EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
72 OPTFLAGS="${CFLAGS}" \
73 bindir=${base_sbindir} \
74 LIB=${base_libdir} libdir=${base_libdir}/multipath \
75 unitdir=${systemd_system_unitdir} \
Brad Bishop0e2770c2020-01-21 07:31:46 -050076 libudevdir=${nonarch_base_libdir}/udev \
Brad Bishop19323692019-04-05 15:28:33 -040077 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
78 '
79
80do_install() {
81 oe_runmake install
82
83 # We copy an initscript, but do not start multipathd at init time.
84 #
85 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then
86 install -d ${D}${sysconfdir}/init.d
87 cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd
88 fi
89
Brad Bishop0e2770c2020-01-21 07:31:46 -050090 sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \
91 ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules
92
Brad Bishop19323692019-04-05 15:28:33 -040093 install -d ${D}${sysconfdir}
94 install -m 0644 ${WORKDIR}/multipath.conf.example \
95 ${D}${sysconfdir}/multipath.conf.example
96}
97
98FILES_${PN}-dbg += "${base_libdir}/multipath/.debug"
99
100PACKAGES =+ "${PN}-libs"
101FILES_${PN}-libs = "${base_libdir}/lib*.so.* \
102 ${base_libdir}/multipath/lib*.so*"
103RDEPENDS_${PN} += "${PN}-libs bash"
104
105PROVIDES += "device-mapper-multipath"
106RPROVIDES_${PN} += "device-mapper-multipath"
107RPROVIDES_${PN}-libs += "device-mapper-multipath-libs"
108
109FILES_${PN}-dev += "${base_libdir}/pkgconfig"
110
111PACKAGES =+ "kpartx"
112FILES_kpartx = "${base_sbindir}/kpartx \
Brad Bishop0e2770c2020-01-21 07:31:46 -0500113 ${nonarch_base_libdir}/udev/kpartx_id \
Brad Bishop19323692019-04-05 15:28:33 -0400114 "
115
Brad Bishop0f291cc2019-09-01 15:16:57 -0400116RDEPENDS_${PN} += "kpartx"