diff options
-rw-r--r-- | config/samba/cross-answers | 41 | ||||
-rw-r--r-- | patches/samba-3.0.37/0001-Linux-oplock-support-is-conditional-on-HAVE_KERNEL_O.patch | 37 | ||||
-rw-r--r-- | patches/samba-3.0.37/0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch | 42 | ||||
-rw-r--r-- | patches/samba-3.0.37/0003-configure.in-make-LINUX_LFS_SUPPORT-cacheable.patch | 45 | ||||
-rw-r--r-- | patches/samba-3.0.37/0004-configure.in-fix-test-for-negative-enum-values.patch | 62 | ||||
-rw-r--r-- | patches/samba-3.0.37/0005-configure.in-fix-time_t-detection.patch | 34 | ||||
-rw-r--r-- | patches/samba-3.0.37/0006-configure.in-fix-off_t-test.patch | 37 | ||||
-rw-r--r-- | patches/samba-3.0.37/0007-configure.in-fix-dev_t-test.patch | 39 | ||||
-rwxr-xr-x | patches/samba-3.0.37/autogen.sh | 4 | ||||
-rw-r--r-- | patches/samba-3.0.37/series | 7 | ||||
-rw-r--r-- | projectroot/etc/samba/smb.conf | 40 | ||||
-rw-r--r-- | projectroot/usr/lib/tmpfiles.d/samba.conf | 2 | ||||
-rw-r--r-- | rules/samba.in | 118 | ||||
-rw-r--r-- | rules/samba.make | 239 |
14 files changed, 196 insertions, 551 deletions
diff --git a/config/samba/cross-answers b/config/samba/cross-answers new file mode 100644 index 000000000..a66d14843 --- /dev/null +++ b/config/samba/cross-answers @@ -0,0 +1,41 @@ +Checking uname sysname type: "Linux" +Checking uname machine type: "@UNAME_M@" +Checking uname release type: "@UNAME_R@" +Checking uname version type: "@UNAME_V@" +Checking simple C program: "hello world" +rpath library support: OK +-Wl,--version-script support: OK +Checking getconf LFS_CFLAGS: NO +Checking for large file support without additional flags: @HAS_64BIT@ +Checking for -D_FILE_OFFSET_BITS=64: OK +Checking correct behavior of strtoll: NO +Checking for working strptime: OK +Checking for C99 vsnprintf: "1" +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 value of NSIG: "65" +Checking value of _NSIG: "65" +Checking value of SIGRTMAX: "64" +Checking value of SIGRTMIN: "34" +Checking for a 64-bit host to support lmdb: @HAS_64BIT@ +Checking whether the WRFILE -keytab is supported: OK +Checking errno of iconv for illegal multibyte sequence: OK +Checking for kernel change notify support: OK +Checking for Linux kernel oplocks: OK +Checking for kernel share modes: OK +Checking whether POSIX capabilities are available: OK +Checking if can we convert from CP850 to UCS-2LE: OK +Checking if can we convert from UTF-8 to UCS-2LE: OK +vfs_fileid checking for statfs() and struct statfs.f_fsid: OK +Checking whether we can use Linux thread-specific credentials: OK +Checking whether we can use Linux thread-specific credentials with 32-bit system calls: 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: @HAS_64BIT@ +Checking whether the realpath function allows a NULL argument: OK +Checking for ftruncate extend: OK +getcwd takes a NULL argument: OK +checking for clnt_create(): OK diff --git a/patches/samba-3.0.37/0001-Linux-oplock-support-is-conditional-on-HAVE_KERNEL_O.patch b/patches/samba-3.0.37/0001-Linux-oplock-support-is-conditional-on-HAVE_KERNEL_O.patch deleted file mode 100644 index 0cee2ecfa..000000000 --- a/patches/samba-3.0.37/0001-Linux-oplock-support-is-conditional-on-HAVE_KERNEL_O.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Robert Schwebel <r.schwebel@pengutronix.de> -Subject: [samba] make oplock support conditional - -Linux oplock support is conditional on HAVE_KERNEL_OPLOCKS_LINUX, not -plain old LINUX. - -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> - ---- - source/modules/vfs_default.c | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -# 20100428 rsc: This patch was already applied in the samba upstream, see -# http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23962 -# and d8d84cd7082a95e673a7efc285879dd412b78b4c in samba git. - -diff --git a/source/modules/vfs_default.c b/source/modules/vfs_default.c -index 4cc6e88..1f8fb63 100644 ---- a/source/modules/vfs_default.c -+++ b/source/modules/vfs_default.c -@@ -813,10 +813,11 @@ static int vfswrap_linux_setlease(vfs_handle_struct *handle, files_struct *fsp, - - START_PROFILE(syscall_linux_setlease); - --#ifdef LINUX -+#ifdef HAVE_KERNEL_OPLOCKS_LINUX - /* first set the signal handler */ -- if(linux_set_lease_sighandler(fd) == -1) -+ if(linux_set_lease_sighandler(fd) == -1) { - return -1; -+ } - - result = linux_setlease(fd, leasetype); - #else --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch b/patches/samba-3.0.37/0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch deleted file mode 100644 index 0043cee20..000000000 --- a/patches/samba-3.0.37/0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9130b57a196e2cf316230409b7e1d4a4eab56fed Mon Sep 17 00:00:00 2001 -From: Robert Schwebel <r.schwebel@pengutronix.de> -Date: Tue, 7 Jul 2009 15:56:55 +0200 -Subject: [PATCH 2/8] [configure.in] make getgrouplist_ok test cross compile save - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 1e4ea0f..192a9d9 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -1389,7 +1389,7 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[]) - case "$host_os" in - *linux*) - # glibc <= 2.3.2 has a broken getgrouplist -- AC_TRY_RUN([ -+ AC_RUN_IFELSE([ - #include <unistd.h> - #include <sys/utsname.h> - main() { -@@ -1405,10 +1405,14 @@ main() { - #endif - exit(0); - } --], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) -+], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no], [linux_getgrouplist_ok=maybe]) -+ - if test x"$linux_getgrouplist_ok" = x"yes"; then - AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) - fi -+ if test x"$linux_getgrouplist_ok" = x"maybe"; then -+ AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist - guessed while crosscompiling]) -+ fi - ;; - *) - AC_CHECK_FUNCS(getgrouplist) --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0003-configure.in-make-LINUX_LFS_SUPPORT-cacheable.patch b/patches/samba-3.0.37/0003-configure.in-make-LINUX_LFS_SUPPORT-cacheable.patch deleted file mode 100644 index fb8f7e00e..000000000 --- a/patches/samba-3.0.37/0003-configure.in-make-LINUX_LFS_SUPPORT-cacheable.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 793f69e2c8a23e202e0155e5341a3c756e573c6e Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Tue, 7 Jul 2009 17:09:09 +0200 -Subject: [PATCH 3/8] [configure.in] make LINUX_LFS_SUPPORT cacheable - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 9 ++++----- - 1 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 192a9d9..701622d 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -768,7 +768,7 @@ exit(1); - # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. - # - *linux*) -- AC_MSG_CHECKING([for LFS support]) -+ AC_CACHE_CHECK([for LFS support], [samba_cv_LINUX_LFS_SUPPORT],[ - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - AC_TRY_RUN([ -@@ -807,15 +807,14 @@ main() { - exit(1); - #endif - } --], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross]) -- CPPFLAGS="$old_CPPFLAGS" -- if test x$LINUX_LFS_SUPPORT = xyes ; then -+], [samba_cv_LINUX_LFS_SUPPORT=yes], [samba_cv_LINUX_LFS_SUPPORT=no], [samba_cv_LINUX_LFS_SUPPORT=cross]) -+ CPPFLAGS="$old_CPPFLAGS"]) -+ if test x$samba_cv_LINUX_LFS_SUPPORT = xyes ; then - CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" - AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) - AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) - AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions]) - fi -- AC_MSG_RESULT([$LINUX_LFS_SUPPORT]) - ;; - - # --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0004-configure.in-fix-test-for-negative-enum-values.patch b/patches/samba-3.0.37/0004-configure.in-fix-test-for-negative-enum-values.patch deleted file mode 100644 index aa599aaff..000000000 --- a/patches/samba-3.0.37/0004-configure.in-fix-test-for-negative-enum-values.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 6d2c30e32e551ba84bb9967d6fd48e21c7ad714c Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Tue, 7 Jul 2009 18:21:00 +0200 -Subject: [PATCH 4/8] [configure.in] fix test for negative enum values - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 28 ++++++++-------------------- - 1 files changed, 8 insertions(+), 20 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 701622d..85b0bd7 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -493,6 +493,8 @@ else - fi - AC_SUBST(BROKEN_CC) - -+AC_TRY_COMPILE([],[(void)sizeof(char[-1])],AC_MSG_ERROR([configure's compilation assert doesn't work with $CC])) -+ - dnl Check if the C compiler understands -Werror - AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ - AC_TRY_RUN_STRICT([ -@@ -530,29 +532,15 @@ fi - # and don't truncate the values to INT_MAX - # a runtime test is needed here - AC_SUBST(PIDL_ARGS) --AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [ -- AC_TRY_RUN( -+AC_CACHE_CHECK([that the C compiler understands negative enum values], [samba_cv_BUILD_CC_NEGATIVE_ENUM_VALUES], [ -+ AC_TRY_COMPILE([], - [ -- #include <stdio.h> - enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; -- int main(void) { -- enum negative_values v1 = NEGATIVE_VALUE; -- unsigned v2 = NEGATIVE_VALUE; -- -- if (v1 != 0xFFFFFFFF) { -- printf("%u != 0xFFFFFFFF\n", v1); -- return 1; -- } -- if (v2 != 0xFFFFFFFF) { -- printf("%u != 0xFFFFFFFF\n", v2); -- return 1; -- } -- -- return 0; -- } -+ (void)sizeof(char[1-2*( (unsigned)NEGATIVE_VALUE != 0xFFFFFFFF)]); -+ (void)sizeof(char[1-2*((enum negative_values)NEGATIVE_VALUE != 0xFFFFFFFF)]); - ], -- SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)]) --if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then -+ samba_cv_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_BUILD_CC_NEGATIVE_ENUM_VALUES=no)]) -+if test x"$samba_cv_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then - AC_MSG_WARN([using --unit-enums for pidl]) - PIDL_ARGS="$PIDL_ARGS --uint-enums" - fi --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0005-configure.in-fix-time_t-detection.patch b/patches/samba-3.0.37/0005-configure.in-fix-time_t-detection.patch deleted file mode 100644 index 6e01f6780..000000000 --- a/patches/samba-3.0.37/0005-configure.in-fix-time_t-detection.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6f48413916d3575a1f12bc14e0990f40606e894a Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Tue, 7 Jul 2009 18:57:16 +0200 -Subject: [PATCH 5/8] [configure.in] fix time_t detection - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 85b0bd7..164dbcb 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -1951,10 +1951,13 @@ if test x"$samba_cv_compiler_supports_ll" = x"yes"; then - fi - - -+AC_CHECK_SIZEOF(time_t) - AC_CACHE_CHECK([for 64 bit time_t],samba_cv_SIZEOF_TIME_T,[ --AC_TRY_RUN([#include <time.h> --main() { exit((sizeof(time_t) == 8) ? 0 : 1); }], --samba_cv_SIZEOF_TIME_T=yes,samba_cv_SIZEOF_TIME_T=no,samba_cv_SIZEOF_TIME_T=cross)]) -+if test $ac_cv_sizeof_time_t -eq 8; then -+ samba_cv_SIZEOF_TIME_T=yes -+else -+ samba_cv_SIZEOF_TIME_T=no -+fi]) - if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then - AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type]) - fi --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0006-configure.in-fix-off_t-test.patch b/patches/samba-3.0.37/0006-configure.in-fix-off_t-test.patch deleted file mode 100644 index 9777d64c8..000000000 --- a/patches/samba-3.0.37/0006-configure.in-fix-off_t-test.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6daf3aad32f86549e2c5033e67d8541a20b89b2f Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Tue, 7 Jul 2009 19:17:40 +0200 -Subject: [PATCH 6/8] [configure.in] fix off_t test - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 12 ++++++++---- - 1 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 164dbcb..6094b87 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -1962,11 +1962,15 @@ if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then - AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type]) - fi - -+ -+AC_CHECK_SIZEOF(off_t) - AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[ --AC_TRY_RUN([#include <stdio.h> --#include <sys/stat.h> --main() { exit((sizeof(off_t) == 8) ? 0 : 1); }], --samba_cv_SIZEOF_OFF_T=yes,samba_cv_SIZEOF_OFF_T=no,samba_cv_SIZEOF_OFF_T=cross)]) -+if test $ac_cv_sizeof_off_t -eq 8; then -+ samba_cv_SIZEOF_OFF_T=yes -+else -+ samba_cv_SIZEOF_OFF_T=no -+fi -+]) - if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then - AC_DEFINE(SIZEOF_OFF_T,8,[The size of the 'off_t' type]) - fi --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/0007-configure.in-fix-dev_t-test.patch b/patches/samba-3.0.37/0007-configure.in-fix-dev_t-test.patch deleted file mode 100644 index 875a89beb..000000000 --- a/patches/samba-3.0.37/0007-configure.in-fix-dev_t-test.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 803cbd7cf45052396ef929167bfa15ad6e8fc7bc Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Tue, 7 Jul 2009 19:17:52 +0200 -Subject: [PATCH 7/8] [configure.in] fix dev_t test - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - source/configure.in | 14 ++++++-------- - 1 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/source/configure.in b/source/configure.in -index 6094b87..8b01ed4 100644 ---- a/source/configure.in -+++ b/source/configure.in -@@ -2014,15 +2014,13 @@ if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then - AC_DEFINE(HAVE_INO64_T,1,[Whether the 'ino64_t' type is available]) - fi - -+AC_CHECK_SIZEOF(dev_t) - AC_CACHE_CHECK([for 64 bit dev_t],samba_cv_SIZEOF_DEV_T,[ --AC_TRY_RUN([ --#if defined(HAVE_UNISTD_H) --#include <unistd.h> --#endif --#include <stdio.h> --#include <sys/stat.h> --main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }], --samba_cv_SIZEOF_DEV_T=yes,samba_cv_SIZEOF_DEV_T=no,samba_cv_SIZEOF_DEV_T=cross)]) -+if test $ac_cv_sizeof_dev_t -eq 8; then -+ samba_cv_SIZEOF_DEV_T=yes -+else -+ samba_cv_SIZEOF_DEV_T=no -+fi]) - if test x"$samba_cv_SIZEOF_DEV_T" = x"yes"; then - AC_DEFINE(SIZEOF_DEV_T,8,[The size of the 'dev_t' type]) - fi --- -1.6.3.3 - diff --git a/patches/samba-3.0.37/autogen.sh b/patches/samba-3.0.37/autogen.sh deleted file mode 100755 index a1333120a..000000000 --- a/patches/samba-3.0.37/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd source && ./autogen.sh - diff --git a/patches/samba-3.0.37/series b/patches/samba-3.0.37/series deleted file mode 100644 index 5eb490721..000000000 --- a/patches/samba-3.0.37/series +++ /dev/null @@ -1,7 +0,0 @@ -0001-Linux-oplock-support-is-conditional-on-HAVE_KERNEL_O.patch -0002-configure.in-make-getgrouplist_ok-test-cross-compile.patch -0003-configure.in-make-LINUX_LFS_SUPPORT-cacheable.patch -0004-configure.in-fix-test-for-negative-enum-values.patch -0005-configure.in-fix-time_t-detection.patch -0006-configure.in-fix-off_t-test.patch -0007-configure.in-fix-dev_t-test.patch diff --git a/projectroot/etc/samba/smb.conf b/projectroot/etc/samba/smb.conf index 188d85c1f..9db5aa2bc 100644 --- a/projectroot/etc/samba/smb.conf +++ b/projectroot/etc/samba/smb.conf @@ -3,36 +3,16 @@ ; consult samba manual page if you wish to make ; changes [global] -; guest account = nobody + workgroup = WORKGROUP server string = PTXdist sample samba server - log file = /var/log/samba-log.%m - lock directory = /var/lock - share modes = yes - security = share - encrypt passwords = no - guest account = root - interfaces = eth0 + security = user + encrypt passwords = yes + invalid users = root + load printers = no + printcap name = /dev/null + disable spoolss = yes [homes] - comment = Home Directories - browseable = no - writable = no - create mask = 0700 - directory mask = 0700 - -[share] - comment = Data Directory - path = /home - browseable = yes - read only = no - create mode = 0750 - public = yes - -[printers] - comment = All Printers - browseable = no - path = /tmp - printable = yes - public = no - writable = no - create mode = 0700 + comment = Home Directories + browseable = no + read only = yes diff --git a/projectroot/usr/lib/tmpfiles.d/samba.conf b/projectroot/usr/lib/tmpfiles.d/samba.conf new file mode 100644 index 000000000..868c586d2 --- /dev/null +++ b/projectroot/usr/lib/tmpfiles.d/samba.conf @@ -0,0 +1,2 @@ +d /var/log/samba/cores 0700 root root - +d /var/lib/samba/private 0700 root root - diff --git a/rules/samba.in b/rules/samba.in index d71b9ab8a..ec5423661 100644 --- a/rules/samba.in +++ b/rules/samba.in @@ -3,14 +3,22 @@ menuconfig SAMBA tristate prompt "samba " + select HOST_SYSTEM_PERL + select LIBC_CRYPT + select LIBC_DL select LIBC_NSL select LIBC_RESOLV - select LIBC_DL - select LIBC_CRYPT if SAMBA_SERVER select GCCLIBS_GCC_S - select READLINE + select ACL + select BUSYBOX_START_STOP_DAEMON if SAMBA_STARTSCRIPT + select CUPS if SAMBA_CUPS + select KRB5 + select LIBBSD + select LIBCAP select LIBPOPT - select BUSYBOX_START_STOP_DAEMON if SAMBA_STARTSCRIPT + select READLINE + select SYSTEMD if SAMBA_SYSTEMD_UNIT + select ZLIB help Samba is an Open Source/Free Software suite that has, since 1992, provided file and print services to all manner of @@ -20,85 +28,10 @@ menuconfig SAMBA See http://www.samba.org for details. -# Optional Features: -# --enable-static=PKGS build static libraries default=no -# --enable-shared=PKGS build shared libraries default=yes -# --enable-pie Turn on pie support if available (default=yes) -# --enable-debug Turn on compiler debugging information (default=no) -# --enable-socket-wrapper Turn on socket wrapper library (default=no) -# --enable-developer Turn on developer warnings and debugging (default=no) -# --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no) -# --enable-dmalloc Enable heap debugging default=no - - -# --enable-iprint Turn on iPrint support (default=yes if cups is yes) -# -# Optional Packages: -# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -# --with-fhs Use FHS-compliant paths (default=no) -# --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private) -# --with-rootsbindir=DIR Which directory to use for root sbin ($ac_default_prefix/sbin) -# --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks) -# --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks) -# --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat) -# --with-configdir=DIR Where to put configuration files ($libdir) -# --with-logfilebase=DIR Where to put log files ($VARDIR) -# --with-libdir=DIR Where to put libdir ($libdir) -# --with-pammodulesdir=DIR Which directory to use for PAM modules ($ac_default_prefix/$libdir/security) -# --with-mandir=DIR Where to put man pages ($mandir) -# --with-cfenc=HEADERDIR Use internal CoreFoundation encoding API -# for optimization (Mac OS X/Darwin only) -# --with-selftest-prefix=DIR The prefix where make test will be runned ($selftest_prefix) -# --with-smbtorture4-path=PATH The path to a samba4 smbtorture for make test (none) -# --with-profiling-data Include gathering source code profile information (default=no) -# --with-readline=DIR Look for readline include/libs in DIR (default=auto) -# --with-smbwrapper Include SMB wrapper support (default=no) -# --with-afs Include AFS clear-text auth support (default=no) -# --with-fake-kaserver Include AFS fake-kaserver support (default=no) -# --with-vfs-afsacl Include AFS to NT ACL mapping module (default=no) -# --with-dce-dfs Include DCE/DFS clear-text auth support (default=no) -# --with-ldap LDAP support (default yes) -# --with-ads Active Directory support (default auto) -# --with-krb5=base-dir Locate Kerberos 5 support (default=/usr) -# --with-automount Include automount support (default=no) -# --with-smbmount Include smbmount (Linux only) support (default=no) -# --with-cifsmount Include mount.cifs and umount.cifs (Linux only) support (default=yes) -# --with-pam Include PAM support (default=no) -# --with-pam_smbpass Build PAM module for authenticating against passdb backends (default=no) -# --with-nisplus-home Include NISPLUS_HOME support (default=no) -# --with-syslog Include experimental SYSLOG support (default=no) -# --with-quotas Include disk-quota support (default=no) -# --with-sys-quotas Include lib/sysquotas.c support (default=auto) -# --with-utmp Include utmp accounting (default, if supported by OS) -# --with-libmsrpc Build the libmsrpc shared library (default=yes if shared libs supported) -# --with-libsmbclient Build the libsmbclient shared library (default=yes if shared libs supported) -# --with-libsmbsharemodes Build the libsmbsharemodes shared library (default=yes if shared libs supported) -# --with-spinlocks Use spin locks instead of fcntl locks (default=no) -# --with-cluster-support Enable cluster extensions (default=no) -# --with-acl-support Include ACL support (default=no) -# --with-aio-support Include asynchronous io support (default=no) -# --with-sendfile-support Check for sendfile support (default=yes) -# --with-winbind Build winbind (default, if supported by OS) -# --with-included-popt use bundled popt library, not from system -# --with-included-iniparser use bundled iniparser library, not from system -# --with-python=PYTHONNAME build Python libraries -# --with-static-modules=MODULES Comma-seperated list of names of modules to statically link in -# --with-shared-modules=MODULES Comma-seperated list of names of modules to build shared - if SAMBA config SAMBA_COMMON bool - default y - prompt "Samba common files" - help - Install common samba files. - -config SAMBA_SMB_CONF - bool - default y - prompt "install /etc/samba/smb.conf" config SAMBA_SERVER bool @@ -108,19 +41,6 @@ config SAMBA_SERVER Installs samba server. ATTENTION: You need rw access to your rootfs before starting the samba server! -if SAMBA_SERVER - -config SAMBA_SECRETS_USER - bool - prompt "User defined smb password Database" - help - This will install the /etc/samba/secrets.tdb from - projectroot/etc/samba/secrets.tdb. If you wish to run samba - in user security level and use you own userdatabase. You will - have to enable this. If you say n here. The samba server will - generates his own secrets.tdb after initialisation. -endif - config SAMBA_CLIENT bool select SAMBA_COMMON @@ -135,16 +55,8 @@ config SAMBA_LIBCLIENT help Installs the libsmbclient shared library. -config SAMBA_SMBFS - bool - select SAMBA_COMMON - prompt "Samba file system" - help - Enables the system to mount windows share via SMB protocol - config SAMBA_CUPS bool - depends on BROKEN prompt "cups support" help Turn on CUPS support @@ -155,4 +67,10 @@ config SAMBA_STARTSCRIPT depends on SAMBA_SERVER prompt "install /etc/init.d/samba" +config SAMBA_SYSTEMD_UNIT + bool + default y + depends on SAMBA_SERVER && INITMETHOD_SYSTEMD + prompt "install systemd unit files" + endif diff --git a/rules/samba.make b/rules/samba.make index efe40a1f9..cfa869495 100644 --- a/rules/samba.make +++ b/rules/samba.make @@ -17,106 +17,119 @@ PACKAGES-$(PTXCONF_SAMBA) += samba # # Paths and names # -SAMBA_VERSION := 3.0.37 -SAMBA_MD5 := 11ed2bfef4090bd5736b194b43f67289 +SAMBA_VERSION := 4.9.4 +SAMBA_MD5 := 5e94705ae741bc6e4c893cea7b5de0d5 SAMBA := samba-$(SAMBA_VERSION) SAMBA_SUFFIX := tar.gz +SAMBA_URL := https://download.samba.org/pub/samba/stable/$(SAMBA).$(SAMBA_SUFFIX) SAMBA_SOURCE := $(SRCDIR)/$(SAMBA).$(SAMBA_SUFFIX) SAMBA_DIR := $(BUILDDIR)/$(SAMBA) -SAMBA_LICENSE := GPL-2.0-only - -SAMBA_URL := \ - http://www.samba.org/samba/ftp/stable/$(SAMBA).$(SAMBA_SUFFIX) \ - http://www.samba.org/samba/ftp/old-versions/$(SAMBA).$(SAMBA_SUFFIX) +SAMBA_LICENSE := GPL-3.0-or-later AND LGPL-3.0-or-later +# cross-compile runtime checks. Initial file generated with +# --cross-execute=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross +SAMBA_CONFIG := $(shell ptxd_get_alternative config/samba cross-answers && echo $$ptxd_reply) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -SAMBA_PATH := PATH=$(CROSS_PATH) -SAMBA_ENV := \ - $(CROSS_ENV) \ - CFLAGS=-O2 \ - libreplace_cv_READDIR_NEEDED=no \ - samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \ - samba_cv_HAVE_BROKEN_GETGROUPS=no \ - samba_cv_HAVE_C99_VSNPRINTF=yes \ - samba_cv_HAVE_DEVICE_MAJOR_FN=yes \ - samba_cv_HAVE_DEVICE_MINOR_FN=yes \ - samba_cv_HAVE_FCNTL_LOCK=yes \ - samba_cv_HAVE_FTRUNCATE_EXTEND=yes \ - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ - samba_cv_HAVE_IFACE_AIX=no \ - samba_cv_HAVE_IFACE_IFCONF=yes \ - samba_cv_HAVE_IFACE_IFREQ=yes \ - samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes \ - samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ - samba_cv_HAVE_KERNEL_SHARE_MODES=yes \ - samba_cv_HAVE_MAKEDEV=yes \ - samba_cv_HAVE_MMAP=yes \ - samba_cv_HAVE_NATIVE_ICONV=yes \ - samba_cv_HAVE_SECURE_MKSTEMP=yes \ - samba_cv_HAVE_STRUCT_FLOCK64=yes \ - samba_cv_HAVE_TRUNCATED_SALT=no \ - samba_cv_HAVE_WORKING_AF_LOCAL=yes \ - samba_cv_LINUX_LFS_SUPPORT=yes \ - samba_cv_REALPATH_TAKES_NULL=yes \ - samba_cv_REPLACE_INET_NTOA=no \ - samba_cv_USE_SETRESUID=yes \ - samba_cv_USE_SETREUID=yes \ - samba_cv_have_longlong=yes \ - samba_cv_have_setresgid=yes \ - samba_cv_have_setresuid=yes - # # autoconf # -SAMBA_AUTOCONF := \ - $(CROSS_AUTOCONF_USR) \ - --disable-pie \ - --libdir=/usr/lib/samba \ - --sysconfdir=/etc \ - --with-configdir=/etc/samba \ - --with-libdir=/usr/lib \ - --with-libsmbclient \ - --with-lockdir=/var/lock \ - --with-logfilebase=/var/log \ - --with-piddir=/var/run \ - --with-privatedir=/etc/samba \ - --with-readline \ - --with-syslog \ +SAMBA_CONF_TOOL := NO +SAMBA_CONF_OPT := \ + --nocache \ + --without-json-audit \ + --without-gettext \ + --disable-python \ + --without-gpgme \ + --without-winbind \ --without-ads \ - --without-automount \ - --without-included-popt \ - --without-krb5 \ --without-ldap \ + --$(call ptx/endis,PTXCONF_SAMBA_CUPS)-cups \ + --disable-iprint \ --without-pam \ - --without-utmp \ - --without-winbind - -ifdef PTXCONF_SAMBA_CUPS -SAMBA_AUTOCONF += --enable-cups -else -SAMBA_AUTOCONF += --disable-cups -endif - -ifdef PTXCONF_SAMBA_SMBFS -SAMBA_AUTOCONF += --with-smbmount -endif - -ifdef PTXCONF_ICONV -SAMBA_AUTOCONF += --with-libiconv=$(SYSROOT)/usr -else -SAMBA_AUTOCONF += --without-libiconv -endif + --with-quotas \ + --with-sendfile-support \ + --with-utmp \ + --disable-avahi \ + --$(call ptx/wwo, PTXCONF_ICONV)-iconv \ + --with-acl-support \ + --with-dnsupdate \ + --with-syslog \ + --without-automount \ + --without-dmapi \ + --without-fam \ + --without-profiling-data \ + --without-libarchive \ + --without-cluster-support \ + --without-regedit \ + --without-fake-kaserver \ + --disable-glusterfs \ + --disable-cephfs \ + --disable-spotlight \ + --with-systemd \ + --without-lttng \ + --accel-aes=$(call ptx/ifdef,PTXCONF_ARCH_X86_64,intelaesni,none) \ + --enable-pthreadpool \ + --with-system-mitkrb5 \ + --without-ad-dc \ + --without-ntvfs-fileserver \ + $(CROSS_AUTOCONF_SYSROOT_USR) \ + --bundled-libraries=NONE,cmocka,tdb,talloc,tevent,ldb \ + --disable-rpath \ + --disable-rpath-install \ + --enable-auto-reconfigure \ + --cross-compile \ + --cross-execute=/does/not/exist/and/triggers/exceptions \ + --cross-answers=$(SAMBA_DIR)/cross-answers \ + --hostcc=$(HOSTCC) \ + --enable-fhs \ + --with-piddir=/run/samba \ + --with-lockdir=/var/lib/samba/lock \ + --systemd-install-services \ + --with-systemddir=/usr/lib/systemd/system + +$(STATEDIR)/samba.prepare: + @$(call targetinfo) + @UNAME_M=$(PTXCONF_ARCH_STRING) \ + UNAME_R=$(KERNEL_VERSION) \ + UNAME_V=$(if $(KERNEL_HEADER_VERSION),$(KERNEL_HEADER_VERSION),$(KERNEL_VERSION)) \ + HAS_64BIT=$(call ptx/ifdef,PTXCONF_ARCH_LP64,OK,NO) \ + ptxd_replace_magic $(SAMBA_CONFIG) > $(SAMBA_DIR)/cross-answers + @$(call world/execute, SAMBA, $(SYSTEMPYTHON) ./buildtools/bin/waf configure $(SAMBA_CONF_OPT)) + @$(call touch) -SAMBA_SUBDIR := source -SAMBA_MAKE_PAR := NO +SAMBA_COMPILE_ENV := \ + PTXDIST_ICECC= # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- +SAMBA_COMMON_LIBS := \ + libdcerpc \ + libdcerpc-binding \ + libndr-krb5pac \ + libndr-nbt \ + libndr-standard \ + libndr \ + libnetapi \ + libsamba-credentials \ + libsamba-errors \ + libsamba-hostconfig \ + libsamba-passdb \ + libsamba-util \ + libsamdb \ + libsmbconf \ + libtevent-util \ + libwbclient \ + samba/libldb \ + samba/libtalloc \ + samba/libtdb \ + samba/libtevent + + $(STATEDIR)/samba.targetinstall: @$(call targetinfo) @@ -126,9 +139,15 @@ $(STATEDIR)/samba.targetinstall: @$(call install_fixup, samba,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>") @$(call install_fixup, samba,DESCRIPTION,missing) - @$(call install_copy, samba, 0, 0, 0755, /etc/samba) + @$(call install_alternative_tree, samba, 0, 0, /etc/samba) ifdef PTXCONF_SAMBA_COMMON + @$(call install_glob, samba, 0, 0, -, \ + /usr/lib/samba,*-samba4.so) + + @$(foreach lib, $(SAMBA_COMMON_LIBS), \ + $(call install_lib, samba, 0, 0, 0644, $(lib))$(ptx/nl)) + @$(call install_copy, samba, 0, 0, 0755, -, \ /usr/bin/nmblookup) @$(call install_copy, samba, 0, 0, 0755, -, \ @@ -137,12 +156,6 @@ ifdef PTXCONF_SAMBA_COMMON /usr/bin/smbpasswd) @$(call install_copy, samba, 0, 0, 0755, -, \ /usr/bin/testparm) - @$(call install_copy, samba, 0, 0, 0644, -, \ - /usr/lib/lowcase.dat) - @$(call install_copy, samba, 0, 0, 0644, -, \ - /usr/lib/upcase.dat) - @$(call install_copy, samba, 0, 0, 0644, -, \ - /usr/lib/valid.dat) endif ifdef PTXCONF_SAMBA_SERVER @@ -158,16 +171,27 @@ ifdef PTXCONF_SAMBA_SERVER /usr/bin/smbstatus) @$(call install_copy, samba, 0, 0, 0755, -, \ /usr/bin/tdbbackup) + @$(call install_copy, samba, 0, 0, 0755, /var/cache/samba) + @$(call install_copy, samba, 0, 0, 0755, /var/lib/samba) + @$(call install_alternative, samba, 0, 0, 0644, \ + /usr/lib/tmpfiles.d/samba.conf) endif -ifdef PTXCONF_SAMBA_SMB_CONF - @$(call install_alternative, samba, 0, 0, 0644, \ - /etc/samba/smb.conf) +ifdef PTXCONF_SAMBA_CLIENT + @$(call install_copy, samba, 0, 0, 0755, -, \ + /usr/bin/smbcacls) + @$(call install_copy, samba, 0, 0, 0755, -, \ + /usr/bin/smbcquotas) + @$(call install_copy, samba, 0, 0, 0755, -, \ + /usr/bin/smbtree) + @$(call install_copy, samba, 0, 0, 0755, -, \ + /usr/bin/smbclient) + @$(call install_copy, samba, 0, 0, 0755, -, \ + /usr/bin/rpcclient) endif -ifdef PTXCONF_SAMBA_SECRETS_USER - @$(call install_alternative, samba, 0, 0, 0600, \ - /etc/samba/secrets.tdb) +ifdef PTXCONF_SAMBA_LIBCLIENT + @$(call install_lib, samba, 0, 0, 0644, libsmbclient) endif # # @@ -185,29 +209,16 @@ endif endif endif -ifdef PTXCONF_SAMBA_CLIENT - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbcacls) - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbcquotas) - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbtree) - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbclient) - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/rpcclient) -endif - -ifdef PTXCONF_SAMBA_LIBCLIENT - @$(call install_copy, samba, 0, 0, 0644, -, \ - /usr/lib/libsmbclient.so) -endif +ifdef PTXCONF_SAMBA_SYSTEMD_UNIT + @$(call install_alternative, samba, 0, 0, 0644, \ + /usr/lib/systemd/system/smb.service) + @$(call install_link, samba, ../smb.service, \ + /usr/lib/systemd/system/multi-user.target.wants/smb.service) -ifdef PTXCONF_SAMBA_SMBFS - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbmount) - @$(call install_copy, samba, 0, 0, 0755, -, \ - /usr/bin/smbumount) + @$(call install_alternative, samba, 0, 0, 0644, \ + /usr/lib/systemd/system/nmb.service) + @$(call install_link, samba, ../nmb.service, \ + /usr/lib/systemd/system/multi-user.target.wants/nmb.service) endif @$(call install_finish, samba) |