pkgsrc/net/samba4/Makefile
adam 1c2ef12a1c samba4: updated to 4.13.2
Changes since 4.13.1
--------------------
   * BUG 14486: s3: modules: vfs_glusterfs: Fix leak of char
     **lines onto mem_ctx on return.
   * BUG 14471: RN: vfs_zfsacl: Only grant DELETE_CHILD if ACL tag is special.
   * BUG 14538: smb.conf.5: Add clarification how configuration changes
     reflected by Samba.
   * BUG 14552: daemons: Report status to systemd even when running in
     foreground.
   * BUG 14553: DNS Resolver: Support both dnspython before and after 2.0.0.
   * BUG 14486: s3-vfs_glusterfs: Refuse connection when write-behind xlator is
     present.
   * BUG 14487: provision: Add support for BIND 9.16.x.
   * BUG 14537: ctdb-common: Avoid aliasing errors during code optimization.
   * BUG 14541: libndr: Avoid assigning duplicate versions to symbols.
   * BUG 14522: docs: Fix default value of spoolss:architecture.
   * BUG 14388: winbind: Fix a memleak.
   * BUG 14531: s4:dsdb:acl_read: Implement "List Object" mode feature.
   * BUG 14486: docs-xml/manpages: Add warning about write-behind translator for
     vfs_glusterfs.
   * nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h.
   * BUG 14530: vfs_shadow_copy2: Avoid closing snapsdir twice.
   * BUG 14547: third_party: Update resolv_wrapper to version 1.1.7.
   * BUG 14550: examples:auth: Do not install example plugin.
   * BUG 14513: ctdb-recoverd: Drop unnecessary and broken code.
   * BUG 14471: RN: vfs_zfsacl: Only grant DELETE_CHILD if ACL tag is special.

Changes since 4.13.0
--------------------
   * BUG 14434: CVE-2020-14318: s3: smbd: Ensure change notifies can't get set
     unless the directory handle is open for SEC_DIR_LIST.
   * BUG 12795: CVE-2020-14383: Remote crash after adding NS or MX records using
     'samba-tool'.
   * BUG 14472: CVE-2020-14383: Remote crash after adding MX records.
   * BUG 14436: CVE-2020-14323: winbind: Fix invalid lookupsids DoS.

4.31.0:
NEW FEATURES/CHANGES
====================

Python 3.6 or later required
----------------------------
Samba's minimum runtime requirement for python was raised to Python
3.5 with samba 4.12.  Samba 4.13 raises this minimum version to Python
3.6 both to access new features and because this is the oldest version
we test with in our CI infrastructure.

This is also the last release where it will be possible to build Samba
(just the file server) with Python versions 2.6 and 2.7.

As Python 2.7 has been End Of Life upstream since April 2020, Samba
is dropping ALL Python 2.x support in the NEXT release.

Samba 4.14 to be released in March 2021 will require Python 3.6 or
later to build.

wide links functionality
------------------------
For this release, the code implementing the insecure "wide links = yes"
functionality has been moved out of the core smbd code and into a separate
VFS module, vfs_widelinks. Currently this vfs module is implicitly loaded
by smbd as the last but one module before vfs_default if "wide links = yes"
is enabled on the share (note, the existing restrictions on enabling wide
links around the SMB1 "unix extensions" and the "allow insecure wide links"
parameters are still in force). The implicit loading was done to allow
existing users of "wide links = yes" to keep this functionality without
having to make a change to existing working smb.conf files.

Please note that the Samba developers recommend changing any Samba
installations that currently use "wide links = yes" to use bind mounts
as soon as possible, as "wide links = yes" is an inherently insecure
configuration which we would like to remove from Samba. Moving the
feature into a VFS module allows this to be done in a cleaner way
in future.

A future release to be determined will remove this implicit linkage,
causing administrators who need this functionality to have to explicitly
add the vfs_widelinks module into the "vfs objects =" parameter lists.
The release notes will be updated to note this change when it occurs.

NT4-like 'classic' Samba domain controllers
-------------------------------------------
Samba 4.13 deprecates Samba's original domain controller mode.

