sslh has been updated to 1.16 (diff enclosed). Please note that: 1.) distfile has been moved to github. Makefile has been changed to use GH_*. 2.) sslh would like to use gmake. To circumvent this requirement this port has been patched in the past to use OpenBSDs make. As of 1.16 sslh requires to run a bash script before the actual build. This script is intended to generate a header file. The running of this script has been patched out by placing a prepared header file in ${FILESDIR} and a Perl one-liner in Makefile.
Comments? OK? Kind regards, -- Björn Ketelaars GPG key: 0x4F0E5F21
diff --git a/Makefile b/Makefile index bc8d41f..901251d 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,11 @@ COMMENT = SSL/SSH multiplexer -VERSION = 1.15 -DISTNAME = sslh-${VERSION} -REVISION = 0 +GH_ACCOUNT = yrutschle +GH_PROJECT = sslh +GH_COMMIT = 9d2deff6ad51622e2de1788af1d1465c5b37075e +GH_TAGNAME = v1.16 +DISTNAME = ${GH_PROJECT}-${GH_TAGNAME:S/v//} CATEGORIES = security net HOMEPAGE = http://www.rutschle.net/tech/sslh.shtml @@ -14,8 +16,6 @@ MAINTAINER = Bjorn Ketelaars <bjorn.ketela...@hydroxide.nl> # GPLv2+ PERMIT_PACKAGE_CDROM = Yes -MASTER_SITES = http://www.rutschle.net/tech/ - WANTLIB = c config LIB_DEPENDS = devel/libconfig @@ -23,9 +23,14 @@ MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include -DLIBCONFIG" \ LIBS="-L${LOCALBASE}/lib -lconfig" NO_TEST = Yes +do-configure: + @cp ${FILESDIR}/version.h ${WRKSRC} + @perl -pi -e 's,\@VERSION\@,${GH_TAGNAME:S/v//},g' ${WRKSRC}/Makefile \ + ${WRKSRC}/version.h + do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sslh - ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/sslh + ${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/sslh ${INSTALL_DATA} ${WRKSRC}/sslh.8 ${PREFIX}/man/man8 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sslh .for p in basic.cfg example.cfg diff --git a/distinfo b/distinfo index 7367725..e7beafa 100644 --- a/distinfo +++ b/distinfo @@ -1,2 +1,2 @@ -SHA256 (sslh-1.15.tar.gz) = /IVMxdlb4sUCk+ZVt0JwMuznTr7x9/ARnA/D4gcQnM0= -SIZE (sslh-1.15.tar.gz) = 33241 +SHA256 (sslh-1.16.tar.gz) = qw4z/5R6CM8ErykI7Rsfb0ogIOsEsShxhpfgTd0SkXc= +SIZE (sslh-1.16.tar.gz) = 36485 diff --git a/files/version.h b/files/version.h new file mode 100644 index 0000000..96ccb5f --- /dev/null +++ b/files/version.h @@ -0,0 +1,5 @@ +#ifndef _VERSION_H_ +#define _VERSION_H_ + +#define VERSION "@VERSION@" +#endif diff --git a/patches/patch-Makefile b/patches/patch-Makefile index 35e0d0a..66b3fd8 100644 --- a/patches/patch-Makefile +++ b/patches/patch-Makefile @@ -1,10 +1,13 @@ ---- Makefile.orig Sat Jul 27 16:25:04 2013 -+++ Makefile Mon Mar 24 18:28:02 2014 -@@ -2,35 +2,20 @@ +--- Makefile.orig Tue Feb 11 22:06:01 2014 ++++ Makefile Mon Jan 12 21:15:17 2015 +@@ -1,49 +1,29 @@ + # Configuration - VERSION="1.15" +-VERSION=$(shell ./genver.sh -r) ++VERSION=@VERSION@ USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files) --USELIBWRAP= # Use libwrap? + USELIBWRAP= # Use libwrap? + USELIBCAP= # Use libcap? COV_TEST= # Perform test coverage? PREFIX=/usr/local @@ -21,24 +24,36 @@ CC ?= gcc CFLAGS ?=-Wall -g $(CFLAGS_COV) - LIBS=$(LDFLAGS) + LIBS= OBJS=common.o sslh-main.o probe.o -ifneq ($(strip $(USELIBWRAP)),) - LIBS:=$(LIBS) -lwrap -- CFLAGS:=$(CFLAGS) -DLIBWRAP +- CPPFLAGS+=-DLIBWRAP -endif - -ifneq ($(strip $(USELIBCONFIG)),) - LIBS:=$(LIBS) -lconfig -- CFLAGS:=$(CFLAGS) -DLIBCONFIG +- CPPFLAGS+=-DLIBCONFIG +-endif +- +-ifneq ($(strip $(USELIBCAP)),) +- LIBS:=$(LIBS) -lcap +- CPPFLAGS+=-DLIBCAP -endif - all: sslh $(MAN) echosrv .c.o: *.h -@@ -51,7 +36,7 @@ echosrv: $(OBJS) echosrv.o - $(CC) $(CFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + + version.h: +- ./genver.sh >version.h + + sslh: sslh-fork sslh-select + +@@ -59,7 +39,7 @@ echosrv: $(OBJS) echosrv.o + $(CC) $(CFLAGS) $(LDFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS) $(MAN): sslh.pod Makefile - pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) diff --git a/patches/patch-basic_cfg b/patches/patch-basic_cfg index 4ecb02f..fa6d8ec 100644 --- a/patches/patch-basic_cfg +++ b/patches/patch-basic_cfg @@ -1,9 +1,9 @@ $OpenBSD: ports/net/sslh/patches/patch-basic_cfg,v 1.1 2013/04/01 21:37:28 sthen Exp $ ---- basic.cfg.orig Tue Mar 5 19:01:27 2013 -+++ basic.cfg Tue Mar 5 19:01:27 2013 -@@ -6,7 +6,7 @@ foreground: false; - inetd: false; +--- basic.cfg.orig Tue Feb 11 22:06:01 2014 ++++ basic.cfg Thu May 8 13:16:47 2014 +@@ -7,7 +7,7 @@ inetd: false; numeric: false; + transparent: false; timeout: 2; -user: "nobody"; +user: "_sslh"; diff --git a/patches/patch-example_cfg b/patches/patch-example_cfg index aad9f2d..e9dc590 100644 --- a/patches/patch-example_cfg +++ b/patches/patch-example_cfg @@ -1,9 +1,9 @@ $OpenBSD: ports/net/sslh/patches/patch-example_cfg,v 1.1 2013/04/01 21:37:28 sthen Exp $ ---- example.cfg.orig Tue Mar 5 19:01:28 2013 -+++ example.cfg Tue Mar 5 19:01:28 2013 -@@ -8,7 +8,7 @@ foreground: true; - inetd: false; +--- example.cfg.orig Tue Feb 11 22:06:01 2014 ++++ example.cfg Thu May 8 13:16:47 2014 +@@ -9,7 +9,7 @@ inetd: false; numeric: false; + transparent: false; timeout: 2; -user: "nobody"; +user: "_sslh"; diff --git a/patches/patch-sslh_pod b/patches/patch-sslh_pod index 648fee8..eec3f2e 100644 --- a/patches/patch-sslh_pod +++ b/patches/patch-sslh_pod @@ -1,6 +1,6 @@ $OpenBSD: ports/net/sslh/patches/patch-sslh_pod,v 1.3 2013/04/01 21:37:28 sthen Exp $ ---- sslh.pod.orig Sat Dec 15 16:29:38 2012 -+++ sslh.pod Tue Mar 5 19:15:23 2013 +--- sslh.pod.orig Tue Feb 11 22:06:01 2014 ++++ sslh.pod Thu May 8 13:16:47 2014 @@ -26,17 +26,14 @@ Hence B<sslh> acts as a protocol demultiplexer, or a switchboard. Its name comes from its original function to serve SSH and HTTPS on the same port. @@ -26,7 +26,7 @@ $OpenBSD: ports/net/sslh/patches/patch-sslh_pod,v 1.3 2013/04/01 21:37:28 sthen =head2 Configuration file A configuration file can be supplied to B<sslh>. Command -@@ -187,24 +184,6 @@ Runs in background. This overrides B<foreground> if se +@@ -188,24 +185,6 @@ Runs in background. This overrides B<foreground> if se the configuration file (or on the command line, but there is no point setting both on the command line unless you have a personality disorder). diff --git a/pkg/PLIST b/pkg/PLIST index fcd3255..13e20ea 100644 --- a/pkg/PLIST +++ b/pkg/PLIST @@ -5,7 +5,7 @@ @bin sbin/sslh-fork @bin sbin/sslh-select share/doc/sslh/ -share/doc/sslh/README +share/doc/sslh/README.md share/examples/sslh/ share/examples/sslh/basic.cfg share/examples/sslh/example.cfg