Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" |
| 2 | |
| 3 | DESCRIPTION = "It provides tools to manage multipath devices \ |
| 4 | by instructing the device-mapper kernel module what to do. These \ |
| 5 | tools include: \ |
| 6 | 1. multipath - Scan the system for multipath devices and assemble them.\ |
| 7 | 2. multipathd - Detects when paths fail and execs multipath to update \ |
| 8 | things.\ |
| 9 | 3. mpathpersist - Persistent reservation management feature allows \ |
| 10 | cluster management software to manage persistent reservation through \ |
| 11 | mpath device. It processes management requests from callers and hides \ |
| 12 | the management task details. It also handles persistent reservation \ |
| 13 | management of data path life cycle and state changes.\ |
| 14 | 4. kpartx - This tool, derived from util-linux's partx, reads partition \ |
| 15 | tables on specified device and create device maps over partitions \ |
| 16 | segments detected. It is called from hotplug upon device maps creation \ |
| 17 | and deletion" |
| 18 | |
| 19 | HOMEPAGE = "http://christophe.varoqui.free.fr/" |
| 20 | |
| 21 | DEPENDS = "libdevmapper \ |
Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame] | 22 | lvm2 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | libaio \ |
| 24 | liburcu \ |
| 25 | readline \ |
| 26 | udev \ |
| 27 | json-c \ |
| 28 | " |
| 29 | |
| 30 | LICENSE = "GPLv2" |
| 31 | |
| 32 | SRC_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 \ |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 46 | file://0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 47 | file://0001-fix-bug-of-do_compile-and-do_install.patch \ |
Andrew Geissler | eafcbb8 | 2020-06-05 17:59:17 -0500 | [diff] [blame] | 48 | file://0001-add-explicit-dependency-on-libraries.patch \ |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 49 | file://0001-fix-boolean-value-with-json-c-0.14.patch \ |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 50 | file://0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | " |
| 52 | |
| 53 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" |
| 54 | |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 55 | SRCREV = "d4915917655b3d205aa0e339ca13080ed8182d0d" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 56 | |
| 57 | S = "${WORKDIR}/git" |
| 58 | |
| 59 | inherit systemd pkgconfig |
| 60 | |
| 61 | SYSTEMD_SERVICE_${PN} = "multipathd.service" |
| 62 | SYSTEMD_AUTO_ENABLE = "disable" |
| 63 | |
| 64 | TARGET_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 |
| 71 | ARM_INSTRUCTION_SET_armv4 = "arm" |
| 72 | ARM_INSTRUCTION_SET_armv5 = "arm" |
| 73 | |
| 74 | # The exact version of SYSTEMD does not matter but should be greater than 209. |
| 75 | # |
| 76 | EXTRA_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 Bishop | 0e2770c | 2020-01-21 07:31:46 -0500 | [diff] [blame] | 81 | libudevdir=${nonarch_base_libdir}/udev \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 82 | ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ |
| 83 | ' |
| 84 | |
| 85 | do_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 Bishop | 0e2770c | 2020-01-21 07:31:46 -0500 | [diff] [blame] | 95 | 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 98 | install -d ${D}${sysconfdir} |
| 99 | install -m 0644 ${WORKDIR}/multipath.conf.example \ |
| 100 | ${D}${sysconfdir}/multipath.conf.example |
| 101 | } |
| 102 | |
| 103 | FILES_${PN}-dbg += "${base_libdir}/multipath/.debug" |
| 104 | |
| 105 | PACKAGES =+ "${PN}-libs" |
| 106 | FILES_${PN}-libs = "${base_libdir}/lib*.so.* \ |
| 107 | ${base_libdir}/multipath/lib*.so*" |
| 108 | RDEPENDS_${PN} += "${PN}-libs bash" |
| 109 | |
| 110 | PROVIDES += "device-mapper-multipath" |
| 111 | RPROVIDES_${PN} += "device-mapper-multipath" |
| 112 | RPROVIDES_${PN}-libs += "device-mapper-multipath-libs" |
| 113 | |
| 114 | FILES_${PN}-dev += "${base_libdir}/pkgconfig" |
| 115 | |
| 116 | PACKAGES =+ "kpartx" |
| 117 | FILES_kpartx = "${base_sbindir}/kpartx \ |
Brad Bishop | 0e2770c | 2020-01-21 07:31:46 -0500 | [diff] [blame] | 118 | ${nonarch_base_libdir}/udev/kpartx_id \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 119 | " |
| 120 | |
Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame] | 121 | RDEPENDS_${PN} += "kpartx" |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 122 | PARALLEL_MAKE = "" |