diff --git a/net/samba4/Makefile b/net/samba4/Makefile index 97345641c6..52bf1ae48e 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba -PKG_VERSION:=4.18.8 +PKG_VERSION:=4.22.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -13,7 +13,7 @@ PKG_SOURCE_URL:= \ 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:=4fb87bceaeb01d832a59046c197a044b7e8e8000581548b5d577a6cda03344d1 +PKG_HASH:=d9ac8e224a200159e62c651cf42307dc162212ec25d04eb6800b9a7ccfbcc3c1 PKG_BUILD_FLAGS:=gc-sections @@ -217,14 +217,6 @@ HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support -- --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \ --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 -ifdef CONFIG_TARGET_x86_64 - CONFIGURE_ARGS += --accel-aes=intelaesni -else - CONFIGURE_ARGS += --accel-aes=none -endif - CONFIGURE_ARGS += \ --with-lockdir=/var/lock \ --with-logfilebase=/var/log \ @@ -371,6 +363,7 @@ define Build/Configure echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt # NOTE: special answers for freeBSD/CircleCI echo 'checking for clnt_create(): OK' >> $(PKG_BUILD_DIR)/cross-answers.txt + echo 'Checking whether fcntl supports setting/getting hints: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt $(call Build/Configure/Default) endef diff --git a/net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch b/net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch index 4f06db3694..50fa9ec7e4 100644 --- a/net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch +++ b/net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch @@ -1,10 +1,9 @@ --- a/wscript_configure_embedded_heimdal +++ b/wscript_configure_embedded_heimdal -@@ -6,3 +6,14 @@ if not conf.env['BISON']: - +@@ -7,6 +7,17 @@ if not conf.env['BISON']: 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): + return False @@ -15,3 +14,7 @@ + +check_system_heimdal_binary("compile_et") +check_system_heimdal_binary("asn1_compile") ++ + # + # See https://github.com/heimdal/heimdal/pull/1234 + # and https://github.com/krb5/krb5/pull/1329 diff --git a/net/samba4/patches/012-fix-gnutls-version-check.patch b/net/samba4/patches/012-fix-gnutls-version-check.patch new file mode 100644 index 0000000000..96a0dff2b1 --- /dev/null +++ b/net/samba4/patches/012-fix-gnutls-version-check.patch @@ -0,0 +1,11 @@ +--- a/wscript_configure_system_gnutls ++++ b/wscript_configure_system_gnutls +@@ -36,7 +36,7 @@ if (gnutls_version > parse_version('3.6. + + # GNUTLS_CB_TLS_SERVER_END_POINT is available with + # 3.7.2 +-if (gnutls_version >= parse_version('3.7.2')): ++if (gnutls_version > parse_version('3.7.2')): + conf.DEFINE('HAVE_GNUTLS_CB_TLS_SERVER_END_POINT', 1) + + # Check if gnutls has fips mode support diff --git a/net/samba4/patches/020-source3-msgsock-nvram-fix.patch b/net/samba4/patches/020-source3-msgsock-nvram-fix.patch index df5f56348d..0a32145099 100644 --- a/net/samba4/patches/020-source3-msgsock-nvram-fix.patch +++ b/net/samba4/patches/020-source3-msgsock-nvram-fix.patch @@ -1,6 +1,6 @@ --- a/source3/lib/messages.c +++ b/source3/lib/messages.c -@@ -500,7 +500,7 @@ static NTSTATUS messaging_init_internal( +@@ -501,7 +501,7 @@ static NTSTATUS messaging_init_internal( return NT_STATUS_ACCESS_DENIED; } @@ -9,7 +9,7 @@ if (priv_path == NULL) { return NT_STATUS_NO_MEMORY; } -@@ -663,7 +663,7 @@ NTSTATUS messaging_reinit(struct messagi +@@ -664,7 +664,7 @@ NTSTATUS messaging_reinit(struct messagi msg_ctx->per_process_talloc_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id, diff --git a/net/samba4/patches/021-source4-msgsock-nvram-fix.patch b/net/samba4/patches/021-source4-msgsock-nvram-fix.patch index 2bd1e79c65..8091d126f3 100644 --- a/net/samba4/patches/021-source4-msgsock-nvram-fix.patch +++ b/net/samba4/patches/021-source4-msgsock-nvram-fix.patch @@ -1,6 +1,6 @@ --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c -@@ -526,7 +526,7 @@ static struct imessaging_context *imessa +@@ -537,7 +537,7 @@ static struct imessaging_context *imessa goto fail; } diff --git a/net/samba4/patches/101-do-not-check-xsltproc-manpages.patch b/net/samba4/patches/101-do-not-check-xsltproc-manpages.patch index abce345d87..03c37298e6 100644 --- a/net/samba4/patches/101-do-not-check-xsltproc-manpages.patch +++ b/net/samba4/patches/101-do-not-check-xsltproc-manpages.patch @@ -2,17 +2,6 @@ Don't check xsltproc manpages Signed-off-by: Bian Naimeng ---- a/lib/ldb/wscript -+++ b/lib/ldb/wscript -@@ -144,7 +144,7 @@ def configure(conf): - conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2])) - - if conf.env.standalone_ldb: -- conf.CHECK_XSLTPROC_MANPAGES() -+ #conf.CHECK_XSLTPROC_MANPAGES() - - # we need this for the ldap backend - if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -48,7 +48,7 @@ def configure(conf): diff --git a/net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch b/net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch index 766fefc522..c970dc8e5e 100644 --- a/net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch +++ b/net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch @@ -1,6 +1,6 @@ --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -434,22 +434,13 @@ def configure(conf): +@@ -441,33 +441,13 @@ def configure(conf): conf.CHECK_FUNCS('prctl dirname basename') @@ -16,6 +16,17 @@ - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', - checklibc=True): - strlcpy_in_bsd = True +- elif conf.env.enable_fuzzing: +- # Just to complicate it more, some versions of Honggfuzz have +- # got strlcpy and strlcat in libc, but not in +- # (unless it is there coincidentally, on a BSD). Therefore we +- # can't use CHECK_FUNCS alone to decide whether to add the +- # headers to replace.h. +- # +- # As this is only known to happen on a fuzzing compiler, we'll +- # skip the check when not in fuzzing mode. +- conf.CHECK_HEADERS('bsd/string.h') +- - 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'): @@ -29,7 +40,7 @@ conf.CHECK_CODE(''' struct ucred cred; -@@ -832,9 +823,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL +@@ -850,9 +830,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']: @@ -39,7 +50,7 @@ if conf.CHECK_CODE(''' #define %s 1 #define NO_CONFIG_H 1 -@@ -847,7 +835,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL +@@ -865,7 +842,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL #include "tests/getifaddrs.c" ''' % method, method, @@ -48,7 +59,7 @@ addmain=False, execute=True): break -@@ -895,7 +883,6 @@ def build(bld): +@@ -913,7 +890,6 @@ def build(bld): break extra_libs = '' diff --git a/net/samba4/patches/104-fix-build-on-aarch64-and-risc.patch b/net/samba4/patches/104-fix-build-on-aarch64-and-risc.patch new file mode 100644 index 0000000000..d6bd8f58f0 --- /dev/null +++ b/net/samba4/patches/104-fix-build-on-aarch64-and-risc.patch @@ -0,0 +1,11 @@ +--- a/lib/ldb/tests/test_ldb_comparison_fold.c ++++ b/lib/ldb/tests/test_ldb_comparison_fold.c +@@ -52,7 +52,7 @@ struct ranked_value { + int rank; + }; + +-#define STR_VAL(s, r) { { discard_const(s), sizeof(s) - 1 }, r} ++#define STR_VAL(s, r) { { (void *)s, sizeof(s) - 1 }, r} + + static const struct ranked_value values_common[] = { + STR_VAL("", 0), diff --git a/net/samba4/patches/104-samba-4.12-unbundle-icu.patch b/net/samba4/patches/104-samba-4.12-unbundle-icu.patch deleted file mode 100644 index bceaa1addf..0000000000 --- a/net/samba4/patches/104-samba-4.12-unbundle-icu.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/lib/util/charset/wscript_configure -+++ b/lib/util/charset/wscript_configure -@@ -37,15 +37,15 @@ conf.CHECK_CODE(''' - lib='iconv', - headers='errno.h iconv.h') - --if conf.CHECK_CFG(package='icu-i18n', -- args='--cflags --libs', -- msg='Checking for icu-i18n', -- uselib_store='ICU_I18N'): -- for lib in conf.env['LIB_ICU_I18N']: -- conf.CHECK_LIB(lib, shlib=True, mandatory=True) -- conf.env['icu-libs'] = ' '.join(conf.env['LIB_ICU_I18N']) -- if not conf.CHECK_HEADERS('unicode/ustring.h'): -- conf.fatal('Found libicu, but unicode/ustring.h is missing') -- conf.DEFINE('HAVE_UTF8_NORMALISATION', 1) --else: -- conf.env['icu-libs'] = '' -+# if conf.CHECK_CFG(package='icu-i18n', -+ # args='--cflags --libs', -+ # msg='Checking for icu-i18n', -+ # uselib_store='ICU_I18N'): -+ # for lib in conf.env['LIB_ICU_I18N']: -+ # conf.CHECK_LIB(lib, shlib=True, mandatory=True) -+ # conf.env['icu-libs'] = ' '.join(conf.env['LIB_ICU_I18N']) -+ # if not conf.CHECK_HEADERS('unicode/ustring.h'): -+ # conf.fatal('Found libicu, but unicode/ustring.h is missing') -+ # conf.DEFINE('HAVE_UTF8_NORMALISATION', 1) -+# else: -+conf.env['icu-libs'] = '' diff --git a/net/samba4/patches/105-perl-json-pp.patch b/net/samba4/patches/105-perl-json-pp.patch deleted file mode 100644 index feb8aaaf41..0000000000 --- a/net/samba4/patches/105-perl-json-pp.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- 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(); -+ my $obj = JSON::PP->new->utf8->decode(); - close $EXP; - - foreach my $x (keys %$obj) {