summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch60
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch112
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0003-waf-improve-readability-of-cross-answers-generated-b.patch66
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch72
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0005-build-unify-and-fix-endian-tests.patch169
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0006-avoid-using-colon-in-the-checking-msg.patch32
-rw-r--r--meta-networking/recipes-connectivity/samba/samba-4.1.12/0007-waf-Fix-parsing-of-cross-answers-file-in-case-answer.patch36
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.1.12.bb7
8 files changed, 554 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch
new file mode 100644
index 0000000000..69668c088a
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch
@@ -0,0 +1,60 @@
1From 1b32c7d7f148bcf2598799b21dfa3ba1ed824d32 Mon Sep 17 00:00:00 2001
2From: Uri Simchoni <urisimchoni@gmail.com>
3Date: Mon, 18 May 2015 21:12:06 +0300
4Subject: [PATCH 1/7] waf: sanitize and fix added cross answer
5
6When configuring samba for cross-compilation using the cross-answers
7method, the function add_answer receives the standard output and exit code
8of a configuration test and updates the cross-answers file accordingly.
9
10This patch sanitizes the standard output to conform to the cross-answers
11file format - one line of output. It also adds a missing newline.
12
13(Note - at this point add_answer is only ever called with empty output
14but this change is significant for the reminder of this patchset)
15
16Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
17Reviewed-by: Andrew Bartlett <abartlet@samba.org>
18Reviewed-by: Alexander Bokovoy <ab@samba.org>
19
20Upstream-Status: Backport
21
22Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
23---
24 buildtools/wafsamba/samba_cross.py | 13 +++++++++++--
25 1 file changed, 11 insertions(+), 2 deletions(-)
26
27diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
28index 3838e34..fc1d78e 100644
29--- a/buildtools/wafsamba/samba_cross.py
30+++ b/buildtools/wafsamba/samba_cross.py
31@@ -19,6 +19,16 @@ def add_answer(ca_file, msg, answer):
32 except:
33 Logs.error("Unable to open cross-answers file %s" % ca_file)
34 sys.exit(1)
35+ (retcode, retstring) = answer
36+ # if retstring is more than one line then we probably
37+ # don't care about its actual content (the tests should
38+ # yield one-line output in order to comply with the cross-answer
39+ # format)
40+ retstring = retstring.strip()
41+ if len(retstring.split('\n')) > 1:
42+ retstring = ''
43+ answer = (retcode, retstring)
44+
45 if answer == ANSWER_OK:
46 f.write('%s: OK\n' % msg)
47 elif answer == ANSWER_UNKNOWN:
48@@ -26,8 +36,7 @@ def add_answer(ca_file, msg, answer):
49 elif answer == ANSWER_FAIL:
50 f.write('%s: FAIL\n' % msg)
51 else:
52- (retcode, retstring) = answer
53- f.write('%s: (%d, "%s")' % (msg, retcode, retstring))
54+ f.write('%s: (%d, "%s")\n' % (msg, retcode, retstring))
55 f.close()
56
57
58--
591.9.1
60
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch
new file mode 100644
index 0000000000..fce3abcaa6
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0002-Adds-a-new-mode-to-samba-cross-compiling.patch
@@ -0,0 +1,112 @@
1From add52538b9a0ccf66ca87c7a691bf59901765849 Mon Sep 17 00:00:00 2001
2From: Uri Simchoni <urisimchoni@gmail.com>
3Date: Mon, 18 May 2015 21:15:19 +0300
4Subject: [PATCH 2/7] Adds a new mode to samba cross-compiling.
5
6When both --cross-answers and --cross-execute are set, this means:
7- Use cross-answers
8- If answer is unknown, then instead of adding UNKNOWN to the cross-answers
9 file and failing configure, the new mode runs cross-execute to determine the
10 answer and adds that to the cross-answers file.
11
12Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
13Reviewed-by: Andrew Bartlett <abartlet@samba.org>
14Reviewed-by: Alexander Bokovoy <ab@samba.org>
15
16Upstream-Status: Backport
17
18Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
19---
20 buildtools/wafsamba/samba_cross.py | 46 ++++++++++++++++++++++++++++----------
21 1 file changed, 34 insertions(+), 12 deletions(-)
22
23diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
24index fc1d78e..3f1ef12 100644
25--- a/buildtools/wafsamba/samba_cross.py
26+++ b/buildtools/wafsamba/samba_cross.py
27@@ -45,7 +45,6 @@ def cross_answer(ca_file, msg):
28 try:
29 f = open(ca_file, 'r')
30 except:
31- add_answer(ca_file, msg, ANSWER_UNKNOWN)
32 return ANSWER_UNKNOWN
33 for line in f:
34 line = line.strip()
35@@ -78,7 +77,6 @@ def cross_answer(ca_file, msg):
36 else:
37 raise Utils.WafError("Bad answer format '%s' in %s" % (line, ca_file))
38 f.close()
39- add_answer(ca_file, msg, ANSWER_UNKNOWN)
40 return ANSWER_UNKNOWN
41
42
43@@ -86,24 +84,47 @@ class cross_Popen(Utils.pproc.Popen):
44 '''cross-compilation wrapper for Popen'''
45 def __init__(*k, **kw):
46 (obj, args) = k
47-
48- if '--cross-execute' in args:
49- # when --cross-execute is set, then change the arguments
50- # to use the cross emulator
51- i = args.index('--cross-execute')
52- newargs = args[i+1].split()
53- newargs.extend(args[0:i])
54- args = newargs
55- elif '--cross-answers' in args:
56+ use_answers = False
57+ ans = ANSWER_UNKNOWN
58+
59+ # Three possibilities:
60+ # 1. Only cross-answers - try the cross-answers file, and if
61+ # there's no corresponding answer, add to the file and mark
62+ # the configure process as unfinished.
63+ # 2. Only cross-execute - get the answer from cross-execute
64+ # 3. Both - try the cross-answers file, and if there is no
65+ # corresponding answer - use cross-execute to get an answer,
66+ # and add that answer to the file.
67+ if '--cross-answers' in args:
68 # when --cross-answers is set, then change the arguments
69 # to use the cross answers if available
70+ use_answers = True
71 i = args.index('--cross-answers')
72 ca_file = args[i+1]
73 msg = args[i+2]
74 ans = cross_answer(ca_file, msg)
75+
76+ if '--cross-execute' in args and ans == ANSWER_UNKNOWN:
77+ # when --cross-execute is set, then change the arguments
78+ # to use the cross emulator
79+ i = args.index('--cross-execute')
80+ newargs = args[i+1].split()
81+ newargs.extend(args[0:i])
82+ if use_answers:
83+ p = real_Popen(newargs,
84+ stdout=Utils.pproc.PIPE,
85+ stderr=Utils.pproc.PIPE)
86+ ce_out, ce_err = p.communicate()
87+ ans = (p.returncode, ce_out)
88+ add_answer(ca_file, msg, ans)
89+ else:
90+ args = newargs
91+
92+ if use_answers:
93 if ans == ANSWER_UNKNOWN:
94 global cross_answers_incomplete
95 cross_answers_incomplete = True
96+ add_answer(ca_file, msg, ans)
97 (retcode, retstring) = ans
98 args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
99 real_Popen.__init__(*(obj, args), **kw)
100@@ -124,7 +145,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None):
101
102 if conf.env.CROSS_EXECUTE:
103 ret.extend(['--cross-execute', conf.env.CROSS_EXECUTE])
104- elif conf.env.CROSS_ANSWERS:
105+
106+ if conf.env.CROSS_ANSWERS:
107 if msg is None:
108 raise Utils.WafError("Cannot have NULL msg in cross-answers")
109 ret.extend(['--cross-answers', os.path.join(Options.launch_dir, conf.env.CROSS_ANSWERS), msg])
110--
1111.9.1
112
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0003-waf-improve-readability-of-cross-answers-generated-b.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0003-waf-improve-readability-of-cross-answers-generated-b.patch
new file mode 100644
index 0000000000..ec17d9d216
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0003-waf-improve-readability-of-cross-answers-generated-b.patch
@@ -0,0 +1,66 @@
1From f7052d633396005563e44509428503f42c9faa97 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 12 Nov 2015 01:00:11 -0500
4Subject: [PATCH 3/7] waf: improve readability of cross-answers generated by cross-execute
5
6When generating a result for cross-answers from the (retcode, retstring) tuple:
7- (0, "output") indicated as "output"
8- 1 is interpreted as generic fail code, instead of 255, because most
9 if not all tests fail with 1 as exit code rather than 255
10- For failing test, use NO instead of FAIL, because that's not
11 necessarily a failure (it could mean that something is NOT
12 broken)
13
14Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
15Reviewed-by: Andrew Bartlett <abartlet@samba.org>
16Reviewed-by: Alexander Bokovoy <ab@samba.org>
17
18Upstream-Status: Backport
19
20Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
21---
22 buildtools/wafsamba/samba_cross.py | 13 ++++++++-----
23 1 file changed, 8 insertions(+), 5 deletions(-)
24
25diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
26index 3f1ef12..d1e7006 100644
27--- a/buildtools/wafsamba/samba_cross.py
28+++ b/buildtools/wafsamba/samba_cross.py
29@@ -6,7 +6,7 @@ from Configure import conf
30 real_Popen = None
31
32 ANSWER_UNKNOWN = (254, "")
33-ANSWER_FAIL = (255, "")
34+ANSWER_NO = (1, "")
35 ANSWER_OK = (0, "")
36
37 cross_answers_incomplete = False
38@@ -33,10 +33,13 @@ def add_answer(ca_file, msg, answer):
39 f.write('%s: OK\n' % msg)
40 elif answer == ANSWER_UNKNOWN:
41 f.write('%s: UNKNOWN\n' % msg)
42- elif answer == ANSWER_FAIL:
43- f.write('%s: FAIL\n' % msg)
44+ elif answer == ANSWER_NO:
45+ f.write('%s: NO\n' % msg)
46 else:
47- f.write('%s: (%d, "%s")\n' % (msg, retcode, retstring))
48+ if retcode == 0:
49+ f.write('%s: "%s"\n' % (msg, retstring))
50+ else:
51+ f.write('%s: (%d, "%s")\n' % (msg, retcode, retstring))
52 f.close()
53
54
55@@ -64,7 +67,7 @@ def cross_answer(ca_file, msg):
56 return ANSWER_UNKNOWN
57 elif ans == "FAIL" or ans == "NO":
58 f.close()
59- return ANSWER_FAIL
60+ return ANSWER_NO
61 elif ans[0] == '"':
62 return (0, ans.strip('"'))
63 elif ans[0] == "'":
64--
651.9.1
66
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch
new file mode 100644
index 0000000000..3fbb770f3b
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch
@@ -0,0 +1,72 @@
1From 8ffb1892b5c42d8d29124d274aa4b5f1726d7e9f Mon Sep 17 00:00:00 2001
2From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3Date: Mon, 21 Apr 2014 10:18:16 -0300
4Subject: [PATCH 4/7] build: make wafsamba CHECK_SIZEOF cross-compile friendly
5
6Use the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e
7We do the same array trick iteratively starting from 1 (byte) by powers
8of 2 up to 32.
9
10The new 'critical' option is used to make the invocation die or not
11according to each test.
12The default is True since normally it's expected to find a proper
13result and should error out if not.
14
15Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
16Reviewed-by: Andrew Bartlett <abartlet@samba.org>
17Reviewed-by: David Disseldorp <ddiss@samba.org>
18
19Upstream-Status: Backport
20
21Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
22---
23 buildtools/wafsamba/samba_autoconf.py | 28 ++++++++++++++++------------
24 1 file changed, 16 insertions(+), 12 deletions(-)
25
26diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
27index fe110bd..59953d9 100644
28--- a/buildtools/wafsamba/samba_autoconf.py
29+++ b/buildtools/wafsamba/samba_autoconf.py
30@@ -304,23 +304,27 @@ def CHECK_FUNCS(conf, list, link=True, lib=None, headers=None):
31
32
33 @conf
34-def CHECK_SIZEOF(conf, vars, headers=None, define=None):
35+def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True):
36 '''check the size of a type'''
37- ret = True
38 for v in TO_LIST(vars):
39 v_define = define
40+ ret = False
41 if v_define is None:
42 v_define = 'SIZEOF_%s' % v.upper().replace(' ', '_')
43- if not CHECK_CODE(conf,
44- 'printf("%%u", (unsigned)sizeof(%s))' % v,
45- define=v_define,
46- execute=True,
47- define_ret=True,
48- quote=False,
49- headers=headers,
50- local_include=False,
51- msg="Checking size of %s" % v):
52- ret = False
53+ for size in list((1, 2, 4, 8, 16, 32)):
54+ if CHECK_CODE(conf,
55+ 'static int test_array[1 - 2 * !(((long int)(sizeof(%s))) <= %d)];' % (v, size),
56+ define=v_define,
57+ quote=False,
58+ headers=headers,
59+ local_include=False,
60+ msg="Checking if size of %s == %d" % (v, size)):
61+ conf.DEFINE(v_define, size)
62+ ret = True
63+ break
64+ if not ret and critical:
65+ Logs.error("Couldn't determine size of '%s'" % v)
66+ sys.exit(1)
67 return ret
68
69 @conf
70--
711.9.1
72
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0005-build-unify-and-fix-endian-tests.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0005-build-unify-and-fix-endian-tests.patch
new file mode 100644
index 0000000000..5546b6d65e
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0005-build-unify-and-fix-endian-tests.patch
@@ -0,0 +1,169 @@
1From 81379b6b14ea725c72953be2170b382403ed8728 Mon Sep 17 00:00:00 2001
2From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3Date: Mon, 21 Apr 2014 10:18:15 -0300
4Subject: [PATCH 5/7] build: unify and fix endian tests
5
6Unify the endian tests out of lib/ccan/wscript into wafsamba since
7they're almost cross-compile friendly.
8While at it fix them to be so by moving the preprocessor directives out
9of main scope since that will fail.
10And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN
11defines separate because of different codebases.
12
13Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
14Reviewed-by: Andrew Bartlett <abartlet@samba.org>
15Reviewed-by: David Disseldorp <ddiss@samba.org>
16
17Upstream-Status: Backport
18
19Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
20---
21 buildtools/wafsamba/wscript | 65 ++++++++++++++++++++++++++++++++++++++++++---
22 lib/ccan/wscript | 55 --------------------------------------
23 2 files changed, 62 insertions(+), 58 deletions(-)
24
25diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
26index 7984227..1a2cfe6 100755
27--- a/buildtools/wafsamba/wscript
28+++ b/buildtools/wafsamba/wscript
29@@ -390,9 +390,68 @@ def configure(conf):
30 else:
31 conf.define('SHLIBEXT', "so", quote=True)
32
33- conf.CHECK_CODE('long one = 1; return ((char *)(&one))[0]',
34- execute=True,
35- define='WORDS_BIGENDIAN')
36+ # First try a header check for cross-compile friendlyness
37+ conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
38+ #define B __BYTE_ORDER
39+ #elif defined(BYTE_ORDER)
40+ #define B BYTE_ORDER
41+ #endif
42+
43+ #ifdef __LITTLE_ENDIAN
44+ #define LITTLE __LITTLE_ENDIAN
45+ #elif defined(LITTLE_ENDIAN)
46+ #define LITTLE LITTLE_ENDIAN
47+ #endif
48+
49+ #if !defined(LITTLE) || !defined(B) || LITTLE != B
50+ #error Not little endian.
51+ #endif
52+ int main(void) { return 0; }""",
53+ addmain=False,
54+ headers="endian.h sys/endian.h",
55+ define="HAVE_LITTLE_ENDIAN")
56+ conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
57+ #define B __BYTE_ORDER
58+ #elif defined(BYTE_ORDER)
59+ #define B BYTE_ORDER
60+ #endif
61+
62+ #ifdef __BIG_ENDIAN
63+ #define BIG __BIG_ENDIAN
64+ #elif defined(BIG_ENDIAN)
65+ #define BIG BIG_ENDIAN
66+ #endif
67+
68+ #if !defined(BIG) || !defined(B) || BIG != B
69+ #error Not big endian.
70+ #endif
71+ int main(void) { return 0; }""",
72+ addmain=False,
73+ headers="endian.h sys/endian.h",
74+ define="HAVE_BIG_ENDIAN")
75+
76+ if not conf.CONFIG_SET("HAVE_BIG_ENDIAN") and not conf.CONFIG_SET("HAVE_LITTLE_ENDIAN"):
77+ # That didn't work! Do runtime test.
78+ conf.CHECK_CODE("""union { int i; char c[sizeof(int)]; } u;
79+ u.i = 0x01020304;
80+ return u.c[0] == 0x04 && u.c[1] == 0x03 && u.c[2] == 0x02 && u.c[3] == 0x01 ? 0 : 1;""",
81+ addmain=True, execute=True,
82+ define='HAVE_LITTLE_ENDIAN',
83+ msg="Checking for HAVE_LITTLE_ENDIAN - runtime")
84+ conf.CHECK_CODE("""union { int i; char c[sizeof(int)]; } u;
85+ u.i = 0x01020304;
86+ return u.c[0] == 0x01 && u.c[1] == 0x02 && u.c[2] == 0x03 && u.c[3] == 0x04 ? 0 : 1;""",
87+ addmain=True, execute=True,
88+ define='HAVE_BIG_ENDIAN',
89+ msg="Checking for HAVE_BIG_ENDIAN - runtime")
90+
91+ # Extra sanity check.
92+ if conf.CONFIG_SET("HAVE_BIG_ENDIAN") == conf.CONFIG_SET("HAVE_LITTLE_ENDIAN"):
93+ Logs.error("Failed endian determination. The PDP-11 is back?")
94+ sys.exit(1)
95+ else:
96+ if conf.CONFIG_SET("HAVE_BIG_ENDIAN"):
97+ conf.DEFINE('WORDS_BIGENDIAN', 1)
98
99 # check if signal() takes a void function
100 if conf.CHECK_CODE('return *(signal (0, 0)) (0) == 1',
101diff --git a/lib/ccan/wscript b/lib/ccan/wscript
102index a0b5406..5b3a910 100644
103--- a/lib/ccan/wscript
104+++ b/lib/ccan/wscript
105@@ -25,61 +25,6 @@ def configure(conf):
106 conf.CHECK_CODE('int __attribute__((used)) func(int x) { return x; }',
107 addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
108 define='HAVE_ATTRIBUTE_USED')
109- # We try to use headers for a compile-time test.
110- conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
111- #define B __BYTE_ORDER
112- #elif defined(BYTE_ORDER)
113- #define B BYTE_ORDER
114- #endif
115-
116- #ifdef __LITTLE_ENDIAN
117- #define LITTLE __LITTLE_ENDIAN
118- #elif defined(LITTLE_ENDIAN)
119- #define LITTLE LITTLE_ENDIAN
120- #endif
121-
122- #if !defined(LITTLE) || !defined(B) || LITTLE != B
123- #error Not little endian.
124- #endif""",
125- headers="endian.h sys/endian.h",
126- define="HAVE_LITTLE_ENDIAN")
127- conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
128- #define B __BYTE_ORDER
129- #elif defined(BYTE_ORDER)
130- #define B BYTE_ORDER
131- #endif
132-
133- #ifdef __BIG_ENDIAN
134- #define BIG __BIG_ENDIAN
135- #elif defined(BIG_ENDIAN)
136- #define BIG BIG_ENDIAN
137- #endif
138-
139- #if !defined(BIG) || !defined(B) || BIG != B
140- #error Not big endian.
141- #endif""",
142- headers="endian.h sys/endian.h",
143- define="HAVE_BIG_ENDIAN")
144-
145- if not conf.CONFIG_SET("HAVE_BIG_ENDIAN") and not conf.CONFIG_SET("HAVE_LITTLE_ENDIAN"):
146- # That didn't work! Do runtime test.
147- conf.CHECK_CODE("""union { int i; char c[sizeof(int)]; } u;
148- u.i = 0x01020304;
149- return u.c[0] == 0x04 && u.c[1] == 0x03 && u.c[2] == 0x02 && u.c[3] == 0x01 ? 0 : 1;""",
150- addmain=True, execute=True,
151- define='HAVE_LITTLE_ENDIAN',
152- msg="Checking for HAVE_LITTLE_ENDIAN - runtime")
153- conf.CHECK_CODE("""union { int i; char c[sizeof(int)]; } u;
154- u.i = 0x01020304;
155- return u.c[0] == 0x01 && u.c[1] == 0x02 && u.c[2] == 0x03 && u.c[3] == 0x04 ? 0 : 1;""",
156- addmain=True, execute=True,
157- define='HAVE_BIG_ENDIAN',
158- msg="Checking for HAVE_BIG_ENDIAN - runtime")
159-
160- # Extra sanity check.
161- if conf.CONFIG_SET("HAVE_BIG_ENDIAN") == conf.CONFIG_SET("HAVE_LITTLE_ENDIAN"):
162- Logs.error("Failed endian determination. The PDP-11 is back?")
163- sys.exit(1)
164
165 conf.CHECK_CODE('return __builtin_choose_expr(1, 0, "garbage");',
166 link=True,
167--
1681.9.1
169
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0006-avoid-using-colon-in-the-checking-msg.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0006-avoid-using-colon-in-the-checking-msg.patch
new file mode 100644
index 0000000000..cdf7a38c18
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0006-avoid-using-colon-in-the-checking-msg.patch
@@ -0,0 +1,32 @@
1From 5413f97290d3126262eb309ecbcf7769509f2a11 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Tue, 10 Nov 2015 00:48:35 -0500
4Subject: [PATCH 6/7] avoid using colon in the checking msg
5
6Upstream-Status: Pending
7
8colon is used as the separator when parse from
9a answers file, the colon here makes it never
10get the right answer.
11
12Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
13---
14 wscript_configure_system_mitkrb5 | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
18index a62d00b..a2d89f0 100644
19--- a/wscript_configure_system_mitkrb5
20+++ b/wscript_configure_system_mitkrb5
21@@ -240,7 +240,7 @@ conf.CHECK_CODE('''
22 ''',
23 'HAVE_WRFILE_KEYTAB',
24 headers='krb5.h', lib='krb5', execute=True,
25- msg="Checking whether the WRFILE:-keytab is supported");
26+ msg="Checking whether the WRFILE -keytab is supported");
27 # Check for KRB5_DEPRECATED handling
28 conf.CHECK_CODE('''#define KRB5_DEPRECATED 1
29 #include <krb5.h>''',
30--
311.9.1
32
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0007-waf-Fix-parsing-of-cross-answers-file-in-case-answer.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0007-waf-Fix-parsing-of-cross-answers-file-in-case-answer.patch
new file mode 100644
index 0000000000..de0d32c780
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0007-waf-Fix-parsing-of-cross-answers-file-in-case-answer.patch
@@ -0,0 +1,36 @@
1From 649c731526dc1473bd1804d2903d7559e63616da Mon Sep 17 00:00:00 2001
2From: Uri Simchoni <urisimchoni@gmail.com>
3Date: Mon, 4 May 2015 09:12:45 +0300
4Subject: [PATCH 7/7] waf: Fix parsing of cross-answers file in case answer includes a colon
5
6The answer provided in the cross-answers file may include a colon,
7as in:
8Checking uname version type: "#57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014"
9
10Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
11Reviewed-by: Andrew Bartlett <abartlet@samba.org>
12Reviewed-by: Alexander Bokovoy <ab@samba.org>
13
14Upstream-Status: Backport
15
16Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17---
18 buildtools/wafsamba/samba_cross.py | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
22index d1e7006..7961212 100644
23--- a/buildtools/wafsamba/samba_cross.py
24+++ b/buildtools/wafsamba/samba_cross.py
25@@ -54,7 +54,7 @@ def cross_answer(ca_file, msg):
26 if line == '' or line[0] == '#':
27 continue
28 if line.find(':') != -1:
29- a = line.split(':')
30+ a = line.split(':', 1)
31 thismsg = a[0].strip()
32 if thismsg != msg:
33 continue
34--
351.9.1
36
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
index fa35038bec..3d677bec15 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
@@ -34,6 +34,13 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
34 file://19-systemd-daemon-is-contained-by-libsystemd.patch \ 34 file://19-systemd-daemon-is-contained-by-libsystemd.patch \
35 file://20-do-not-import-target-module-while-cross-compile.patch \ 35 file://20-do-not-import-target-module-while-cross-compile.patch \
36 file://21-add-config-option-without-valgrind.patch \ 36 file://21-add-config-option-without-valgrind.patch \
37 file://0001-waf-sanitize-and-fix-added-cross-answer.patch \
38 file://0002-Adds-a-new-mode-to-samba-cross-compiling.patch \
39 file://0003-waf-improve-readability-of-cross-answers-generated-b.patch \
40 file://0004-build-make-wafsamba-CHECK_SIZEOF-cross-compile-frien.patch \
41 file://0005-build-unify-and-fix-endian-tests.patch \
42 file://0006-avoid-using-colon-in-the-checking-msg.patch \
43 file://0007-waf-Fix-parsing-of-cross-answers-file-in-case-answer.patch \
37 " 44 "
38 45
39SRC_URI[md5sum] = "232016d7581a1ba11e991ec2674553c4" 46SRC_URI[md5sum] = "232016d7581a1ba11e991ec2674553c4"