Here is a backport of samba-4.8.11 to OpenBSD 6.4, including the various
improvements that happened in -current (PLIST and WANTLIB fixup, rc.d
pexp).

SHARED_LIBS minor bumps due to symbol additions.  I'm cheating here
since libsmbconf lost three symbols in the 4.8.7->4.8.9 update:

--8<--
Dynamic export changes:
 removed:
        messaging_init_client@@SMBCONF_4.1
        server_event_ctx@@SMBCONF_4.1
        server_msg_ctx@@SMBCONF_4.1
-->8--

Those were private symbols removed/hidden in the following commits:
  
https://git.samba.org/?p=samba.git;a=commitdiff;h=18cd5c525eddcf260d4b9294ae13a03d0638aa2c
  
https://git.samba.org/?p=samba.git;a=commitdiff;h=a81799cf627e98152eca2dc2667ad16f475d85fb

I don't expect x11/kde/base3 (the only registered libsmbconf consumer)
to be affected.

Feedback, build and test reports welcome.


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/samba/Makefile,v
retrieving revision 1.260.2.2
diff -u -p -r1.260.2.2 Makefile
--- Makefile    27 Nov 2018 10:18:06 -0000      1.260.2.2
+++ Makefile    12 Apr 2019 10:33:53 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile,v 1.260.2.2 2018/11/27 10:18:06 jca Exp $
 
-VERSION =              4.8.7
+VERSION =              4.8.11
 DISTNAME =             samba-${VERSION}
 
 COMMENT-main =         SMB and CIFS client and server for UNIX
@@ -20,8 +20,8 @@ PKG_ARCH-docs =               *
 LDB_V =                        1.3.6
 TEVENT_V =             0.9.36
 
-REVISION-ldb =         2
-REVISION-tevent =      4
+REVISION-ldb =         3
+REVISION-tevent =      5
 
 SHARED_LIBS =          asn1-samba4             0.0 \
                        com_err-samba4          0.0 \
@@ -48,12 +48,12 @@ SHARED_LIBS =               asn1-samba4             0.0 \
                        samba-credentials       0.2 \
                        samba-errors            1.0 \
                        samba-hostconfig        4.0 \
-                       samba-passdb            2.0 \
+                       samba-passdb            2.1 \
                        samba-policy            0.0 \
                        samba-util              3.2 \
                        samdb                   0.1 \
                        smbclient               4.2 \
-                       smbconf                 4.1 \
+                       smbconf                 4.2 \
                        smbldap                 0.1 \
                        tevent                  0.4 \
                        tevent-util             1.0 \
@@ -80,17 +80,17 @@ UTIL_WANTLIB =              ${UTIL_LIBS:S@^@lib/samb
 WANTLIB-common =       c pthread
 
 WANTLIB-main =         ${WANTLIB-common} ${MODPY_WANTLIB}
-WANTLIB-main +=                z
+WANTLIB-main +=                crypto curses m util z
 WANTLIB-main +=                avahi-client avahi-common cups dbus-1 execinfo 
fam
 WANTLIB-main +=                iconv intl jansson lber ldap pam popt gnutls
-WANTLIB-main +=                ldb pyldb-util pytalloc-util tdb talloc tevent
+WANTLIB-main +=                ldb pyldb-util pytalloc-util readline tdb 
talloc tevent
 WANTLIB-main +=                ${UTIL_WANTLIB}
 
 WANTLIB-ldb =          ${WANTLIB-common} ${MODPY_WANTLIB}
-WANTLIB-ldb +=         popt talloc tevent
+WANTLIB-ldb +=         lber ldap popt m talloc tdb tevent util
 
 WANTLIB-tevent =       ${WANTLIB-common} ${MODPY_WANTLIB}
-WANTLIB-tevent +=      talloc
+WANTLIB-tevent +=      m talloc util
 
 WANTLIB-util =         ${WANTLIB-common}
 
@@ -122,6 +122,7 @@ LIB_DEPENDS-main =  ${BUILD_PKGPATH},-ldb
                        devel/jansson \
                        devel/libexecinfo \
                        devel/libtalloc>=2.1.9 \
+                       devel/popt \
                        net/avahi \
                        print/cups,-libs \
                        security/gnutls \
@@ -129,8 +130,10 @@ LIB_DEPENDS-main = ${BUILD_PKGPATH},-ldb
                        sysutils/gamin
 
 LIB_DEPENDS-ldb =      ${BUILD_PKGPATH},-tevent>=${TEVENT_V} \
-                       devel/libtalloc>=2.1.9 \
-                       devel/popt
+                       devel/popt \
+                       databases/openldap \
+                       databases/tdb>=1.3.14 \
+                       devel/libtalloc>=2.1.9
 
 LIB_DEPENDS-tevent =   devel/libtalloc>=2.1.9
 
@@ -172,6 +175,8 @@ WAF =                       ${WRKSRC}/buildtools/bin/waf
 WAF_ARGS =             -v -j ${MAKE_JOBS}
 
 CONFIGURE_ENV =                LC_ALL=en_US.UTF-8 \
+                       CFLAGS="${CFLAGS}" \
+                       LDFLAGS="${LDFLAGS}" \
                        CPP="/usr/libexec/cpp"
 
 MAKE_ENV =             LC_ALL=en_US.UTF-8 \
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/samba/distinfo,v
retrieving revision 1.71.2.2
diff -u -p -r1.71.2.2 distinfo
--- distinfo    27 Nov 2018 10:18:06 -0000      1.71.2.2
+++ distinfo    12 Apr 2019 10:33:53 -0000
@@ -1,2 +1,2 @@
-SHA256 (samba-4.8.7.tar.gz) = D29nky6Lsjq4O0MHADesRS+fxfIHY4V9K2fiCe5802I=
-SIZE (samba-4.8.7.tar.gz) = 17724232
+SHA256 (samba-4.8.11.tar.gz) = 0pSo10VdfSUte6/JxHSFXqbg6+VZw7q80wOlwk5YcQo=
+SIZE (samba-4.8.11.tar.gz) = 17761896
Index: patches/patch-source3_wscript
===================================================================
RCS file: /cvs/ports/net/samba/patches/patch-source3_wscript,v
retrieving revision 1.7
diff -u -p -r1.7 patch-source3_wscript
--- patches/patch-source3_wscript       11 Jun 2018 11:59:51 -0000      1.7
+++ patches/patch-source3_wscript       12 Apr 2019 10:33:53 -0000
@@ -15,7 +15,7 @@ Index: source3/wscript
          conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)
  
      # We crash without vfs_default
