From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EC9681381F1 for ; Wed, 13 Jul 2016 16:59:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2779721C182; Wed, 13 Jul 2016 16:59:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AF65221C182 for ; Wed, 13 Jul 2016 16:59:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7A397340CB8 for ; Wed, 13 Jul 2016 16:59:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 311F52440 for ; Wed, 13 Jul 2016 16:59:01 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1468429126.f51fc3240bc6f1f37736ece7f8ecfc5a242e7712.kensington@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/sslh/, net-misc/sslh/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/sslh/files/sslh-1.18-systemd-generator.patch net-misc/sslh/files/sslh-1.18-version-deps.patch net-misc/sslh/files/sslh.conf.d-2 net-misc/sslh/files/sslh.init.d-2 net-misc/sslh/sslh-1.18-r1.ebuild X-VCS-Directories: net-misc/sslh/ net-misc/sslh/files/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: f51fc3240bc6f1f37736ece7f8ecfc5a242e7712 X-VCS-Branch: master Date: Wed, 13 Jul 2016 16:59:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7f5f5c82-af5c-4cdb-abc4-617c0bd4e46a X-Archives-Hash: 5ea7dbb3aee73c658b09a8b5a2b62864 commit: f51fc3240bc6f1f37736ece7f8ecfc5a242e7712 Author: Craig Andrews integralblue com> AuthorDate: Fri Jun 24 22:24:34 2016 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Wed Jul 13 16:58:46 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f51fc324 net-misc/sslh: revision bump adding systemd support This new revision builds the systemd generator and installs the systemd service. It also renames OPTIONS to DAEMON_OPTS in the sslh conf.d file for compatibility with the systemd service which sources it. Gentoo-bug: 563600 .../sslh/files/sslh-1.18-systemd-generator.patch | 26 ++++++++++ net-misc/sslh/files/sslh-1.18-version-deps.patch | 13 +++++ net-misc/sslh/files/sslh.conf.d-2 | 4 +- net-misc/sslh/files/sslh.init.d-2 | 2 +- net-misc/sslh/sslh-1.18-r1.ebuild | 60 ++++++++++++++++++++++ 5 files changed, 102 insertions(+), 3 deletions(-) diff --git a/net-misc/sslh/files/sslh-1.18-systemd-generator.patch b/net-misc/sslh/files/sslh-1.18-systemd-generator.patch new file mode 100644 index 0000000..476de2a --- /dev/null +++ b/net-misc/sslh/files/sslh-1.18-systemd-generator.patch @@ -0,0 +1,26 @@ +https://patch-diff.githubusercontent.com/raw/yrutschle/sslh/pull/98 +--- a/Makefile ++++ b/Makefile +@@ -27,6 +27,8 @@ CFLAGS ?=-Wall -g $(CFLAGS_COV) + LIBS= + OBJS=common.o sslh-main.o probe.o tls.o + ++CONDITIONAL_TARGETS= ++ + ifneq ($(strip $(USELIBWRAP)),) + LIBS:=$(LIBS) -lwrap + CPPFLAGS+=-DLIBWRAP +@@ -54,10 +56,11 @@ endif + ifneq ($(strip $(USESYSTEMD)),) + LIBS:=$(LIBS) -lsystemd + CPPFLAGS+=-DSYSTEMD ++ CONDITIONAL_TARGETS+=systemd-sslh-generator + endif + + +-all: sslh $(MAN) echosrv ++all: sslh $(MAN) echosrv $(CONDITIONAL_TARGETS) + + .c.o: *.h + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + diff --git a/net-misc/sslh/files/sslh-1.18-version-deps.patch b/net-misc/sslh/files/sslh-1.18-version-deps.patch new file mode 100644 index 0000000..aa02871 --- /dev/null +++ b/net-misc/sslh/files/sslh-1.18-version-deps.patch @@ -0,0 +1,13 @@ +make sure the files using version.h depend on it being generated first + +--- a/Makefile ++++ b/Makefile +@@ -78,7 +78,7 @@ + systemd-sslh-generator: systemd-sslh-generator.o + $(CC) $(CFLAGS) $(LDFLAGS) -o systemd-sslh-generator systemd-sslh-generator.o -lconfig + +-echosrv: $(OBJS) echosrv.o ++echosrv: version.h $(OBJS) echosrv.o + $(CC) $(CFLAGS) $(LDFLAGS) -o echosrv echosrv.o probe.o common.o tls.o $(LIBS) + + $(MAN): sslh.pod Makefile diff --git a/net-misc/sslh/files/sslh.conf.d-2 b/net-misc/sslh/files/sslh.conf.d-2 index 719be7b..73d08d5 100644 --- a/net-misc/sslh/files/sslh.conf.d-2 +++ b/net-misc/sslh/files/sslh.conf.d-2 @@ -1,8 +1,8 @@ # /etc/conf.d/sslh # Options to sslh itself. See the sslh(1) man page. -#OPTIONS="" +#DAEMON_OPTS="" # Multiplexing example # Port 44 can be used for ssh, http, and https. Drop privileges after starting. -#OPTIONS="-p localhost:44 --ssh 127.0.0.1:22 --http 127.0.0.1:80 --ssl 127.0.0.1:443 --user nobody" +#DAEMON_OPTS="-p localhost:44 --ssh 127.0.0.1:22 --http 127.0.0.1:80 --ssl 127.0.0.1:443 --user nobody" diff --git a/net-misc/sslh/files/sslh.init.d-2 b/net-misc/sslh/files/sslh.init.d-2 index 0351f7c..b75e96f 100644 --- a/net-misc/sslh/files/sslh.init.d-2 +++ b/net-misc/sslh/files/sslh.init.d-2 @@ -8,7 +8,7 @@ start() { start-stop-daemon --start \ --pidfile /var/run/${SVCNAME}.pid \ --exec /usr/sbin/sslh -- \ - ${OPTIONS} \ + ${DAEMON_OPTS} \ --pidfile /var/run/${SVCNAME}.pid eend $? } diff --git a/net-misc/sslh/sslh-1.18-r1.ebuild b/net-misc/sslh/sslh-1.18-r1.ebuild new file mode 100644 index 0000000..1059a96 --- /dev/null +++ b/net-misc/sslh/sslh-1.18-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +MY_P="${PN}-v${PV}" +inherit systemd toolchain-funcs + +DESCRIPTION="Port multiplexer - accept both HTTPS and SSH connections on the same port" +HOMEPAGE="http://www.rutschle.net/tech/sslh.shtml" +SRC_URI="http://www.rutschle.net/tech/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~m68k ~mips ~s390 ~sh ~x86" +IUSE="caps systemd tcpd" + +RDEPEND="caps? ( sys-libs/libcap ) + systemd? ( sys-apps/systemd:= ) + tcpd? ( sys-apps/tcp-wrappers ) + dev-libs/libconfig" +DEPEND="${RDEPEND} + dev-lang/perl" + +RESTRICT="test" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}/${PN}-1.17-version-deps.patch" + "${FILESDIR}/${PN}-1.18-version-deps.patch" + "${FILESDIR}/${PN}-1.18-systemd-generator.patch" +) + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + USELIBCAP=$(usev caps) \ + USELIBWRAP=$(usev tcpd) \ + USESYSTEMD=$(usev systemd) +} + +src_install() { + dosbin sslh-{fork,select} + dosym sslh-fork /usr/sbin/sslh + doman sslh.8.gz + dodoc ChangeLog README.md + + newinitd "${FILESDIR}"/sslh.init.d-2 sslh + newconfd "${FILESDIR}"/sslh.conf.d-2 sslh + + if use systemd; then + # Gentoo puts the binaries in /usr/sbin, but upstream puts them in /usr/bin + sed -i -e 's~/usr/bin/~/usr/sbin/~g' scripts/systemd.sslh.service || die + systemd_newunit scripts/systemd.sslh.service sslh.service + exeinto /usr/lib/systemd/system-generators/ + doexe systemd-sslh-generator + fi +}