svn commit: r405603 - in head/security/hitch: . files

Ryan Steinmetz zi at FreeBSD.org
Sat Jan 9 03:23:03 UTC 2016


Author: zi
Date: Sat Jan  9 03:23:01 2016
New Revision: 405603
URL: https://svnweb.freebsd.org/changeset/ports/405603

Log:
  - Update to 1.1.0

Added:
  head/security/hitch/files/patch-buildfixes   (contents, props changed)
Modified:
  head/security/hitch/Makefile
  head/security/hitch/distinfo
  head/security/hitch/files/hitch.in
  head/security/hitch/pkg-plist

Modified: head/security/hitch/Makefile
==============================================================================
--- head/security/hitch/Makefile	Sat Jan  9 02:18:25 2016	(r405602)
+++ head/security/hitch/Makefile	Sat Jan  9 03:23:01 2016	(r405603)
@@ -2,8 +2,8 @@
 # $FreeBSD$
 
 PORTNAME=		hitch
+PORTVERSION=		1.1.0
 DISTVERSIONPREFIX=	${PORTNAME}-
-DISTVERSION=		1.0.0-beta1
 CATEGORIES=		security
 
 MAINTAINER=		zi at FreeBSD.org
@@ -11,6 +11,7 @@ COMMENT=		TLS proxy to forward connectio
 
 LICENSE=		BSD2CLAUSE
 
+BUILD_DEPENDS=		rst2man:textproc/py-docutils
 LIB_DEPENDS=		libev.so:${PORTSDIR}/devel/libev
 
 USERS=			nobody
@@ -26,9 +27,6 @@ LDFLAGS+=		-L${LOCALBASE}/lib
 USE_GITHUB=		yes
 GH_ACCOUNT=		varnish
 
