summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin>2015-06-26 16:09:49 +0000
committerjperkin <jperkin>2015-06-26 16:09:49 +0000
commit91c52099abc4856c9d340a50a03986c9c13fa688 (patch)
tree29601a8fa8a3646c34a685905751ae05e3436e99
parent81d9e5bcd429ad594bad827fd1fbe0125c64a29f (diff)
downloadpkgsrc-91c52099abc4856c9d340a50a03986c9c13fa688.tar.gz
Attempt to fix various build issues:
- Explicitly disable samba-regedit for now, it is built depending on various curses characteristics that we do not currently support. - Avoid epoll implementation on SmartOS. - Pull in Active Directory and LDAP options from net/samba, LDAP support is dynamically configured and we need to ensure that, if enabled, we correctly pull in openldap. The SunOS native LDAP is missing some TLS functions that Samba depends upon. Tested with various PKG_OPTIONS combinations, fixes build on SmartOS.
-rw-r--r--net/samba4/Makefile5
-rw-r--r--net/samba4/PLIST22
-rw-r--r--net/samba4/distinfo8
-rw-r--r--net/samba4/options.mk32
-rw-r--r--net/samba4/patches/patch-lib_replace_wscript17
-rw-r--r--net/samba4/patches/patch-lib_tevent_wscript15
-rw-r--r--net/samba4/patches/patch-source4_scripting_wsript_build6
-rw-r--r--net/samba4/patches/patch-testprogs_blackbox_dbcheck-oldrelease.sh8
8 files changed, 88 insertions, 25 deletions
diff --git a/net/samba4/Makefile b/net/samba4/Makefile
index 341a8518420..ade40fb376d 100644
--- a/net/samba4/Makefile
+++ b/net/samba4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2015/06/12 10:50:53 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2015/06/26 16:09:49 jperkin Exp $
DISTNAME= samba-${VERSION}
PKGREVISION= 4
@@ -97,6 +97,9 @@ CONFIGURE_ARGS+= --jobs=${MAKE_JOBS}
CONFIGURE_ARGS+= --jobs=1
.endif
+# Depends on ncurses, explicitly disable for now.
+CONFIGURE_ARGS+= --without-regedit
+
# for winbind option build.
.if ${OPSYS} != "SunOS"
LDFLAGS+= -Wl,--allow-shlib-undefined
diff --git a/net/samba4/PLIST b/net/samba4/PLIST
index 6f61a8ebb39..3f237dced53 100644
--- a/net/samba4/PLIST
+++ b/net/samba4/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.2 2015/06/26 16:09:49 jperkin Exp $
bin/cifsdd
bin/dbwrap_tool
bin/eventlogadm
@@ -128,7 +128,7 @@ include/smb_cliraw.h
include/smb_common.h
include/smb_composite.h
include/smb_constants.h
-include/smb_ldap.h
+${PLIST.ldap}include/smb_ldap.h
include/smb_raw.h
include/smb_raw_interfaces.h
include/smb_raw_signing.h
@@ -139,7 +139,7 @@ include/smb_signing.h
include/smb_unix_ext.h
include/smb_util.h
include/smbconf.h
-include/smbldap.h
+${PLIST.ldap}include/smbldap.h
include/tdr.h
include/torture.h
include/tsocket.h
@@ -225,8 +225,8 @@ lib/libsmbclient.so.0
lib/libsmbclient.so.0.2.1
lib/libsmbconf.so
lib/libsmbconf.so.0
-lib/libsmbldap.so
-lib/libsmbldap.so.0
+${PLIST.ldap}lib/libsmbldap.so
+${PLIST.ldap}lib/libsmbldap.so.0
lib/libtevent-util.so
lib/libtevent-util.so.0
lib/libtevent-util.so.0.0.1
@@ -607,10 +607,10 @@ ${PYSITELIB}/talloc.so
${PYSITELIB}/tdb.so
${PYSITELIB}/tevent.py
lib/samba/auth/script.so
-lib/samba/idmap/ad.so
+${PLIST.ldap}lib/samba/idmap/ad.so
lib/samba/idmap/autorid.so
lib/samba/idmap/hash.so
-lib/samba/idmap/rfc2307.so
+${PLIST.ldap}lib/samba/idmap/rfc2307.so
lib/samba/idmap/rid.so
lib/samba/idmap/tdb2.so
lib/samba/ldb/asq.so
@@ -624,9 +624,9 @@ lib/samba/ldb/server_sort.so
lib/samba/ldb/skel.so
lib/samba/ldb/tdb.so
lib/samba/nss_info/hash.so
-lib/samba/nss_info/rfc2307.so
-lib/samba/nss_info/sfu.so
-lib/samba/nss_info/sfu20.so
+${PLIST.ldap}lib/samba/nss_info/rfc2307.so
+${PLIST.ldap}lib/samba/nss_info/sfu.so
+${PLIST.ldap}lib/samba/nss_info/sfu20.so
lib/samba/private/libCHARSET3-samba4.so
lib/samba/private/libLIBWBCLIENT-OLD-samba4.so
lib/samba/private/libMESSAGING-samba4.so
@@ -703,7 +703,7 @@ lib/samba/private/libsmb-transport-samba4.so
lib/samba/private/libsmbd-base-samba4.so
lib/samba/private/libsmbd-conn-samba4.so
lib/samba/private/libsmbd-shim-samba4.so
-lib/samba/private/libsmbldaphelper-samba4.so
+${PLIST.ldap}lib/samba/private/libsmbldaphelper-samba4.so
lib/samba/private/libsmbpasswdparser-samba4.so
lib/samba/private/libsmbregistry-samba4.so
lib/samba/private/libsocket-blocking-samba4.so
diff --git a/net/samba4/distinfo b/net/samba4/distinfo
index e6fb17e685d..8e570ffe914 100644
--- a/net/samba4/distinfo
+++ b/net/samba4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2015/05/26 15:11:25 jperkin Exp $
+$NetBSD: distinfo,v 1.3 2015/06/26 16:09:49 jperkin Exp $
SHA1 (samba-4.2.1.tar.gz) = f5d0471efc459898344866b5bc518c80ce67e8d5
RMD160 (samba-4.2.1.tar.gz) = 539f915c0c80cf67b8a73b6d7924804609801fb8
@@ -6,6 +6,8 @@ Size (samba-4.2.1.tar.gz) = 20701467 bytes
SHA1 (patch-buildtools_wafsamba_wscript) = 5604936a825675647157331df2333f4237c611f5
SHA1 (patch-lib_nss__wrapper_nss__wrapper.c) = c692fa33ec17ed4f1dc1e40c1fadf7846d976824
SHA1 (patch-lib_nss__wrapper_wscript) = 1ce37974f93e791c9e0b1bdc34d26890583fdbfb
+SHA1 (patch-lib_replace_wscript) = b6a042c2c13c0be78d7b64c0ce2efdaf4bbb1f3b
+SHA1 (patch-lib_tevent_wscript) = 9617b9e40d2ffc8d6297390a20ba9bd44147d669
SHA1 (patch-nsswitch_wscript__build) = e8a6251e031ffa13d6347fade8891f7afd65d3eb
-SHA1 (patch-source4_scripting_wsript_build) = 91c99acc8cbadbd8d19400d466491c1da3e42527
-SHA1 (patch-testprogs_blackbox_dbcheck-oldrelease.sh) = c651014e5e703041a5bcf83f71a1d36c3f5f3309
+SHA1 (patch-source4_scripting_wsript_build) = 6053076427835ac4fe97d93b2ff67d2caccc71f4
+SHA1 (patch-testprogs_blackbox_dbcheck-oldrelease.sh) = 3448ae91a57123ac820d71892851b165477bc499
diff --git a/net/samba4/options.mk b/net/samba4/options.mk
index ceda523f8cd..a68cedc962c 100644
--- a/net/samba4/options.mk
+++ b/net/samba4/options.mk
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+# $NetBSD: options.mk,v 1.2 2015/06/26 16:09:49 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.samba4
-PKG_SUPPORTED_OPTIONS= fam pam winbind # cups # cups option is broken for me.
-PKG_SUGGESTED_OPTIONS= pam winbind
+PKG_SUPPORTED_OPTIONS= ads fam ldap pam winbind # cups # cups option is broken for me.
+PKG_SUGGESTED_OPTIONS= ldap pam winbind
.include "../../mk/bsd.fast.prefs.mk"
@@ -11,6 +11,10 @@ SAMBA_ACL_OPSYS= AIX Darwin FreeBSD HPUX IRIX Linux OSF1 SunOS
PKG_SUPPORTED_OPTIONS+= acl
.endif
+.if empty(MACHINE_PLATFORM:MDarwin-1[1-9].*)
+PKG_SUGGESTED_OPTIONS+= ads
+.endif
+
.include "../../mk/bsd.options.mk"
###
@@ -23,6 +27,15 @@ CONFIGURE_ARGS+= --without-acl-support
.endif
###
+### Allow Samba to join as a member server of an Active Directory domain.
+###
+.if !empty(PKG_OPTIONS:Mads)
+CONFIGURE_ARGS+= --with-ads
+.else
+CONFIGURE_ARGS+= --without-ads
+.endif
+
+###
### Native CUPS support for providing printing services.
###
PLIST_VARS+= cups
@@ -48,6 +61,19 @@ CONFIGURE_ARGS+= --without-fam
.endif
###
+### Support LDAP authentication and storage of Samba account information.
+###
+PLIST_VARS+= ldap
+# Active Directory requires ldap
+.if !empty(PKG_OPTIONS:Mldap) || !empty(PKG_OPTIONS:Mads)
+. include "../../databases/openldap-client/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ldap
+PLIST.ldap= yes
+.else
+CONFIGURE_ARGS+= --without-ldap
+.endif
+
+###
### Support PAM authentication and build smbpass and winbind PAM modules.
###
PLIST_VARS+= pam
diff --git a/net/samba4/patches/patch-lib_replace_wscript b/net/samba4/patches/patch-lib_replace_wscript
new file mode 100644
index 00000000000..ec1f22307d9
--- /dev/null
+++ b/net/samba4/patches/patch-lib_replace_wscript
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_replace_wscript,v 1.1 2015/06/26 16:09:49 jperkin Exp $
+
+Skip epoll tests on SunOS, implementation is Linux-specific.
+
+--- lib/replace/wscript.orig 2015-04-15 18:00:13.000000000 +0000
++++ lib/replace/wscript
+@@ -283,7 +283,9 @@ def configure(conf):
+ conf.CHECK_FUNCS('gai_strerror get_current_dir_name')
+ conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid')
+ conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')
+- conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
++ conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r')
++ if not sys.platform.startswith('sunos'):
++ conf.CHECK_FUNCS('epoll_create')
+ conf.CHECK_FUNCS('port_create')
+
+ conf.SET_TARGET_TYPE('attr', 'EMPTY')
diff --git a/net/samba4/patches/patch-lib_tevent_wscript b/net/samba4/patches/patch-lib_tevent_wscript
new file mode 100644
index 00000000000..65bb8c5cf67
--- /dev/null
+++ b/net/samba4/patches/patch-lib_tevent_wscript
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_tevent_wscript,v 1.1 2015/06/26 16:09:49 jperkin Exp $
+
+Skip epoll tests on SunOS, implementation is Linux-specific.
+
+--- lib/tevent/wscript.orig 2015-03-04 19:50:43.000000000 +0000
++++ lib/tevent/wscript
+@@ -41,7 +41,7 @@ def configure(conf):
+ if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
+ conf.define('USING_SYSTEM_PYTEVENT', 1)
+
+- if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
++ if not sys.platform.startswith('sunos') and conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
+ conf.DEFINE('HAVE_EPOLL', 1)
+
+ tevent_num_signals = 64
diff --git a/net/samba4/patches/patch-source4_scripting_wsript_build b/net/samba4/patches/patch-source4_scripting_wsript_build
index 230cd5b07c0..c9cf8d30245 100644
--- a/net/samba4/patches/patch-source4_scripting_wsript_build
+++ b/net/samba4/patches/patch-source4_scripting_wsript_build
@@ -1,11 +1,11 @@
-$NetBSD: patch-source4_scripting_wsript_build,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+$NetBSD: patch-source4_scripting_wsript_build,v 1.2 2015/06/26 16:09:49 jperkin Exp $
Avoid getting strange ending # character on interpreter
name like:
#!/usr/pkg/bin/python2.7#
---- source4/scripting/wscript_build.orig 2013-04-09 17:14:59.000000000 +0900
-+++ source4/scripting/wscript_build 2013-06-07 20:41:22.000000000 +0900
+--- source4/scripting/wscript_build.orig 2014-10-01 09:16:21.000000000 +0000
++++ source4/scripting/wscript_build
@@ -9,7 +9,7 @@ if bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLE
if sbin_files:
bld.INSTALL_FILES('${SBINDIR}',
diff --git a/net/samba4/patches/patch-testprogs_blackbox_dbcheck-oldrelease.sh b/net/samba4/patches/patch-testprogs_blackbox_dbcheck-oldrelease.sh
index 8cec8a6076b..d5b33f00f0f 100644
--- a/net/samba4/patches/patch-testprogs_blackbox_dbcheck-oldrelease.sh
+++ b/net/samba4/patches/patch-testprogs_blackbox_dbcheck-oldrelease.sh
@@ -1,10 +1,10 @@
-$NetBSD: patch-testprogs_blackbox_dbcheck-oldrelease.sh,v 1.1 2015/05/12 12:19:52 ryoon Exp $
+$NetBSD: patch-testprogs_blackbox_dbcheck-oldrelease.sh,v 1.2 2015/06/26 16:09:49 jperkin Exp $
ERROR: [check-portability.awk]
---- testprogs/blackbox/dbcheck-oldrelease.sh.orig 2013-09-27 19:35:31.000000000 +0900
-+++ testprogs/blackbox/dbcheck-oldrelease.sh 2013-11-02 11:59:48.000000000 +0900
-@@ -55,19 +55,19 @@ dbcheck_acl_reset_clean() {
+--- testprogs/blackbox/dbcheck-oldrelease.sh.orig 2014-10-01 09:16:22.000000000 +0000
++++ testprogs/blackbox/dbcheck-oldrelease.sh
+@@ -178,19 +178,19 @@ dbcheck_clean2() {
}
referenceprovision() {