summaryrefslogtreecommitdiff
path: root/net/samba4
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2022-07-29 20:33:38 +0000
committerjperkin <jperkin@pkgsrc.org>2022-07-29 20:33:38 +0000
commit79bd1c4b25f58614a1b8fdfa62b9c78125f03e66 (patch)
treefb6198e5ec156d9f3bbd972302370e2afb6d29c5 /net/samba4
parentacb16725e60a49c864c461c3063fd88451c1b016 (diff)
downloadpkgsrc-79bd1c4b25f58614a1b8fdfa62b9c78125f03e66.tar.gz
samba4: Add support for mit-krb5.
The builtin heimdal no longer builds and it's unclear how it can possibly work as it uses functions that do not exist anywhere. Also fix some SunOS build issues. I'm not convinced this won't break builds that use heimdal but will keep an eye out for failures.
Diffstat (limited to 'net/samba4')
-rw-r--r--net/samba4/Makefile14
-rw-r--r--net/samba4/PLIST16
-rw-r--r--net/samba4/PLIST.heimdal15
-rw-r--r--net/samba4/PLIST.mit-krb54
-rw-r--r--net/samba4/distinfo4
-rw-r--r--net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c55
-rw-r--r--net/samba4/patches/patch-third__party_heimdal_lib_roken_getauxval.h15
7 files changed, 105 insertions, 18 deletions
diff --git a/net/samba4/Makefile b/net/samba4/Makefile
index 1ddee7faa81..36458ab93f7 100644
--- a/net/samba4/Makefile
+++ b/net/samba4/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.146 2022/07/27 08:23:04 dogcow Exp $
+# $NetBSD: Makefile,v 1.147 2022/07/29 20:33:38 jperkin Exp $
DISTNAME= samba-4.16.3
CATEGORIES= net
@@ -101,6 +101,16 @@ CONFIGURE_ARGS+= --jobs=1
.endif
CONFIGURE_ARGS+= --without-gpgme
+.include "../../mk/krb5.buildlink3.mk"
+
+PLIST_SRC= ${PLIST_SRC_DFLT}
+PLIST_SRC+= PLIST.${KRB5_TYPE}
+
+.if ${KRB5_TYPE} == "mit-krb5"
+CONFIGURE_ARGS+= --with-system-mitkrb5 --with-experimental-mit-ad-dc
+CONFIGURE_ARGS+= --with-system-mitkdc=${KRB5BASE}/sbin/krb5kdc
+.endif
+
# Depends on ncurses, explicitly disable for now.
CONFIGURE_ARGS+= --without-regedit
@@ -117,7 +127,7 @@ 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
+LDFLAGS.SunOS+= -lsocket -lsendfile
.include "options.mk"
diff --git a/net/samba4/PLIST b/net/samba4/PLIST
index bddca17042d..264b67839c8 100644
--- a/net/samba4/PLIST
+++ b/net/samba4/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.44 2022/07/21 09:35:19 adam Exp $
+@comment $NetBSD: PLIST,v 1.45 2022/07/29 20:33:38 jperkin Exp $
bin/cifsdd
bin/dbwrap_tool
bin/dumpmscat
@@ -672,7 +672,6 @@ ${PLIST.ads}lib/samba/nss_info/rfc2307.${SOEXT}
${PLIST.ads}lib/samba/nss_info/sfu.${SOEXT}
${PLIST.ads}lib/samba/nss_info/sfu20.${SOEXT}
lib/samba/private/libCHARSET3-samba4.so
-${PLIST.ads}lib/samba/private/libHDB-SAMBA4-samba4.so
lib/samba/private/libLIBWBCLIENT-OLD-samba4.so
lib/samba/private/libMESSAGING-SEND-samba4.so
lib/samba/private/libMESSAGING-samba4.so
@@ -681,7 +680,6 @@ lib/samba/private/libRPC-SERVER-LOOP-samba4.so
lib/samba/private/libRPC-WORKER-samba4.so
lib/samba/private/libaddns-samba4.so
lib/samba/private/libads-samba4.so
-lib/samba/private/libasn1-samba4.so
lib/samba/private/libasn1util-samba4.so
lib/samba/private/libauth-samba4.so
lib/samba/private/libauth-unix-token-samba4.so
@@ -698,7 +696,6 @@ lib/samba/private/libclidns-samba4.so
lib/samba/private/libcluster-samba4.so
lib/samba/private/libcmdline-contexts-samba4.so
lib/samba/private/libcmdline-samba4.so
-lib/samba/private/libcom-err-samba4.so
lib/samba/private/libcommon-auth-samba4.so
${PLIST.ads}lib/samba/private/libdb-glue-samba4.so
lib/samba/private/libdbwrap-samba4.so
@@ -717,19 +714,10 @@ lib/samba/private/libgensec-samba4.so
lib/samba/private/libgpext-samba4.so
lib/samba/private/libgpo-samba4.so
lib/samba/private/libgse-samba4.so
-lib/samba/private/libgss-preauth-samba4.so
-lib/samba/private/libgssapi-samba4.so
-lib/samba/private/libhcrypto-samba4.so
-lib/samba/private/libhdb-samba4.so
-lib/samba/private/libheimbase-samba4.so
-lib/samba/private/libheimntlm-samba4.so
lib/samba/private/libhttp-samba4.so
-lib/samba/private/libhx509-samba4.so
lib/samba/private/libidmap-samba4.so
lib/samba/private/libinterfaces-samba4.so
lib/samba/private/libiov-buf-samba4.so
-lib/samba/private/libkdc-samba4.so
-lib/samba/private/libkrb5-samba4.so
lib/samba/private/libkrb5samba-samba4.so
lib/samba/private/libldbsamba-samba4.so
lib/samba/private/liblibcli-lsa3-samba4.so
@@ -753,7 +741,6 @@ lib/samba/private/libprinting-migrate-samba4.so
${PLIST.ads}lib/samba/private/libprocess-model-samba4.so
lib/samba/private/libregistry-samba4.so
lib/samba/private/libreplace-samba4.so
-lib/samba/private/libroken-samba4.so
lib/samba/private/libsamba-cluster-support-samba4.so
lib/samba/private/libsamba-debug-samba4.so
lib/samba/private/libsamba-modules-samba4.so
@@ -786,7 +773,6 @@ lib/samba/private/libtrusts-util-samba4.so
lib/samba/private/libutil-reg-samba4.so
lib/samba/private/libutil-setid-samba4.so
lib/samba/private/libutil-tdb-samba4.so
-lib/samba/private/libwind-samba4.so
lib/samba/private/libxattr-tdb-samba4.so
${PLIST.ads}lib/samba/process_model/prefork.${SOEXT}
${PLIST.ads}lib/samba/process_model/standard.${SOEXT}
diff --git a/net/samba4/PLIST.heimdal b/net/samba4/PLIST.heimdal
new file mode 100644
index 00000000000..016bc98c3c8
--- /dev/null
+++ b/net/samba4/PLIST.heimdal
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST.heimdal,v 1.1 2022/07/29 20:33:38 jperkin Exp $
+${PLIST.ads}lib/samba/private/libHDB-SAMBA4-samba4.so
+lib/samba/private/libasn1-samba4.so
+lib/samba/private/libcom-err-samba4.so
+lib/samba/private/libgss-preauth-samba4.so
+lib/samba/private/libgssapi-samba4.so
+lib/samba/private/libhcrypto-samba4.so
+lib/samba/private/libhdb-samba4.so
+lib/samba/private/libheimbase-samba4.so
+lib/samba/private/libheimntlm-samba4.so
+lib/samba/private/libhx509-samba4.so
+lib/samba/private/libkdc-samba4.so
+lib/samba/private/libkrb5-samba4.so
+lib/samba/private/libroken-samba4.so
+lib/samba/private/libwind-samba4.so
diff --git a/net/samba4/PLIST.mit-krb5 b/net/samba4/PLIST.mit-krb5
new file mode 100644
index 00000000000..28aa7a4fa6f
--- /dev/null
+++ b/net/samba4/PLIST.mit-krb5
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST.mit-krb5,v 1.1 2022/07/29 20:33:38 jperkin Exp $
+lib/krb5/plugins/kdb/samba.so
+lib/samba/krb5/winbind_krb5_localauth.so
+man/man8/winbind_krb5_localauth.8
diff --git a/net/samba4/distinfo b/net/samba4/distinfo
index fab76a50c69..499d1df5e36 100644
--- a/net/samba4/distinfo
+++ b/net/samba4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.78 2022/07/21 09:35:19 adam Exp $
+$NetBSD: distinfo,v 1.79 2022/07/29 20:33:38 jperkin Exp $
BLAKE2s (samba-4.16.3.tar.gz) = 465d98b2aaec2d305d81e38d6d61de0b1f5061802aeba284a9df52e83f0ee05c
SHA512 (samba-4.16.3.tar.gz) = 8f082654251e6a3284ba8f411c55b854dc00a9c6b07c486ca01f53af2b6ec09d34c21d66a2a1afc7a8c62a9f715c643c1a22fc7688699d23f8fcafe6995b5ebd
@@ -17,6 +17,7 @@ SHA1 (patch-lib_tdb_common_mutex.c) = 74162bf9dfd440fc0b9782982e83776c9671a983
SHA1 (patch-lib_tevent_tevent.c) = dc782c5b7214abf52a4c8c242018b1989bca08e3
SHA1 (patch-lib_tevent_tevent__threads.c) = e5e82db82cff4d550451cd9290b3a351b25d4de4
SHA1 (patch-lib_tevent_wscript) = fbbe2024096b57d651d90064f53489a974db9d7a
+SHA1 (patch-lib_tsocket_tsocket__bsd.c) = 0ac414e02ee3a326d3dd34515bfffce6e8da5e46
SHA1 (patch-lib_util_charset_charset__macosxfs.c) = 9772fc52fff48aec2a7e279223f73bb791217c26
SHA1 (patch-lib_util_smb__threads.h) = 817591a2b69f31ac29497a2006fe21f0b4b0aaea
SHA1 (patch-lib_util_tfork.c) = a9acb5561c5bba76450c48904a22019c8b14cbec
@@ -37,3 +38,4 @@ SHA1 (patch-source4_scripting_wsript_build) = 816d44f48b6cbc6d999995e00eaea1d2dc
SHA1 (patch-source4_utils_oLschema2ldif_wscript__build) = cbba15c2c0e1eee9d07424510a96b596f46992b4
SHA1 (patch-third__party_heimdal__build_roken.h) = 59d5523676fe8c0315e969247f26b4ea2f900402
SHA1 (patch-third__party_heimdal_include_heim__threads.h) = 5ad13530cf9688e46f9ad487bb0fddab668c8276
+SHA1 (patch-third__party_heimdal_lib_roken_getauxval.h) = 23c9cf574d9f042c9f6dd1b0377c91045e755b5b
diff --git a/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c b/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c
new file mode 100644
index 00000000000..4dcba53d45e
--- /dev/null
+++ b/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c
@@ -0,0 +1,55 @@
+$NetBSD: patch-lib_tsocket_tsocket__bsd.c,v 1.3 2022/07/29 20:33:38 jperkin Exp $
+
+Avoid s_addr macro.
+
+--- lib/tsocket/tsocket_bsd.c.orig 2022-01-24 10:26:58.933306500 +0000
++++ lib/tsocket/tsocket_bsd.c
+@@ -457,7 +457,7 @@ int _tsocket_address_inet_from_hostport_
+ char *buf = NULL;
+ uint64_t port = 0;
+ int ret;
+- char *s_addr = NULL;
++ char *sun_addr = NULL;
+ uint16_t s_port = default_port;
+ bool conv_ret;
+ bool is_ipv6_by_squares = false;
+@@ -486,7 +486,7 @@ int _tsocket_address_inet_from_hostport_
+ /* IPv6 possibly with port - squares detected */
+ port_sep = pr_sq + 1;
+ if (*port_sep == '\0') {
+- s_addr = pl_sq + 1;
++ sun_addr = pl_sq + 1;
+ *pr_sq = 0;
+ s_port = default_port;
+ goto get_addr;
+@@ -508,7 +508,7 @@ int _tsocket_address_inet_from_hostport_
+ s_port = (uint16_t)port;
+ *port_sep = 0;
+ *pr_sq = 0;
+- s_addr = pl_sq + 1;
++ sun_addr = pl_sq + 1;
+ *pl_sq = 0;
+ goto get_addr;
+ } else if (pl_period != NULL && port_sep != NULL) {
+@@ -525,18 +525,18 @@ int _tsocket_address_inet_from_hostport_
+ }
+ s_port = (uint16_t)port;
+ *port_sep = 0;
+- s_addr = buf;
++ sun_addr = buf;
+ goto get_addr;
+ } else {
+ /* Everything else, let tsocket_address_inet_from string() */
+ /* find parsing errors */
+- s_addr = buf;
++ sun_addr = buf;
+ s_port = default_port;
+ goto get_addr;
+ }
+ get_addr:
+ ret = _tsocket_address_inet_from_strings(
+- mem_ctx, fam, s_addr, s_port, _addr, location);
++ mem_ctx, fam, sun_addr, s_port, _addr, location);
+
+ return ret;
+ }
diff --git a/net/samba4/patches/patch-third__party_heimdal_lib_roken_getauxval.h b/net/samba4/patches/patch-third__party_heimdal_lib_roken_getauxval.h
new file mode 100644
index 00000000000..871a74861f2
--- /dev/null
+++ b/net/samba4/patches/patch-third__party_heimdal_lib_roken_getauxval.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-third__party_heimdal_lib_roken_getauxval.h,v 1.1 2022/07/29 20:33:38 jperkin Exp $
+
+Avoid auxv_t conflict on SunOS.
+
+--- third_party/heimdal/lib/roken/getauxval.h.orig 2022-01-24 10:27:00.525315000 +0000
++++ third_party/heimdal/lib/roken/getauxval.h
+@@ -44,7 +44,7 @@
+ #include <sys/exec_elf.h>
+ #endif
+
+-#ifndef HAVE_AUXV_T
++#if !defined(HAVE_AUXV_T) && !defined(__sun)
+ /*
+ * Illumos defines auxv_t per the ABI standards, but all other OSes seem
+ * to use { long; long; } instead, depends on sizeof(long) ==