Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2014 21:14:41 +0000 (UTC)
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r348807 - in head: . devel/apr1 devel/apr1/files
Message-ID:  <201403222114.s2MLEfjV011002@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ohauer
Date: Sat Mar 22 21:14:41 2014
New Revision: 348807
URL: http://svnweb.freebsd.org/changeset/ports/348807
QAT: https://qat.redports.org/buildarchive/r348807/

Log:
  - update to apr-1.5.0
  - add fix for FreeBSD 10 obtained from
    http://svn.apache.org/viewvc?view=revision&revision=1551672
  - bump USE_BDB=42+ -> USE_BDB=48+ [1]
  - add entry to UPDATING
  
  Changes for APR 1.5.0 (shortened)
  http://www.apache.org/dist/apr/CHANGES-APR-1.5
  
    *) Add apr_sockaddr_is_wildcard() to check if a socket address
       refers to the wildcard address for the protocol family (e.g.,
       0.0.0.0/INADDR_ANY for IPv4).  [Jeff Trawick]
  
    *) Add the apr_escape interface. [Graham Leggett]
  
    *) Add apr_skiplist family. [Jim Jagielski]
  
    *) Add the apr_table_getm() call, which transparently handles the
       merging of keys with multiple values. [Graham Leggett]
  
    *) Add apr_hash_this_key(), apr_hash_this_key_len(), and
       apr_hash_this_val() for easier access to those attributes from
       a hash iterator.  [Hyrum K. Wright <hyrum_wright mail.utexas.edu>]
  
    *) Improve platform detection by updating config.guess and config.sub.
       [Rainer Jung]
  
    *) apr_socket_opt_set: Add support for APR_SO_BROADCAST. PR 46389.
       [Armin MÃŒller <mueller itestra com>]
  
    *) Enable platform specific support for the opening of a file or
       pipe in non-blocking mode through the APR_FOPEN_NONBLOCK flag.
       [Graham Leggett]
  
  [1] requested by Pavel Timofeev, Sean Bruno
  
  with hat apache@
  
  PR:		ports/186441
  PR:		ports/186899

Added:
  head/devel/apr1/files/patch-apr-1.5.0__network_io__unix__sockets.c   (contents, props changed)
Modified:
  head/UPDATING
  head/devel/apr1/Makefile
  head/devel/apr1/distinfo
  head/devel/apr1/files/patch-apr__configure
  head/devel/apr1/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sat Mar 22 20:47:04 2014	(r348806)
+++ head/UPDATING	Sat Mar 22 21:14:41 2014	(r348807)
@@ -5,6 +5,21 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20140322:
+  AFFECTS: users of devel/apr1
+  AUTHOR: ohauer@FreeBSD.org
+
+  APR was updated to 1.5.0, BDB requirement was bumped to 48+
+
+  Please rebuild all ports which are using functions from APR/APR-util
+  such as Apache, Subversion, etc.
+
+  # portmaster -r apr
+    or
+  # portupgrade -r devel/apr1
+    or
+  # pkg install -fR devel/apr1
+
 20140318:
   AFFECTS: users of net/openldap24-server
   AUTHOR: delphij@FreeBSD.org

Modified: head/devel/apr1/Makefile
==============================================================================
--- head/devel/apr1/Makefile	Sat Mar 22 20:47:04 2014	(r348806)
+++ head/devel/apr1/Makefile	Sat Mar 22 21:14:41 2014	(r348807)
@@ -26,7 +26,7 @@ NDBM_DESC=	NDBM support
 SSL_DESC=	OpenSSL crypto driver
 NSS_DESC=	NSS crypto driver
 
-APR_VERSION=	1.4.8
+APR_VERSION=	1.5.0
 APU_VERSION=	1.5.3
 
 USES=		iconv pathfix
@@ -38,7 +38,7 @@ APR_WRKDIR=	${WRKDIR}/apr-${APR_VERSION}
 APU_WRKDIR=	${WRKDIR}/apr-util-${APU_VERSION}
 
 PLIST_SUB+=	SHLIB_APR_MAJOR="${SHLIB_APR_MAJOR}" SHLIB_APU_MAJOR="${SHLIB_APU_MAJOR}"
