multipath-tools_0.8.4.bb 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver"
  2. DESCRIPTION = "It provides tools to manage multipath devices \
  3. by instructing the device-mapper kernel module what to do. These \
  4. tools include: \
  5. 1. multipath - Scan the system for multipath devices and assemble them.\
  6. 2. multipathd - Detects when paths fail and execs multipath to update \
  7. things.\
  8. 3. mpathpersist - Persistent reservation management feature allows \
  9. cluster management software to manage persistent reservation through \
  10. mpath device. It processes management requests from callers and hides \
  11. the management task details. It also handles persistent reservation \
  12. management of data path life cycle and state changes.\
  13. 4. kpartx - This tool, derived from util-linux's partx, reads partition \
  14. tables on specified device and create device maps over partitions \
  15. segments detected. It is called from hotplug upon device maps creation \
  16. and deletion"
  17. HOMEPAGE = "http://christophe.varoqui.free.fr/"
  18. DEPENDS = "libdevmapper \
  19. lvm2 \
  20. libaio \
  21. liburcu \
  22. readline \
  23. udev \
  24. json-c \
  25. "
  26. LICENSE = "GPLv2"
  27. SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
  28. file://multipathd.oe \
  29. file://multipath.conf.example \
  30. file://0021-RH-fixup-udev-rules-for-redhat.patch \
  31. file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \
  32. file://0023-RH-don-t-start-without-a-config-file.patch \
  33. file://0024-RH-use-rpm-optflags-if-present.patch \
  34. file://0025-RH-add-mpathconf.patch \
  35. file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \
  36. file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \
  37. file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \
  38. file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \
  39. file://0030-Always-use-devmapper.patch \
  40. file://0031-Always-use-devmapper-for-kpartx.patch \
  41. file://0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch \
  42. file://0001-fix-bug-of-do_compile-and-do_install.patch \
  43. file://0001-add-explicit-dependency-on-libraries.patch \
  44. file://0001-fix-boolean-value-with-json-c-0.14.patch \
  45. file://0001-libmultipath-uevent.c-fix-error-handling-for-udev_mo.patch \
  46. "
  47. LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
  48. SRCREV = "d4915917655b3d205aa0e339ca13080ed8182d0d"
  49. S = "${WORKDIR}/git"
  50. inherit systemd pkgconfig
  51. SYSTEMD_SERVICE_${PN} = "multipathd.service"
  52. SYSTEMD_AUTO_ENABLE = "disable"
  53. TARGET_CC_ARCH += "${LDFLAGS}"
  54. # multipath-tools includes a copy of the valgrind.h header
  55. # file and uses the macros to suppress some false positives. However,
  56. # that only works on ARM when thumb is disabled. Otherwise one gets:
  57. # Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3'
  58. # ../Makefile.inc:66: recipe for target 'debug.o' failed
  59. ARM_INSTRUCTION_SET_armv4 = "arm"
  60. ARM_INSTRUCTION_SET_armv5 = "arm"
  61. # The exact version of SYSTEMD does not matter but should be greater than 209.
  62. #
  63. EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \
  64. OPTFLAGS="${CFLAGS}" \
  65. bindir=${base_sbindir} \
  66. LIB=${base_libdir} libdir=${base_libdir}/multipath \
  67. unitdir=${systemd_system_unitdir} \
  68. libudevdir=${nonarch_base_libdir}/udev \
  69. ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \
  70. '
  71. do_install() {
  72. oe_runmake install
  73. # We copy an initscript, but do not start multipathd at init time.
  74. #
  75. if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then
  76. install -d ${D}${sysconfdir}/init.d
  77. cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd
  78. fi
  79. sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \
  80. ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules
  81. install -d ${D}${sysconfdir}
  82. install -m 0644 ${WORKDIR}/multipath.conf.example \
  83. ${D}${sysconfdir}/multipath.conf.example
  84. }
  85. FILES_${PN}-dbg += "${base_libdir}/multipath/.debug"
  86. PACKAGES =+ "${PN}-libs"
  87. FILES_${PN}-libs = "${base_libdir}/lib*.so.* \
  88. ${base_libdir}/multipath/lib*.so*"
  89. RDEPENDS_${PN} += "${PN}-libs bash"
  90. PROVIDES += "device-mapper-multipath"
  91. RPROVIDES_${PN} += "device-mapper-multipath"
  92. RPROVIDES_${PN}-libs += "device-mapper-multipath-libs"
  93. FILES_${PN}-dev += "${base_libdir}/pkgconfig"
  94. PACKAGES =+ "kpartx"
  95. FILES_kpartx = "${base_sbindir}/kpartx \
  96. ${nonarch_base_libdir}/udev/kpartx_id \
  97. "
  98. RDEPENDS_${PN} += "kpartx"
  99. PARALLEL_MAKE = ""