From d2dc569f99dd1dc992046f1a628147943890766e Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 30 Sep 2011 12:49:09 +0000 Subject: [PATCH 1/1] [package] sslh: update to 1.9 his patch bumps the sslh package to v1.9. This update brings about some useful changes, including: * Multiple bind address support * IPv6 support * OpenVPN support * tinc VPN support Tested and working on ar71xx. Signed-off-by: Jonathan McCrohan git-svn-id: svn://svn.openwrt.org/openwrt/packages@28331 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/sslh/Makefile | 8 ++++---- net/sslh/files/sslh.config | 11 +++++++++-- net/sslh/files/sslh.init | 20 +++++++++++++------- net/sslh/patches/001-no_sslh_select.patch | 29 +++++++++++++++++++++++++++++ net/sslh/patches/001-no_strip.patch | 10 ---------- net/sslh/patches/002-no_strip.patch | 10 ++++++++++ 6 files changed, 65 insertions(+), 23 deletions(-) create mode 100644 net/sslh/patches/001-no_sslh_select.patch create mode 100644 net/sslh/patches/002-no_strip.patch diff --git a/net/sslh/Makefile b/net/sslh/Makefile index b5d32d212..4a568a175 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sslh -PKG_VERSION:=1.7a -PKG_RELEASE:=2 +PKG_VERSION:=1.9 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://rutschle.net/tech/ -PKG_MD5SUM:=ee124654412198a5e11fe28acf10634d +PKG_MD5SUM:=1c0193853ef35f80e3e4b1a744832cd1 include $(INCLUDE_DIR)/package.mk @@ -40,7 +40,7 @@ endef define Package/sslh/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh $(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) $(INSTALL_DIR) $(1)/etc/config diff --git a/net/sslh/files/sslh.config b/net/sslh/files/sslh.config index 3e22c17fb..e4a21d17c 100644 --- a/net/sslh/files/sslh.config +++ b/net/sslh/files/sslh.config @@ -4,14 +4,21 @@ config 'sslh' 'default' # disable or enable option 'enable' '1' # listen defaults to '0.0.0.0:443' (all interfaces) + # multiple -p arguments may be supplied using a uci list # -p : option 'listen' '' # ssh defaults to 'localhost:22' - # -s : + # --ssh : option 'ssh' '' # ssl defaults to 'localhost:443' - # -l : + # --ssl : option 'ssl' '' + # openvpn defaults to 'localhost:1194' + # --openvpn : + option 'openvpn' '' + # tinc defaults to 'localhost:655' + # --tinc : + option 'tinc' '' # timeout (for ssh, then ssl is assumed) defaults to 2 # -t option 'timeout' '' diff --git a/net/sslh/files/sslh.init b/net/sslh/files/sslh.init index 98b7d84eb..8de272596 100644 --- a/net/sslh/files/sslh.init +++ b/net/sslh/files/sslh.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009-2010 OpenWrt.org +# Copyright (C) 2009-2011 OpenWrt.org NAME=sslh PROG=/usr/sbin/sslh @@ -24,18 +24,24 @@ sslh_start() local args="-P /var/run/${NAME}.${PIDCOUNT}.pid" local val # A) listen parameter - config_get val "${section}" listen - [ -n "${val}" ] && append args "-p ${val}" + config_get vals "${section}" listen + [ -n "${vals}" ] && for val in $vals; do append args "-p ${val}"; done # B) ssh parameter config_get val "${section}" ssh - [ -n "${val}" ] && append args "-s ${val}" + [ -n "${val}" ] && append args "--ssh ${val}" # C) ssl parameter config_get val "${section}" ssl - [ -n "${val}" ] && append args "-l ${val}" - # D) timeout (for ssh, then ssl is assumed) + [ -n "${val}" ] && append args "--ssl ${val}" + # D) openvpn parameter + config_get val "${section}" openvpn + [ -n "${val}" ] && append args "--openvpn ${val}" + # E) tinc parameter + config_get val "${section}" tinc + [ -n "${val}" ] && append args "--tinc ${val}" + # F) timeout (before a connection is considered to be SSH) config_get val "${section}" timeout [ -n "${val}" ] && append args "-t ${val}" - # E) verbose parameter + # G) verbose parameter local verbosed config_get_bool verbosed "${section}" verbose 0 [ "${verbosed}" -ne 0 ] && append args "-v" diff --git a/net/sslh/patches/001-no_sslh_select.patch b/net/sslh/patches/001-no_sslh_select.patch new file mode 100644 index 000000000..9dd4ef667 --- /dev/null +++ b/net/sslh/patches/001-no_sslh_select.patch @@ -0,0 +1,29 @@ +--- a/Makefile ++++ b/Makefile +@@ -27,16 +27,12 @@ + $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $< + + +-sslh: $(OBJS) sslh-fork sslh-select ++sslh: $(OBJS) sslh-fork + + sslh-fork: $(OBJS) sslh-fork.o Makefile common.h + $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS) + strip sslh-fork + +-sslh-select: $(OBJS) sslh-select.o Makefile common.h +- $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS) +- strip sslh-select +- + + $(MAN): sslh.pod Makefile + pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) +@@ -58,7 +54,7 @@ + update-rc.d sslh remove + + clean: +- rm -f sslh-fork sslh-select $(MAN) *.o ++ rm -f sslh-fork $(MAN) *.o + + tags: + ctags -T *.[ch] diff --git a/net/sslh/patches/001-no_strip.patch b/net/sslh/patches/001-no_strip.patch index cf6e53d61..e69de29bb 100644 --- a/net/sslh/patches/001-no_strip.patch +++ b/net/sslh/patches/001-no_strip.patch @@ -1,10 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -24,7 +24,6 @@ all: sslh $(MAN) - - sslh: sslh.c Makefile - $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh sslh.c $(LIBS) -- strip sslh - - $(MAN): sslh.pod Makefile - pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) diff --git a/net/sslh/patches/002-no_strip.patch b/net/sslh/patches/002-no_strip.patch new file mode 100644 index 000000000..5ca74ee64 --- /dev/null +++ b/net/sslh/patches/002-no_strip.patch @@ -0,0 +1,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,6 @@ + + sslh-fork: $(OBJS) sslh-fork.o Makefile common.h + $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS) +- strip sslh-fork + + sslh-select: $(OBJS) sslh-select.o Makefile common.h + $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS) -- 2.11.0