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 8B732138334 for ; Thu, 26 Jul 2018 20:39:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75688E092E; Thu, 26 Jul 2018 20:39:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3668AE092E for ; Thu, 26 Jul 2018 20:39:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F0972335CCD for ; Thu, 26 Jul 2018 20:39:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 253A4365 for ; Thu, 26 Jul 2018 20:39:40 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1532637572.a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/teleport/files/, sys-cluster/teleport/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-cluster/teleport/Manifest sys-cluster/teleport/files/teleport-2.5.init.d sys-cluster/teleport/files/teleport-2.5.service sys-cluster/teleport/files/teleport.init.d sys-cluster/teleport/files/teleport.service sys-cluster/teleport/teleport-2.5.8.ebuild X-VCS-Directories: sys-cluster/teleport/files/ sys-cluster/teleport/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc X-VCS-Branch: master Date: Thu, 26 Jul 2018 20:39:40 +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: 2c4e1f28-afce-4460-96d9-765c4b27f519 X-Archives-Hash: f149085d1c360e2ca2d411379524fa2f commit: a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc Author: Graeme Lawes gmail com> AuthorDate: Sun Jul 8 16:31:44 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Jul 26 20:39:32 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a9f1d0 sys-cluster/teleport: add v2.5.8 sys-cluster/teleport/Manifest | 1 + sys-cluster/teleport/files/teleport-2.5.init.d | 37 ----------------- sys-cluster/teleport/files/teleport-2.5.service | 13 ------ sys-cluster/teleport/files/teleport.init.d | 10 ++++- sys-cluster/teleport/files/teleport.service | 8 ++-- sys-cluster/teleport/teleport-2.5.8.ebuild | 55 +++++++++++++++++++++++++ 6 files changed, 70 insertions(+), 54 deletions(-) diff --git a/sys-cluster/teleport/Manifest b/sys-cluster/teleport/Manifest index d1686e71f31..739e3918ea0 100644 --- a/sys-cluster/teleport/Manifest +++ b/sys-cluster/teleport/Manifest @@ -2,3 +2,4 @@ DIST teleport-2.4.2.tar.gz 9975909 BLAKE2B 68916e1d15f49448e918b39b2a760f90eca29 DIST teleport-2.4.5.tar.gz 9975753 BLAKE2B cdb6e577cd565cf6760d73c92cac674571e9b1257d23b280bd96428cca4e7c593738a925d3632a80fed3e0868c5f3aac79800db19bbf2a2b92d495600bf014cc SHA512 15e7e3c52c058625eb525c7c9cda00186eba037edbed89d21fb090b87c05570a1636f328260d4c7445253b0f5b81f321ce0da7d2b7fc316a0a9938ed22cc6c9c DIST teleport-2.5.2.tar.gz 16211219 BLAKE2B 28d0d1bb8d01fba39e79a262744b69a9df27438b9dbb0a25cd23acd57b6004a7f2309e432c0db4188c2e023a0b0299fd64723acfd57c1328d2345bba08fff4a9 SHA512 58fad4015824b9077bbd13cc3c6a994e5a54ed367264477854da7b129eea04c4cba44a580650a259b01f390a9f2028d7501df2ac4ab4821d085bbfe1cd887ec5 DIST teleport-2.5.6.tar.gz 16216649 BLAKE2B e5ae8645d59df2684601dab5c222399d89b356592774365ffbca4e3f2d9ed745f2839902ee1e244c7b7eb300230d771daa754bbbbe29fc8e79f833715094d4f2 SHA512 fae1eb53ff45115551c5002745303cd0e9a044557e6e56cda870a57531700bb68e23b59d2930ac2dd654b200732edc3ed9432e1bc0e9dbf0e7529e980599a323 +DIST teleport-2.5.8.tar.gz 16219666 BLAKE2B dd64ef4ca5b26e025e46c88d58e7ec226810b583c4b740416f6cc0caec5ea7d050c732368917ec34c5f8a36c7670d2903baa6c32203a2c5cac972e3a2b4bcbbb SHA512 070eebc889adde017641a833ee0e414c5f56848ac36fa96fb66e83062212307904e8264da758042765ba13d6a0c1b4f5314c1b0e90a2c37723ef1c0aa22889be diff --git a/sys-cluster/teleport/files/teleport-2.5.init.d b/sys-cluster/teleport/files/teleport-2.5.init.d deleted file mode 100644 index a951ec5318a..00000000000 --- a/sys-cluster/teleport/files/teleport-2.5.init.d +++ /dev/null @@ -1,37 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -: ${TELEPORT_CONFDIR:=/etc/teleport} -: ${TELEPORT_PIDFILE:=/var/run/${SVCNAME}.pid} -: ${TELEPORT_BINARY:=/usr/bin/teleport} -: ${TELEPORT_LOGFILE:=/var/log/teleport.log} - -depend() { - need net -} - -start() { - ebegin "Starting Teleport SSH Service" - start-stop-daemon --start --exec /usr/bin/teleport \ - --background --make-pidfile --pidfile "${TELEPORT_PIDFILE}" \ - --stderr "${TELEPORT_LOGFILE}" \ - -- start --config="${TELEPORT_CONFDIR}/teleport.yaml" \ - ${TELEPORT_OPTS} - eend $? -} - -stop() { - ebegin "Stopping Teleport SSH Service" - start-stop-daemon --stop --exec /usr/bin/teleport \ - --pidfile "${TELEPORT_PIDFILE}" - eend $? -} - -reload() { - checkconfig || return 1 - ebegin "Reloading ${SVCNAME}" - start-stop-daemon --signal HUP \ - --exec "${TELEPORT_BINARY}" --pidfile "${TELEPORT_PIDFILE}" - eend $? -} diff --git a/sys-cluster/teleport/files/teleport-2.5.service b/sys-cluster/teleport/files/teleport-2.5.service deleted file mode 100644 index 37b38210aff..00000000000 --- a/sys-cluster/teleport/files/teleport-2.5.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Teleport SSH Service -After=network.target - -[Service] -Type=simple -Restart=on-failure -ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml --pid-file=/var/run/teleport.pid -ExecReload=/bin/kill -HUP $MAINPID -PIDFile=/var/run/teleport.pid - -[Install] -WantedBy=multi-user.target diff --git a/sys-cluster/teleport/files/teleport.init.d b/sys-cluster/teleport/files/teleport.init.d index a5d08b7f3f6..a951ec5318a 100644 --- a/sys-cluster/teleport/files/teleport.init.d +++ b/sys-cluster/teleport/files/teleport.init.d @@ -18,7 +18,7 @@ start() { --stderr "${TELEPORT_LOGFILE}" \ -- start --config="${TELEPORT_CONFDIR}/teleport.yaml" \ ${TELEPORT_OPTS} - eend $? + eend $? } stop() { @@ -27,3 +27,11 @@ stop() { --pidfile "${TELEPORT_PIDFILE}" eend $? } + +reload() { + checkconfig || return 1 + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP \ + --exec "${TELEPORT_BINARY}" --pidfile "${TELEPORT_PIDFILE}" + eend $? +} diff --git a/sys-cluster/teleport/files/teleport.service b/sys-cluster/teleport/files/teleport.service index b74734bbf9e..37b38210aff 100644 --- a/sys-cluster/teleport/files/teleport.service +++ b/sys-cluster/teleport/files/teleport.service @@ -1,11 +1,13 @@ [Unit] Description=Teleport SSH Service -After=network.target +After=network.target [Service] Type=simple -Restart=always -ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml +Restart=on-failure +ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml --pid-file=/var/run/teleport.pid +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/teleport.pid [Install] WantedBy=multi-user.target diff --git a/sys-cluster/teleport/teleport-2.5.8.ebuild b/sys-cluster/teleport/teleport-2.5.8.ebuild new file mode 100644 index 00000000000..597ac0e391f --- /dev/null +++ b/sys-cluster/teleport/teleport-2.5.8.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit golang-build systemd + +DESCRIPTION="Modern SSH server for teams managing distributed infrastructure" +HOMEPAGE="https://gravitational.com/teleport" + +EGO_PN="github.com/gravitational/${PN}/..." + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 golang-vcs + EGIT_REPO_URI="https://github.com/gravitational/${PN}.git" +else + inherit golang-vcs-snapshot + SRC_URI="https://github.com/gravitational/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm" +fi + +IUSE="" +LICENSE="Apache-2.0" +RESTRICT="test strip" +SLOT="0" + +DEPEND="app-arch/zip" +RDEPEND="" + +src_prepare() { + default + + sed -i -e 's/-j 3/-j 1/g' src/${EGO_PN%/*}/Makefile || die +} + +src_compile() { + BUILDFLAGS="" GOPATH="${S}" emake -j1 -C src/${EGO_PN%/*} full +} + +src_install() { + keepdir /var/lib/${PN} /etc/${PN} + dobin src/${EGO_PN%/*}/build/{tsh,tctl,teleport} + + insinto /etc/${PN} + doins "${FILESDIR}"/${PN}.yaml + + newinitd "${FILESDIR}"/${PN}.init.d ${PN} + newconfd "${FILESDIR}"/${PN}.conf.d ${PN} + + systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service + systemd_install_serviced "${FILESDIR}"/${PN}.service.conf ${PN}.service +} + +src_test() { + BUILDFLAGS="" GOPATH="${S}" emake -C src/${EGO_PN%/*} test +}