blob: e9f01bd1fe71a4bd4bcfbe13aac750c30fecebab [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "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 lvm2 \
23 libaio \
24 liburcu \
25 readline \
26 udev \
27 json-c \
28 "
29
30LICENSE = "GPL-2.0-only"
31
Patrick Williamsac13d5f2023-11-24 18:59:46 -060032SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=master \
Andrew Geissler517393d2023-01-13 08:55:19 -060033 file://multipathd.oe \
34 file://multipath.conf.example \
Patrick Williamsb58112e2024-03-07 11:16:36 -060035 file://0001-RH-fixup-udev-rules-for-redhat.patch \
36 file://0002-RH-Remove-the-property-blacklist-exception-builtin.patch \
37 file://0003-RH-don-t-start-without-a-config-file.patch \
38 file://0004-RH-use-rpm-optflags-if-present.patch \
39 file://0005-RH-add-mpathconf.patch \
40 file://0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \
41 file://0007-RH-warn-on-invalid-regex-instead-of-failing.patch \
42 file://0008-RH-reset-default-find_mutipaths-value-to-off.patch \
43 file://0009-multipath-tools-modify-create-config.mk-for-cross-co.patch \
44 file://0010-Subject-PATCH-Always-use-devmapper.patch \
45 file://0011-fix-bug-of-do_compile-and-do_install.patch \
46 file://0012-add-explicit-dependency-on-libraries.patch \
Patrick Williams03514f12024-04-05 07:04:11 -050047 file://0001-libmultipath-always-use-glibc-basename.patch \
Andrew Geissler517393d2023-01-13 08:55:19 -060048 "
49
50LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
51
Patrick Williamsb58112e2024-03-07 11:16:36 -060052SRCREV = "3daacfdfd110b24a3a7d5a276dcf8512b7039199"
Andrew Geissler517393d2023-01-13 08:55:19 -060053
54S = "${WORKDIR}/git"
55
56inherit systemd pkgconfig
57
58SYSTEMD_SERVICE:${PN} = "multipathd.service"
59SYSTEMD_AUTO_ENABLE = "disable"
60
61TARGET_CC_ARCH += "${LDFLAGS}"
62
63# multipath-tools includes a copy of the valgrind.h header
64# file and uses the macros to suppress some false positives. However,
65# that only works on ARM when thumb is disabled. Otherwise one gets:
66# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
67# ../Makefile.inc:66: recipe for target 'debug.o' failed
68ARM_INSTRUCTION_SET:armv4 = "arm"
69ARM_INSTRUCTION_SET:armv5 = "arm"
70
71# The exact version of SYSTEMD does not matter but should be greater than 209.
72#
73EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
74 OPTFLAGS="${CFLAGS}" \
75 prefix=${prefix} \
76 bindir=${base_sbindir} \
77 LIB=${base_libdir} libdir=${base_libdir}/multipath \
78 usrlibdir=${libdir} \
79 plugindir=${base_libdir}/multipath \
80 unitdir=${systemd_system_unitdir} \
81 libudevdir=${nonarch_base_libdir}/udev \
82 modulesloaddir=${sysconfdir}/modules-load.d \
83 tmpfilesdir=${sysconfdir}/tmpfiles.d \
84 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
85 '
86
87do_install() {
88 oe_runmake install
89
90 # We copy an initscript, but do not start multipathd at init time.
91 #
92 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then
93 install -d ${D}${sysconfdir}/init.d
94 cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd
95 fi
96
97 sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \
98 ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules
99
100 install -d ${D}${sysconfdir}
101 install -m 0644 ${WORKDIR}/multipath.conf.example \
102 ${D}${sysconfdir}/multipath.conf.example
103}
104
Patrick Williamsb58112e2024-03-07 11:16:36 -0600105FILES:${PN} += "${systemd_system_unitdir}"
Andrew Geissler517393d2023-01-13 08:55:19 -0600106FILES:${PN}-dbg += "${base_libdir}/multipath/.debug"
107
108PACKAGES =+ "${PN}-libs"
109FILES:${PN}-libs = "${base_libdir}/lib*.so.* \
110 ${base_libdir}/multipath/lib*.so*"
111RDEPENDS:${PN} += "${PN}-libs bash libgcc"
112
113PROVIDES += "device-mapper-multipath"
114RPROVIDES:${PN} += "device-mapper-multipath"
115RPROVIDES:${PN}-libs += "device-mapper-multipath-libs"
116
117FILES:${PN}-dev += "${base_libdir}/pkgconfig"
118
119PACKAGES =+ "kpartx"
120FILES:kpartx = "${base_sbindir}/kpartx \
121 ${nonarch_base_libdir}/udev/kpartx_id \
122 "
123
124RDEPENDS:${PN} += "kpartx"
125PARALLEL_MAKE = ""