Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2017 01:39:16 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r448644 - in head: . www www/mod_gnutls www/mod_gnutls/files
Message-ID:  <201708240139.v7O1dGHv005132@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Thu Aug 24 01:39:16 2017
New Revision: 448644
URL: https://svnweb.freebsd.org/changeset/ports/448644

Log:
  Resurrect www/mod_gnutls and update to 0.8.2.

Added:
  head/www/mod_gnutls/
     - copied from r366982, head/www/mod_gnutls/
  head/www/mod_gnutls/files/patch-src_gnutls__io.c   (contents, props changed)
  head/www/mod_gnutls/files/patch-src_gnutls__ocsp.c   (contents, props changed)
  head/www/mod_gnutls/files/patch-src_gnutls__util.c   (contents, props changed)
Deleted:
  head/www/mod_gnutls/files/patch-src-Makefile.in
Modified:
  head/MOVED
  head/www/Makefile
  head/www/mod_gnutls/Makefile
  head/www/mod_gnutls/distinfo
  head/www/mod_gnutls/files/pkg-message.in
  head/www/mod_gnutls/pkg-descr
  head/www/mod_gnutls/pkg-plist

Modified: head/MOVED
==============================================================================
--- head/MOVED	Thu Aug 24 01:04:44 2017	(r448643)
+++ head/MOVED	Thu Aug 24 01:39:16 2017	(r448644)
@@ -6872,7 +6872,6 @@ www/lusca-head||2014-09-01|Not staged
 www/mod_auth_form||2014-09-01|Not staged
 www/mod_auth_mellon||2014-09-01|Not staged
 www/mod_ftp||2014-09-01|Not staged
-www/mod_gnutls||2014-09-01|Not staged
 www/mod_log_dbd||2014-09-01|Not staged
 www/mod_pagespeed||2014-09-01|Not staged
 www/moodle24||2014-09-01|Not staged

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Thu Aug 24 01:04:44 2017	(r448643)
+++ head/www/Makefile	Thu Aug 24 01:39:16 2017	(r448644)
@@ -450,6 +450,7 @@
     SUBDIR += mod_fileiri
     SUBDIR += mod_flickr
     SUBDIR += mod_geoip2
+    SUBDIR += mod_gnutls
     SUBDIR += mod_gzip2
     SUBDIR += mod_h264_streaming
     SUBDIR += mod_hosts_access

Modified: head/www/mod_gnutls/Makefile
==============================================================================
--- head/www/mod_gnutls/Makefile	Tue Sep  2 10:38:28 2014	(r366982)
+++ head/www/mod_gnutls/Makefile	Thu Aug 24 01:39:16 2017	(r448644)
@@ -1,51 +1,32 @@
-# Created by: Fumiyuki Shimizu <fumifumi@abacustech.jp>
 # $FreeBSD$
 
 PORTNAME=	mod_gnutls
-PORTVERSION=	0.5.10
-PORTREVISION=	3
+PORTVERSION=	0.8.2
 CATEGORIES=	www security
-MASTER_SITES=	http://modgnutls.sourceforge.net/downloads/ \
-		http://www.outoforder.cc/downloads/mod_gnutls/
+MASTER_SITES=	https://mod.gnutls.org/downloads/
 PKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	mod_gnutls uses the GnuTLS library to provide SSL, and TLS encryption for Apache HTTPD
+COMMENT=	Extension for Apache httpd using GnuTLS library to provide HTTPS
 
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-LIB_DEPENDS=	libgnutls.so:${PORTSDIR}/security/gnutls
+LIB_DEPENDS=	libgnutls.so:security/gnutls
 
-USE_AUTOTOOLS=	libtool
-USES=		pkgconfig tar:bzip2
-USE_APACHE=	22
 GNU_CONFIGURE=	yes
+USES=		libtool pkgconfig tar:bzip2
+USE_APACHE=	24
 
-DOCS=		LICENSE NEWS README README.ENV
-
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-DBDIR=	${PREFIX}/var/db/${PORTNAME}
-
+DBDIR=		${PREFIX}/var/db/${PORTNAME}
+PLIST_SUB=	SED="${SED}" WWWGRP=${WWWGRP} WWWOWN=${WWWOWN}
 SUB_FILES=	pkg-message
-PLIST_SUB+=	DBDIR=${DBDIR}
+SUB_LIST=	DBDIR="${DBDIR}"
 
-CONFIGURE_ARGS=	--with-apxs=${APXS}
+CFLAGS+=	-Wno-deprecated-declarations
+CONFIGURE_ARGS=	--with-apxs="${APXS}"
 
-# mod_gnutls does not conflict with mod_ssl.
-#pre-install:
-#	@if test -e '${LOCALBASE}/${APACHEMODDIR}/mod_ssl.so'; then for opt in -a -A -A; do '${APXS}' -e "$${opt}" -n ssl '${LOCALBASE}/${APACHEMODDIR}/mod_ssl.so' >/dev/null 2>&1; done; else true; fi
-
 post-install:
-.if !defined(NOPORTDOCS)
-	@${MKDIR} '${DOCSDIR}'
-	@cd '${WRKSRC}' && ${INSTALL_DATA} ${DOCS} '${DOCSDIR}'
-.endif
-	@if test -d '${DBDIR}'; then true; else ${MKDIR} '${DBDIR}'; fi
-	@${CHOWN} '${WWWOWN}:${WWWGRP}' '${DBDIR}'
-	@${CHMOD} 'u=rwx,g=rx,o=' '${DBDIR}'
-	@${CAT} '${PKGMESSAGE}'
+	${MKDIR} "${STAGEDIR}${DBDIR}"
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/www/mod_gnutls/distinfo
==============================================================================
--- head/www/mod_gnutls/distinfo	Tue Sep  2 10:38:28 2014	(r366982)
+++ head/www/mod_gnutls/distinfo	Thu Aug 24 01:39:16 2017	(r448644)
@@ -1,2 +1,3 @@
-SHA256 (mod_gnutls-0.5.10.tar.bz2) = 469fea5f2f422c459b4153c1b959d5d62568d3ddf87f90ca6fe880c81b3b8374
-SIZE (mod_gnutls-0.5.10.tar.bz2) = 245958
+TIMESTAMP = 1503524329
+SHA256 (mod_gnutls-0.8.2.tar.bz2) = 05eeb78e41f1fd6780607a17d705b1965ce5c3ce6223a9a8a86ba9288d22e683
+SIZE (mod_gnutls-0.8.2.tar.bz2) = 415903