-SHLIB_APR_MAJOR=	4
+SHLIB_APR_MAJOR=	5
 SHLIB_APU_MAJOR=	5
 
 APR_CONF_ARGS=	--with-installbuilddir=${DATADIR}/build-1
@@ -81,7 +81,7 @@ APU_CONF_ARGS+=	--without-gdbm
 .if ${PORT_OPTIONS:MBDB}
 APU_EXTRAS=	yes
 PLIST_SUB+=	BDB=""
-USE_BDB=	42+
+USE_BDB=	48+
 APU_CONF_ARGS+=	--with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR}
 .else
 PLIST_SUB+=	BDB="@comment "
@@ -200,19 +200,17 @@ post-patch:
 
 do-configure:
 	@(cd ${APR_WRKDIR} && \
-		${SETENV} ${CONFIGURE_ENV} \
-		./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS})
+		${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS})
 	@(cd ${APU_WRKDIR} && \
-		${SETENV} ${CONFIGURE_ENV} \
-		./configure ${CONFIGURE_ARGS} ${APU_CONF_ARGS})
+		${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS} ${APU_CONF_ARGS})
 
 do-build:
 	@(cd ${APR_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS})
 	@(cd ${APU_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS})
 
 do-install:
-	@(cd ${APR_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} ${MAKE_ARGS} )
-	@(cd ${APU_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} ${MAKE_ARGS} )
+	@(cd ${APR_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} ${MAKE_ARGS})
+	@(cd ${APU_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} ${MAKE_ARGS})
 
 test: build
 	-@(cd ${APR_WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE} test)

Modified: head/devel/apr1/distinfo
==============================================================================
--- head/devel/apr1/distinfo	Sat Mar 22 20:47:04 2014	(r348806)
+++ head/devel/apr1/distinfo	Sat Mar 22 21:14:41 2014	(r348807)
@@ -1,4 +1,4 @@
-SHA256 (apr-1.4.8.tar.gz) = 1689e415bdfab6aaa41f07836b5dd9ed4901d22ddeb99feffdb2cee3124adf49
-SIZE (apr-1.4.8.tar.gz) = 979397
+SHA256 (apr-1.5.0.tar.gz) = 9879f02054cb22e99f605f6fdbf47f4c028af4cd4f351cf64186a7ee447f35d7
+SIZE (apr-1.5.0.tar.gz) = 1016391
 SHA256 (apr-util-1.5.3.tar.gz) = 76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743
 SIZE (apr-util-1.5.3.tar.gz) = 874462

Added: head/devel/apr1/files/patch-apr-1.5.0__network_io__unix__sockets.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/apr1/files/patch-apr-1.5.0__network_io__unix__sockets.c	Sat Mar 22 21:14:41 2014	(r348807)
@@ -0,0 +1,44 @@
+Fix the inheritance of the non-blocking option across apr_socket_accept()
+on FreeBSD 10 which was introduced with APR 1.5.0 through an unlikely
+mechanism:
+
+* FreeBSD 10 introduced accept4().  APR uses accept4() where it can find it.
+  accept4() on Linux and FreeBSD 10 both have a SOCK_NONBLOCK flag, but on
+  FreeBSD 10 the SOCK_NONBLOCK is the sole determiner of whether or not the
+  connected socket is non-blocking.
+* clang is normally used on FreeBSD 10.
+* APR's configure-time check for inherited O_NONBLOCK didn't work with clang,
+  so initially the lack of inheritance across accept4() wasn't a problem.
+* APR 1.5.0 allowed the configure-time check to work with clang, exposing
+  the bad expectation about accept4() matching the accept() behavior.
+
+With FreeBSD accept4() (avail in 10+), O_NONBLOCK is not inherited
+(unlike Linux).  Mimic the accept() behavior here in a way that
+may help other platforms as well.
+
+http://svn.apache.org/viewvc?view=revision&revision=1551672
+===================================================================================
+--- ./apr-1.5.0/network_io/unix/sockets.c.orig	2011-03-23 19:50:21.000000000 +0100
++++ ./apr-1.5.0/network_io/unix/sockets.c	2014-03-22 18:52:57.000000000 +0100
+@@ -207,7 +207,20 @@
+     sa.salen = sizeof(sa.sa);
+ 
+ #ifdef HAVE_ACCEPT4
+-    s = accept4(sock->socketdes, (struct sockaddr *)&sa.sa, &sa.salen, SOCK_CLOEXEC);
++    {
++        int flags = SOCK_CLOEXEC;
++
++#if defined(SOCK_NONBLOCK) && APR_O_NONBLOCK_INHERITED
++        /* With FreeBSD accept4() (avail in 10+), O_NONBLOCK is not inherited
++         * (unlike Linux).  Mimic the accept() behavior here in a way that
++         * may help other platforms.
++         */
++        if (apr_is_option_set(sock, APR_SO_NONBLOCK) == 1) {
++            flags |= SOCK_NONBLOCK;
++        }
++#endif
++        s = accept4(sock->socketdes, (struct sockaddr *)&sa.sa, &sa.salen, flags);
++    }
+ #else
+     s = accept(sock->socketdes, (struct sockaddr *)&sa.sa, &sa.salen);
+ #endif

