blob: 55866e9841c6d97e8944d488fac1661641971882 [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 \
22 libaio \
23 liburcu \
24 readline \
25 udev \
26 json-c \
27 "
28
29LICENSE = "GPLv2"
30
31SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
32 file://multipathd.oe \
33 file://multipath.conf.example \
34 file://0021-RH-fixup-udev-rules-for-redhat.patch \
35 file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \
36 file://0023-RH-don-t-start-without-a-config-file.patch \
37 file://0024-RH-use-rpm-optflags-if-present.patch \
38 file://0025-RH-add-mpathconf.patch \
39 file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \
40 file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \
41 file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \
42 file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \
43 file://0030-Always-use-devmapper.patch \
44 file://0031-Always-use-devmapper-for-kpartx.patch \
45 "
46
47LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
48
Brad Bishop15ae2502019-06-18 21:44:24 -040049SRCREV = "e23b5d7cf67a9c543e118f2f6b902594a02a804a"
Brad Bishop19323692019-04-05 15:28:33 -040050
51S = "${WORKDIR}/git"
52
53inherit systemd pkgconfig
54
55SYSTEMD_SERVICE_${PN} = "multipathd.service"
56SYSTEMD_AUTO_ENABLE = "disable"
57
58TARGET_CC_ARCH += "${LDFLAGS}"
59
60# multipath-tools includes a copy of the valgrind.h header
61# file and uses the macros to suppress some false positives. However,
62# that only works on ARM when thumb is disabled. Otherwise one gets:
63# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
64# ../Makefile.inc:66: recipe for target 'debug.o' failed
65ARM_INSTRUCTION_SET_armv4 = "arm"
66ARM_INSTRUCTION_SET_armv5 = "arm"
67
68# The exact version of SYSTEMD does not matter but should be greater than 209.
69#
70EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
71 OPTFLAGS="${CFLAGS}" \
72 bindir=${base_sbindir} \
73 LIB=${base_libdir} libdir=${base_libdir}/multipath \
74 unitdir=${systemd_system_unitdir} \
75 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
76 '
77
78do_install() {
79 oe_runmake install
80
81 # We copy an initscript, but do not start multipathd at init time.
82 #
83 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then
84 install -d ${D}${sysconfdir}/init.d
85 cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd
86 fi
87
88 install -d ${D}${sysconfdir}
89 install -m 0644 ${WORKDIR}/multipath.conf.example \
90 ${D}${sysconfdir}/multipath.conf.example
91}
92
93FILES_${PN}-dbg += "${base_libdir}/multipath/.debug"
94
95PACKAGES =+ "${PN}-libs"
96FILES_${PN}-libs = "${base_libdir}/lib*.so.* \
97 ${base_libdir}/multipath/lib*.so*"
98RDEPENDS_${PN} += "${PN}-libs bash"
99
100PROVIDES += "device-mapper-multipath"
101RPROVIDES_${PN} += "device-mapper-multipath"
102RPROVIDES_${PN}-libs += "device-mapper-multipath-libs"
103
104FILES_${PN}-dev += "${base_libdir}/pkgconfig"
105
106PACKAGES =+ "kpartx"
107FILES_kpartx = "${base_sbindir}/kpartx \
108 ${nonarch_libdir}/udev/kpartx_id \
109 "
110
111RDEPENDS_${PN} += "bash kpartx"