include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.14.14
+PKG_VERSION:=4.17.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
http://samba.mirror.bit.nl/samba/ftp/stable/ \
https://download.samba.org/pub/samba/stable/
-PKG_HASH:=abd5e9e6aa45e55114b188ba189ebdfc8fd3d7718d43f749e477ce7f791e5519
+PKG_HASH:=04868ecda82fcbeda7b8bf519a2461a64d55c6e70efc6f6053b2fbba55f1823a
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=COPYING
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
- DEPENDS:= +libtirpc +libreadline +libpopt +libcap +zlib +libgnutls +libtasn1 +libuuid +libopenssl +libpthread +KERNEL_IO_URING:liburing \
+ DEPENDS:= +libtirpc +libreadline +libpopt +libcap +zlib +libgnutls +perlbase-json-pp +libtasn1 +libuuid +libopenssl +libpthread +KERNEL_IO_URING:liburing \
+PACKAGE_libpam:libpam \
+SAMBA4_SERVER_VFS:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
--without-automount \
--without-iconv \
--without-lttng \
- --without-ntvfs-fileserver \
--without-pam \
--without-systemd \
--without-utmp \
--without-automount \
--without-iconv \
--without-lttng \
- --without-ntvfs-fileserver \
--without-pam \
--without-systemd \
--without-utmp \
HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
--without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \
- --without-dnsupdate --without-ads --without-ldap --without-ldb-lmdb
+ --without-ads --without-ldap --without-ldb-lmdb
# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
# Support for Nettle wasn't comitted
CONFIGURE_ARGS += --without-winbind --without-ldb-lmdb --with-acl-support
else
CONFIGURE_ARGS += --without-winbind --without-ads --without-ldap --without-ldb-lmdb --without-ad-dc \
- --without-json --without-libarchive --disable-python --nopyc --nopyo --without-dnsupdate --without-acl-support
+ --without-json --without-libarchive --disable-python --nopyc --nopyo --without-acl-support
endif
SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
export COMPILE_ET=$(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
export ASN1_COMPILE=$(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
+export PYTHONHASHSEED=1
# make sure we use the hostpkg build toolset and we need to find host 'yapp'
HOST_CONFIGURE_VARS+= \
$(call Host/Prepare/Default)
$(SED) 's,mandatory=True,mandatory=False,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
$(SED) 's,gnutls_version =.*,gnutls_version = gnutls_min_required_version,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,gnutls_version_str.*,gnutls_version_str = "3.7.7",g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,(gnutls_version > .*,(parse_version(gnutls_version) > parse_version("3.6.10")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,(gnutls_version < .*,(parse_version(gnutls_version) < parse_version("3.5.2")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
endef
define Host/Compile
(cd $(HOST_BUILD_DIR); \
+++ /dev/null
---- a/source3/wscript
-+++ b/source3/wscript
-@@ -885,7 +885,7 @@ msg.msg_accrightslen = sizeof(fd);
- if conf.env.with_iconv:
- conf.DEFINE('HAVE_ICONV', 1)
-
-- if Options.options.with_pam:
-+ if Options.options.with_pam != False:
- use_pam=True
- conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
- if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
-@@ -962,6 +962,17 @@ int i; i = PAM_RADIO_TYPE;
- "or headers not found. Use --without-pam to disable "
- "PAM support.");
-
-+ else:
-+ Logs.warn("PAM disabled")
-+ use_pam=False
-+ conf.undefine('WITH_PAM')
-+ conf.undefine('WITH_PAM_MODULES')
-+ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
-+ conf.undefine('PAM_RHOST')
-+ conf.undefine('PAM_TTY')
-+ conf.undefine('HAVE_PAM_PAM_APPL_H')
-+
-+
- seteuid = False
-
- #
+++ /dev/null
-samba: build dnsserver_common code
-
-Just 'install' does not seem to do it.
-
-Upstream-Status: Pending
-
-
---- a/source4/dns_server/wscript_build
-+++ b/source4/dns_server/wscript_build
-@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
- source='dnsserver_common.c',
- deps='samba-util samba-errors ldbsamba clidns',
- private_library=True,
-- install=bld.AD_DC_BUILD_IS_ENABLED()
-+ enabled=bld.AD_DC_BUILD_IS_ENABLED()
- )
-
- bld.SAMBA_MODULE('service_dns',
+++ /dev/null
---- a/nsswitch/wins.c
-+++ b/nsswitch/wins.c
-@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex =
- #define INADDRSZ 4
- #endif
-
-+#ifndef NETDB_INTERNAL
-+#define NETDB_INTERNAL -1
-+#endif
-+
-+#ifndef NETDB_SUCCESS
-+#define NETDB_SUCCESS 0
-+#endif
-+
- NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
- struct hostent *he,
- char *buffer,
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
-@@ -32,6 +32,8 @@
- #include <talloc.h>
+@@ -33,6 +33,8 @@
#include <sys/time.h>
+ #include <sys/types.h>
#include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
--- a/wscript_configure_embedded_heimdal
+++ b/wscript_configure_embedded_heimdal
-@@ -2,3 +2,14 @@ if not conf.env['FLEX']:
- conf.fatal("Embedded Heimdal build requires flex but it was not found. Install flex or use --with-system-mitkrb5 or --with-system-heimdalkrb5")
+@@ -6,3 +6,14 @@ if not conf.env['BISON']:
- conf.RECURSE('source4/heimdal_build')
+ conf.define('USING_EMBEDDED_HEIMDAL', 1)
+ conf.RECURSE('third_party/heimdal_build')
+
+def check_system_heimdal_binary(name):
+ if conf.LIB_MAY_BE_BUNDLED(name):
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 +88,4 @@ finally:
+@@ -86,9 +78,6 @@ finally:
#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.env.KRB5_VENDOR = 'heimdal'
conf.define('USING_SYSTEM_KRB5', 1)
+ conf.define('USING_SYSTEM_HEIMDAL', 1)
--- a/lib/util/util_paths.c
+++ b/lib/util/util_paths.c
-@@ -26,6 +26,9 @@
- #include "dynconfig/dynconfig.h"
- #include "lib/util/util_paths.h"
+@@ -28,6 +28,10 @@
#include "system/passwd.h"
+ #include "system/filesys.h"
+
+#if !defined(__GLIBC__)
+ #define NSS_BUFLEN_PASSWD 1024
+#endif
-
++
/**
* @brief Returns an absolute path to a file in the Samba modules directory.
+ *
--- a/python/wscript
+++ b/python/wscript
-@@ -73,9 +73,9 @@ def configure(conf):
- for module, package in selftest_pkgs.items():
- find_third_party_module(conf, module, package)
+@@ -90,9 +90,9 @@ def configure(conf):
+ "'python3-iso8601'. Please install "
+ "one of the packages.")
- if not Options.options.without_ad_dc:
- for module, package in ad_dc_pkgs.items():
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
-@@ -507,7 +507,7 @@ static NTSTATUS messaging_init_internal(
+@@ -500,7 +500,7 @@ static NTSTATUS messaging_init_internal(
return NT_STATUS_ACCESS_DENIED;
}
if (priv_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
-@@ -670,7 +670,7 @@ NTSTATUS messaging_reinit(struct messagi
+@@ -663,7 +663,7 @@ NTSTATUS messaging_reinit(struct messagi
msg_ctx->per_process_talloc_ctx,
msg_ctx->event_ctx,
&msg_ctx->id.unique_id,
+++ /dev/null
-From: https://gitlab.com/samba-team/samba/-/commit/29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb
-
-From 29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb Mon Sep 17 00:00:00 2001
-Date: Thu, 10 Feb 2022 00:02:17 +0300
-Subject: [PATCH] wafsamba: replace 'echo -n' with printf
-
-This patch makes samba_cross.py compatible with old bash (e.g. 3.2)
-
-
-Autobuild-Date(master): Fri Feb 11 07:58:57 UTC 2022 on sn-devel-184
----
- buildtools/wafsamba/samba_cross.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/buildtools/wafsamba/samba_cross.py
-+++ b/buildtools/wafsamba/samba_cross.py
-@@ -134,7 +134,7 @@ class cross_Popen(Utils.subprocess.Popen
- cross_answers_incomplete = True
- add_answer(ca_file, msg, ans)
- (retcode, retstring) = ans
-- args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
-+ args = ['/bin/sh', '-c', "printf %%s '%s'; exit %d" % (retstring, retcode)]
- real_Popen.__init__(*(obj, args), **kw)
-
-
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
-@@ -416,22 +416,13 @@ def configure(conf):
+@@ -436,22 +436,13 @@ def configure(conf):
conf.CHECK_FUNCS('prctl dirname basename')
conf.CHECK_CODE('''
struct ucred cred;
-@@ -817,9 +808,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -834,9 +825,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
# look for a method of finding the list of network interfaces
for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
if conf.CHECK_CODE('''
#define %s 1
#define NO_CONFIG_H 1
-@@ -832,7 +820,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -849,7 +837,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
#include "tests/getifaddrs.c"
''' % method,
method,
addmain=False,
execute=True):
break
-@@ -880,7 +868,6 @@ def build(bld):
+@@ -897,7 +885,6 @@ def build(bld):
break
extra_libs = ''
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
-@@ -11,13 +11,13 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
+@@ -12,17 +12,17 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
conf.CHECK_HEADERS('execinfo.h')
conf.SET_TARGET_TYPE('LIBUNWIND', 'EMPTY')
--if conf.check_cfg(package='libunwind-generic',
-- args='--cflags --libs',
-- msg='Checking for libunwind',
-- uselib_store='LIBUNWIND',
-- mandatory=False):
-- if conf.CHECK_HEADERS('libunwind.h'):
-- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
-+# if conf.check_cfg(package='libunwind-generic',
-+ # args='--cflags --libs',
-+ # msg='Checking for libunwind',
-+ # uselib_store='LIBUNWIND',
-+ # mandatory=False):
-+ # if conf.CHECK_HEADERS('libunwind.h'):
-+ # conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
-
- conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
-
+-if Options.options.with_libunwind:
+- if conf.check_cfg(package='libunwind-generic',
+- args='--cflags --libs',
+- msg='Checking for libunwind',
+- uselib_store='LIBUNWIND',
+- mandatory=False):
+- if conf.CHECK_HEADERS('libunwind.h'):
+- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
+- else:
+- raise Errors.WafError('--with-libunwind specified but libunwind not found')
+-elif Options.options.with_libunwind == None:
++#if Options.options.with_libunwind:
++ #if conf.check_cfg(package='libunwind-generic',
++ #args='--cflags --libs',
++ #msg='Checking for libunwind',
++ #uselib_store='LIBUNWIND',
++ #mandatory=False):
++ #if conf.CHECK_HEADERS('libunwind.h'):
++ #conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
++ #else:
++ #raise Errors.WafError('--with-libunwind specified but libunwind not found')
++if Options.options.with_libunwind == None:
+ if not conf.CONFIG_SET('HAVE_BACKTRACE_SYMBOLS') \
+ and not Options.options.disable_fault_handling:
+ raise Errors.WafError(
--- /dev/null
+--- a/third_party/heimdal/cf/make-proto.pl
++++ b/third_party/heimdal/cf/make-proto.pl
+@@ -4,7 +4,7 @@
+ use Getopt::Std;
+ use File::Compare;
+
+-use JSON;
++use JSON::PP;
+
+ my $comment = 0;
+ my $doxygen = 0;
+@@ -70,7 +70,7 @@ if($opt_x) {
+ my $EXP;
+ local $/;
+ open(EXP, '<', $opt_x) || die "open ${opt_x}";
+- my $obj = JSON->new->utf8->decode(<EXP>);
++ my $obj = JSON::PP->new->utf8->decode(<EXP>);
+ close $EXP;
+
+ foreach my $x (keys %$obj) {
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking whether setresuid is available: NO
Checking whether seteuid is available: NO
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file