mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
46
package/samba4/0001-libreplace-disable-libbsd-support.patch
Normal file
46
package/samba4/0001-libreplace-disable-libbsd-support.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From fc0304ba92ec7ae9a2f75fbc31d97fee39d19665 Mon Sep 17 00:00:00 2001
|
||||
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
Date: Wed, 7 Sep 2016 23:03:43 -0300
|
||||
Subject: [PATCH] libreplace: disable libbsd support
|
||||
|
||||
Disable libbsd support, samba4 uses a global config.h for its own
|
||||
codebase and that of heimdal (when building with builtin).
|
||||
This causes redefinition conflicts for link(2) when both standard
|
||||
unistd.h and bsd/unistd.h get included.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
[Bernd: rebased for versions 4.7.3, 4.8.0 & 4.8.5]
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
lib/replace/wscript | 15 ---------------
|
||||
1 file changed, 15 deletions(-)
|
||||
|
||||
diff --git a/lib/replace/wscript b/lib/replace/wscript
|
||||
index 6c7de5953f0..ac230d719f7 100644
|
||||
--- a/lib/replace/wscript
|
||||
+++ b/lib/replace/wscript
|
||||
@@ -304,21 +304,6 @@ def configure(conf):
|
||||
|
||||
strlcpy_in_bsd = False
|
||||
|
||||
- # libbsd on some platforms provides strlcpy and strlcat
|
||||
- if not conf.CHECK_FUNCS('strlcpy strlcat'):
|
||||
- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
|
||||
- checklibc=True):
|
||||
- strlcpy_in_bsd = True
|
||||
- if not conf.CHECK_FUNCS('getpeereid'):
|
||||
- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
|
||||
- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
|
||||
- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
|
||||
- if not conf.CHECK_FUNCS('setproctitle_init'):
|
||||
- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
|
||||
-
|
||||
- if not conf.CHECK_FUNCS('closefrom'):
|
||||
- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
|
||||
-
|
||||
conf.CHECK_CODE('''
|
||||
struct ucred cred;
|
||||
socklen_t cred_len;
|
||||
--
|
||||
2.18.0
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
From e3e9755989b158b2497d2c449db445cf7f93de56 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sun, 28 Jan 2018 11:57:11 +0100
|
||||
Subject: [PATCH] Fix uClibc build on 64bit platforms by including stdint.h
|
||||
|
||||
Fixes an error detected by buildroot autobuilders:
|
||||
http://autobuild.buildroot.net/results/573/573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log
|
||||
|
||||
/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27:
|
||||
error: conflicting types for 'uintptr_t'
|
||||
typedef unsigned long int uintptr_t;
|
||||
^
|
||||
In file included from ../lib/ldb/tests/ldb_msg.c:17:0:
|
||||
../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
The define __WORDSIZE is missing when cmocka.h decides how to
|
||||
define uintptr_t, this patch includes stdint.h when needed.
|
||||
|
||||
Patch sent upstream:
|
||||
https://lists.samba.org/archive/samba-technical/2018-January/125306.html
|
||||
|
||||
[updated for samba-4.8.4, v2 sent upstream
|
||||
https://lists.samba.org/archive/samba-technical/2018-August/129732.html,
|
||||
updated for samba-4.9.1 & 4.10.6]
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
lib/ldb/tests/ldb_kv_ops_test.c | 1 +
|
||||
lib/ldb/tests/ldb_tdb_test.c | 1 +
|
||||
lib/ldb/tests/test_ldb_dn.c | 1 +
|
||||
lib/ldb/tests/test_ldb_qsort.c | 1 +
|
||||
lib/util/tests/test_ms_fnmatch.c | 1 +
|
||||
source3/lib/test_tldap.c | 1 +
|
||||
6 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c
|
||||
index d6a4dc058e5..8b230200cba 100644
|
||||
--- a/lib/ldb/tests/ldb_kv_ops_test.c
|
||||
+++ b/lib/ldb/tests/ldb_kv_ops_test.c
|
||||
@@ -46,6 +46,7 @@
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
diff --git a/lib/ldb/tests/ldb_tdb_test.c b/lib/ldb/tests/ldb_tdb_test.c
|
||||
index 8418dbfd671..ef91ba54756 100644
|
||||
--- a/lib/ldb/tests/ldb_tdb_test.c
|
||||
+++ b/lib/ldb/tests/ldb_tdb_test.c
|
||||
@@ -40,6 +40,7 @@
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
diff --git a/lib/ldb/tests/test_ldb_dn.c b/lib/ldb/tests/test_ldb_dn.c
|
||||
index 4965dcef575..37eeedc1d70 100644
|
||||
--- a/lib/ldb/tests/test_ldb_dn.c
|
||||
+++ b/lib/ldb/tests/test_ldb_dn.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
diff --git a/lib/ldb/tests/test_ldb_qsort.c b/lib/ldb/tests/test_ldb_qsort.c
|
||||
index 06e80d94379..663cf0e7564 100644
|
||||
--- a/lib/ldb/tests/test_ldb_qsort.c
|
||||
+++ b/lib/ldb/tests/test_ldb_qsort.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
diff --git a/lib/util/tests/test_ms_fnmatch.c b/lib/util/tests/test_ms_fnmatch.c
|
||||
index 7fe8ed05e28..d11c7bed4be 100644
|
||||
--- a/lib/util/tests/test_ms_fnmatch.c
|
||||
+++ b/lib/util/tests/test_ms_fnmatch.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
diff --git a/source3/lib/test_tldap.c b/source3/lib/test_tldap.c
|
||||
index a6c2f2117cb..659c5a7371a 100644
|
||||
--- a/source3/lib/test_tldap.c
|
||||
+++ b/source3/lib/test_tldap.c
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From bed8720dce64181c188c23a28506a88cd2e1ee4f Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 11 May 2019 00:07:50 +0200
|
||||
Subject: [PATCH] test_regfio.c: include stdint.h before cmoka.h
|
||||
|
||||
This fix the following build failure on mips64el:
|
||||
/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27: error: conflicting types for 'uintptr_t'
|
||||
typedef unsigned long int uintptr_t;
|
||||
^
|
||||
In file included from ../source3/registry/tests/test_regfio.c:23:0:
|
||||
../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/bae0508e84c905dc23ad7cf1153cd1e9d8e4d734
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://gitlab.com/samba-team/samba/merge_requests/442]
|
||||
---
|
||||
source3/registry/tests/test_regfio.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/source3/registry/tests/test_regfio.c b/source3/registry/tests/test_regfio.c
|
||||
index 86a217661f3..f945e653708 100644
|
||||
--- a/source3/registry/tests/test_regfio.c
|
||||
+++ b/source3/registry/tests/test_regfio.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
+#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
#include <errno.h>
|
||||
--
|
||||
2.20.1
|
||||
|
||||
94
package/samba4/0004-cross_compile-fix.patch
Normal file
94
package/samba4/0004-cross_compile-fix.patch
Normal file
@@ -0,0 +1,94 @@
|
||||
From a197e0cafb276a9b732f914b1f679ebb487b47f1 Mon Sep 17 00:00:00 2001
|
||||
From: pinglin <pinglin@synology.com>
|
||||
Date: Tue, 19 Mar 2019 20:46:27 +0800
|
||||
Subject: [PATCH] cross_compile argument doesn't apply
|
||||
|
||||
reproduce:
|
||||
./configure --cross-compile --cross-answers=XXX
|
||||
|
||||
The output log now will show correct cross-answers.
|
||||
|
||||
Downloaded from
|
||||
https://github.com/openwrt/packages/blob/master/net/samba4/patches/003-samba-4-10-cross_compile-fix.patch
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
third_party/waf/waflib/Context.py | 20 ++++++++++++++++++--
|
||||
third_party/waf/waflib/Tools/c_config.py | 11 +++++++----
|
||||
2 files changed, 25 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/third_party/waf/waflib/Context.py b/third_party/waf/waflib/Context.py
|
||||
index 3222fb1551c..d1c87512095 100644
|
||||
--- a/third_party/waf/waflib/Context.py
|
||||
+++ b/third_party/waf/waflib/Context.py
|
||||
@@ -359,8 +359,16 @@ class Context(ctx):
|
||||
|
||||
encoding = kw.pop('decode_as', default_encoding)
|
||||
|
||||
+ exec_args = kw.pop('exec_args', [])
|
||||
+ if isinstance(cmd, str):
|
||||
+ cmd = [cmd] + exec_args
|
||||
+ elif isinstance(cmd, list):
|
||||
+ cmd = cmd + exec_args
|
||||
try:
|
||||
- ret, out, err = Utils.run_process(cmd, kw, cargs)
|
||||
+ if exec_args:
|
||||
+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
|
||||
+ else:
|
||||
+ ret, out, err = Utils.run_process(cmd, kw, cargs)
|
||||
except Exception as e:
|
||||
raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
|
||||
|
||||
@@ -438,8 +446,16 @@ class Context(ctx):
|
||||
|
||||
encoding = kw.pop('decode_as', default_encoding)
|
||||
|
||||
+ exec_args = kw.pop('exec_args', [])
|
||||
+ if isinstance(cmd, str):
|
||||
+ cmd = [cmd] + exec_args
|
||||
+ elif isinstance(cmd, list):
|
||||
+ cmd = cmd + exec_args
|
||||
try:
|
||||
- ret, out, err = Utils.run_process(cmd, kw, cargs)
|
||||
+ if exec_args:
|
||||
+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
|
||||
+ else:
|
||||
+ ret, out, err = Utils.run_process(cmd, kw, cargs)
|
||||
except Exception as e:
|
||||
raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
|
||||
|
||||
diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
|
||||
index 76082152cd9..25e468b0844 100644
|
||||
--- a/third_party/waf/waflib/Tools/c_config.py
|
||||
+++ b/third_party/waf/waflib/Tools/c_config.py
|
||||
@@ -660,20 +660,23 @@ class test_exec(Task.Task):
|
||||
"""
|
||||
color = 'PINK'
|
||||
def run(self):
|
||||
+ exec_args = Utils.to_list(self.generator.exec_args)
|
||||
+
|
||||
if getattr(self.generator, 'rpath', None):
|
||||
if getattr(self.generator, 'define_ret', False):
|
||||
- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
|
||||
+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], exec_args=exec_args)
|
||||
else:
|
||||
- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
|
||||
+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], exec_args=exec_args)
|
||||
else:
|
||||
env = self.env.env or {}
|
||||
env.update(dict(os.environ))
|
||||
for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
|
||||
env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
|
||||
+
|
||||
if getattr(self.generator, 'define_ret', False):
|
||||
- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
|
||||
+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env, exec_args=exec_args)
|
||||
else:
|
||||
- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
|
||||
+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env, exec_args=exec_args)
|
||||
|
||||
@feature('test_exec')
|
||||
@after_method('apply_link')
|
||||
--
|
||||
2.17.1
|
||||
|
||||
27
package/samba4/0005-fix_unistd_incl.patch
Normal file
27
package/samba4/0005-fix_unistd_incl.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
Fix unistd.h include
|
||||
|
||||
Fixes build error
|
||||
|
||||
source4/heimdal/lib/asn1/asn1_err.c:47:23: error: 'link' redeclared as different kind of symbol
|
||||
static struct et_list link = { 0, 0 };
|
||||
|
||||
Downloaded from
|
||||
https://github.com/openwrt/packages/blob/master/net/samba4/patches/006-samba-4-10-musl_rm_unistd_incl.patch
|
||||
|
||||
Upstream bug report: https://bugzilla.samba.org/show_bug.cgi?id=13856
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
--- a/lib/replace/replace.h
|
||||
+++ b/lib/replace/replace.h
|
||||
@@ -162,10 +162,6 @@
|
||||
#include <bsd/unistd.h>
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_UNISTD_H
|
||||
-#include <unistd.h>
|
||||
-#endif
|
||||
-
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
From 189440643157fbc872a1670b3e30b6c459dbd930 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sun, 21 Jul 2019 15:12:03 +0200
|
||||
Subject: [PATCH] heimdal_build/wscript_build: do not add host include
|
||||
patch
|
||||
|
||||
Fixes cross-compile.
|
||||
|
||||
Upstream bug report: https://bugzilla.samba.org/show_bug.cgi?id=13856
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
source4/heimdal_build/wscript_build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
|
||||
index 45938b88315..e896c3e9454 100644
|
||||
--- a/source4/heimdal_build/wscript_build
|
||||
+++ b/source4/heimdal_build/wscript_build
|
||||
@@ -131,7 +131,7 @@ def HEIMDAL_ASN1(name, source,
|
||||
samba_cflags = CURRENT_CFLAGS(bld, name, ''),
|
||||
depends_on = '',
|
||||
samba_deps = to_list('roken replace'),
|
||||
- samba_includes = includes + ["/usr/include/heimdal"],
|
||||
+ samba_includes = includes,
|
||||
local_include = True)
|
||||
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
51
package/samba4/Config.in
Normal file
51
package/samba4/Config.in
Normal file
@@ -0,0 +1,51 @@
|
||||
comment "samba4 needs a uClibc or glibc toolchain w/ wchar, dynamic library, NPTL"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_USE_WCHAR || BR2_TOOLCHAIN_USES_MUSL \
|
||||
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
config BR2_PACKAGE_SAMBA4
|
||||
bool "samba4"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_USE_WCHAR # python
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # python -> libffi
|
||||
depends on !BR2_STATIC_LIBS # cmocka, python, gnutls
|
||||
depends on !BR2_nios2 # binary too large, relocations don't fit
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_USES_MUSL
|
||||
select BR2_PACKAGE_CMOCKA
|
||||
select BR2_PACKAGE_E2FSPROGS
|
||||
select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
select BR2_PACKAGE_POPT
|
||||
select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Provides secure, stable and fast file and print services
|
||||
for all clients using the SMB/CIFS protocol, such as all
|
||||
versions of DOS, Windows, OS/2, Linux and many others.
|
||||
|
||||
http://www.samba.org/
|
||||
|
||||
if BR2_PACKAGE_SAMBA4
|
||||
|
||||
config BR2_PACKAGE_SAMBA4_AD_DC
|
||||
bool "AD DC"
|
||||
select BR2_PACKAGE_GNUTLS
|
||||
select BR2_PACKAGE_JANSSON
|
||||
help
|
||||
Enable Active Directory Domain Controller functionality.
|
||||
|
||||
config BR2_PACKAGE_SAMBA4_ADS
|
||||
bool "ADS"
|
||||
select BR2_PACKAGE_OPENLDAP
|
||||
help
|
||||
Enable Active Directory member Server functionality.
|
||||
|
||||
config BR2_PACKAGE_SAMBA4_SMBTORTURE
|
||||
bool "smbtorture"
|
||||
help
|
||||
Install the smbtorture test suite.
|
||||
It's normally used for validation and stress testing.
|
||||
Approximately +5 MB of stripped uncompressed target space.
|
||||
|
||||
endif
|
||||
56
package/samba4/S91smb
Normal file
56
package/samba4/S91smb
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/samba/smb.conf ] || exit 0
|
||||
|
||||
mkdir -p /var/log/samba
|
||||
|
||||
start() {
|
||||
printf "Starting SMB services: "
|
||||
smbd -D
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
|
||||
printf "Starting NMB services: "
|
||||
nmbd -D
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Shutting down SMB services: "
|
||||
kill -9 `pidof smbd`
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
|
||||
printf "Shutting down NMB services: "
|
||||
kill -9 `pidof nmbd`
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
printf "Reloading smb.conf file: "
|
||||
kill -HUP `pidof smbd`
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
42
package/samba4/samba4-cache.txt
Normal file
42
package/samba4/samba4-cache.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
Checking simple C program: OK
|
||||
rpath library support: OK
|
||||
-Wl,--version-script support: OK
|
||||
Checking getconf LFS_CFLAGS: NO
|
||||
Checking for large file support without additional flags: OK
|
||||
Checking for -D_LARGE_FILES: OK
|
||||
Checking correct behavior of strtoll: NO
|
||||
Checking for working strptime: OK
|
||||
Checking for C99 vsnprintf: OK
|
||||
Checking for HAVE_SHARED_MMAP: OK
|
||||
Checking for HAVE_MREMAP: OK
|
||||
Checking for HAVE_INCOHERENT_MMAP: NO
|
||||
Checking for HAVE_SECURE_MKSTEMP: OK
|
||||
Checking for HAVE_IFACE_GETIFADDRS: OK
|
||||
Checking for kernel change notify support: OK
|
||||
Checking for Linux kernel oplocks: OK
|
||||
Checking for kernel share modes: OK
|
||||
Checking if can we convert from CP850 to UCS-2LE: OK
|
||||
Checking if can we convert from UTF-8 to UCS-2LE: OK
|
||||
Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
|
||||
Checking whether we can use Linux thread-specific credentials: OK
|
||||
Checking whether setreuid is available: OK
|
||||
Checking whether setresuid is available: OK
|
||||
Checking whether seteuid is available: OK
|
||||
Checking whether fcntl locking is available: OK
|
||||
Checking whether fcntl lock supports open file description locks: OK
|
||||
Checking for the maximum value of the 'time_t' type: OK
|
||||
Checking whether the realpath function allows a NULL argument: OK
|
||||
Checking whether POSIX capabilities are available: OK
|
||||
Checking for ftruncate extend: OK
|
||||
vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
|
||||
getcwd takes a NULL argument: OK
|
||||
Checking uname sysname type: "Linux"
|
||||
Checking uname release type: "3.0.0"
|
||||
Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013"
|
||||
Checking value of NSIG: "65"
|
||||
Checking value of _NSIG: "65"
|
||||
Checking value of SIGRTMAX: "64"
|
||||
Checking value of SIGRTMIN: "34"
|
||||
Checking errno of iconv for illegal multibyte sequence: "0"
|
||||
checking for clnt_create(): OK
|
||||
Checking for a 64-bit host to support lmdb: NO
|
||||
4
package/samba4/samba4.hash
Normal file
4
package/samba4/samba4.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# https://download.samba.org/pub/samba/stable/samba-4.10.7.tar.asc
|
||||
sha256 34f30494b6b63700f54be22be636e8a6e0430577166a76a017075e11c02a1ebb samba-4.10.7.tar.gz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
196
package/samba4/samba4.mk
Normal file
196
package/samba4/samba4.mk
Normal file
@@ -0,0 +1,196 @@
|
||||
################################################################################
|
||||
#
|
||||
# samba4
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SAMBA4_VERSION = 4.10.7
|
||||
SAMBA4_SITE = https://download.samba.org/pub/samba/stable
|
||||
SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
|
||||
SAMBA4_INSTALL_STAGING = YES
|
||||
SAMBA4_LICENSE = GPL-3.0+
|
||||
SAMBA4_LICENSE_FILES = COPYING
|
||||
SAMBA4_DEPENDENCIES = \
|
||||
host-e2fsprogs host-heimdal host-nfs-utils \
|
||||
cmocka e2fsprogs popt zlib \
|
||||
$(if $(BR2_PACKAGE_LIBAIO),libaio) \
|
||||
$(if $(BR2_PACKAGE_LIBCAP),libcap) \
|
||||
$(if $(BR2_PACKAGE_READLINE),readline) \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
SAMBA4_CFLAGS = $(TARGET_CFLAGS)
|
||||
SAMBA4_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
|
||||
SAMBA4_CONF_ENV = \
|
||||
CFLAGS="$(SAMBA4_CFLAGS)" \
|
||||
LDFLAGS="$(SAMBA4_LDFLAGS)" \
|
||||
XSLTPROC=false \
|
||||
WAF_NO_PREFORK=1
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
SAMBA4_PYTHON = \
|
||||
PYTHON="$(HOST_DIR)/bin/python3" \
|
||||
PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config"
|
||||
SAMBA4_DEPENDENCIES += host-python3 python3
|
||||
else
|
||||
SAMBA4_PYTHON = \
|
||||
PYTHON="$(HOST_DIR)/bin/python2" \
|
||||
PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config"
|
||||
SAMBA4_DEPENDENCIES += host-python python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
||||
SAMBA4_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
|
||||
SAMBA4_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
|
||||
SAMBA4_DEPENDENCIES += libtirpc host-pkgconf
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
SAMBA4_CONF_OPTS += --with-acl-support
|
||||
SAMBA4_DEPENDENCIES += acl
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-acl-support
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CUPS),y)
|
||||
SAMBA4_CONF_ENV += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
|
||||
SAMBA4_CONF_OPTS += --enable-cups
|
||||
SAMBA4_DEPENDENCIES += cups
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --disable-cups
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS),y)
|
||||
SAMBA4_DEPENDENCIES += dbus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
|
||||
SAMBA4_CONF_OPTS += --enable-avahi
|
||||
SAMBA4_DEPENDENCIES += avahi
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --disable-avahi
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GAMIN),y)
|
||||
SAMBA4_CONF_OPTS += --with-fam
|
||||
SAMBA4_DEPENDENCIES += gamin
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-fam
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
||||
SAMBA4_CONF_OPTS += --enable-gnutls
|
||||
SAMBA4_DEPENDENCIES += gnutls
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --disable-gnutls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
|
||||
SAMBA4_CONF_OPTS += --with-libarchive
|
||||
SAMBA4_DEPENDENCIES += libarchive
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-libarchive
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
||||
SAMBA4_CONF_ENV += NCURSES_CONFIG="$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)"
|
||||
SAMBA4_DEPENDENCIES += ncurses
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-regedit
|
||||
endif
|
||||
|
||||
# The ctdb tests (cluster) need bash and take up some space
|
||||
# They're normally intended for debugging so remove them
|
||||
define SAMBA4_REMOVE_CTDB_TESTS
|
||||
rm -rf $(TARGET_DIR)/usr/lib/ctdb-tests
|
||||
rm -rf $(TARGET_DIR)/usr/share/ctdb-tests
|
||||
rm -f $(TARGET_DIR)/usr/bin/ctdb_run_*tests
|
||||
endef
|
||||
SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_CTDB_TESTS
|
||||
|
||||
define SAMBA4_CONFIGURE_CMDS
|
||||
$(INSTALL) -m 0644 package/samba4/samba4-cache.txt $(@D)/cache.txt;
|
||||
echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt;
|
||||
(cd $(@D); \
|
||||
$(SAMBA4_PYTHON) \
|
||||
python_LDFLAGS="" \
|
||||
python_LIBDIR="" \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(SAMBA4_CONF_ENV) \
|
||||
./buildtools/bin/waf configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-libiconv=$(STAGING_DIR)/usr \
|
||||
--enable-fhs \
|
||||
--cross-compile \
|
||||
--cross-answers=$(@D)/cache.txt \
|
||||
--hostcc=gcc \
|
||||
--disable-rpath \
|
||||
--disable-rpath-install \
|
||||
--disable-iprint \
|
||||
--without-pam \
|
||||
--without-dmapi \
|
||||
--without-gpgme \
|
||||
--without-ldb-lmdb \
|
||||
--disable-glusterfs \
|
||||
--with-cluster-support \
|
||||
--bundled-libraries='!asn1_compile,!compile_et' \
|
||||
$(SAMBA4_CONF_OPTS) \
|
||||
)
|
||||
endef
|
||||
|
||||
define SAMBA4_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(SAMBA4_PYTHON) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define SAMBA4_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(SAMBA4_PYTHON) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
|
||||
endef
|
||||
|
||||
define SAMBA4_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(SAMBA4_PYTHON) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC),y)
|
||||
SAMBA4_DEPENDENCIES += jansson
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-ad-dc --without-json
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y)
|
||||
SAMBA4_CONF_OPTS += --with-ads --with-ldap --with-shared-modules=idmap_ad
|
||||
SAMBA4_DEPENDENCIES += openldap
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-ads --without-ldap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SAMBA4_SMBTORTURE),)
|
||||
define SAMBA4_REMOVE_SMBTORTURE
|
||||
rm -f $(TARGET_DIR)/usr/bin/smbtorture
|
||||
endef
|
||||
SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_SMBTORTURE
|
||||
endif
|
||||
|
||||
define SAMBA4_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/samba4/S91smb \
|
||||
$(TARGET_DIR)/etc/init.d/S91smb
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD),y)
|
||||
SAMBA4_CONF_OPTS += --systemd-install-services
|
||||
SAMBA4_DEPENDENCIES += systemd
|
||||
endif
|
||||
|
||||
define SAMBA4_INSTALL_INIT_SYSTEMD
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/nmb.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nmb.service
|
||||
ln -sf ../../../../usr/lib/systemd/system/smb.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/smb.service
|
||||
ln -sf ../../../../usr/lib/systemd/system/winbind.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/winbind.service
|
||||
$(INSTALL) -D -m 644 $(@D)/packaging/systemd/samba.conf.tmp \
|
||||
$(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
|
||||
printf "d /var/log/samba 755 root root\n" >>$(TARGET_DIR)/usr/lib/tmpfiles.d/samba.conf
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user