summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-02-10 18:35:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:50 +0000
commitf0d5478de47cb7dd45141a279f067be869a2f4c5 (patch)
treeb342fcc0c9ddef95918745e9eceed377d0738422 /meta/recipes-extended
parent79d5041a9c9ff16ca254d99f87c9ad0f178d48e6 (diff)
downloadpoky-f0d5478de47cb7dd45141a279f067be869a2f4c5.tar.gz
mdadm: update to version 3.4
3.3.4 -> 3.4 a) Removed the following upstreamed patch: 1. 0001-Define-_POSIX_C_SOURCE-if-undefined.patch b) Added following patches to fix uclibc,musl and x32 build failures 1. 0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch 2. 0001-util.c-include-poll.h-instead-of-sys-poll.h.patch 3. 0001-Fix-some-type-comparison-problems.patch 4. 0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch (From OE-Core rev: e1ae012388e4321b95cd79c014af135cf6c419ad) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch59
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch50
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch33
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch55
-rw-r--r--meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch45
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch2
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch75
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.4.bb (renamed from meta/recipes-extended/mdadm/mdadm_3.3.4.bb)17
8 files changed, 229 insertions, 107 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch b/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
deleted file mode 100644
index a461b763c9..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From d74b02d4653d1ea26029c2528eb93d7268b83eb3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 13 Jan 2016 07:28:33 +0000
4Subject: [PATCH] Define _POSIX_C_SOURCE if undefined
5
6typecast second argument of connect() API to use struct sockaddr*
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 config.c | 3 +++
13 mdmon.c | 2 +-
14 msg.c | 2 +-
15 3 files changed, 5 insertions(+), 2 deletions(-)
16
17diff --git a/config.c b/config.c
18index a882ed3..a675688 100644
19--- a/config.c
20+++ b/config.c
21@@ -63,6 +63,9 @@
22 * but may not wrap over lines
23 *
24 */
25+#ifndef _POSIX_C_SOURCE
26+#define _POSIX_C_SOURCE 200809L
27+#endif
28
29 #ifndef CONFFILE
30 #define CONFFILE "/etc/mdadm.conf"
31diff --git a/mdmon.c b/mdmon.c
32index ee12b7c..e4b73d9 100644
33--- a/mdmon.c
34+++ b/mdmon.c
35@@ -235,7 +235,7 @@ static int make_control_sock(char *devname)
36 addr.sun_family = PF_LOCAL;
37 strcpy(addr.sun_path, path);
38 umask(077); /* ensure no world write access */
39- if (bind(sfd, &addr, sizeof(addr)) < 0) {
40+ if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
41 close(sfd);
42 return -1;
43 }
44diff --git a/msg.c b/msg.c
45index 754630b..45cd450 100644
46--- a/msg.c
47+++ b/msg.c
48@@ -170,7 +170,7 @@ int connect_monitor(char *devname)
49
50 addr.sun_family = PF_LOCAL;
51 strcpy(addr.sun_path, path);
52- if (connect(sfd, &addr, sizeof(addr)) < 0) {
53+ if (connect(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
54 close(sfd);
55 return -1;
56 }
57--
582.7.0
59
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
new file mode 100644
index 0000000000..ee482b5ca0
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
@@ -0,0 +1,50 @@
1From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Mon, 8 Feb 2016 11:18:52 +0200
4Subject: [PATCH] Fix some type comparison problems
5
6As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
7timestamps will overflow in the year 2038. It already changed the
8utime and ctime in struct mdu_array_info_s from int to unsigned
9int. So we need to change the values that compared with them to
10unsigned int too.
11
12Upstream-Status: Backport
13
14Signed-off-by : Xiao Ni <xni@redhat.com>
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17
18 Monitor.c | 2 +-
19 util.c | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/Monitor.c b/Monitor.c
23index f19c2e5..6df80f9 100644
24--- a/Monitor.c
25+++ b/Monitor.c
26@@ -33,7 +33,7 @@
27 struct state {
28 char *devname;
29 char devnm[32]; /* to sync with mdstat info */
30- long utime;
31+ unsigned int utime;
32 int err;
33 char *spare_group;
34 int active, working, failed, spare, raid;
35diff --git a/util.c b/util.c
36index 3e6d293..96a806d 100644
37--- a/util.c
38+++ b/util.c
39@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
40 */
41 struct superswitch *ss;
42 struct supertype *st;
43- time_t besttime = 0;
44+ unsigned int besttime = 0;
45 int bestsuper = -1;
46 int i;
47
48--
492.4.0
50
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
new file mode 100644
index 0000000000..deb7486383
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
@@ -0,0 +1,33 @@
1From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Tue, 9 Feb 2016 11:44:01 +0200
4Subject: [PATCH] Fix the path of corosync and dlm header files check
5
6Original Makefile will check headers on host instead of sysroot.
7Fix it.
8
9Upstream-Status: Inappropriate [Yocto specific]
10
11Signed-off-by: Maxin B. John <maxin.john@intel.com>
12---
13 Makefile | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index fd79cfb..34150a9 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR)
21 FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
22 SYSTEMD_DIR=/lib/systemd/system
23
24-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
25-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
26+COROSYNC:=$(shell [ -d $(SYSROOT)/usr/include/corosync ] || echo -DNO_COROSYNC)
27+DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM)
28
29 DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
30 DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
31--
322.4.0
33
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
new file mode 100644
index 0000000000..1395473981
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
@@ -0,0 +1,55 @@
1From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Fri, 5 Feb 2016 18:06:32 +0200
4Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
5
6Fixes this build error:
7
8| In file included from mdadm.c:28:0:
9| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
10| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
11| ^
12
13Upstream-Status: Submitted
14
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17 mdadm.h | 9 +++++++++
18 1 file changed, 9 insertions(+)
19
20diff --git a/mdadm.h b/mdadm.h
21index dd02be7..230e60f 100755
22--- a/mdadm.h
23+++ b/mdadm.h
24@@ -139,12 +139,20 @@ struct dlm_lksb {
25 * and there is no standard conversion function so... */
26 /* And dietlibc doesn't think byteswap is ok, so.. */
27 /* #include <byteswap.h> */
28+
29+#ifndef bswap_16
30 #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
31 ((x) & 0xff00U) >> 8)
32+#endif
33+
34+#ifndef bswap_32
35 #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
36 ((x) & 0xff000000U) >> 24 | \
37 ((x) & 0x0000ff00U) << 8 | \
38 ((x) & 0x00ff0000U) >> 8)
39+#endif
40+
41+#ifndef bswap_64
42 #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
43 ((x) & 0xff00000000000000ULL) >> 56 | \
44 ((x) & 0x000000000000ff00ULL) << 40 | \
45@@ -153,6 +161,7 @@ struct dlm_lksb {
46 ((x) & 0x0000ff0000000000ULL) >> 24 | \
47 ((x) & 0x00000000ff000000ULL) << 8 | \
48 ((x) & 0x000000ff00000000ULL) >> 8)
49+#endif
50
51 #if !defined(__KLIBC__)
52 #if BYTE_ORDER == LITTLE_ENDIAN
53--
542.4.0
55
diff --git a/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch b/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
new file mode 100644
index 0000000000..d5cf003745
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
@@ -0,0 +1,45 @@
1From 2645673a7ea948a1297d5b8f0daab29b898f044f Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Fri, 5 Feb 2016 17:14:04 +0200
4Subject: [PATCH] util.c: include poll.h instead of sys/poll.h
5
6This fixes a compile warning when building with musl:
7
8 In file included from util.c:27:0:
9 |
10 qemux86-64/usr/include/sys/poll.h:1:2:
11 error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
12 [-Werror=cpp]
13 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
14 | ^
15
16Upstream-Status: Accepted
17
18Signed-off-by: Maxin B. John <maxin.john@intel.com>
19---
20 util.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/util.c b/util.c
24index 970d484..3e6d293 100644
25--- a/util.c
26+++ b/util.c
27@@ -24,7 +24,6 @@
28
29 #include "mdadm.h"
30 #include "md_p.h"
31-#include <sys/poll.h>
32 #include <sys/socket.h>
33 #include <sys/utsname.h>
34 #include <sys/wait.h>
35@@ -32,6 +31,7 @@
36 #include <sys/resource.h>
37 #include <sys/vfs.h>
38 #include <linux/magic.h>
39+#include <poll.h>
40 #include <ctype.h>
41 #include <dirent.h>
42 #include <signal.h>
43--
442.4.0
45
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
index 3b3db0a7f0..40acc148e0 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -1,4 +1,4 @@
1Upstream-Status: pending 1Upstream-Status: Accepted
2 2
3By hardcoding CC's definition in the Makefile, all the gcc parameters 3By hardcoding CC's definition in the Makefile, all the gcc parameters
4set by tune settings are lost. Causing compile failure with x32 toolchain 4set by tune settings are lost. Causing compile failure with x32 toolchain
diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
index f7c55142f6..267c007c21 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -1,50 +1,45 @@
1From f3acf8499a4cc400206c5c56f0a6c69192ed55de Mon Sep 17 00:00:00 2001 1From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com> 2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Sat, 7 Nov 2015 04:21:17 -0500 3Date: Wed, 10 Feb 2016 17:28:05 +0200
4Subject: [PATCH] mdadm: fix ptest build errors 4Subject: [PATCH] mdadm-fix-ptest-build-errors
5 5
6Check return value for posix_memalign() to fix ptest build error: 6builds fail with ptest enabled:
7 7
8 raid6check.c:352:2: error: ignoring return value of posix_memalign, \ 8| restripe.c: In function 'test_stripes':
9 declared with attribute warn_unused_result [-Werror=unused-result] 9| restripe.c:845:4: error: ignoring return value of 'read', declared with
10 10| attribute warn_unused_result [-Werror=unused-result]
11Initialize *stripe_buf as NULL to fix ptest build error: 11| read(source[i], stripes[i], chunk_size);
12 12| ^
13 raid6check.c: In function 'check_stripes': 13| cc1: all warnings being treated as errors
14 raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \ 14| Makefile:214: recipe for target 'test_stripe' failed
15 in this function [-Werror=maybe-uninitialized]
16 15
17Upstream-Status: Pending 16Upstream-Status: Pending
18 17
19Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 18Signed-off-by: Maxin B. John <maxin.john@intel.com>
20--- 19---
21 raid6check.c | 6 ++++-- 20 restripe.c | 6 +++++-
22 1 file changed, 4 insertions(+), 2 deletions(-) 21 1 file changed, 5 insertions(+), 1 deletion(-)
23 22
24diff --git a/raid6check.c b/raid6check.c 23diff --git a/restripe.c b/restripe.c
25index cb8522e..9462bcf 100644 24index 56dca73..d24b2b4 100644
26--- a/raid6check.c 25--- a/restripe.c
27+++ b/raid6check.c 26+++ b/restripe.c
28@@ -312,7 +312,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, 27@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets,
29 /* read the data and p and q blocks, and check we got them right */
30 int data_disks = raid_disks - 2;
31 int syndrome_disks = data_disks + is_ddf(layout) * 2;
32- char *stripe_buf;
33+ char *stripe_buf = NULL;
34 28
35 /* stripes[] is indexed by raid_disk and holds chunks from each device */ 29 while (length > 0) {
36 char **stripes = xmalloc(raid_disks * sizeof(char*)); 30 int disk;
37@@ -349,7 +349,9 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, 31+ ssize_t ret;
38 if (!tables_ready)
39 make_tables();
40 32
41- posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size); 33 for (i = 0 ; i < raid_disks ; i++) {
42+ if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0) 34 lseek64(source[i], offsets[i]+start, 0);
43+ goto exitCheck; 35- read(source[i], stripes[i], chunk_size);
44+ 36+ ret = read(source[i], stripes[i], chunk_size);
45 block_index_for_slot += 2; 37+ if (ret == -1) {
46 blocks += 2; 38+ printf("Read Failed\n");
47 blocks_page += 2; 39+ }
40 }
41 for (i = 0 ; i < data_disks ; i++) {
42 int disk = geo_map(i, start/chunk_size, raid_disks,
48-- 43--
491.9.1 442.4.0
50 45
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.4.bb
index e004030f85..142dfddbf2 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.4.bb
@@ -14,11 +14,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \ 14 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://0001-Fix-typo-in-comparision.patch \ 15 file://0001-Fix-typo-in-comparision.patch \
16 file://mdadm-fix-ptest-build-errors.patch \ 16 file://mdadm-fix-ptest-build-errors.patch \
17 file://0001-Define-_POSIX_C_SOURCE-if-undefined.patch \ 17 file://0001-util.c-include-poll.h-instead-of-sys-poll.h.patch \
18 file://0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch \
19 file://0001-Fix-some-type-comparison-problems.patch \
20 file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
18 file://run-ptest \ 21 file://run-ptest \
19 " 22 "
20SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09" 23SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63"
21SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68" 24SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808"
22 25
23CFLAGS += "-fno-strict-aliasing" 26CFLAGS += "-fno-strict-aliasing"
24inherit autotools-brokensep 27inherit autotools-brokensep
@@ -28,12 +31,12 @@ EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
28# prevents 64-bit userland from seeing this definition, instead defaulting 31# prevents 64-bit userland from seeing this definition, instead defaulting
29# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get 32# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
30# int-ll64.h included 33# int-ll64.h included
31EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' 34CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
32EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' 35CFLAGS_append_mips64 = ' -D__SANE_USERSPACE_TYPES__'
33EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' 36CFLAGS_append_mips64n32 = ' -D__SANE_USERSPACE_TYPES__'
34 37
35do_compile() { 38do_compile() {
36 oe_runmake 39 oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
37} 40}
38 41
39do_install() { 42do_install() {