Sites using Samba as a Domain Controller should upgrade from the
NT4-like 'classic' Domain Controller to a Samba Active Directory DC
to ensure full operation with modern windows clients.

SMBv1 only protocol options deprecated
--------------------------------------
A number of smb.conf parameters for less-secure authentication methods
which are only possible over SMBv1 are deprecated in this release.
2020-11-12 06:37:18 +00:00

225 lines
7.6 KiB
Makefile

# $NetBSD: Makefile,v 1.111 2020/11/12 06:37:18 adam Exp $
DISTNAME= samba-4.13.2
CATEGORIES= net
MASTER_SITES= https://download.samba.org/pub/samba/stable/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://www.samba.org/
COMMENT= SMB/CIFS protocol server suite
LICENSE= gnu-gpl-v3
CONFLICTS+= ja-samba-[0-9]* winbind-[0-9]*
PYTHON_VERSIONS_INCOMPATIBLE= 27
GCC_REQD+= 4.4
BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
BUILD_DEPENDS+= docbook-xml-[0-9]*:../../textproc/docbook-xml
BUILD_DEPENDS+= docbook-xsl>=1.79.2:../../textproc/docbook-xsl
DEPENDS+= p5-Parse-Yapp>=1.05:../../devel/p5-Parse-Yapp
DEPENDS+= ${PYPKGPREFIX}-dns-[0-9]*:../../net/py-dns
DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
DEPENDS+= ${PYPKGPREFIX}-iso8601-[0-9]*:../../time/py-iso8601
BUILD_DEFS+= VARBASE
.include "../../mk/bsd.prefs.mk"
SMB_LIB?= ${PREFIX}/lib
PKG_SYSCONFSUBDIR= samba
SMB_SHAREDSTATE?= ${PREFIX}/com
SMB_LOCALSTATE?= ${VARBASE}
SMB_INFO?= ${PREFIX}/info
SMB_MAN?= ${PREFIX}/${PKGMANDIR}
SMB_STATE?= ${VARBASE}/db/samba4
SMB_PRIVATE?= ${SMB_STATE}/private
SMB_PID?= ${VARBASE}/run
SMB_CACHE?= ${VARBASE}/run
SMB_LOCK?= ${VARBASE}/run
SMB_LOGFILEBASE?= ${VARBASE}/log
SMB_SOCKETS?= ${VARBASE}/run
SMB_MODULES?= ${SMB_LIB}/samba
SMB_PRIVATELIB?= ${SMB_LIB}/samba/private
SMB_PRIVSOCKETS?= ${VARBASE}/run
SMB_CONFIG?= ${PKG_SYSCONFDIR}
SMB_DATAROOT?= ${PREFIX}/share/samba
SMB_LOCALE?= ${PREFIX}/share/locale
SMB_DOC?= ${PREFIX}/share/doc/samba
SMB_PAMMODULES?= ${SMB_LIB}/samba/security
FILES_SUBST+= SMB_CONFIG=${SMB_CONFIG}
FILES_SUBST+= SMB_PID=${SMB_PID}
# mktemp is useful for the replacement adduser script, but don't require
# a full dependency since it's not actually needed by samba.
USE_TOOLS+= gmake mktemp perl:run pkg-config
.if ${OPSYS} == "NetBSD"
USE_GNU_ICONV= yes # FIXME: something doesn't work on NetBSD
BROKEN_GETTEXT_DETECTION= yes
.endif
# Debugging
#CONFIGURE_ARGS+= -vvv
#CONFIGURE_ARGS+= --enable-developer
#CONFIGURE_ARGS+= --fatal-errors
HAS_CONFIGURE= yes
CONFIG_SHELL= ${PYTHONBIN}
CONFIGURE_SCRIPT= ${WRKSRC}/buildtools/bin/waf
CONFIGURE_ARGS+= configure
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --infodir=${SMB_INFO}
CONFIGURE_ARGS+= --mandir=${SMB_MAN}
CONFIGURE_ARGS+= --datarootdir=${SMB_DATAROOT}
CONFIGURE_ARGS+= --libdir=${SAMBA_LIB}
CONFIGURE_ARGS+= --localedir=${SMB_LOCALE}
CONFIGURE_ARGS+= --docdir=${SMB_DOC}
CONFIGURE_ARGS+= --with-statedir=${SMB_STATE}
CONFIGURE_ARGS+= --with-privatedir=${SMB_PRIVATE}
CONFIGURE_ARGS+= --with-piddir=${SMB_PID}
CONFIGURE_ARGS+= --with-cachedir=${SMB_CACHE}
CONFIGURE_ARGS+= --with-lockdir=${SMB_LOCK}
CONFIGURE_ARGS+= --with-logfilebase=${SMB_LOGFILEBASE}
CONFIGURE_ARGS+= --with-sockets-dir=${SMB_SOCKETS}
CONFIGURE_ARGS+= --with-modulesdir=${SMB_MODULES}
CONFIGURE_ARGS+= --with-privatelibdir=${SMB_PRIVATELIB}
CONFIGURE_ARGS+= --with-privileged-socket-dir=${SMB_PRIVSOCKETS}
CONFIGURE_ARGS+= --with-configdir=${SMB_CONFIG}
CONFIGURE_ARGS+= --with-libiconv=${BUILDLINK_PREFIX.iconv}
#CONFIGURE_ARGS+= --bundled-libraries=com_err
CONFIGURE_ARGS+= --abi-check-disable
CONFIGURE_ARGS+= --disable-symbol-versions
.if defined(MAKE_JOBS) && !empty(MAKE_JOBS) && !(defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO]))
CONFIGURE_ARGS+= --jobs=${MAKE_JOBS}
.else
CONFIGURE_ARGS+= --jobs=1
.endif
CONFIGURE_ARGS+= --without-gpgme
# Depends on ncurses, explicitly disable for now.
CONFIGURE_ARGS+= --without-regedit
PY_PATCHPLIST= yes
MAKE_FLAGS+= WAF_BINARY=${PYTHONBIN}\ ${WRKSRC}/buildtools/bin/waf
# for winbind option build.
.if "${OPSYS}" != "Darwin" && "${OPSYS}" != "SunOS"
LDFLAGS+= -Wl,--allow-shlib-undefined
.endif
LDFLAGS+= ${BUILDLINK_LDADD.gettext}
LDFLAGS+= ${COMPILER_RPATH_FLAG}${SMB_PRIVATELIB}
CFLAGS.SunOS+= -DHAVE_SOLARIS_GETGRENT_R
# workaround https://bugzilla.samba.org/show_bug.cgi?id=12502 for now
CFLAGS.SunOS+= -DMSG_NOSIGNAL=0
LDFLAGS.SunOS+= -lsocket -lnsl -lsendfile
.include "options.mk"
.if ${SHLIB_TYPE} == "dylib"
PLIST_SUBST+= SOEXT=dylib
.else
PLIST_SUBST+= SOEXT=so
.endif
.if !defined(PWD_MKDB)
PWD_MKDB!= ${TYPE} pwd_mkdb 2>&1 | \
${AWK} '/not found/ { print "pwd_mkdb"; exit } { print $$3 }'
MAKEFLAGS+= PWD_MKDB=${PWD_MKDB:Q}
.endif
FILES_SUBST+= MKTEMP=${MKTEMP:Q}
FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
INSTALLATION_DIRS+= ${DOCDIR} ${EGDIR}
DOCDIR= share/doc/${PKGBASE}
EGDIR= share/examples/${PKGBASE}
CONF_FILES= ${PREFIX}/${EGDIR}/smb.conf.default ${SMB_CONFIG}/smb.conf
OWN_DIRS_PERMS= ${SMB_PRIVATE} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
RCD_SCRIPTS+= samba nmbd smbd ${WINBINDD_RCD_SCRIPT}
SUBST_CLASSES+= docbook
SUBST_MESSAGE.docbook= Fixing docbook URLs.
SUBST_FILES.docbook+= buildtools/wafsamba/wafsamba.py
SUBST_FILES.docbook+= ctdb/doc/*.xml
SUBST_FILES.docbook+= docs-xml/build/DTD/samba-doc
SUBST_FILES.docbook+= docs-xml/xslt/*.xsl
SUBST_FILES.docbook+= lib/ldb/docs/builddocs.sh
SUBST_FILES.docbook+= librpc/tools/*.xml
SUBST_FILES.docbook+= */*/man/*.xml
SUBST_FILES.docbook+= */*/*/man/*.xml
SUBST_STAGE.docbook= pre-configure
SUBST_SED.docbook= -e 's,http://www.oasis-open.org/docbook/xml,${PREFIX}/share/xml/docbook,g'
SUBST_SED.docbook+= -e 's,http://docbook.sourceforge.net/release/xsl/current,${PREFIX}/share/xsl/docbook,g'
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing paths.
SUBST_FILES.paths= ${WRKDIR}/adduser.sh ${WRKDIR}/deluser.sh
SUBST_FILES.paths+= source3/script/findsmb.in source4/heimdal_build/roken.h
SUBST_STAGE.paths= pre-configure
SUBST_SED.paths+= -e 's,@PERL@,${PERL5},g'
SUBST_VARS.paths= AWK CAT MKTEMP RM PWD_MKDB SH PERL PKG_SYSCONFBASE
SUBST_CLASSES+= logpath
SUBST_MESSAGE.logpath= Fixing log path.
SUBST_FILES.logpath= examples/smb.conf.default
SUBST_STAGE.logpath= pre-configure
SUBST_SED.logpath+= -e 's,/usr/local/samba/var/log.%m,${SMB_LOGFILEBASE}/log.%m,g'
SMF_INSTANCES= smbd nmbd
CTF_FILES_SKIP+= lib/libdcerpc-samr.so.* # empty
post-extract:
${CP} ${FILESDIR}/adduser.sh ${FILESDIR}/deluser.sh ${WRKDIR}
post-install:
${RUN} cd ${WRKSRC}/docs-xml/registry; for f in *.reg; do \
${INSTALL_DATA} $${f} ${DESTDIR}${PREFIX}/${DOCDIR}/$${f}; \
done
${INSTALL_SCRIPT} ${WRKDIR}/adduser.sh \
${DESTDIR}${PREFIX}/${EGDIR}/adduser.sh
${INSTALL_SCRIPT} ${WRKDIR}/deluser.sh \
${DESTDIR}${PREFIX}/${EGDIR}/deluser.sh
${INSTALL_DATA} ${WRKSRC}/examples/LDAP/samba.schema \
${DESTDIR}${PREFIX}/${EGDIR}
${INSTALL_DATA} ${WRKSRC}/examples/smb.conf.default \
${DESTDIR}${PREFIX}/${EGDIR}
REPLACE_PERL+= librpc/tables.pl
REPLACE_PERL+= pidl/pidl
REPLACE_PERL+= pidl/tests/*.pl
REPLACE_PERL+= script/*.pl
REPLACE_PERL+= source3/script/*.pl
REPLACE_PERL+= source4/build/pasn1/pasn1.pl
REPLACE_PERL+= source4/script/*.pl
REPLACE_PERL+= third_party/nss_wrapper/nss_wrapper.pl
REPLACE_PYTHON+= buildtools/bin/waf
REPLACE_PYTHON+= source4/setup/wscript_build
REPLACE_PYTHON+= source4/scripting/bin/*
.if "${OPSYS}" == "Linux"
.include "../../devel/libuuid/buildlink3.mk"
.endif
.include "../../archivers/libarchive/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
BUILDLINK_API_DEPENDS.ldb+= ldb>=2.2.0
.include "../../databases/ldb/buildlink3.mk"
.include "../../databases/lmdb/buildlink3.mk"
.include "../../devel/cmocka/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/popt/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
BUILDLINK_API_DEPENDS.talloc+= talloc>=2.2.0
.include "../../devel/talloc/buildlink3.mk"
.include "../../devel/tevent/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../security/gnutls/buildlink3.mk"
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../textproc/jansson/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"