Commit dee1cf0c authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Thomas Petazzoni
Browse files

samba4: new package



Samba 4.1.x uses the waf build system which isn't very cross-compile
friendly, and also some tests are formulated in a way that isn't
cross-build friendly either by needing to run them.

For this reason the samba4 build system includes a way to define
answers for many of the tests, but this support isn't complete
and some tests still want to be executed.

Samba 4.1.x also requires a proper answers file for each architecture,
and at the moment i've only tested for ARM and PowerPC so only those
architectures are supported to begin with. To add support for another
architecture basically copy one of the cache files to the proper name,
enable it in Config.in and adjust endianess and all of the "size of"
answers. I'm in the process of automating the sizeof and endianess
answers within the samba build system to make them cross friendly
to simplify the answers file to just one generic linux variant.
The 3.6.x branch is still security supported for the forseeable future.

I'm currently working with samba upstream to solve many of these
issues but this will probably happen with the yet unreleased
4.2 branch only.

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 80ad06e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -956,6 +956,7 @@ source "package/rsync/Config.in"
source "package/rtorrent/Config.in"
source "package/rtptools/Config.in"
source "package/samba/Config.in"
source "package/samba4/Config.in"
source "package/sconeserver/Config.in"
source "package/ser2net/Config.in"
source "package/smcroute/Config.in"
+24 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_SAMBA4
	bool "samba4"
	depends on !BR2_PACKAGE_SAMBA
	depends on BR2_INET_IPV6
	depends on BR2_USE_MMU # fork()
	depends on BR2_USE_WCHAR # e2fsprogs
	depends on BR2_LARGEFILE
	depends on BR2_TOOLCHAIN_HAS_THREADS # talloc python threads
	# Supported architectures only limited by the cached answers
	depends on BR2_arm || BR2_powerpc
	select BR2_PACKAGE_E2FSPROGS
	select BR2_PACKAGE_POPT
	select 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/

comment "samba4 needs a toolchain w/ IPv6, wchar, largfile, threads"
	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE || \
		!BR2_USE_WCHAR || !BR2_INET_IPV6

package/samba4/S91smb

0 → 100644
+56 −0
Original line number Diff line number Diff line
#!/bin/sh

[ -f /etc/samba/smb.conf ] || exit 0

mkdir -p /var/log/samba

start() {
	echo -n "Starting SMB services: "
	smbd -D
	[ $? == 0 ] && echo "OK" || echo "FAIL"

	echo -n "Starting NMB services: "
	nmbd -D
	[ $? == 0 ] && echo "OK" || echo "FAIL"
}

stop() {
	echo -n "Shutting down SMB services: "
	kill -9 `pidof smbd`
	[ $? == 0 ] && echo "OK" || echo "FAIL"

	echo -n "Shutting down NMB services: "
	kill -9 `pidof nmbd`
	[ $? == 0 ] && echo "OK" || echo "FAIL"
}

restart() {
	stop
	start
}

reload() {
        echo -n "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 $?
+65 −0
Original line number Diff line number Diff line
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 HAVE_LITTLE_ENDIAN - runtime: OK
Checking for HAVE_BIG_ENDIAN - runtime: NO
Checking for kernel change notify support: OK
Checking for Linux kernel oplocks: OK
Checking for kernel share modes: OK
Checking whether blkcnt_t is 32 bit: NO
Checking whether blkcnt_t is 64 bit: 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 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
getcwd takes a NULL argument: OK
Checking uname sysname type: "Linux"
Checking uname machine type: "arm"
Checking uname release type: "3.0.0"
Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013"
Checking for WORDS_BIGENDIAN: NO
Checking size of bool: "1"
Checking size of char: "1"
Checking size of int: "4"
Checking size of long long: "8"
Checking size of long: "4"
Checking size of short: "2"
Checking size of size_t: "4"
Checking size of ssize_t: "4"
Checking size of int8_t: "1"
Checking size of uint8_t: "1"
Checking size of int16_t: "2"
Checking size of uint16_t: "2"
Checking size of int32_t: "4"
Checking size of uint32_t: "4"
Checking size of int64_t: "8"
Checking size of uint64_t: "8"
Checking size of void*: "4"
Checking size of off_t: "8"
Checking size of dev_t: "8"
Checking size of ino_t: "8"
Checking size of time_t: "4"
Checking size of ((struct utmp *)NULL)->ut_line: "32"
Checking value of NSIG: "65"
Checking value of _NSIG: "65"
Checking value of SIGRTMAX: "64"
Checking value of SIGRTMIN: "34"
+65 −0
Original line number Diff line number Diff line
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 HAVE_LITTLE_ENDIAN - runtime: NO
Checking for HAVE_BIG_ENDIAN - runtime: OK
Checking for kernel change notify support: OK
Checking for Linux kernel oplocks: OK
Checking for kernel share modes: OK
Checking whether blkcnt_t is 32 bit: NO
Checking whether blkcnt_t is 64 bit: 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 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
getcwd takes a NULL argument: OK
Checking uname sysname type: "Linux"
Checking uname machine type: "powerpc"
Checking uname release type: "3.0.0"
Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013"
Checking for WORDS_BIGENDIAN: OK
Checking size of bool: "1"
Checking size of char: "1"
Checking size of int: "4"
Checking size of long long: "8"
Checking size of long: "4"
Checking size of short: "2"
Checking size of size_t: "4"
Checking size of ssize_t: "4"
Checking size of int8_t: "1"
Checking size of uint8_t: "1"
Checking size of int16_t: "2"
Checking size of uint16_t: "2"
Checking size of int32_t: "4"
Checking size of uint32_t: "4"
Checking size of int64_t: "8"
Checking size of uint64_t: "8"
Checking size of void*: "4"
Checking size of off_t: "8"
Checking size of dev_t: "8"
Checking size of ino_t: "8"
Checking size of time_t: "4"
Checking size of ((struct utmp *)NULL)->ut_line: "32"
Checking value of NSIG: "65"
Checking value of _NSIG: "65"
Checking value of SIGRTMAX: "64"
Checking value of SIGRTMIN: "34"
Loading