-post-patch:
-	${REINPLACE_CMD} 's|stud|${PORTNAME}|g' ${WRKSRC}/*.* ${WRKSRC}/src/*
-
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc
 	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/

Modified: head/security/hitch/distinfo
==============================================================================
--- head/security/hitch/distinfo	Sat Jan  9 02:18:25 2016	(r405602)
+++ head/security/hitch/distinfo	Sat Jan  9 03:23:01 2016	(r405603)
@@ -1,2 +1,2 @@
-SHA256 (varnish-hitch-hitch-1.0.0-beta1_GH0.tar.gz) = 9214f748a28a2ac726197ad74720889dcba345fecf0369259df7769e3a734d3d
-SIZE (varnish-hitch-hitch-1.0.0-beta1_GH0.tar.gz) = 48476
+SHA256 (varnish-hitch-hitch-1.1.0_GH0.tar.gz) = 5cfafd19fb81f323677b142044c8b825627c3b4994cb9b545dc4e292f64a4d0b
+SIZE (varnish-hitch-hitch-1.1.0_GH0.tar.gz) = 79116

Modified: head/security/hitch/files/hitch.in
==============================================================================
--- head/security/hitch/files/hitch.in	Sat Jan  9 02:18:25 2016	(r405602)
+++ head/security/hitch/files/hitch.in	Sat Jan  9 03:23:01 2016	(r405603)
@@ -31,7 +31,7 @@ load_rc_config $name
 : ${hitch_enable="NO"}
 : ${hitch_config="%%PREFIX%%/etc/hitch.conf"}
 
-command="%%PREFIX%%/sbin/hitch-openssl"
+command="%%PREFIX%%/sbin/hitch"
 command_args="--daemon -u nobody -g nobody -s --config=${hitch_config}"
 
 required_files=${hitch_config}

Added: head/security/hitch/files/patch-buildfixes
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/hitch/files/patch-buildfixes	Sat Jan  9 03:23:01 2016	(r405603)
@@ -0,0 +1,186 @@
+\ No newline at end of file
+diff -urN Makefile.am Makefile.am
+--- Makefile.am	2015-11-20 08:25:04.000000000 -0500
++++ Makefile.am	2016-01-08 06:03:09.000000000 -0500
+@@ -2,7 +2,7 @@
+ SUBDIRS = src
+ 
+ hitch.8: hitch.man.rst
+-	rst2man --halt=2 $< $@
++	rst2man --halt=2 hitch.man.rst $@
+ 
+ doc_DATA = hitch.conf.ex CHANGES.rst README.md
+ 
+diff -urN bootstrap bootstrap
+--- bootstrap	2015-11-20 08:25:04.000000000 -0500
++++ bootstrap	2016-01-08 06:03:09.000000000 -0500
+@@ -1,4 +1,4 @@
+-#!/bin/bash -x
++#!/bin/sh -x
+ set -o errexit
+ aclocal
+ autoconf
+diff -urN configure.ac configure.ac
+--- configure.ac	2015-11-20 08:25:04.000000000 -0500
++++ configure.ac	2016-01-08 06:03:09.000000000 -0500
+@@ -2,7 +2,7 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ AC_PREREQ([2.59])
+-AC_INIT([hitch], [1.1.0], [support at varnish-software.com])
++AC_INIT([hitch], [1.1.1dev], [support at varnish-software.com])
+ AC_CONFIG_SRCDIR([src/configuration.c])
+ AC_CONFIG_HEADERS([config.h])
+ 
+diff -urN hitch.conf.ex hitch.conf.ex
+--- hitch.conf.ex	2015-11-20 08:25:04.000000000 -0500
++++ hitch.conf.ex	2016-01-08 06:03:09.000000000 -0500
+@@ -32,7 +32,7 @@
+ #
+ # Run openssl ciphers for list of available ciphers.
+ # type: string
+-ciphers = ""
++ciphers = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
+ 
+ # Enforce server cipher list order
+ #
+diff -urN src/configuration.c src/configuration.c
+--- src/configuration.c	2015-11-20 08:25:04.000000000 -0500
++++ src/configuration.c	2016-01-08 06:03:09.000000000 -0500
+@@ -13,7 +13,6 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <getopt.h>
+-#include <libgen.h>
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <grp.h>
+@@ -904,8 +903,13 @@
+ }
+ 
+ void
+-config_print_usage_fd(char *prog, hitch_config *cfg, FILE *out)
++config_print_usage_fd(char *prog, FILE *out)
+ {
++	hitch_config *cfg;
++
++	cfg = config_new();
++	AN(cfg);
++
+ 	if (out == NULL)
+ 		out = stderr;
+ 	fprintf(out, "Usage: %s [OPTIONS] PEM\n\n", basename(prog));
+@@ -991,12 +995,14 @@
+ 	fprintf(out, "  -p  --pidfile=FILE         PID file\n");
+ 	fprintf(out, "  -V  --version              Print program version and exit\n");
+ 	fprintf(out, "  -h  --help                 This help message\n");
++
++	config_destroy(cfg);
+ }
+ 
+ void
+-config_print_usage(char *prog, hitch_config *cfg)
++config_print_usage(char *prog)
+ {
+-	config_print_usage_fd(prog, cfg, stdout);
++	config_print_usage_fd(prog, stdout);
+ }
+ 
+ int
+@@ -1050,7 +1056,7 @@
+ 	};
+ 
+ 	if (argc == 1) {
+-		config_print_usage(argv[0], cfg);
++		config_print_usage(argv[0]);
+ 		*retval = 0;
+ 		return (1);
+ 	}
+@@ -1142,7 +1148,7 @@
+ 			return (1);
+ 			break;
+ 		case 'h':
+-			config_print_usage(argv[0], cfg);
++			config_print_usage(argv[0]);
+ 			*retval = 0;
+ 			return (1);
+ 			break;
+diff -urN src/hitch.c src/hitch.c
+--- src/hitch.c	2015-11-20 08:25:04.000000000 -0500
++++ src/hitch.c	2016-01-08 06:03:09.000000000 -0500
+@@ -37,6 +37,7 @@
+ 
+ #include "config.h"
+ 
++#include <libgen.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+diff -urN src/tests/test08-test-configs src/tests/test08-test-configs
+--- src/tests/test08-test-configs	2015-11-20 08:25:04.000000000 -0500
++++ src/tests/test08-test-configs	2016-01-08 06:03:09.000000000 -0500
+@@ -18,3 +18,10 @@
+ $HITCH --test --config=configs/test08d.cfg certs/default.example.com 2>/dev/null 1>&2
+ test "$?" = "0" || die "Valid config test08d.cfg unparseable?"
+ 
++# Issue #52.
++$HITCH --config=configs/default.cfg --help 2>/dev/null 1>&2
++test "$?" = "0" || die "--help after --config does not work as expected."
++
++# Works as expected.
++$HITCH --test --config=configs/default.cfg 2>/dev/null 1>&2
++test "$?" = "1" || die "--help with --config does not work as expected."
+diff -urN src/tests/test10-dflt-certs src/tests/test10-dflt-certs
+--- src/tests/test10-dflt-certs	1969-12-31 19:00:00.000000000 -0500
++++ src/tests/test10-dflt-certs	2016-01-08 06:03:09.000000000 -0500
+@@ -0,0 +1,50 @@
++#/bin/bash
++#
++# 
++#
++. common.sh
++set +o errexit
++
++PORT1=$(($RANDOM + 1024))
++PORT2=$(($RANDOM + 1024))
++PORT3=$(($RANDOM + 1024))
++PORT4=$(($RANDOM + 1024))
++
++$HITCH $HITCH_ARGS --backend=[hitch-tls.org]:80 \
++       --frontend=[${LISTENADDR}]:$PORT1+certs/site1.example.com \
++       --frontend=[${LISTENADDR}]:$PORT2+certs/site2.example.com \
++       --frontend=[${LISTENADDR}]:$PORT3+certs/site3.example.com \
++       --frontend=[${LISTENADDR}]:$PORT4 \
++       certs/default.example.com
++
++test "$?" = "0" || die "Hitch did not start."
++
++# :PORT1 without SNI
++echo | openssl s_client -prexit -connect $LISTENADDR:$PORT1 2>/dev/null > $DUMPFILE
++test "$?" = "0" || die "s_client failed"
++grep -q -c "subject=/CN=site1.example.com" $DUMPFILE
++test "$?" = "0" || die "s_client got wrong certificate on listen port #1"
++
++# :PORT1 w/ SNI
++echo | openssl s_client -servername site1.example.com -prexit -connect $LISTENADDR:$PORT1 2>/dev/null > $DUMPFILE
++test "$?" = "0" || die "s_client failed"
++grep -q -c "subject=/CN=site1.example.com" $DUMPFILE
++test "$?" = "0" || die "s_client got wrong certificate in listen port #2"
++
++# :PORT1 w/ different matching SNI name
++echo | openssl s_client -servername site3.example.com -prexit -connect $LISTENADDR:$PORT1 2>/dev/null > $DUMPFILE
++test "$?" = "0" || die "s_client failed"
++grep -q -c "subject=/CN=site3.example.com" $DUMPFILE
++test "$?" = "0" || die "s_client got wrong certificate in listen port #2"
++
++# :PORT2 no SNI
++echo | openssl s_client -prexit -connect $LISTENADDR:$PORT2 > $DUMPFILE 2>&1
++test "$?" = "0" || die "s_client failed"
++grep -q -c "subject=/CN=site2.example.com" $DUMPFILE
++test "$?" = "0" || die "s_client got wrong certificate in listen port #2"
++
++# :PORT4 SNI w/ unknown servername 
++echo | openssl s_client -servername invalid.example.com -prexit -connect $LISTENADDR:$PORT4 > $DUMPFILE 2>&1
++test "$?" = "0" || die "s_client failed"
++grep -q -c "subject=/CN=default.example.com" $DUMPFILE
++test "$?" = "0" || die "s_client got wrong certificate in listen port #2"

Modified: head/security/hitch/pkg-plist
==============================================================================
--- head/security/hitch/pkg-plist	Sat Jan  9 02:18:25 2016	(r405602)
+++ head/security/hitch/pkg-plist	Sat Jan  9 03:23:01 2016	(r405603)
@@ -1,3 +1,6 @@
 man/man8/hitch.8.gz
-sbin/hitch-openssl
+sbin/hitch
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES.rst
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/hitch.conf.ex
 @sample etc/hitch.conf.sample


More information about the svn-ports-head mailing list