ports/net/samba416/files/0018-Add-configuration-option-that-allows-to-choose-alter.patch
Timur I. Bakeyev 2daf87ac19 net/samba416: New port for Samba 4.16
This is an initial attempt to add Samba to the FreeBSD after major
rewrite of the VFS code in the upstream.

Most of the port development is now carried in:

     https://gitlab.com/samba-freebsd

Due to the way how new Samba VFS code is written there is a constrain
that Samba 4.14+ can run only on FreeBSD 13.1+, as it requires support
of the `nodup` option for the `fdesc` file system, as well as it's
presence in the system in general.

    https://gitlab.com/samba-freebsd/-/wikis/The-New-VFS

I'd like to thank CyberSecure Pty Ltd. company for their supoort of
the port development and Andrew Walker from iXsystems Inc. for the
patches he created and made available for the Samba4 on TrueNAS.

PR:		263874
2022-10-17 01:23:12 +02:00

65 lines
2.4 KiB
Diff

From b81d399aa6d9e2bdbb9db0efa8109c41aad4d025 Mon Sep 17 00:00:00 2001
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
Date: Mon, 31 May 2021 02:49:20 +0200
Subject: [PATCH 18/28] Add configuration option that allows to choose
alternative mDNS implementation dns_sd library.
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
---
source3/wscript | 12 ++++++++++++
source3/wscript_build | 2 ++
2 files changed, 14 insertions(+)
diff --git a/source3/wscript b/source3/wscript
index 2121b8b6510..6209472c6c8 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -70,6 +70,7 @@ def options(opt):
opt.samba_add_onoff_option('sendfile-support', default=None)
opt.samba_add_onoff_option('utmp')
opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
+ opt.samba_add_onoff_option('dnssd', with_name="enable", without_name="disable")
opt.samba_add_onoff_option('iconv')
opt.samba_add_onoff_option('acl-support')
opt.samba_add_onoff_option('syslog')
@@ -855,6 +856,17 @@ msg.msg_accrightslen = sizeof(fd);
conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
+ if Options.options.with_dnssd:
+ conf.env.with_dnssd = True
+ if not conf.CHECK_HEADERS('dns_sd.h'):
+ conf.env.with_dnssd = False
+ if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'):
+ conf.env.with_dnssd = False
+ if conf.env.with_dnssd:
+ conf.DEFINE('WITH_DNSSD_SUPPORT', 1)
+ else:
+ conf.SET_TARGET_TYPE('dns_sd', 'EMPTY')
+
if Options.options.with_iconv:
conf.env.with_iconv = True
if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
diff --git a/source3/wscript_build b/source3/wscript_build
index 5cf965dc45d..edd7985e648 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -709,6 +709,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
samba3core
param_service
AVAHI
+ dns_sd
PROFILE
LOCKING
LIBADS_SERVER
@@ -1128,6 +1129,7 @@ bld.SAMBA3_BINARY('client/smbclient',
msrpc3
RPC_NDR_SRVSVC
cli_smb_common
+ dns_sd
archive
''')
--
2.37.1