blob: c0c4412c7d930d802b6b734032a64240c621cb67 [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
Andrew Geissler9aee5002022-03-30 16:27:02 +000030LICENSE = "GPL-2.0-only"
Brad Bishop19323692019-04-05 15:28:33 -040031
Andrew Geissler595f6302022-01-24 19:11:47 +000032SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http;branch=master \
Brad Bishop19323692019-04-05 15:28:33 -040033 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 \
Andrew Geisslera2681d92020-10-16 10:17:07 -050046 file://0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch \
Andrew Geissler7f40b712020-05-15 14:09:53 -050047 file://0001-fix-bug-of-do_compile-and-do_install.patch \
Andrew Geisslereafcbb82020-06-05 17:59:17 -050048 file://0001-add-explicit-dependency-on-libraries.patch \
Andrew Geissler89770b02020-06-13 10:40:47 -050049 file://0001-fix-boolean-value-with-json-c-0.14.patch \
Andrew Geissler72956ed2021-01-08 16:11:14 -060050 file://0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch \
Brad Bishop19323692019-04-05 15:28:33 -040051 "
52
53LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
54
Andrew Geissler7f40b712020-05-15 14:09:53 -050055SRCREV = "d4915917655b3d205aa0e339ca13080ed8182d0d"
Brad Bishop19323692019-04-05 15:28:33 -040056
57S = "${WORKDIR}/git"
58
59inherit systemd pkgconfig
60
Patrick Williams213cb262021-08-07 19:21:33 -050061SYSTEMD_SERVICE:${PN} = "multipathd.service"
Brad Bishop19323692019-04-05 15:28:33 -040062SYSTEMD_AUTO_ENABLE = "disable"
63
64TARGET_CC_ARCH += "${LDFLAGS}"
65
66# multipath-tools includes a copy of the valgrind.h header
67# file and uses the macros to suppress some false positives. However,
68# that only works on ARM when thumb is disabled. Otherwise one gets:
69# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
70# ../Makefile.inc:66: recipe for target 'debug.o' failed
Patrick Williams213cb262021-08-07 19:21:33 -050071ARM_INSTRUCTION_SET:armv4 = "arm"
72ARM_INSTRUCTION_SET:armv5 = "arm"
Brad Bishop19323692019-04-05 15:28:33 -040073
74# The exact version of SYSTEMD does not matter but should be greater than 209.
75#
76EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
77 OPTFLAGS="${CFLAGS}" \
78 bindir=${base_sbindir} \
79 LIB=${base_libdir} libdir=${base_libdir}/multipath \
80 unitdir=${systemd_system_unitdir} \
Brad Bishop0e2770c2020-01-21 07:31:46 -050081 libudevdir=${nonarch_base_libdir}/udev \
Brad Bishop19323692019-04-05 15:28:33 -040082 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
83 '
84
85do_install() {
86 oe_runmake install
87
88 # We copy an initscript, but do not start multipathd at init time.
89 #
90 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then
91 install -d ${D}${sysconfdir}/init.d
92 cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd
93 fi
94
Brad Bishop0e2770c2020-01-21 07:31:46 -050095 sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \
96 ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules
97
Brad Bishop19323692019-04-05 15:28:33 -040098 install -d ${D}${sysconfdir}
99 install -m 0644 ${WORKDIR}/multipath.conf.example \
100 ${D}${sysconfdir}/multipath.conf.example
101}
102
Patrick Williams213cb262021-08-07 19:21:33 -0500103FILES:${PN}-dbg += "${base_libdir}/multipath/.debug"
Brad Bishop19323692019-04-05 15:28:33 -0400104
105PACKAGES =+ "${PN}-libs"
Patrick Williams213cb262021-08-07 19:21:33 -0500106FILES:${PN}-libs = "${base_libdir}/lib*.so.* \
Brad Bishop19323692019-04-05 15:28:33 -0400107 ${base_libdir}/multipath/lib*.so*"
Patrick Williams213cb262021-08-07 19:21:33 -0500108RDEPENDS:${PN} += "${PN}-libs bash"
Brad Bishop19323692019-04-05 15:28:33 -0400109
110PROVIDES += "device-mapper-multipath"
Patrick Williams213cb262021-08-07 19:21:33 -0500111RPROVIDES:${PN} += "device-mapper-multipath"
112RPROVIDES:${PN}-libs += "device-mapper-multipath-libs"
Brad Bishop19323692019-04-05 15:28:33 -0400113
Patrick Williams213cb262021-08-07 19:21:33 -0500114FILES:${PN}-dev += "${base_libdir}/pkgconfig"
Brad Bishop19323692019-04-05 15:28:33 -0400115
116PACKAGES =+ "kpartx"
Patrick Williams213cb262021-08-07 19:21:33 -0500117FILES:kpartx = "${base_sbindir}/kpartx \
Brad Bishop0e2770c2020-01-21 07:31:46 -0500118 ${nonarch_base_libdir}/udev/kpartx_id \
Brad Bishop19323692019-04-05 15:28:33 -0400119 "
120
Patrick Williams213cb262021-08-07 19:21:33 -0500121RDEPENDS:${PN} += "kpartx"
Andrew Geisslerd221e032020-07-10 16:13:21 -0500122PARALLEL_MAKE = ""