Modified: head/devel/apr1/files/patch-apr__configure
==============================================================================
--- head/devel/apr1/files/patch-apr__configure	Sat Mar 22 20:47:04 2014	(r348806)
+++ head/devel/apr1/files/patch-apr__configure	Sat Mar 22 21:14:41 2014	(r348807)
@@ -1,6 +1,6 @@
---- ./apr-1.4.8/configure.orig	2013-06-30 12:29:38.000000000 +0200
-+++ ./apr-1.4.8/configure	2013-06-30 12:32:04.000000000 +0200
-@@ -6642,11 +6642,7 @@
+--- ./apr-1.5.0/configure.orig	2014-03-22 18:52:57.000000000 +0100
++++ ./apr-1.5.0/configure	2014-03-22 18:52:57.000000000 +0100
+@@ -6622,11 +6622,7 @@
      apr_lock_method="USE_FLOCK_SERIALIZE"
    fi
  
@@ -13,7 +13,7 @@
          # 502102 is when libc_r switched to libpthread (aka libkse).
          if test $os_version -ge "502102"; then
            apr_cv_pthreads_cflags="none"
-@@ -18784,11 +18780,7 @@
+@@ -18812,11 +18808,7 @@
  # comparisons.
  case $host in
      *freebsd*)
@@ -25,4 +25,4 @@
 +            os_version="OSVERSION"
          ;;
      *linux*)
-         os_version=`uname -r | sed -e 's/\(.\)\.\(.\)\.\(.\).*/\1\2\3/'`
+         os_major=`uname -r | sed -e 's/\([1-9][0-9]*\)\..*/\1/'`

Modified: head/devel/apr1/pkg-plist
==============================================================================
--- head/devel/apr1/pkg-plist	Sat Mar 22 20:47:04 2014	(r348806)
+++ head/devel/apr1/pkg-plist	Sat Mar 22 21:14:41 2014	(r348807)
@@ -13,6 +13,7 @@ include/apr-1/apr_dbm.h
 include/apr-1/apr_dso.h
 include/apr-1/apr_env.h
 include/apr-1/apr_errno.h
+include/apr-1/apr_escape.h
 include/apr-1/apr_file_info.h
 include/apr-1/apr_file_io.h
 include/apr-1/apr_fnmatch.h
@@ -48,6 +49,7 @@ include/apr-1/apr_sdbm.h
 include/apr-1/apr_sha1.h
 include/apr-1/apr_shm.h
 include/apr-1/apr_signal.h
+include/apr-1/apr_skiplist.h
 include/apr-1/apr_strings.h
 include/apr-1/apr_strmatch.h
 include/apr-1/apr_support.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403222114.s2MLEfjV011002>