diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-07-02 09:58:11 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-10 09:24:32 -0700 |
commit | 0c9e727a28cd87025b4208ddadb3213aac0bfdee (patch) | |
tree | d6b0b34f546c2acc3b59377f96c37c87ac4a252c | |
parent | 6613c053c52f18282e8704923a5f6d3cd2b3e75c (diff) | |
download | meta-openembedded-0c9e727a28cd87025b4208ddadb3213aac0bfdee.tar.gz |
samba: upgrade 4.8.12 -> 4.10.5
1. switch to python3, from 4.10.x, samba support both python2 and python3,
and from 4.11.x, python2 will be dropped.
2. fix cross-compile problem caused by waf
3. disable lmdb
4. refresh patch
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch | 42 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch | 62 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch | 59 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch | 48 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba/glibc_only.patch | 29 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba_4.10.5.bb (renamed from meta-networking/recipes-connectivity/samba/samba_4.8.12.bb) | 52 |
6 files changed, 203 insertions, 89 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch b/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch new file mode 100644 index 0000000000..fb12a10e26 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 27 Jun 2019 11:09:47 +0800 | ||
4 | Subject: [PATCH] samba: fix musl lib without innetgr | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
9 | --- | ||
10 | lib/util/access.c | 2 +- | ||
11 | source3/auth/user_util.c | 2 +- | ||
12 | 2 file changed, 2 insertion(+), 2 deletion(-) | ||
13 | |||
14 | diff --git a/lib/util/access.c b/lib/util/access.c | ||
15 | index 7da0573..b94949e 100644 | ||
16 | --- a/lib/util/access.c | ||
17 | +++ b/lib/util/access.c | ||
18 | @@ -112,7 +112,7 @@ static bool string_match(const char *tok,const char *s) | ||
19 | return true; | ||
20 | } | ||
21 | } else if (tok[0] == '@') { /* netgroup: look it up */ | ||
22 | -#ifdef HAVE_NETGROUP | ||
23 | +#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR) | ||
24 | DATA_BLOB tmp; | ||
25 | char *mydomain = NULL; | ||
26 | char *hostname = NULL; | ||
27 | diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c | ||
28 | index a76b5d4..30f523d 100644 | ||
29 | --- a/source3/auth/user_util.c | ||
30 | +++ b/source3/auth/user_util.c | ||
31 | @@ -148,7 +148,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char | ||
32 | |||
33 | bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname) | ||
34 | { | ||
35 | -#ifdef HAVE_NETGROUP | ||
36 | +#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR) | ||
37 | static char *my_yp_domain = NULL; | ||
38 | char *lowercase_user = NULL; | ||
39 | |||
40 | -- | ||
41 | 2.7.4 | ||
42 | |||
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 0000000000..23b35a8145 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 25 Jan 2019 15:00:59 +0800 | ||
4 | Subject: [PATCH] waf: add support of cross_compile | ||
5 | |||
6 | After upgrade, waf also upgraded | ||
7 | |||
8 | on 1.5.19, for cross_compile, subprocess.Popen is set to be | ||
9 | samba_cross.cross_Popen, which will not execute testprog on | ||
10 | host, but only read result from cross-answers.txt which is | ||
11 | passed by option --cross-answer | ||
12 | |||
13 | part of old code: | ||
14 | args = Utils.to_list(kw.get('exec_args', [])) | ||
15 | proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) | ||
16 | |||
17 | but on new version, exec_args is not used and cause do_configure | ||
18 | failed with Exec format error | ||
19 | |||
20 | fixed by append cross anser related args to cmd | ||
21 | |||
22 | Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] | ||
23 | |||
24 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
25 | --- | ||
26 | third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- | ||
27 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
28 | |||
29 | diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py | ||
30 | index 7608215..767cf33 100644 | ||
31 | --- a/third_party/waf/waflib/Tools/c_config.py | ||
32 | +++ b/third_party/waf/waflib/Tools/c_config.py | ||
33 | @@ -660,20 +660,21 @@ class test_exec(Task.Task): | ||
34 | """ | ||
35 | color = 'PINK' | ||
36 | def run(self): | ||
37 | + args = self.generator.bld.kw.get('exec_args', []) | ||
38 | if getattr(self.generator, 'rpath', None): | ||
39 | if getattr(self.generator, 'define_ret', False): | ||
40 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) | ||
41 | - else: | ||
42 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) | ||
43 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) | ||
44 | + else: | ||
45 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) | ||
46 | else: | ||
47 | env = self.env.env or {} | ||
48 | env.update(dict(os.environ)) | ||
49 | for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): | ||
50 | env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') | ||
51 | if getattr(self.generator, 'define_ret', False): | ||
52 | - self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) | ||
53 | + self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) | ||
54 | else: | ||
55 | - self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) | ||
56 | + self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) | ||
57 | |||
58 | @feature('test_exec') | ||
59 | @after_method('apply_link') | ||
60 | -- | ||
61 | 2.7.4 | ||
62 | |||
diff --git a/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch index e112b3b40b..3f2921ed33 100644 --- a/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch +++ b/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch | |||
@@ -1,21 +1,32 @@ | |||
1 | Some modules such as dynamic library maybe cann't be imported while cross compile, | 1 | From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 |
2 | we just check whether does the module exist. | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Tue, 25 Jun 2019 14:25:08 +0800 | ||
4 | Subject: [PATCH] do not import target module while cross compile | ||
5 | |||
6 | Some modules such as dynamic library maybe cann't be imported | ||
7 | while cross compile, we just check whether does the module exist. | ||
3 | 8 | ||
4 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | 9 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> |
5 | 10 | ||
6 | Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py | 11 | update to version 4.10.5, and switch to python3 |
7 | =================================================================== | 12 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
8 | --- samba-4.4.2.orig/buildtools/wafsamba/samba_bundled.py | 13 | --- |
9 | +++ samba-4.4.2/buildtools/wafsamba/samba_bundled.py | 14 | buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- |
10 | @@ -2,6 +2,7 @@ | 15 | 1 file changed, 18 insertions(+), 8 deletions(-) |
11 | 16 | ||
12 | import sys | 17 | diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py |
13 | import Build, Options, Logs | 18 | index 60ce7da..5468a36 100644 |
14 | +import imp, os | 19 | --- a/buildtools/wafsamba/samba_bundled.py |
15 | from Configure import conf | 20 | +++ b/buildtools/wafsamba/samba_bundled.py |
16 | from samba_utils import TO_LIST | 21 | @@ -4,6 +4,7 @@ import sys |
22 | from waflib import Build, Options, Logs | ||
23 | from waflib.Configure import conf | ||
24 | from wafsamba import samba_utils | ||
25 | +import importlib.util, os | ||
17 | 26 | ||
18 | @@ -230,17 +231,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li | 27 | def PRIVATE_NAME(bld, name, private_extension, private_library): |
28 | '''possibly rename a library to include a bundled extension''' | ||
29 | @@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): | ||
19 | # versions | 30 | # versions |
20 | minversion = minimum_library_version(conf, libname, minversion) | 31 | minversion = minimum_library_version(conf, libname, minversion) |
21 | 32 | ||
@@ -25,34 +36,32 @@ Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py | |||
25 | - found = False | 36 | - found = False |
26 | - else: | 37 | - else: |
27 | + # Find module in PYTHONPATH | 38 | + # Find module in PYTHONPATH |
28 | + stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]]) | 39 | + spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) |
29 | + if stuff: | 40 | + if spec: |
30 | try: | 41 | try: |
31 | - version = m.__version__ | 42 | - version = m.__version__ |
32 | - except AttributeError: | 43 | - except AttributeError: |
33 | + m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2]) | 44 | + module = importlib.util.module_from_spec(spec) |
45 | + spec.loader.load_module(module) | ||
34 | + except ImportError: | 46 | + except ImportError: |
35 | found = False | 47 | found = False |
36 | + | 48 | + |
37 | + if conf.env.CROSS_COMPILE: | 49 | + if conf.env.CROSS_COMPILE: |
38 | + # Some modules such as dynamic library maybe cann't be imported | 50 | + # Some modules such as dynamic library maybe cann't be imported |
39 | + # while cross compile, we just check whether the module exist | 51 | + # while cross compile, we just check whether the module exist |
40 | + Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1])) | 52 | + Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) |
41 | + found = True | 53 | + found = True |
42 | else: | 54 | else: |
43 | - found = tuplize_version(version) >= tuplize_version(minversion) | 55 | - found = tuplize_version(version) >= tuplize_version(minversion) |
44 | + try: | 56 | + try: |
45 | + version = m.__version__ | 57 | + version = module.__version__ |
46 | + except AttributeError: | 58 | + except AttributeError: |
47 | + found = False | 59 | + found = False |
48 | + else: | 60 | + else: |
49 | + found = tuplize_version(version) >= tuplize_version(minversion) | 61 | + found = tuplize_version(version) >= tuplize_version(minversion) |
50 | + finally: | ||
51 | + if stuff[0]: | ||
52 | + stuff[0].close() | ||
53 | + else: | ||
54 | + found = False | ||
55 | + | ||
56 | if not found and not conf.LIB_MAY_BE_BUNDLED(libname): | 62 | if not found and not conf.LIB_MAY_BE_BUNDLED(libname): |
57 | Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) | 63 | Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) |
58 | sys.exit(1) | 64 | sys.exit(1) |
65 | -- | ||
66 | 2.7.4 | ||
67 | |||
diff --git a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch index 6a7f8facc5..46a6f06267 100644 --- a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch +++ b/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch | |||
@@ -1,54 +1,40 @@ | |||
1 | From 9a2d6315ff206b2a47100dfd85afe3af56576995 Mon Sep 17 00:00:00 2001 | 1 | From 87bc8e7eafc7d12a1d3a143ebb9e43cf5fbafb72 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Thu, 10 Dec 2015 04:20:51 -0500 | 3 | Date: Thu, 20 Jun 2019 14:11:16 +0800 |
4 | Subject: [PATCH] Add config option without-valgrind | 4 | Subject: [PATCH] Add config option without-valgrind |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | 7 | ||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | 8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
9 | 9 | ||
10 | Update patch to version 4.10.5 | ||
11 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
10 | --- | 12 | --- |
11 | lib/replace/wscript | 4 +++- | 13 | lib/replace/wscript | 5 +++-- |
12 | source3/wscript | 5 ++++- | ||
13 | wscript | 4 ++++ | 14 | wscript | 4 ++++ |
14 | 3 files changed, 11 insertions(+), 2 deletions(-) | 15 | 2 files changed, 7 insertions(+), 2 deletions(-) |
15 | 16 | ||
16 | diff --git a/lib/replace/wscript b/lib/replace/wscript | 17 | diff --git a/lib/replace/wscript b/lib/replace/wscript |
17 | index f0040b1..aca73af 100644 | 18 | index a7fd25d..a19ae68 100644 |
18 | --- a/lib/replace/wscript | 19 | --- a/lib/replace/wscript |
19 | +++ b/lib/replace/wscript | 20 | +++ b/lib/replace/wscript |
20 | @@ -101,7 +101,9 @@ def configure(conf): | 21 | @@ -110,8 +110,9 @@ def configure(conf): |
21 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') | 22 | conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') |
22 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') | 23 | conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') |
23 | 24 | ||
24 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 25 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
26 | - conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') | ||
25 | + if not Options.options.disable_valgrind: | 27 | + if not Options.options.disable_valgrind: |
26 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | 28 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') |
27 | + | 29 | + conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') |
28 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') | 30 | conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') |
29 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') | 31 | conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') |
30 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') | 32 | conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') |
31 | diff --git a/source3/wscript b/source3/wscript | ||
32 | index bac3dd5..a5c51ea 100644 | ||
33 | --- a/source3/wscript | ||
34 | +++ b/source3/wscript | ||
35 | @@ -1070,7 +1070,10 @@ syscall(SYS_setgroups32, 0, NULL); | ||
36 | Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient") | ||
37 | else: | ||
38 | conf.DEFINE('WITH_DNS_UPDATES', 1) | ||
39 | - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
40 | + | ||
41 | + if not Options.options.disable_valgrind: | ||
42 | + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') | ||
43 | + | ||
44 | if Options.options.developer: | ||
45 | if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'): | ||
46 | conf.DEFINE('VALGRIND', '1') | ||
47 | diff --git a/wscript b/wscript | 33 | diff --git a/wscript b/wscript |
48 | index 542a60c..22e6116 100644 | 34 | index e38a8e9..38b7230 100644 |
49 | --- a/wscript | 35 | --- a/wscript |
50 | +++ b/wscript | 36 | +++ b/wscript |
51 | @@ -86,6 +86,10 @@ def set_options(opt): | 37 | @@ -105,6 +105,10 @@ def options(opt): |
52 | help=("Disable RELRO builds"), | 38 | help=("Disable RELRO builds"), |
53 | action="store_false", dest='enable_relro') | 39 | action="store_false", dest='enable_relro') |
54 | 40 | ||
@@ -58,7 +44,7 @@ index 542a60c..22e6116 100644 | |||
58 | + | 44 | + |
59 | gr = opt.option_group('developer options') | 45 | gr = opt.option_group('developer options') |
60 | 46 | ||
61 | opt.tool_options('python') # options for disabling pyc or pyo compilation | 47 | opt.load('python') # options for disabling pyc or pyo compilation |
62 | -- | 48 | -- |
63 | 1.9.1 | 49 | 2.7.4 |
64 | 50 | ||
diff --git a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch index 894bc8bb2c..d07ec0df18 100644 --- a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch +++ b/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch | |||
@@ -1,15 +1,28 @@ | |||
1 | Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c | 1 | From 062cf74b498c1d12fd76f9d9bca926ac806e0b99 Mon Sep 17 00:00:00 2001 |
2 | =================================================================== | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | --- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c | 3 | Date: Thu, 20 Jun 2019 14:15:18 +0800 |
4 | +++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c | 4 | Subject: [PATCH] glibc only fix |
5 | @@ -166,8 +166,10 @@ int main(int argc, const char **argv) | 5 | |
6 | if (ret == 0) { | 6 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
7 | pthread_mutex_unlock(mutex); | 7 | --- |
8 | ctdb/tests/src/test_mutex_raw.c | 2 ++ | ||
9 | 1 file changed, 2 insertions(+) | ||
10 | |||
11 | diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c | ||
12 | index 926a525..814343f 100644 | ||
13 | --- a/ctdb/tests/src/test_mutex_raw.c | ||
14 | +++ b/ctdb/tests/src/test_mutex_raw.c | ||
15 | @@ -291,8 +291,10 @@ int main(int argc, const char **argv) | ||
16 | "failed\n"); | ||
17 | exit (EXIT_FAILURE); | ||
8 | } | 18 | } |
9 | +#ifdef __GLIBC__ | 19 | +#ifdef __GLIBC__ |
10 | } else if (ret == EBUSY) { | 20 | } else if (ret == EBUSY) { |
11 | printf("pid=%u\n", mutex->__data.__owner); | 21 | printf("INFO: pid=%u\n", mutex->__data.__owner); |
12 | +#endif | 22 | +#endif |
13 | } else if (ret == 0) { | 23 | } else if (ret == 0) { |
14 | pthread_mutex_unlock(mutex); | 24 | pthread_mutex_unlock(mutex); |
15 | } | 25 | } |
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.8.12.bb b/meta-networking/recipes-connectivity/samba/samba_4.10.5.bb index 762a5bc615..c34ac92b9e 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.8.12.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.10.5.bb | |||
@@ -23,26 +23,25 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ | |||
23 | file://dnsserver-4.7.0.patch \ | 23 | file://dnsserver-4.7.0.patch \ |
24 | file://smb_conf-4.7.0.patch \ | 24 | file://smb_conf-4.7.0.patch \ |
25 | file://volatiles.03_samba \ | 25 | file://volatiles.03_samba \ |
26 | file://0001-waf-add-support-of-cross_compile.patch \ | ||
26 | " | 27 | " |
27 | SRC_URI_append_libc-musl = " \ | 28 | SRC_URI_append_libc-musl = " \ |
28 | file://samba-pam.patch \ | 29 | file://samba-pam.patch \ |
29 | file://samba-4.3.9-remove-getpwent_r.patch \ | 30 | file://samba-4.3.9-remove-getpwent_r.patch \ |
30 | file://cmocka-uintptr_t.patch \ | 31 | file://cmocka-uintptr_t.patch \ |
32 | file://0001-samba-fix-musl-lib-without-innetgr.patch \ | ||
31 | " | 33 | " |
32 | 34 | ||
33 | SRC_URI[md5sum] = "25de700c8f1148fd13973a49a51c059e" | 35 | SRC_URI[md5sum] = "7d20c01ae35b08bc850442a0c303bca5" |
34 | SRC_URI[sha256sum] = "c162d519101e15d1a1d76df063bfefe8d1656f57fb74e1ef19fe05d341a65d8f" | 36 | SRC_URI[sha256sum] = "6c10266d5e8c44ce1ea17dc993ace67a83607b4d9a830959c75e3188c6af6375" |
35 | 37 | ||
36 | UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.8(\.\d+)+).tar.gz" | 38 | UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.10(\.\d+)+).tar.gz" |
37 | 39 | ||
38 | inherit systemd waf-samba cpan-base perlnative update-rc.d | 40 | inherit systemd waf-samba cpan-base perlnative update-rc.d |
39 | # remove default added RDEPENDS on perl | 41 | # remove default added RDEPENDS on perl |
40 | RDEPENDS_${PN}_remove = "perl" | 42 | RDEPENDS_${PN}_remove = "perl" |
41 | 43 | ||
42 | DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libbsd libaio libpam" | 44 | DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam libtasn1 jansson" |
43 | |||
44 | RCONFLICTS_${PN} = "libldb" | ||
45 | RCONFLICTS_${PN}-python = "pyldb" | ||
46 | 45 | ||
47 | inherit distro_features_check | 46 | inherit distro_features_check |
48 | REQUIRED_DISTRO_FEATURES = "pam" | 47 | REQUIRED_DISTRO_FEATURES = "pam" |
@@ -64,10 +63,14 @@ SYSTEMD_SERVICE_winbind = "winbind.service" | |||
64 | # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller | 63 | # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller |
65 | SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" | 64 | SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" |
66 | 65 | ||
66 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
67 | #to cross Popen | ||
68 | export WAF_NO_PREFORK="yes" | ||
69 | |||
67 | # Use krb5. Build active domain controller. | 70 | # Use krb5. Build active domain controller. |
68 | # | 71 | # |
69 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ | 72 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ |
70 | acl ad-dc cups gnutls ldap mitkrb5 \ | 73 | acl cups ad-dc gnutls ldap mitkrb5 \ |
71 | " | 74 | " |
72 | 75 | ||
73 | RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt" | 76 | RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt" |
@@ -84,6 +87,8 @@ PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind," | |||
84 | PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" | 87 | PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" |
85 | PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" | 88 | PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" |
86 | PACKAGECONFIG[libunwind] = ", , libunwind" | 89 | PACKAGECONFIG[libunwind] = ", , libunwind" |
90 | PACKAGECONFIG[gpgme] = ",--without-gpgme,," | ||
91 | PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," | ||
87 | 92 | ||
88 | # Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS, | 93 | # Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS, |
89 | # And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to: | 94 | # And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to: |
@@ -108,17 +113,7 @@ SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODU | |||
108 | # .so files so there will not be a conflict. This is not done consistantly, so be very careful | 113 | # .so files so there will not be a conflict. This is not done consistantly, so be very careful |
109 | # when adding to this list. | 114 | # when adding to this list. |
110 | # | 115 | # |
111 | SAMBA4_LIBS="heimdal,cmocka,ldb,pyldb-util,NONE" | 116 | SAMBA4_LIBS="heimdal,cmocka,NONE" |
112 | |||
113 | # interim packages: As long as ldb/pyldb-util are in SAMBA4_LIBS we need to pack | ||
114 | # bundled libraries in seperate packages. Otherwise they are auto-packed in | ||
115 | # package 'samba' which RDEPENDS on lots of packages not wanted e.g autostarting | ||
116 | # nmbd/smbd daemons | ||
117 | # Once 'ldb,pyldb-util' are removed from SAMBA4_LIBS the bundled packages can | ||
118 | # be removed again. | ||
119 | PACKAGES =+ "${PN}-bundled-ldb ${PN}-bundled-pyldb-util" | ||
120 | FILES_${PN}-bundled-ldb = "${libdir}/samba/libldb${SOLIBS}" | ||
121 | FILES_${PN}-bundled-pyldb-util = "${libdir}/samba/libpyldb-util${SOLIBS}" | ||
122 | 117 | ||
123 | EXTRA_OECONF += "--enable-fhs \ | 118 | EXTRA_OECONF += "--enable-fhs \ |
124 | --with-piddir=/run \ | 119 | --with-piddir=/run \ |
@@ -179,8 +174,6 @@ do_install_append() { | |||
179 | install -d ${D}${sysconfdir}/default | 174 | install -d ${D}${sysconfdir}/default |
180 | install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba | 175 | install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba |
181 | 176 | ||
182 | # install ctdb config file and test cases | ||
183 | install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes | ||
184 | # the items are from ctdb/tests/run_tests.sh | 177 | # the items are from ctdb/tests/run_tests.sh |
185 | for d in onnode takeover tool eventscripts cunit simple complex; do | 178 | for d in onnode takeover tool eventscripts cunit simple complex; do |
186 | testdir=${D}${datadir}/ctdb-tests/$d | 179 | testdir=${D}${datadir}/ctdb-tests/$d |
@@ -196,9 +189,17 @@ do_install_append() { | |||
196 | 189 | ||
197 | chmod 0750 ${D}${sysconfdir}/sudoers.d | 190 | chmod 0750 ${D}${sysconfdir}/sudoers.d |
198 | rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log | 191 | rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log |
192 | |||
193 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba-gpupdate | ||
194 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_upgradedns | ||
195 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_spnupdate | ||
196 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_kcc | ||
197 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_dnsupdate | ||
198 | sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${bindir}/samba-tool | ||
199 | |||
199 | } | 200 | } |
200 | 201 | ||
201 | PACKAGES =+ "${PN}-python ${PN}-pidl \ | 202 | PACKAGES =+ "${PN}-python3 ${PN}-pidl \ |
202 | ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ | 203 | ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ |
203 | winbind \ | 204 | winbind \ |
204 | ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ | 205 | ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ |
@@ -227,8 +228,8 @@ python samba_populate_packages() { | |||
227 | PACKAGESPLITFUNCS_prepend = "samba_populate_packages " | 228 | PACKAGESPLITFUNCS_prepend = "samba_populate_packages " |
228 | PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*" | 229 | PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*" |
229 | 230 | ||
230 | RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules" | 231 | RDEPENDS_${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3" |
231 | RDEPENDS_${PN}-python += "pytalloc python-tdb" | 232 | RDEPENDS_${PN}-python3 += "pytalloc python3-tdb" |
232 | 233 | ||
233 | FILES_${PN}-base = "${sbindir}/nmbd \ | 234 | FILES_${PN}-base = "${sbindir}/nmbd \ |
234 | ${sbindir}/smbd \ | 235 | ${sbindir}/smbd \ |
@@ -261,6 +262,7 @@ FILES_${PN} += "${libdir}/vfs/*.so \ | |||
261 | ${libdir}/charset/*.so \ | 262 | ${libdir}/charset/*.so \ |
262 | ${libdir}/*.dat \ | 263 | ${libdir}/*.dat \ |
263 | ${libdir}/auth/*.so \ | 264 | ${libdir}/auth/*.so \ |
265 | ${datadir}/ctdb/events/* \ | ||
264 | " | 266 | " |
265 | 267 | ||
266 | FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb" | 268 | FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb" |
@@ -286,7 +288,7 @@ FILES_winbind = "${sbindir}/winbindd \ | |||
286 | ${sysconfdir}/init.d/winbind \ | 288 | ${sysconfdir}/init.d/winbind \ |
287 | ${systemd_system_unitdir}/winbind.service" | 289 | ${systemd_system_unitdir}/winbind.service" |
288 | 290 | ||
289 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" | 291 | FILES_${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" |
290 | 292 | ||
291 | FILES_smbclient = "${bindir}/cifsdd \ | 293 | FILES_smbclient = "${bindir}/cifsdd \ |
292 | ${bindir}/rpcclient \ | 294 | ${bindir}/rpcclient \ |