Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2019 14:41:18 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505423 - in head/www: h2o h2o-devel h2o-devel/files h2o/files
Message-ID:  <201906301441.x5UEfIOw027423@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Sun Jun 30 14:41:17 2019
New Revision: 505423
URL: https://svnweb.freebsd.org/changeset/ports/505423

Log:
  h2o{,-devel}: Improve rc.d/h2o, freshen h2o.conf
  
  rc.d/h2o:
   - Add a configtest target
   - Fix a bug that could prevent the script from locating the PIDfile path
  
  h2o.conf:
   - Remove entries that are defaults
  
  PR:		238888
  Approved by:	maintainer (dch)
  MFH:		2019Q2

Modified:
  head/www/h2o-devel/Makefile
  head/www/h2o-devel/files/h2o.conf.sample.in
  head/www/h2o-devel/files/h2o.in
  head/www/h2o/Makefile
  head/www/h2o/files/h2o.conf.sample.in
  head/www/h2o/files/h2o.in

Modified: head/www/h2o-devel/Makefile
==============================================================================
--- head/www/h2o-devel/Makefile	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o-devel/Makefile	Sun Jun 30 14:41:17 2019	(r505423)
@@ -4,7 +4,7 @@
 PORTNAME=	h2o
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.3.0-beta1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	www
 PKGNAMESUFFIX=	-devel
 

Modified: head/www/h2o-devel/files/h2o.conf.sample.in
==============================================================================
--- head/www/h2o-devel/files/h2o.conf.sample.in	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o-devel/files/h2o.conf.sample.in	Sun Jun 30 14:41:17 2019	(r505423)
@@ -39,20 +39,13 @@ header.add: "Content-Security-Policy: default-src http
 # 6 months HSTS pinning
 header.add: "Strict-Transport-Security: max-age=16000000"
 
-# no patience for slow users
-http1-request-timeout: 10
-http2-idle-timeout: 10
 # limit POST bodies
 limit-request-body: 10485760 # 10MiB
-max-connections: 1024
 
 file.mime.addtypes:
-  image/svg+xml: .svg
   text/plain: .log
   text/css: .css
   application/atom+xml: .xml
-  application/zip: .zip
-  application/json: .json
   "text/html; charset=utf-8": .html
 
 # per-host configurations

Modified: head/www/h2o-devel/files/h2o.in
==============================================================================
--- head/www/h2o-devel/files/h2o.in	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o-devel/files/h2o.in	Sun Jun 30 14:41:17 2019	(r505423)
@@ -24,19 +24,23 @@ desc="An HTTP/2 high-performance webserver"
 
 load_rc_config $name
 
+extra_commands="configtest reload"
+configtest_cmd="h2o_configtest"
+
 # defaults
 : ${h2o_enable:=NO}
 : ${h2o_config:=%%PREFIX%%/etc/${name}/${name}.conf}
 : ${h2o_perl:=%%LOCALBASE%%/bin/perl}
 
 # daemon
-pidfile=`grep pid-file ${h2o_config} | cut -d' ' -f2`
+pidfile=`grep pid-file ${h2o_config} | awk '{print $2}'`
 h2o_env="H2O_PERL=${h2o_perl}"
 command="%%PREFIX%%/bin/${name}"
 command_args="-m daemon -c ${h2o_config}"
 procname="%%LOCALBASE%%/bin/perl"
 
-# support SIGHUP to reload configuration file
-extra_commands=reload
+h2o_configtest() {
+	"${command}" -c "${h2o_config}" -t
+}
 
 run_rc_command "$1"

Modified: head/www/h2o/Makefile
==============================================================================
--- head/www/h2o/Makefile	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o/Makefile	Sun Jun 30 14:41:17 2019	(r505423)
@@ -4,7 +4,7 @@
 PORTNAME=	h2o
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.2.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	www
 
 MAINTAINER=	dch@FreeBSD.org

Modified: head/www/h2o/files/h2o.conf.sample.in
==============================================================================
--- head/www/h2o/files/h2o.conf.sample.in	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o/files/h2o.conf.sample.in	Sun Jun 30 14:41:17 2019	(r505423)
@@ -39,20 +39,13 @@ header.add: "Content-Security-Policy: default-src http
 # 6 months HSTS pinning
 header.add: "Strict-Transport-Security: max-age=16000000"
 
-# no patience for slow users
-http1-request-timeout: 10
-http2-idle-timeout: 10
 # limit POST bodies
 limit-request-body: 10485760 # 10MiB
-max-connections: 1024
 
 file.mime.addtypes:
-  image/svg+xml: .svg
   text/plain: .log
   text/css: .css
   application/atom+xml: .xml
-  application/zip: .zip
-  application/json: .json
   "text/html; charset=utf-8": .html
 
 # per-host configurations

Modified: head/www/h2o/files/h2o.in
==============================================================================
--- head/www/h2o/files/h2o.in	Sun Jun 30 13:33:24 2019	(r505422)
+++ head/www/h2o/files/h2o.in	Sun Jun 30 14:41:17 2019	(r505423)
@@ -24,19 +24,23 @@ desc="An HTTP/2 high-performance webserver"
 
 load_rc_config $name
 
+extra_commands="configtest reload"
+configtest_cmd="h2o_configtest"
+
 # defaults
 : ${h2o_enable:=NO}
 : ${h2o_config:=%%PREFIX%%/etc/${name}/${name}.conf}
 : ${h2o_perl:=%%LOCALBASE%%/bin/perl}
 
 # daemon
-pidfile=`grep pid-file ${h2o_config} | cut -d' ' -f2`
+pidfile=`grep pid-file ${h2o_config} | awk '{print $2}'`
 h2o_env="H2O_PERL=${h2o_perl}"
 command="%%PREFIX%%/bin/${name}"
 command_args="-m daemon -c ${h2o_config}"
 procname="%%LOCALBASE%%/bin/perl"
 
-# support SIGHUP to reload configuration file
-extra_commands=reload
+h2o_configtest() {
+	"${command}" -c "${h2o_config}" -t
+}
 
 run_rc_command "$1"



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