-@@ -1531,6 +1531,7 @@ main() {
+@@ -1534,6 +1534,7 @@ main() {
  
      conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }',
                      'SEEKDIR_RETURNS_VOID',
Index: patches/patch-source3_wscript_build
===================================================================
RCS file: patches/patch-source3_wscript_build
diff -N patches/patch-source3_wscript_build
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-source3_wscript_build 12 Apr 2019 10:33:53 -0000
@@ -0,0 +1,22 @@
+$OpenBSD: patch-source3_wscript_build,v 1.1 2019/01/23 01:46:19 jca Exp $
+
+XXX is lld-7.0.1 being too picky here?
+
+  ld: error: duplicate symbol 'pdb_search_init' in version script
+
+Work around by spelling out the affected symbols.
+
+Index: source3/wscript_build
+--- source3/wscript_build.orig
++++ source3/wscript_build
+@@ -124,7 +124,9 @@ ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_doma
+                      '!get_attr_list']
+ private_pdb_match.append('!pdb_nds_*')
+ private_pdb_match.append('!pdb_ldapsam_init*')
+-private_pdb_match.append('!pdb_*_init')
++private_pdb_match.append('!pdb_samba_dsdb_init')
++private_pdb_match.append('!pdb_smbpasswd_init')
++private_pdb_match.append('!pdb_tdbsam_init')
+ private_pdb_match = private_pdb_match + ldapsam_pdb_match
+ 
+ bld.SAMBA3_LIBRARY('samba-passdb',
Index: pkg/PLIST-ldb
===================================================================
RCS file: /cvs/ports/net/samba/pkg/PLIST-ldb,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST-ldb
--- pkg/PLIST-ldb       12 Mar 2017 22:19:50 -0000      1.4
+++ pkg/PLIST-ldb       12 Apr 2019 10:33:53 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST-ldb,v 1.4 2017/03/12 22:19:50 jca Exp $
+@conflict samba-<4.8.11
 @bin bin/ldbadd
 @bin bin/ldbdel
 @bin bin/ldbedit
@@ -20,6 +21,15 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/_ldb_text.${MODPY_PYOEXTENSION}
 lib/python${MODPY_VERSION}/site-packages/ldb.so
 lib/samba/ldb/
+lib/samba/ldb/asq.so
+lib/samba/ldb/ldap.so
+lib/samba/ldb/paged_results.so
+lib/samba/ldb/paged_searches.so
+lib/samba/ldb/rdn_name.so
+lib/samba/ldb/sample.so
+lib/samba/ldb/server_sort.so
+lib/samba/ldb/skel.so
+lib/samba/ldb/tdb.so
 lib/samba/libldb-cmdline-samba4.so
 @man man/man1/ldbadd.1
 @man man/man1/ldbdel.1
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/net/samba/pkg/PLIST-main,v
retrieving revision 1.45
diff -u -p -r1.45 PLIST-main
--- pkg/PLIST-main      4 Sep 2018 12:53:16 -0000       1.45
+++ pkg/PLIST-main      12 Apr 2019 10:33:53 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST-main,v 1.45 2018/09/04 12:53:16 espie Exp $
+@conflict ldb-<1.3.6p3
 @pkgpath net/samba,ldap,-main
 @pkgpath net/samba,ads,-main
 @pkgpath net/samba,,-main
@@ -862,7 +863,6 @@ lib/samba/krb5/winbind_krb5_locator.so
 lib/samba/ldb/acl.so
 lib/samba/ldb/aclread.so
 lib/samba/ldb/anr.so
-lib/samba/ldb/asq.so
 lib/samba/ldb/descriptor.so
 lib/samba/ldb/dirsync.so
 lib/samba/ldb/dns_notify.so
@@ -874,7 +874,6 @@ lib/samba/ldb/extended_dn_store.so
 lib/samba/ldb/ildap.so
 lib/samba/ldb/instancetype.so
 lib/samba/ldb/lazy_commit.so
-lib/samba/ldb/ldap.so
 lib/samba/ldb/ldbsamba_extensions.so
 lib/samba/ldb/linked_attributes.so
 lib/samba/ldb/local_password.so
@@ -883,12 +882,9 @@ lib/samba/ldb/objectclass.so
 lib/samba/ldb/objectclass_attrs.so
 lib/samba/ldb/objectguid.so
 lib/samba/ldb/operational.so
-lib/samba/ldb/paged_results.so
-lib/samba/ldb/paged_searches.so
 lib/samba/ldb/partition.so
 lib/samba/ldb/password_hash.so
 lib/samba/ldb/ranged_results.so
-lib/samba/ldb/rdn_name.so
 lib/samba/ldb/repl_meta_data.so
 lib/samba/ldb/resolve_oids.so
 lib/samba/ldb/rootdse.so
@@ -897,18 +893,14 @@ lib/samba/ldb/samba3sid.so
 lib/samba/ldb/samba_dsdb.so
 lib/samba/ldb/samba_secrets.so
 lib/samba/ldb/samldb.so
-lib/samba/ldb/sample.so
 lib/samba/ldb/schema_data.so
 lib/samba/ldb/schema_load.so
 lib/samba/ldb/secrets_tdb_sync.so
-lib/samba/ldb/server_sort.so
 lib/samba/ldb/show_deleted.so
 lib/samba/ldb/simple_dn.so
 lib/samba/ldb/simple_ldap_map.so
-lib/samba/ldb/skel.so
 lib/samba/ldb/subtree_delete.so
 lib/samba/ldb/subtree_rename.so
-lib/samba/ldb/tdb.so
 lib/samba/ldb/tombstone_reanimate.so
 lib/samba/ldb/unique_object_sids.so
 lib/samba/ldb/update_keytab.so
@@ -935,6 +927,7 @@ lib/samba/libcli-smb-common-samba4.so
 lib/samba/libcli-spoolss-samba4.so
 lib/samba/libcliauth-samba4.so
 lib/samba/libcluster-samba4.so
+lib/samba/libcmdline-contexts-samba4.so
 lib/samba/libcmdline-credentials-samba4.so
 @lib lib/samba/libcom_err-samba4.so.${LIBcom_err-samba4_VERSION}
 lib/samba/libcommon-auth-samba4.so
@@ -983,6 +976,7 @@ lib/samba/libnpa-tstream-samba4.so
 lib/samba/libnss-info-samba4.so
 lib/samba/libntvfs-samba4.so
 lib/samba/libpac-samba4.so
+lib/samba/libpopt-samba3-cmdline-samba4.so
 lib/samba/libpopt-samba3-samba4.so
 lib/samba/libposix-eadb-samba4.so
 lib/samba/libprinting-migrate-samba4.so
@@ -1064,6 +1058,7 @@ lib/samba/vfs/extd_audit.so
 lib/samba/vfs/fake_perms.so
 lib/samba/vfs/fruit.so
 lib/samba/vfs/full_audit.so
+lib/samba/vfs/glusterfs_fuse.so
 lib/samba/vfs/linux_xfs_sgid.so
 lib/samba/vfs/media_harmony.so
 lib/samba/vfs/netatalk.so
@@ -1209,6 +1204,7 @@ libexec/samba/
 @man man/man8/vfs_fruit.8
 @man man/man8/vfs_full_audit.8
 @man man/man8/vfs_glusterfs.8
+@man man/man8/vfs_glusterfs_fuse.8
 @man man/man8/vfs_gpfs.8
 @man man/man8/vfs_linux_xfs_sgid.8
 @man man/man8/vfs_media_harmony.8
Index: pkg/samba_ad_dc.rc
===================================================================
RCS file: /cvs/ports/net/samba/pkg/samba_ad_dc.rc,v
retrieving revision 1.3
diff -u -p -r1.3 samba_ad_dc.rc
--- pkg/samba_ad_dc.rc  11 Jan 2018 19:27:08 -0000      1.3
+++ pkg/samba_ad_dc.rc  12 Apr 2019 10:33:53 -0000
@@ -8,6 +8,7 @@ daemon="${TRUEPREFIX}/sbin/samba -D"
 
 . /etc/rc.d/rc.subr
 
+pexp="^samba: root process"
 rc_usercheck=NO
 
 rc_check() {

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to