From 36e8f935a139efc877dd2aee84f07771325dfad0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Aug 2015 08:52:58 -0700 Subject: mdadm: Upgrade mdadm_3.3.2.bb -> mdadm_3.3.4.bb Drop upstreamed patch for gcc5 compatibility Forward port x32 patch (From OE-Core rev: 2782ae4dfb417ba377f861283792d7d9929f2ae3) (From OE-Core rev: 0d0a591fca9fadd786f0ccda05cd68c295d6bb21) Signed-off-by: Khem Raj Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-extended/mdadm/files/inline.patch | 39 ------------ .../mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch | 23 ++++--- meta/recipes-extended/mdadm/mdadm_3.3.2.bb | 72 ---------------------- meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 70 +++++++++++++++++++++ 4 files changed, 81 insertions(+), 123 deletions(-) delete mode 100644 meta/recipes-extended/mdadm/files/inline.patch delete mode 100644 meta/recipes-extended/mdadm/mdadm_3.3.2.bb create mode 100644 meta/recipes-extended/mdadm/mdadm_3.3.4.bb (limited to 'meta/recipes-extended/mdadm') diff --git a/meta/recipes-extended/mdadm/files/inline.patch b/meta/recipes-extended/mdadm/files/inline.patch deleted file mode 100644 index 9009f0650c..0000000000 --- a/meta/recipes-extended/mdadm/files/inline.patch +++ /dev/null @@ -1,39 +0,0 @@ -with gnu11 turning on a default with gcc-5 we have to abide by new inline semantics -using 'inline' and using is in same translation unit means an external definition has to exist -same like "external inline" in gnu89, we simply make the functions static inline since they -are just meant to be used in this file - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Index: mdadm-3.3.2/bitmap.c -=================================================================== ---- mdadm-3.3.2.orig/bitmap.c -+++ mdadm-3.3.2/bitmap.c -@@ -20,7 +20,7 @@ - - #include "mdadm.h" - --inline void sb_le_to_cpu(bitmap_super_t *sb) -+static inline void sb_le_to_cpu(bitmap_super_t *sb) - { - sb->magic = __le32_to_cpu(sb->magic); - sb->version = __le32_to_cpu(sb->version); -@@ -34,7 +34,7 @@ inline void sb_le_to_cpu(bitmap_super_t - sb->write_behind = __le32_to_cpu(sb->write_behind); - } - --inline void sb_cpu_to_le(bitmap_super_t *sb) -+static inline void sb_cpu_to_le(bitmap_super_t *sb) - { - sb_le_to_cpu(sb); /* these are really the same thing */ - } -@@ -74,7 +74,7 @@ typedef struct bitmap_info_s { - } bitmap_info_t; - - /* count the dirty bits in the first num_bits of byte */ --inline int count_dirty_bits_byte(char byte, int num_bits) -+static inline int count_dirty_bits_byte(char byte, int num_bits) - { - int num = 0; - diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch index 143a8d952e..c656d073e3 100644 --- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch +++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch @@ -5,22 +5,21 @@ Upstream-Status: Pending Signed-off-by: Aníbal Limón -diff --git a/monitor.c b/monitor.c -index f81e707..19ea041 100644 ---- a/monitor.c -+++ b/monitor.c -@@ -260,8 +260,13 @@ static int read_and_act(struct active_array *a) +Index: mdadm-3.3.4/monitor.c +=================================================================== +--- mdadm-3.3.4.orig/monitor.c ++++ mdadm-3.3.4/monitor.c +@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar + mdi->curr_state = read_dev_state(mdi->state_fd); + } } - +- gettimeofday(&tv, NULL); +#if defined(__x86_64__) && defined(__ILP32__) -+ dprintf("%s(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n", ++ dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n", +#else - dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", -- __func__, a->info.container_member, + dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", +#endif -+ __func__, -+ a->info.container_member, + a->info.container_member, tv.tv_sec, tv.tv_usec, array_states[a->curr_state], - array_states[a->prev_state], diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb deleted file mode 100644 index b2fbe4ae54..0000000000 --- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Tool for managing software RAID under Linux" -HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" - -# Some files are GPLv2+ while others are GPLv2. -LICENSE = "GPLv2 & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ - file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" - - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ - file://mdadm-3.2.2_fix_for_x32.patch \ - file://gcc-4.9.patch \ - file://mdadm-3.3.2_x32_abi_time_t.patch \ - file://inline.patch \ - file://run-ptest \ - " - -SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220" -SRC_URI[sha256sum] = "0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c" - -CFLAGS += "-fno-strict-aliasing" - -inherit autotools-brokensep - -EXTRA_OEMAKE = "CHECK_RUN_DIR=0" -# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h -# prevents 64-bit userland from seeing this definition, instead defaulting -# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get -# int-ll64.h included -EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' -EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' -EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' - -do_compile() { - oe_runmake -} - -do_install() { - export STRIP="" - autotools_do_install -} - -FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" - -inherit ptest - -do_compile_ptest() { - oe_runmake test -} - -do_install_ptest() { - cp -a ${S}/tests ${D}${PTEST_PATH}/tests - cp ${S}/test ${D}${PTEST_PATH} - sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test - ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm - for prg in test_stripe swap_super raid6check - do - install -D -m 755 $prg ${D}${PTEST_PATH}/ - done -} -RDEPENDS_${PN}-ptest += "bash" -RRECOMMENDS_${PN}-ptest += " \ - coreutils \ - util-linux \ - kernel-module-loop \ - kernel-module-linear \ - kernel-module-raid0 \ - kernel-module-raid1 \ - kernel-module-raid10 \ - kernel-module-raid456 \ -" diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb new file mode 100644 index 0000000000..460a4308b3 --- /dev/null +++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb @@ -0,0 +1,70 @@ +SUMMARY = "Tool for managing software RAID under Linux" +HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" + +# Some files are GPLv2+ while others are GPLv2. +LICENSE = "GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ + file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" + + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ + file://mdadm-3.2.2_fix_for_x32.patch \ + file://gcc-4.9.patch \ + file://mdadm-3.3.2_x32_abi_time_t.patch \ + file://run-ptest \ + " +SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09" +SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68" + +CFLAGS += "-fno-strict-aliasing" + +inherit autotools-brokensep + +EXTRA_OEMAKE = "CHECK_RUN_DIR=0" +# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h +# prevents 64-bit userland from seeing this definition, instead defaulting +# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get +# int-ll64.h included +EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' +EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' +EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' + +do_compile() { + oe_runmake +} + +do_install() { + export STRIP="" + autotools_do_install +} + +FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" + +inherit ptest + +do_compile_ptest() { + oe_runmake test +} + +do_install_ptest() { + cp -a ${S}/tests ${D}${PTEST_PATH}/tests + cp ${S}/test ${D}${PTEST_PATH} + sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test + ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm + for prg in test_stripe swap_super raid6check + do + install -D -m 755 $prg ${D}${PTEST_PATH}/ + done +} +RDEPENDS_${PN}-ptest += "bash" +RRECOMMENDS_${PN}-ptest += " \ + coreutils \ + util-linux \ + kernel-module-loop \ + kernel-module-linear \ + kernel-module-raid0 \ + kernel-module-raid1 \ + kernel-module-raid10 \ + kernel-module-raid456 \ +" -- cgit v1.2.3-54-g00ecf