1 |
commit: a3a9f1d0002e2f2e17c6aaa594192dae4c3a56fc |
2 |
Author: Graeme Lawes <graemelawes <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jul 8 16:31:44 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 26 20:39:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a9f1d0 |
7 |
|
8 |
sys-cluster/teleport: add v2.5.8 |
9 |
|
10 |
sys-cluster/teleport/Manifest | 1 + |
11 |
sys-cluster/teleport/files/teleport-2.5.init.d | 37 ----------------- |
12 |
sys-cluster/teleport/files/teleport-2.5.service | 13 ------ |
13 |
sys-cluster/teleport/files/teleport.init.d | 10 ++++- |
14 |
sys-cluster/teleport/files/teleport.service | 8 ++-- |
15 |
sys-cluster/teleport/teleport-2.5.8.ebuild | 55 +++++++++++++++++++++++++ |
16 |
6 files changed, 70 insertions(+), 54 deletions(-) |
17 |
|
18 |
diff --git a/sys-cluster/teleport/Manifest b/sys-cluster/teleport/Manifest |
19 |
index d1686e71f31..739e3918ea0 100644 |
20 |
--- a/sys-cluster/teleport/Manifest |
21 |
+++ b/sys-cluster/teleport/Manifest |
22 |
@@ -2,3 +2,4 @@ DIST teleport-2.4.2.tar.gz 9975909 BLAKE2B 68916e1d15f49448e918b39b2a760f90eca29 |
23 |
DIST teleport-2.4.5.tar.gz 9975753 BLAKE2B cdb6e577cd565cf6760d73c92cac674571e9b1257d23b280bd96428cca4e7c593738a925d3632a80fed3e0868c5f3aac79800db19bbf2a2b92d495600bf014cc SHA512 15e7e3c52c058625eb525c7c9cda00186eba037edbed89d21fb090b87c05570a1636f328260d4c7445253b0f5b81f321ce0da7d2b7fc316a0a9938ed22cc6c9c |
24 |
DIST teleport-2.5.2.tar.gz 16211219 BLAKE2B 28d0d1bb8d01fba39e79a262744b69a9df27438b9dbb0a25cd23acd57b6004a7f2309e432c0db4188c2e023a0b0299fd64723acfd57c1328d2345bba08fff4a9 SHA512 58fad4015824b9077bbd13cc3c6a994e5a54ed367264477854da7b129eea04c4cba44a580650a259b01f390a9f2028d7501df2ac4ab4821d085bbfe1cd887ec5 |
25 |
DIST teleport-2.5.6.tar.gz 16216649 BLAKE2B e5ae8645d59df2684601dab5c222399d89b356592774365ffbca4e3f2d9ed745f2839902ee1e244c7b7eb300230d771daa754bbbbe29fc8e79f833715094d4f2 SHA512 fae1eb53ff45115551c5002745303cd0e9a044557e6e56cda870a57531700bb68e23b59d2930ac2dd654b200732edc3ed9432e1bc0e9dbf0e7529e980599a323 |
26 |
+DIST teleport-2.5.8.tar.gz 16219666 BLAKE2B dd64ef4ca5b26e025e46c88d58e7ec226810b583c4b740416f6cc0caec5ea7d050c732368917ec34c5f8a36c7670d2903baa6c32203a2c5cac972e3a2b4bcbbb SHA512 070eebc889adde017641a833ee0e414c5f56848ac36fa96fb66e83062212307904e8264da758042765ba13d6a0c1b4f5314c1b0e90a2c37723ef1c0aa22889be |
27 |
|
28 |
diff --git a/sys-cluster/teleport/files/teleport-2.5.init.d b/sys-cluster/teleport/files/teleport-2.5.init.d |
29 |
deleted file mode 100644 |
30 |
index a951ec5318a..00000000000 |
31 |
--- a/sys-cluster/teleport/files/teleport-2.5.init.d |
32 |
+++ /dev/null |
33 |
@@ -1,37 +0,0 @@ |
34 |
-#!/sbin/openrc-run |
35 |
-# Copyright 1999-2017 Gentoo Foundation |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-: ${TELEPORT_CONFDIR:=/etc/teleport} |
39 |
-: ${TELEPORT_PIDFILE:=/var/run/${SVCNAME}.pid} |
40 |
-: ${TELEPORT_BINARY:=/usr/bin/teleport} |
41 |
-: ${TELEPORT_LOGFILE:=/var/log/teleport.log} |
42 |
- |
43 |
-depend() { |
44 |
- need net |
45 |
-} |
46 |
- |
47 |
-start() { |
48 |
- ebegin "Starting Teleport SSH Service" |
49 |
- start-stop-daemon --start --exec /usr/bin/teleport \ |
50 |
- --background --make-pidfile --pidfile "${TELEPORT_PIDFILE}" \ |
51 |
- --stderr "${TELEPORT_LOGFILE}" \ |
52 |
- -- start --config="${TELEPORT_CONFDIR}/teleport.yaml" \ |
53 |
- ${TELEPORT_OPTS} |
54 |
- eend $? |
55 |
-} |
56 |
- |
57 |
-stop() { |
58 |
- ebegin "Stopping Teleport SSH Service" |
59 |
- start-stop-daemon --stop --exec /usr/bin/teleport \ |
60 |
- --pidfile "${TELEPORT_PIDFILE}" |
61 |
- eend $? |
62 |
-} |
63 |
- |
64 |
-reload() { |
65 |
- checkconfig || return 1 |
66 |
- ebegin "Reloading ${SVCNAME}" |
67 |
- start-stop-daemon --signal HUP \ |
68 |
- --exec "${TELEPORT_BINARY}" --pidfile "${TELEPORT_PIDFILE}" |
69 |
- eend $? |
70 |
-} |
71 |
|
72 |
diff --git a/sys-cluster/teleport/files/teleport-2.5.service b/sys-cluster/teleport/files/teleport-2.5.service |
73 |
deleted file mode 100644 |
74 |
index 37b38210aff..00000000000 |
75 |
--- a/sys-cluster/teleport/files/teleport-2.5.service |
76 |
+++ /dev/null |
77 |
@@ -1,13 +0,0 @@ |
78 |
-[Unit] |
79 |
-Description=Teleport SSH Service |
80 |
-After=network.target |
81 |
- |
82 |
-[Service] |
83 |
-Type=simple |
84 |
-Restart=on-failure |
85 |
-ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml --pid-file=/var/run/teleport.pid |
86 |
-ExecReload=/bin/kill -HUP $MAINPID |
87 |
-PIDFile=/var/run/teleport.pid |
88 |
- |
89 |
-[Install] |
90 |
-WantedBy=multi-user.target |
91 |
|
92 |
diff --git a/sys-cluster/teleport/files/teleport.init.d b/sys-cluster/teleport/files/teleport.init.d |
93 |
index a5d08b7f3f6..a951ec5318a 100644 |
94 |
--- a/sys-cluster/teleport/files/teleport.init.d |
95 |
+++ b/sys-cluster/teleport/files/teleport.init.d |
96 |
@@ -18,7 +18,7 @@ start() { |
97 |
--stderr "${TELEPORT_LOGFILE}" \ |
98 |
-- start --config="${TELEPORT_CONFDIR}/teleport.yaml" \ |
99 |
${TELEPORT_OPTS} |
100 |
- eend $? |
101 |
+ eend $? |
102 |
} |
103 |
|
104 |
stop() { |
105 |
@@ -27,3 +27,11 @@ stop() { |
106 |
--pidfile "${TELEPORT_PIDFILE}" |
107 |
eend $? |
108 |
} |
109 |
+ |
110 |
+reload() { |
111 |
+ checkconfig || return 1 |
112 |
+ ebegin "Reloading ${SVCNAME}" |
113 |
+ start-stop-daemon --signal HUP \ |
114 |
+ --exec "${TELEPORT_BINARY}" --pidfile "${TELEPORT_PIDFILE}" |
115 |
+ eend $? |
116 |
+} |
117 |
|
118 |
diff --git a/sys-cluster/teleport/files/teleport.service b/sys-cluster/teleport/files/teleport.service |
119 |
index b74734bbf9e..37b38210aff 100644 |
120 |
--- a/sys-cluster/teleport/files/teleport.service |
121 |
+++ b/sys-cluster/teleport/files/teleport.service |
122 |
@@ -1,11 +1,13 @@ |
123 |
[Unit] |
124 |
Description=Teleport SSH Service |
125 |
-After=network.target |
126 |
+After=network.target |
127 |
|
128 |
[Service] |
129 |
Type=simple |
130 |
-Restart=always |
131 |
-ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml |
132 |
+Restart=on-failure |
133 |
+ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml --pid-file=/var/run/teleport.pid |
134 |
+ExecReload=/bin/kill -HUP $MAINPID |
135 |
+PIDFile=/var/run/teleport.pid |
136 |
|
137 |
[Install] |
138 |
WantedBy=multi-user.target |
139 |
|
140 |
diff --git a/sys-cluster/teleport/teleport-2.5.8.ebuild b/sys-cluster/teleport/teleport-2.5.8.ebuild |
141 |
new file mode 100644 |
142 |
index 00000000000..597ac0e391f |
143 |
--- /dev/null |
144 |
+++ b/sys-cluster/teleport/teleport-2.5.8.ebuild |
145 |
@@ -0,0 +1,55 @@ |
146 |
+# Copyright 1999-2018 Gentoo Foundation |
147 |
+# Distributed under the terms of the GNU General Public License v2 |
148 |
+ |
149 |
+EAPI=6 |
150 |
+inherit golang-build systemd |
151 |
+ |
152 |
+DESCRIPTION="Modern SSH server for teams managing distributed infrastructure" |
153 |
+HOMEPAGE="https://gravitational.com/teleport" |
154 |
+ |
155 |
+EGO_PN="github.com/gravitational/${PN}/..." |
156 |
+ |
157 |
+if [[ ${PV} == "9999" ]] ; then |
158 |
+ inherit git-r3 golang-vcs |
159 |
+ EGIT_REPO_URI="https://github.com/gravitational/${PN}.git" |
160 |
+else |
161 |
+ inherit golang-vcs-snapshot |
162 |
+ SRC_URI="https://github.com/gravitational/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
163 |
+ KEYWORDS="~amd64 ~arm" |
164 |
+fi |
165 |
+ |
166 |
+IUSE="" |
167 |
+LICENSE="Apache-2.0" |
168 |
+RESTRICT="test strip" |
169 |
+SLOT="0" |
170 |
+ |
171 |
+DEPEND="app-arch/zip" |
172 |
+RDEPEND="" |
173 |
+ |
174 |
+src_prepare() { |
175 |
+ default |
176 |
+ |
177 |
+ sed -i -e 's/-j 3/-j 1/g' src/${EGO_PN%/*}/Makefile || die |
178 |
+} |
179 |
+ |
180 |
+src_compile() { |
181 |
+ BUILDFLAGS="" GOPATH="${S}" emake -j1 -C src/${EGO_PN%/*} full |
182 |
+} |
183 |
+ |
184 |
+src_install() { |
185 |
+ keepdir /var/lib/${PN} /etc/${PN} |
186 |
+ dobin src/${EGO_PN%/*}/build/{tsh,tctl,teleport} |
187 |
+ |
188 |
+ insinto /etc/${PN} |
189 |
+ doins "${FILESDIR}"/${PN}.yaml |
190 |
+ |
191 |
+ newinitd "${FILESDIR}"/${PN}.init.d ${PN} |
192 |
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN} |
193 |
+ |
194 |
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service |
195 |
+ systemd_install_serviced "${FILESDIR}"/${PN}.service.conf ${PN}.service |
196 |
+} |
197 |
+ |
198 |
+src_test() { |
199 |
+ BUILDFLAGS="" GOPATH="${S}" emake -C src/${EGO_PN%/*} test |
200 |
+} |