Added: head/www/mod_gnutls/files/patch-src_gnutls__io.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_gnutls/files/patch-src_gnutls__io.c	Thu Aug 24 01:39:16 2017	(r448644)
@@ -0,0 +1,36 @@
+--- src/gnutls_io.c.orig	2016-12-25 18:36:37 UTC
++++ src/gnutls_io.c
+@@ -23,7 +23,8 @@
+ APLOG_USE_MODULE(gnutls);
+ #endif
+ 
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+ #include <inttypes.h>
+ #endif
+ 
+@@ -572,18 +573,21 @@ apr_status_t mgs_filter_input(ap_filter_t * f,
+          * might have different lengths. Read sizes should be too
+          * small for 32 or 64 bit to matter, but we have to make
+          * sure. */
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+         if ((apr_size_t) readbytes < len)
+         {
++#if INTMAX_MAX > SIZE_MAX
+             /* If readbytes is negative the function fails in the
+              * check above, but the compiler doesn't get that. */
+-            if (__builtin_expect(imaxabs(readbytes) > SIZE_MAX, 0))
++            if (__builtin_expect(imaxabs(readbytes) > (intmax_t) SIZE_MAX, 0))
+             {
+                 ap_log_cerror(APLOG_MARK, APLOG_CRIT, APR_EINVAL, ctxt->c,
+                               "%s: prevented buffer length overflow",
+                               __func__);
+                 return APR_EINVAL;
+             }
++#endif
+             len = (apr_size_t) readbytes;
+         }
+ #else

Added: head/www/mod_gnutls/files/patch-src_gnutls__ocsp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_gnutls/files/patch-src_gnutls__ocsp.c	Thu Aug 24 01:39:16 2017	(r448644)
@@ -0,0 +1,32 @@
+--- src/gnutls_ocsp.c.orig	2017-01-08 14:16:07 UTC
++++ src/gnutls_ocsp.c
+@@ -414,7 +414,8 @@ static gnutls_datum_t mgs_get_cert_fingerprint(apr_poo
+     /* Safe integer type conversion: The types of fingerprint.size
+      * (unsigned int) and fplen (size_t) may have different
+      * lengths. */
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+     if (__builtin_expect(fplen <= UINT_MAX, 1))
+     {
+         fingerprint.size = (unsigned int) fplen;
+@@ -569,7 +570,8 @@ static apr_status_t do_ocsp_request(apr_pool_t *p, ser
+     }
+ 
+     /* With the length restriction this really should not overflow. */
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+     if (__builtin_expect(len > UINT_MAX, 0))
+ #else
+     if (__builtin_add_overflow(len, 0, &response->size))
+@@ -580,7 +582,8 @@ static apr_status_t do_ocsp_request(apr_pool_t *p, ser
+     }
+     else
+     {
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+         response->size = (unsigned int) len;
+ #endif
+         response->data = apr_pmemdup(p, buf, len);

Added: head/www/mod_gnutls/files/patch-src_gnutls__util.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_gnutls/files/patch-src_gnutls__util.c	Thu Aug 24 01:39:16 2017	(r448644)
@@ -0,0 +1,12 @@
+--- src/gnutls_util.c.orig	2016-12-25 18:36:37 UTC
++++ src/gnutls_util.c
+@@ -113,7 +113,8 @@ apr_status_t datum_from_file(apr_pool_t *p, const char
+ 
+     /* safe integer type conversion: unsigned int and apr_size_t might
+      * have different sizes */
+-#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
++#if defined(__GNUC__) && __GNUC__ < 5 && \
++    !(defined(__clang__) && __has_builtin(__builtin_add_overflow))
+     if (__builtin_expect(br > UINT_MAX, 0))
+         return APR_EINVAL;
+     else

Modified: head/www/mod_gnutls/files/pkg-message.in
==============================================================================
--- head/www/mod_gnutls/files/pkg-message.in	Tue Sep  2 10:38:28 2014	(r366982)
+++ head/www/mod_gnutls/files/pkg-message.in	Thu Aug 24 01:39:16 2017	(r448644)
@@ -1,19 +1,27 @@
 *********************************************************************
 
-Sample %%PREFIX%%/etc/apache22/httpd.conf.
+Sample %%PREFIX%%/%%APACHEETCDIR%%/httpd.conf:
 
-        #LoadModule ssl_module libexec/apache22/mod_ssl.so
-        LoadModule gnutls_module      libexec/apache22/mod_gnutls.so
+    #LoadModule ssl_module %%APACHEMODDIR%%/mod_ssl.so
+    LoadModule gnutls_module %%APACHEMODDIR%%/mod_gnutls.so
 
-        GnuTLSCache dbm %%DBDIR%%/tls-cache
-        GnuTLSCacheTimeout 500
+    <IfModule gnutls_module>
+        Include %%APACHEETCDIR%%/extra/httpd-gnutls.conf
+    </IfModule>
 
-        <VirtualHost example.com:443>
-                GnuTLSEnable on
-                GnuTLSKeyFile          /etc/ssl/certs/private/example_com.key.pem
-                GnuTLSCertificateFile  /etc/ssl/certs/example_com.crt.pem
-                GnuTLSClientCAFile     /etc/ssl/certs/example_com.ca.pem
-                GnuTLSPriorities       NORMAL:%COMPAT
-        </Directory>
+Sample %%PREFIX%%/%%APACHEETCDIR%%/extra/httpd-gnutls.conf:
+
+    Listen 443
+
+    GnuTLSCache dbm %%DBDIR%%/tls-cache
+    GnuTLSCacheTimeout 500
+
+    <VirtualHost _default_:443>
+        GnuTLSEnable on
+        GnuTLSKeyFile %%PREFIX%%/etc/ssl/certs/private/example_com.key.pem
+        GnuTLSCertificateFile %%PREFIX%%/etc/ssl/certs/example_com.crt.pem
+        GnuTLSClientCAFile %%PREFIX%%/etc/ssl/certs/example_com.ca.pem
+        GnuTLSPriorities NORMAL:%COMPAT
+    </VirtualHost>
 
 *********************************************************************

Modified: head/www/mod_gnutls/pkg-descr
==============================================================================
--- head/www/mod_gnutls/pkg-descr	Tue Sep  2 10:38:28 2014	(r366982)
+++ head/www/mod_gnutls/pkg-descr	Thu Aug 24 01:39:16 2017	(r448644)
@@ -2,4 +2,4 @@ mod_gnutls uses the GnuTLS library to provide SSL 3.0,
 1.1 and 1.2 encryption for Apache HTTPD. It is similar to mod_ssl in
 purpose, but does not use OpenSSL.
 
-WWW:	http://www.outoforder.cc/projects/apache/mod_gnutls/
+WWW: https://mod.gnutls.org

Modified: head/www/mod_gnutls/pkg-plist
==============================================================================
--- head/www/mod_gnutls/pkg-plist	Tue Sep  2 10:38:28 2014	(r366982)
+++ head/www/mod_gnutls/pkg-plist	Thu Aug 24 01:39:16 2017	(r448644)
@@ -1,10 +1,5 @@
 %%APACHEMODDIR%%/%%AP_MODULE%%
-@exec   '%D/sbin/apxs' -e -a -n '%%AP_NAME%%' '%D/%%APACHEMODDIR%%/%%AP_MODULE%%'
-@unexec '%D/sbin/apxs' -e -A -n '%%AP_NAME%%' '%D/%%APACHEMODDIR%%/%%AP_MODULE%%'
-@comment @exec   if test -e '%D/%%APACHEMODDIR%%/mod_ssl.so'; then for opt in -a -A -A; do '%D/sbin/apxs' -e "${opt}" -n ssl '%D/%%APACHEMODDIR%%/mod_ssl.so'; done; fi
-@comment @unexec if test -e '%D/%%APACHEMODDIR%%/mod_ssl.so'; then '%D/sbin/apxs' -e -a -n ssl '%D/%%APACHEMODDIR%%/mod_ssl.so'; fi
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE
-%%PORTDOCS%%%%DOCSDIR%%/NEWS
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/README.ENV
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@postexec %D/sbin/apxs -e %%AP_MOD_EN%% -n %%AP_NAME%% %D/%F
+@postunexec %%SED%% -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf
+@postunexec echo "Don't forget to remove all mod_%%AP_NAME%%-related directives in your httpd.conf"
+@dir(%%WWWOWN%%,%%WWWGRP%%,750) var/db/mod_%%AP_NAME%%



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