Samba4 FreeBSD ports build (4.0.3)

Samba4 has a lot of dependencies. The majority of the dependencies have been updated in the ports tree to provide the foundation to build the S4 port (please make sure to update your ports tree).

I have included the build options for zfsacl's and shadow_copy. It should be noted that shadow_copy does not appear to be fully functionally as of writing.

Samba4 build

clean/pristine ports tree
empty /var/db/ports
empty /usr/local
cd /usr/port/net/samba4
make pacakge-recursive
enable EXP_MODULES (zfsacls, shadow_copy2)
Disabled avahi mostly b/c it comes with a bunch of extra packages (~150MB worth)
Otherwise vanilla samba4 build

Screen shot 2013 02 21 at 10.56.12 PM

The first dependency built is perl
We are using perl 5.16.2
No special options here
Trying to keep it vanilla

Screen shot 2013 02 21 at 11.04.56 PM

Next up talloc 2.0.8
KEEP THE PYTHON BINDINGS!!!talloc 208

Ahh, next up python try to keep it vanilla:
DISABLED the EXAMPLES option
ENABLED the FPECTL option (floating point exception handling)
DISABLED the NLS option – milage my very again here I chose not to include do to extra libs

 python27 27

This can take a while,
Wait... now over to tevent 0.9.1 KEEP PYTHON BINDINGS!!! tevent port

next up tdb 1.2.11
KEEP PYTHON BINDINGS
tdb port

The next dependency is: libiconv 1.14
I added the PATCHES option
libiconv port

openldap-client
default openldap clietn port

wait...
cyrus-sasl-2.1.26
no changes to the defaults
cyrus sasl2 port

gnutls 2.12.23
DISABLE NLS option – Native language support
ENABLE LZO option– Compression
gnutls port

… gmp 5.1.1
default
gmp port

Cups client
default
No images yet!!!

the more direct route

The main option outside the defaults for samba4 is to enable "EXP_MODULES"

I have a ports "option" file which seems work for me. The file contents should be placed in /var/db/ports/samba4/options(default ports options path):

Do not use the lines which start with "===" in the options file.
==== =================== StartFile ==========================

# This file is auto-generated by 'make config'.
# Options for samba4-4.0.3 _OPTIONS_READ=samba4-4.0.3
_FILE_COMPLETE_OPTIONS_LIST=ACL_SUPPORT ADS AIO_SUPPORT AVAHI CUPS DEBUG DEVELOPER DNSUPDATE EXP_MODULES FAM_SUPPORT LDAP MANPAGES PAM_SMBPASS PTHREADPOOL QUOTAS SWAT SYSLOG UTMP WINBIND NSUPDATE BIND98 BIND99
OPTIONS_FILE_SET+=ACL_SUPPORT
OPTIONS_FILE_SET+=ADS
OPTIONS_FILE_SET+=AIO_SUPPORT
OPTIONS_FILE_SET+=AVAHI
OPTIONS_FILE_SET+=CUPS
OPTIONS_FILE_SET+=DEBUG
OPTIONS_FILE_UNSET+=DEVELOPER
OPTIONS_FILE_SET+=DNSUPDATE
OPTIONS_FILE_SET+=EXP_MODULES
OPTIONS_FILE_SET+=FAM_SUPPORT
OPTIONS_FILE_SET+=LDAP
OPTIONS_FILE_UNSET+=MANPAGES
OPTIONS_FILE_UNSET+=PAM_SMBPASS
OPTIONS_FILE_SET+=PTHREADPOOL
OPTIONS_FILE_SET+=QUOTAS
OPTIONS_FILE_SET+=SWAT
OPTIONS_FILE_SET+=SYSLOG
OPTIONS_FILE_SET+=UTMP
OPTIONS_FILE_SET+=WINBIND
OPTIONS_FILE_SET+=NSUPDATE
OPTIONS_FILE_UNSET+=BIND98
OPTIONS_FILE_UNSET+=BIND99

======================= End File ==========================

Once the file has been saved, building the samba is a bit easier.

cd /usr/ports/net/samba4
make
make install