mdadm_4.0.bb 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. SUMMARY = "Tool for managing software RAID under Linux"
  2. HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
  3. # Some files are GPLv2+ while others are GPLv2.
  4. LICENSE = "GPLv2 & GPLv2+"
  5. LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
  6. file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
  7. file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
  8. SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
  9. file://gcc-4.9.patch \
  10. file://mdadm-3.3.2_x32_abi_time_t.patch \
  11. file://mdadm-fix-ptest-build-errors.patch \
  12. file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
  13. file://run-ptest \
  14. file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
  15. file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \
  16. file://0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch \
  17. file://0002-mdadm-Specify-enough-length-when-write-to-buffer.patch \
  18. file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \
  19. file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \
  20. file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \
  21. "
  22. SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d"
  23. SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"
  24. CFLAGS += "-fno-strict-aliasing"
  25. inherit autotools-brokensep
  26. EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
  27. # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
  28. # prevents 64-bit userland from seeing this definition, instead defaulting
  29. # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
  30. # int-ll64.h included
  31. CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
  32. CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
  33. CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
  34. do_compile() {
  35. # Point to right sbindir
  36. sed -i -e "s;BINDIR = /sbin;BINDIR = $base_sbindir;" ${S}/Makefile
  37. oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
  38. }
  39. do_install() {
  40. export STRIP=""
  41. autotools_do_install
  42. }
  43. inherit ptest
  44. do_compile_ptest() {
  45. oe_runmake test
  46. }
  47. do_install_ptest() {
  48. cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
  49. cp ${S}/test ${D}${PTEST_PATH}
  50. sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
  51. ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
  52. for prg in test_stripe swap_super raid6check
  53. do
  54. install -D -m 755 $prg ${D}${PTEST_PATH}/
  55. done
  56. }
  57. RDEPENDS_${PN}-ptest += "bash"
  58. RRECOMMENDS_${PN}-ptest += " \
  59. coreutils \
  60. util-linux \
  61. kernel-module-loop \
  62. kernel-module-linear \
  63. kernel-module-raid0 \
  64. kernel-module-raid1 \
  65. kernel-module-raid10 \
  66. kernel-module-raid456 \
  67. "