Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2015 21:03:06 +0000 (UTC)
From:      Andrej Zverev <az@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r379190 - in head/www: . h2o h2o/files
Message-ID:  <201502172103.t1HL36l5036322@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: az
Date: Tue Feb 17 21:03:05 2015
New Revision: 379190
URL: https://svnweb.freebsd.org/changeset/ports/379190
QAT: https://qat.redports.org/buildarchive/r379190/

Log:
  - add new port: www/h2o
  
  H2O is a very fast HTTP server written in C. It can also be used as a library.
  It supports:
  
  - HTTP/1.0, HTTP/1.1
  - [HTTP/2](http://http2.github.io/)
  - draft 16 (and draft 14 to support older clients)
  - persistent connections
  - chunked encoding
  - negotiation methods: NPN, ALPN, Upgrade, direct
  - dependency and weight-based prioritization
  - server push
  - TLS
  - uses [OpenSSL](https://www.openssl.org/)
  - forward secrecy
  - AEAD ciphers
  - OCSP stapling (automatically enabled)
  - session resumption (internal memory)
  - conditional GET using last-modified / etag
  - mime-type configuration
  - reverse proxy
  - persistent upstream connection
  
  PR:             197519
  Submitted by:   Dave Cottlehuber <dch@skunkwerks.at>

Added:
  head/www/h2o/
  head/www/h2o/Makefile   (contents, props changed)
  head/www/h2o/distinfo   (contents, props changed)
  head/www/h2o/files/
  head/www/h2o/files/h2o.conf.sample   (contents, props changed)
  head/www/h2o/files/h2o.in   (contents, props changed)
  head/www/h2o/pkg-descr   (contents, props changed)
  head/www/h2o/pkg-plist   (contents, props changed)
Modified:
  head/www/Makefile

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Tue Feb 17 20:55:22 2015	(r379189)
+++ head/www/Makefile	Tue Feb 17 21:03:05 2015	(r379190)
@@ -235,6 +235,7 @@
     SUBDIR += gtkhtml4
     SUBDIR += guile-www
     SUBDIR += gurlchecker
+    SUBDIR += h2o
     SUBDIR += habari
     SUBDIR += hastymail
     SUBDIR += hastymail2

Added: head/www/h2o/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/Makefile	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,57 @@
+# Created by: Dave Cottlehuber <dch@skunkwerks.at>
+# $FreeBSD$
+
+PORTNAME=	h2o
+PORTVERSION=	0.9.2
+CATEGORIES=	www
+
+MAINTAINER=	dch@skunkwerks.at
+COMMENT=	Optimized HTTP2 server with support for HTTP/1.x
+
+LICENSE=	MIT
+
+LIB_DEPENDS=	libyaml.so:${PORTSDIR}/textproc/libyaml
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	h2o
+GH_TAGNAME=	v0.9.2
+GH_COMMIT=	5e20cff
+
+MAKE_JOBS_UNSAFE=	yes
+USES=	cmake:outsource
+
+USE_OPENSSL=	yes
+
+PORTDOCS=	README.md
+
+SUB_FILES=	${PORTNAME}
+SUB_LIST+=	H2O_USER=${H2O_USER} \
+		H2O_GROUP=${H2O_GROUP} \
+		H2O_PIDDIR=${H2O_PIDDIR} \
+		H2O_LOGDIR=${H2O_LOGDIR}
+
+PLIST_SUB=	H2O_USER=${H2O_USER} \
+		H2O_GROUP=${H2O_GROUP} \
+		H2O_PIDDIR=${H2O_PIDDIR} \
+		H2O_LOGDIR=${H2O_LOGDIR}
+
+H2O_USER?=	www
+H2O_GROUP?=	www
+
+H2O_LOGDIR=	/var/log/${PORTNAME}/
+H2O_PIDDIR=	/var/run/${PORTNAME}/
+
+USE_RC_SUBR=	${PORTNAME}
+
+do-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR} \
+		${STAGEDIR}${ETCDIR} \
+		${STAGEDIR}${H2O_PIDDIR} \
+		${STAGEDIR}${H2O_LOGDIR}
+	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} \
+		${FILESDIR}/${PORTNAME}.conf.sample \
+		${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/h2o ${STAGEDIR}${PREFIX}/bin/h2o
+
+.include <bsd.port.mk>

Added: head/www/h2o/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/distinfo	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,2 @@
+SHA256 (h2o-0.9.2.tar.gz) = c7d50856231b10bb7662356842283a99b5505f983765ea3c6c347daff6302a9f
+SIZE (h2o-0.9.2.tar.gz) = 775547

Added: head/www/h2o/files/h2o.conf.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/files/h2o.conf.sample	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,27 @@
+# vi: ft=yaml
+# to find out the configuration commands, run: h2o --help
+listen: 80
+listen:
+    port: 443
+    ssl:
+        minimum-version: TLSv1.2
+        # generate your own certificates
+        certificate-file: /usr/local/etc/h2o/server.crt
+        key-file: /usr/local/etc/h2o/server.key
+access-log: /var/log/h2o/h2o.log
+file.dirlisting: on
+# per-host configuration
+hosts:
+    my.example.org:
+        paths:
+            "/":
+                file.dir: "/usr/local/www/data/my.example.org"
+    pkg.example.org:
+        # virtual directory layout
+        paths:
+            "/poudriere":
+                file.dir: "/usr/local/poudriere/data/logs/bulk"
+            "/FreeBSD:10:amd64":
+                file.dir: "/usr/local/poudriere/data/packages/10_1_amd64-default/"
+            "/FreeBSD:11:amd64":
+                file.dir: "/usr/local/poudriere/data/packages/current_amd64-default/"

Added: head/www/h2o/files/h2o.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/files/h2o.in	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: h2o
+# REQUIRE: LOGIN DAEMON NETWORKING
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# h2o_enable    (bool):   Set to NO by default.
+# Set it to YES to enable h2o.
+#
+# h2o_config    (string): Optional full path for h2o config file
+# h2o_user      (user):   Set to h2o by default.
+# h2o_group     (group):  Set to h2o by default.
+
+. /etc/rc.subr
+
+name=h2o
+rcvar=h2o_enable
+
+# defaults
+: ${h2o_enable:="NO"}
+: ${h2o_user:="%%H2O_USER%%"}
+: ${h2o_group:="%%H2O_GROUP%%"}
+: ${h2o_config:="%%PREFIX%%/etc/${name}/${name}.conf"}
+: ${h2o_options:=" --conf ${h2o_config}"}
+
+# daemon
+h2o_pidfile="%%H2O_PIDDIR%%${name}.pid"
+procname="%%PREFIX%%/bin/${name}"
+command=/usr/sbin/daemon
+command_args=" -f -c -r -p ${h2o_pidfile} ${procname} ${h2o_options}"
+start_precmd="h2o_precmd"
+
+h2o_precmd()
+{
+	# create empty pidfile with correct permissions
+	install -o ${h2o_user} /dev/null ${h2o_pidfile}
+}
+
+load_rc_config $name
+run_rc_command "$1"

Added: head/www/h2o/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/pkg-descr	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,23 @@
+H2O is a very fast HTTP server written in C. It can also be used as a library.
+It supports:
+
+- HTTP/1.0, HTTP/1.1
+- [HTTP/2](http://http2.github.io/)
+- draft 16 (and draft 14 to support older clients)
+- persistent connections
+- chunked encoding
+- negotiation methods: NPN, ALPN, Upgrade, direct
+- dependency and weight-based prioritization
+- server push
+- TLS
+- uses [OpenSSL](https://www.openssl.org/)
+- forward secrecy
+- AEAD ciphers
+- OCSP stapling (automatically enabled)
+- session resumption (internal memory)
+- conditional GET using last-modified / etag
+- mime-type configuration
+- reverse proxy
+- persistent upstream connection
+
+WWW: http://github.com/h2o/h2o

Added: head/www/h2o/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/h2o/pkg-plist	Tue Feb 17 21:03:05 2015	(r379190)
@@ -0,0 +1,5 @@
+bin/h2o
+@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_LOGDIR%%
+@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_PIDDIR%%
+@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%ETCDIR%%
+@sample %%ETCDIR%%/h2o.conf.sample



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