From owner-svn-ports-head@freebsd.org Mon Oct 30 05:53:40 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E3C7E54D4A; Mon, 30 Oct 2017 05:53:40 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA7274EB3; Mon, 30 Oct 2017 05:53:40 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9U5rdWx087004; Mon, 30 Oct 2017 05:53:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9U5rd3w087001; Mon, 30 Oct 2017 05:53:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201710300553.v9U5rd3w087001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 30 Oct 2017 05:53:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r453156 - in head/net/openldap24-server: . files X-SVN-Group: ports-head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head/net/openldap24-server: . files X-SVN-Commit-Revision: 453156 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 05:53:40 -0000 Author: delphij Date: Mon Oct 30 05:53:38 2017 New Revision: 453156 URL: https://svnweb.freebsd.org/changeset/ports/453156 Log: Workaround an issue with kqueue support. OpenLDAP does slapd_daemon_init() which will initialize kqueue(), but then calls lutil_detach() which will fork(), and the fork() would invalidate the kqueue descriptor in the child process. Completely solving this would require some intrusive changes so workaround this for now by calling rfork() without RFFDG and reorder file descriptor closure order. While I'm there also refrain from stopping slapd when deinstalling. Modified: head/net/openldap24-server/Makefile head/net/openldap24-server/files/extrapatch-ITS6300 head/net/openldap24-server/pkg-plist Modified: head/net/openldap24-server/Makefile ============================================================================== --- head/net/openldap24-server/Makefile Mon Oct 30 04:04:27 2017 (r453155) +++ head/net/openldap24-server/Makefile Mon Oct 30 05:53:38 2017 (r453156) @@ -65,7 +65,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLD .endif PORTREVISION_CLIENT= 0 -PORTREVISION_SERVER= 2 +PORTREVISION_SERVER= 3 OPENLDAP_SHLIB_MAJOR= 2 OPENLDAP_SHLIB_MINOR= 10.8 OPENLDAP_MAJOR= ${DISTVERSION:R} Modified: head/net/openldap24-server/files/extrapatch-ITS6300 ============================================================================== --- head/net/openldap24-server/files/extrapatch-ITS6300 Mon Oct 30 04:04:27 2017 (r453155) +++ head/net/openldap24-server/files/extrapatch-ITS6300 Mon Oct 30 05:53:38 2017 (r453156) @@ -404,3 +404,31 @@ if ( LogTest( LDAP_DEBUG_ANY )) { int t = ldap_pvt_thread_pool_backload( &connection_pool ); +--- libraries/liblutil/detach.c.orig 2017-06-01 20:01:07 UTC ++++ libraries/liblutil/detach.c +@@ -73,7 +73,7 @@ lutil_detach( int debug, int do_close ) + #ifdef HAVE_THR + pid = fork1(); + #else +- pid = fork(); ++ pid = rfork(RFPROC); + #endif + switch ( pid ) + { +--- servers/slapd/main.c.orig 2017-06-01 20:01:07 UTC ++++ servers/slapd/main.c +@@ -923,12 +923,11 @@ unhandled_option:; + if ( pid ) { + char buf[4]; + rc = EXIT_SUCCESS; +- close( waitfds[1] ); + if ( read( waitfds[0], buf, 1 ) != 1 ) + rc = EXIT_FAILURE; +- _exit( rc ); +- } else { ++ close( waitfds[1] ); + close( waitfds[0] ); ++ _exit( rc ); + } + } + #endif /* HAVE_WINSOCK */ Modified: head/net/openldap24-server/pkg-plist ============================================================================== --- head/net/openldap24-server/pkg-plist Mon Oct 30 04:04:27 2017 (r453155) +++ head/net/openldap24-server/pkg-plist Mon Oct 30 05:53:38 2017 (r453156) @@ -1,4 +1,3 @@ -@preunexec %%RC_DIR%%/etc/rc.d/slapd stop 2>&1 >/dev/null || true %%ETCDIR%%/schema/README %%ETCDIR%%/schema/collective.ldif @sample %%ETCDIR%%/schema/collective.schema.sample