diff options
author | Graeme Lawes <graemelawes@gmail.com> | 2018-07-08 12:31:44 -0400 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-07-26 22:39:32 +0200 |
commit | a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc (patch) | |
tree | bea48d412ab56a8e77e92efc2a13bc7de55374fa /sys-cluster/teleport | |
parent | x11-plugins/wmpager: EAPI7, improve ebuild (diff) | |
download | gentoo-a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc.tar.gz gentoo-a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc.tar.bz2 gentoo-a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc.zip |
sys-cluster/teleport: add v2.5.8
Diffstat (limited to 'sys-cluster/teleport')
-rw-r--r-- | sys-cluster/teleport/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/teleport/files/teleport-2.5.init.d | 37 | ||||
-rw-r--r-- | sys-cluster/teleport/files/teleport-2.5.service | 13 | ||||
-rw-r--r-- | sys-cluster/teleport/files/teleport.init.d | 10 | ||||
-rw-r--r-- | sys-cluster/teleport/files/teleport.service | 8 | ||||
-rw-r--r-- | 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 d1686e71f311..739e3918ea0b 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 a951ec5318a0..000000000000 --- 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 37b38210aff4..000000000000 --- 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 a5d08b7f3f69..a951ec5318a0 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 b74734bbf9ef..37b38210aff4 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 000000000000..597ac0e391f4 --- /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 +} |