Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [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 \ |
| 22 | lvm2 \ |
| 23 | libaio \ |
| 24 | liburcu \ |
| 25 | readline \ |
| 26 | udev \ |
| 27 | json-c \ |
| 28 | " |
| 29 | |
| 30 | LICENSE = "GPL-2.0-only" |
| 31 | |
| 32 | SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=http;branch=master \ |
| 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 | file://0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch \ |
| 47 | file://0001-fix-bug-of-do_compile-and-do_install.patch \ |
| 48 | file://0001-add-explicit-dependency-on-libraries.patch \ |
| 49 | " |
| 50 | |
| 51 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" |
| 52 | |
| 53 | SRCREV = "1332947447133fdf26246012b836868a3d974f0e" |
| 54 | |
| 55 | S = "${WORKDIR}/git" |
| 56 | |
| 57 | inherit systemd pkgconfig |
| 58 | |
| 59 | SYSTEMD_SERVICE:${PN} = "multipathd.service" |
| 60 | SYSTEMD_AUTO_ENABLE = "disable" |
| 61 | |
| 62 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 63 | |
| 64 | # multipath-tools includes a copy of the valgrind.h header |
| 65 | # file and uses the macros to suppress some false positives. However, |
| 66 | # that only works on ARM when thumb is disabled. Otherwise one gets: |
| 67 | # Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' |
| 68 | # ../Makefile.inc:66: recipe for target 'debug.o' failed |
| 69 | ARM_INSTRUCTION_SET:armv4 = "arm" |
| 70 | ARM_INSTRUCTION_SET:armv5 = "arm" |
| 71 | |
| 72 | # The exact version of SYSTEMD does not matter but should be greater than 209. |
| 73 | # |
| 74 | EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ |
| 75 | OPTFLAGS="${CFLAGS}" \ |
| 76 | prefix=${prefix} \ |
| 77 | bindir=${base_sbindir} \ |
| 78 | LIB=${base_libdir} libdir=${base_libdir}/multipath \ |
| 79 | usrlibdir=${libdir} \ |
| 80 | plugindir=${base_libdir}/multipath \ |
| 81 | unitdir=${systemd_system_unitdir} \ |
| 82 | libudevdir=${nonarch_base_libdir}/udev \ |
| 83 | modulesloaddir=${sysconfdir}/modules-load.d \ |
| 84 | tmpfilesdir=${sysconfdir}/tmpfiles.d \ |
| 85 | ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ |
| 86 | ' |
| 87 | |
| 88 | do_install() { |
| 89 | oe_runmake install |
| 90 | |
| 91 | # We copy an initscript, but do not start multipathd at init time. |
| 92 | # |
| 93 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then |
| 94 | install -d ${D}${sysconfdir}/init.d |
| 95 | cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd |
| 96 | fi |
| 97 | |
| 98 | sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ |
| 99 | ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules |
| 100 | |
| 101 | install -d ${D}${sysconfdir} |
| 102 | install -m 0644 ${WORKDIR}/multipath.conf.example \ |
| 103 | ${D}${sysconfdir}/multipath.conf.example |
| 104 | } |
| 105 | |
| 106 | FILES:${PN}-dbg += "${base_libdir}/multipath/.debug" |
| 107 | |
| 108 | PACKAGES =+ "${PN}-libs" |
| 109 | FILES:${PN}-libs = "${base_libdir}/lib*.so.* \ |
| 110 | ${base_libdir}/multipath/lib*.so*" |
| 111 | RDEPENDS:${PN} += "${PN}-libs bash libgcc" |
| 112 | |
| 113 | PROVIDES += "device-mapper-multipath" |
| 114 | RPROVIDES:${PN} += "device-mapper-multipath" |
| 115 | RPROVIDES:${PN}-libs += "device-mapper-multipath-libs" |
| 116 | |
| 117 | FILES:${PN}-dev += "${base_libdir}/pkgconfig" |
| 118 | |
| 119 | PACKAGES =+ "kpartx" |
| 120 | FILES:kpartx = "${base_sbindir}/kpartx \ |
| 121 | ${nonarch_base_libdir}/udev/kpartx_id \ |
| 122 | " |
| 123 | |
| 124 | RDEPENDS:${PN} += "kpartx" |
| 125 | PARALLEL_MAKE = "" |