initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From 4df82c9e03b68dc1621fe4c9ac6a29ae3e64e07e 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 & 4.11.13]
|
||||
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 240d730cbee..c6d8df43c74 100644
|
||||
--- a/lib/replace/wscript
|
||||
+++ b/lib/replace/wscript
|
||||
@@ -406,21 +406,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.20.1
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From e002d2ef2688d5433d2bd03aa4d77a0ec5ac4e63 Mon Sep 17 00:00:00 2001
|
||||
From: Uri Simchoni <uri@samba.org>
|
||||
Date: Sun, 20 Oct 2019 00:03:14 +0300
|
||||
Subject: [PATCH] build: find pre-built heimdal build tools in case of embedded
|
||||
heimdal
|
||||
|
||||
This patch fixes the case of finding asn1_compile and compile_et for
|
||||
building embedded heimdal, by setting
|
||||
--bundled-libraries='!asn1_compile,!compile_et' as configure flags.
|
||||
|
||||
The Heimdal build tools compile_et and asn1_compile are needed *only*
|
||||
if we use the embedded heimdal (otherwise we don't build heimdal and
|
||||
use headers that have been generated by those tools elsewhere).
|
||||
|
||||
For cross-compilation with embedded heimdal, it is vital to use host build
|
||||
tools, and so asn1_compile and compile_et must be supplied and not
|
||||
built. One way of doing this would be to set the COMPILE_ET and
|
||||
ASN1_COMPILE env vars to the location of supplied binaries. Another way,
|
||||
which is more commonly used, is to exclude asn1_compile and compile_et
|
||||
from bundled packages via the switch
|
||||
-bundled-libraries='!asn1_compile,!compile_et'. When this is done,
|
||||
the build script searches the path for those tools and sets the
|
||||
ASN1_COMPILE and COMPILE_ET vars accordingly. (this is admittedly
|
||||
kind of a round-about way of doing things but this has become the
|
||||
de-facto standard amongst embedded distro builders).
|
||||
|
||||
In commit 8061983d4882f3ba3f12da71443b035d7b672eec, this process of
|
||||
finding the binaris has been moved to be carried out only in the
|
||||
system heimdal case. As explained above, we only need these tools,
|
||||
and hence the check, in bundled mode.
|
||||
|
||||
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14164
|
||||
|
||||
Signed-off-by: Uri Simchoni <uri@samba.org>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Bernd: rebased for version 4.11.13]
|
||||
---
|
||||
wscript_configure_embedded_heimdal | 11 +++++++++++
|
||||
wscript_configure_system_heimdal | 11 -----------
|
||||
2 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/wscript_configure_embedded_heimdal b/wscript_configure_embedded_heimdal
|
||||
index 8c55ae2a938..4fdae8062c5 100644
|
||||
--- a/wscript_configure_embedded_heimdal
|
||||
+++ b/wscript_configure_embedded_heimdal
|
||||
@@ -1 +1,12 @@
|
||||
conf.RECURSE('source4/heimdal_build')
|
||||
+
|
||||
+def check_system_heimdal_binary(name):
|
||||
+ if conf.LIB_MAY_BE_BUNDLED(name):
|
||||
+ return False
|
||||
+ if not conf.find_program(name, var=name.upper()):
|
||||
+ return False
|
||||
+ conf.define('USING_SYSTEM_%s' % name.upper(), 1)
|
||||
+ return True
|
||||
+
|
||||
+check_system_heimdal_binary("compile_et")
|
||||
+check_system_heimdal_binary("asn1_compile")
|
||||
diff --git a/wscript_configure_system_heimdal b/wscript_configure_system_heimdal
|
||||
index 0ff6dad2f55..f77c177442f 100644
|
||||
--- a/wscript_configure_system_heimdal
|
||||
+++ b/wscript_configure_system_heimdal
|
||||
@@ -37,14 +37,6 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
|
||||
conf.define('USING_SYSTEM_%s' % name.upper(), 1)
|
||||
return True
|
||||
|
||||
-def check_system_heimdal_binary(name):
|
||||
- if conf.LIB_MAY_BE_BUNDLED(name):
|
||||
- return False
|
||||
- if not conf.find_program(name, var=name.upper()):
|
||||
- return False
|
||||
- conf.define('USING_SYSTEM_%s' % name.upper(), 1)
|
||||
- return True
|
||||
-
|
||||
check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h")
|
||||
|
||||
if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
|
||||
@@ -96,7 +96,4 @@
|
||||
#if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
|
||||
# conf.define('USING_SYSTEM_TOMMATH', 1)
|
||||
|
||||
-check_system_heimdal_binary("compile_et")
|
||||
-check_system_heimdal_binary("asn1_compile")
|
||||
-
|
||||
conf.define('USING_SYSTEM_KRB5', 1)
|
||||
--
|
||||
2.20.1
|
||||
@@ -0,0 +1,40 @@
|
||||
From b2ea5dc3639d68b878c6534f4992da446dbbf2d4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 16 May 2020 18:15:38 +0200
|
||||
Subject: [PATCH] ldap_message_test.c: include stdint.h before cmoka.h
|
||||
|
||||
This fix the following build failure on uclibc:
|
||||
|
||||
In file included from /home/giuliobenetti/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/lib/gcc/mips64el-buildroot-linux-uclibc/5.5.0/include/stdint.h:9:0,
|
||||
from /home/giuliobenetti/autobuild/run/instance-1/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:27,
|
||||
from ../../lib/replace/../replace/replace.h:64,
|
||||
from ../../source4/include/includes.h:23,
|
||||
from ../../libcli/ldap/tests/ldap_message_test.c:41:
|
||||
/home/giuliobenetti/autobuild/run/instance-1/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27: error: conflicting types for 'uintptr_t'
|
||||
typedef unsigned long int uintptr_t;
|
||||
^
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/09e84d15efe755bdefa9f8c6b8355c49ddbc2f65
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: not sent yet]
|
||||
---
|
||||
libcli/ldap/tests/ldap_message_test.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libcli/ldap/tests/ldap_message_test.c b/libcli/ldap/tests/ldap_message_test.c
|
||||
index c5aacd4bc6b..51331e5c600 100644
|
||||
--- a/libcli/ldap/tests/ldap_message_test.c
|
||||
+++ b/libcli/ldap/tests/ldap_message_test.c
|
||||
@@ -34,6 +34,7 @@
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
From 44bccdf7d158ae93ba9a5515038aac2a5ac4fd85 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Date: Sat, 27 Mar 2021 17:17:34 +0100
|
||||
Subject: [PATCH] dcesrv_core: fix build
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move include of system/network.h to avoid a build error:
|
||||
|
||||
In file included from ../../lib/replace/system/network.h:35,
|
||||
from ../../librpc/rpc/dcesrv_core.c:2658:
|
||||
usr/include/unistd.h: At top level:
|
||||
usr/include/unistd.h:675:16: error: conflicting types for ‘geteuid’
|
||||
675 | extern __uid_t geteuid (void) __THROW;
|
||||
|
||||
Patch sent upstream:
|
||||
https://gitlab.com/samba-team/samba/-/merge_requests/1871
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
librpc/rpc/dcesrv_core.c | 11 +----------
|
||||
1 file changed, 1 insertion(+), 10 deletions(-)
|
||||
|
||||
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c
|
||||
index 70e0245532e..e761329d157 100644
|
||||
--- a/librpc/rpc/dcesrv_core.c
|
||||
+++ b/librpc/rpc/dcesrv_core.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "lib/tsocket/tsocket.h"
|
||||
#include "librpc/gen_ndr/ndr_dcerpc.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
+#include "system/network.h"
|
||||
|
||||
|
||||
#undef DBGC_CLASS
|
||||
@@ -2633,16 +2634,6 @@ _PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
|
||||
}
|
||||
}
|
||||
|
||||
-/* We need this include to be able to compile on some plateforms
|
||||
- * (ie. freebsd 7.2) as it seems that <sys/uio.h> is not included
|
||||
- * correctly.
|
||||
- * It has to be that deep because otherwise we have a conflict on
|
||||
- * const struct dcesrv_interface declaration.
|
||||
- * This is mostly due to socket_wrapper defining #define bind swrap_bind
|
||||
- * which conflict with the bind used before.
|
||||
- */
|
||||
-#include "system/network.h"
|
||||
-
|
||||
struct dcesrv_sock_reply_state {
|
||||
struct dcesrv_connection *dce_conn;
|
||||
struct dcesrv_call_state *call;
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
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_GNUTLS
|
||||
select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
select BR2_PACKAGE_POPT
|
||||
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"
|
||||
depends on BR2_PACKAGE_PYTHON3
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_PYTHON_DNSPYTHON
|
||||
select BR2_PACKAGE_PYTHON_MARKDOWN
|
||||
select BR2_PACKAGE_SAMBA4_ADS
|
||||
help
|
||||
Enable Active Directory Domain Controller functionality.
|
||||
|
||||
comment "AD DC depends on python3"
|
||||
depends on !BR2_PACKAGE_PYTHON3
|
||||
|
||||
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
|
||||
@@ -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 $?
|
||||
@@ -0,0 +1,45 @@
|
||||
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
|
||||
Checking value of GNUTLS_CIPHER_AES_128_CFB8: 29
|
||||
Checking value of GNUTLS_MAC_AES_CMAC_128: 203
|
||||
Checking whether fcntl supports flags to send direct I/O availability signals: OK
|
||||
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# https://download.samba.org/pub/samba/stable/samba-4.14.10.tar.asc
|
||||
sha256 107ee862f58062682cec362ec68a24251292805f89aa4c97e7ab80237f91c7af samba-4.14.10.tar.gz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
@@ -0,0 +1,198 @@
|
||||
################################################################################
|
||||
#
|
||||
# samba4
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SAMBA4_VERSION = 4.14.10
|
||||
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_CPE_ID_VENDOR = samba
|
||||
SAMBA4_CPE_ID_PRODUCT = samba
|
||||
SAMBA4_SELINUX_MODULES = samba
|
||||
SAMBA4_DEPENDENCIES = \
|
||||
host-e2fsprogs host-flex host-heimdal host-nfs-utils \
|
||||
host-perl host-perl-parse-yapp host-python3 \
|
||||
cmocka e2fsprogs gnutls 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
|
||||
|
||||
SAMBA4_PYTHON = PYTHON="$(HOST_DIR)/bin/python3"
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
SAMBA4_PYTHON += PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config"
|
||||
SAMBA4_DEPENDENCIES += python3
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --disable-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
|
||||
SAMBA4_SHARED_MODULES += vfs_snapper
|
||||
else
|
||||
SAMBA4_SHARED_MODULES += !vfs_snapper
|
||||
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_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 whether fcntl supports setting/geting hints: $(if $(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13),OK,NO)' >>$(@D)/cache.txt;
|
||||
echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt;
|
||||
(cd $(@D); \
|
||||
$(SAMBA4_PYTHON) \
|
||||
python_LDFLAGS="" \
|
||||
python_LIBDIR="" \
|
||||
PERL="$(HOST_DIR)/bin/perl" \
|
||||
$(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' \
|
||||
--with-shared-modules=$(subst $(space),$(comma),$(strip $(SAMBA4_SHARED_MODULES))) \
|
||||
$(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)
|
||||
# host-python-dnspython and host-python-markdown are not strictly
|
||||
# needed on the host, but on the target. however, samba's configure
|
||||
# tests for their availability on the host.
|
||||
SAMBA4_DEPENDENCIES += \
|
||||
jansson \
|
||||
host-python-dnspython \
|
||||
host-python-markdown \
|
||||
python-dnspython \
|
||||
python-markdown
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-ad-dc --without-json
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y)
|
||||
SAMBA4_CONF_OPTS += --with-ads --with-ldap
|
||||
SAMBA4_DEPENDENCIES += openldap
|
||||
SAMBA4_SHARED_MODULES += idmap_ad
|
||||
else
|
||||
SAMBA4_CONF_OPTS += --without-ads --without-ldap
|
||||
SAMBA4_SHARED_MODULES += !idmap_ad
|
||||
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
|
||||
$(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