Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/sccache/files/, dev-util/sccache/
Date: Sat, 26 Jan 2019 07:32:57
Message-Id: 1548487820.586c7e79932500ea8e4e0dc8a714683f0a9621cf.gyakovlev@gentoo
1 commit: 586c7e79932500ea8e4e0dc8a714683f0a9621cf
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 26 07:30:20 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 26 07:30:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=586c7e79
7
8 dev-util/sccache: add initscripts for scheduler and server
9
10 systemd units will follow later
11
12 Package-Manager: Portage-2.3.58, Repoman-2.3.12
13 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
14
15 dev-util/sccache/files/logrotated | 5 +
16 dev-util/sccache/files/scheduler.confd | 21 ++
17 dev-util/sccache/files/scheduler.initd | 19 ++
18 dev-util/sccache/files/server.confd | 21 ++
19 dev-util/sccache/files/server.initd | 19 ++
20 dev-util/sccache/sccache-0.2.8-r1.ebuild | 360 +++++++++++++++++++++++++++++++
21 6 files changed, 445 insertions(+)
22
23 diff --git a/dev-util/sccache/files/logrotated b/dev-util/sccache/files/logrotated
24 new file mode 100644
25 index 00000000000..83824277bd4
26 --- /dev/null
27 +++ b/dev-util/sccache/files/logrotated
28 @@ -0,0 +1,5 @@
29 +/var/log/sccache-scheduler.log /var/log/sccache-scheduler.error.log /var/log/sccache-server.log /var/log/sccache-server.error.log {
30 + copytruncate
31 + missingok
32 + notifempty
33 +}
34
35 diff --git a/dev-util/sccache/files/scheduler.confd b/dev-util/sccache/files/scheduler.confd
36 new file mode 100644
37 index 00000000000..a70327100fc
38 --- /dev/null
39 +++ b/dev-util/sccache/files/scheduler.confd
40 @@ -0,0 +1,21 @@
41 +# /etc/conf.d/sccache-scheduler: config file for /etc/init.d/sccache-scheduler
42 +#
43 +
44 +# Full path to config file. /etc/sccache/scheduler.conf is default if not set.
45 +#SCCACHE_SCHEDULER_CONF="/etc/sccache/scheduler.conf"
46 +
47 +# logging is off by default, see https://docs.rs/env_logger for possible values
48 +#SCCACHE_SCHEDULER_LOGLEVEL=info
49 +
50 +# plain file (preferred), change logrotate file as well if you change this.
51 +#output_log=/var/log/"${RC_SVCNAME}.log"
52 +#error_log=/var/log/"${RC_SVCNAME}.error.log"
53 +
54 +# syslog support via LOGGER(1). Note this spawns logger processes per io stream
55 +#output_logger="logger -p daemon.none --"
56 +#error_logger="logger -p daemon.err --"
57 +
58 +
59 +# no limits set by default, see IONICE(1), NICE(1), START-STOP-DAEMON(8)
60 +#SSD_NICELEVEL=15
61 +#SSD_IONICELEVEL=3
62
63 diff --git a/dev-util/sccache/files/scheduler.initd b/dev-util/sccache/files/scheduler.initd
64 new file mode 100755
65 index 00000000000..fd4d616a6bd
66 --- /dev/null
67 +++ b/dev-util/sccache/files/scheduler.initd
68 @@ -0,0 +1,19 @@
69 +#!/sbin/openrc-run
70 +# Copyright 1999-2019 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +SCCACHE_SCHEDULER_CONF="${SCCACHE_SCHEDULER_CONF:-/etc/sccache/scheduler.conf}"
74 +
75 +depend() {
76 + need localmount
77 + use net
78 +}
79 +
80 +description="Starts sccache build scheduler server"
81 +
82 +command="/usr/bin/sccache-dist"
83 +command_args="scheduler ${SCCACHE_SCHEDULER_CONF:+--config ${SCCACHE_SCHEDULER_CONF}}"
84 +command_background="true"
85 +pidfile="/run/${RC_SVCNAME}.pid"
86 +required_files="${SCCACHE_SCHEDULER_CONF}"
87 +start_stop_daemon_args="--env RUST_LOG=${SCCACHE_SCHEDULER_LOGLEVEL:- }"
88
89 diff --git a/dev-util/sccache/files/server.confd b/dev-util/sccache/files/server.confd
90 new file mode 100644
91 index 00000000000..20f3f843e60
92 --- /dev/null
93 +++ b/dev-util/sccache/files/server.confd
94 @@ -0,0 +1,21 @@
95 +# /etc/conf.d/sccache-scheduler: config file for /etc/init.d/sccache-scheduler
96 +#
97 +
98 +# Full path to config file. /etc/sccache/server.conf is default if not set.
99 +#SCCACHE_SERVER_CONF="/etc/sccache/server.conf"
100 +
101 +# logging is off by default, see https://docs.rs/env_logger for possible values
102 +#SCCACHE_SERVER_LOGLEVEL=info
103 +
104 +# plain file (preferred), change logrotate file as well if you change this.
105 +#output_log=/var/log/"${RC_SVCNAME}.log"
106 +#error_log=/var/log/"${RC_SVCNAME}.error.log"
107 +
108 +# syslog support via LOGGER(1). Note this spawns logger processes per io stream
109 +#output_logger="logger -p daemon.none --"
110 +#error_logger="logger -p daemon.err --"
111 +
112 +
113 +# no limits set by default, see IONICE(1), NICE(1), START-STOP-DAEMON(8)
114 +#SSD_NICELEVEL=15
115 +#SSD_IONICELEVEL=3
116
117 diff --git a/dev-util/sccache/files/server.initd b/dev-util/sccache/files/server.initd
118 new file mode 100755
119 index 00000000000..004a0ab8356
120 --- /dev/null
121 +++ b/dev-util/sccache/files/server.initd
122 @@ -0,0 +1,19 @@
123 +#!/sbin/openrc-run
124 +# Copyright 1999-2019 Gentoo Authors
125 +# Distributed under the terms of the GNU General Public License v2
126 +
127 +SCCACHE_SERVER_CONF="${SCCACHE_SERVER_CONF:-/etc/sccache/scheduler.conf}"
128 +
129 +depend() {
130 + need localmount
131 + use net
132 +}
133 +
134 +description="Starts sccache build server"
135 +
136 +command="/usr/bin/sccache-dist"
137 +command_args="server ${SCCACHE_SERVER_CONF:+--config ${SCCACHE_SERVER_CONF}}"
138 +command_background="true"
139 +pidfile="/run/${RC_SVCNAME}.pid"
140 +required_files="${SCCACHE_SERVER_CONF}"
141 +start_stop_daemon_args="--env RUST_LOG=${SCCACHE_SERVER_LOGLEVEL:- }"
142
143 diff --git a/dev-util/sccache/sccache-0.2.8-r1.ebuild b/dev-util/sccache/sccache-0.2.8-r1.ebuild
144 new file mode 100644
145 index 00000000000..bf3c4e7086a
146 --- /dev/null
147 +++ b/dev-util/sccache/sccache-0.2.8-r1.ebuild
148 @@ -0,0 +1,360 @@
149 +# Copyright 2017-2019 Gentoo Authors
150 +# Distributed under the terms of the GNU General Public License v2
151 +
152 +EAPI=7
153 +
154 +# needs itoa-0.3.4 for tests
155 +CRATES="
156 +adler32-1.0.3
157 +aho-corasick-0.6.9
158 +ansi_term-0.11.0
159 +ar-0.6.1
160 +arc-swap-0.3.6
161 +arraydeque-0.4.3
162 +arrayvec-0.4.7
163 +ascii-0.8.7
164 +ascii-0.9.1
165 +assert_cmd-0.9.1
166 +atty-0.2.11
167 +backtrace-0.3.9
168 +backtrace-sys-0.1.24
169 +base64-0.9.3
170 +bincode-0.8.0
171 +bincode-1.0.1
172 +bitflags-0.9.1
173 +bitflags-1.0.4
174 +buf_redux-0.6.3
175 +bufstream-0.1.4
176 +build_const-0.2.1
177 +byteorder-1.2.7
178 +bytes-0.4.11
179 +case-0.1.0
180 +cc-1.0.25
181 +cfg-if-0.1.6
182 +chrono-0.4.6
183 +chunked_transfer-0.3.1
184 +clap-2.32.0
185 +cloudabi-0.0.3
186 +combine-3.6.3
187 +conhash-0.4.0
188 +core-foundation-0.2.3
189 +core-foundation-0.5.1
190 +core-foundation-sys-0.2.3
191 +core-foundation-sys-0.5.1
192 +counted-array-0.1.2
193 +crc-1.8.1
194 +crossbeam-deque-0.6.2
195 +crossbeam-epoch-0.6.1
196 +crossbeam-utils-0.5.0
197 +crossbeam-utils-0.6.1
198 +daemonize-0.3.0
199 +derive-error-0.0.3
200 +difference-2.0.0
201 +directories-1.0.2
202 +dtoa-0.4.3
203 +either-1.5.0
204 +encoding_rs-0.8.10
205 +env_logger-0.5.13
206 +error-chain-0.12.0
207 +escargot-0.3.1
208 +failure-0.1.3
209 +failure_derive-0.1.3
210 +filetime-0.1.15
211 +filetime-0.2.4
212 +flate2-1.0.5
213 +flate2-crc-0.1.1
214 +float-cmp-0.4.0
215 +fnv-1.0.6
216 +foreign-types-0.3.2
217 +foreign-types-shared-0.1.1
218 +fuchsia-zircon-0.3.3
219 +fuchsia-zircon-sys-0.3.3
220 +futures-0.1.25
221 +futures-cpupool-0.1.8
222 +gcc-0.3.55
223 +getopts-0.2.18
224 +h2-0.1.13
225 +http-0.1.14
226 +httparse-1.3.3
227 +humantime-1.1.1
228 +hyper-0.11.27
229 +hyper-0.12.16
230 +hyper-tls-0.1.4
231 +hyper-tls-0.3.1
232 +hyperx-0.12.0
233 +idna-0.1.5
234 +indexmap-1.0.2
235 +iovec-0.1.2
236 +itertools-0.7.9
237 +itoa-0.3.4
238 +itoa-0.4.3
239 +jobserver-0.1.11
240 +jsonwebtoken-5.0.1
241 +kernel32-sys-0.2.2
242 +language-tags-0.2.2
243 +lazy_static-0.2.11
244 +lazy_static-1.2.0
245 +lazycell-1.2.0
246 +libc-0.2.44
247 +libflate-0.1.18
248 +libmount-0.1.11
249 +linked-hash-map-0.2.1
250 +local-encoding-0.2.0
251 +lock_api-0.1.5
252 +log-0.3.9
253 +log-0.4.6
254 +lru-disk-cache-0.2.0
255 +matches-0.1.8
256 +md5-0.3.8
257 +memcached-rs-0.3.0
258 +memchr-1.0.2
259 +memchr-2.1.1
260 +memoffset-0.2.1
261 +mime-0.2.6
262 +mime-0.3.12
263 +mime_guess-1.8.6
264 +mime_guess-2.0.0-alpha.6
265 +miniz_oxide-0.2.0
266 +miniz_oxide_c_api-0.2.0
267 +mio-0.6.16
268 +mio-named-pipes-0.1.6
269 +mio-uds-0.6.7
270 +miow-0.2.1
271 +miow-0.3.3
272 +msdos_time-0.1.6
273 +multipart-0.13.6
274 +native-tls-0.1.5
275 +native-tls-0.2.2
276 +net2-0.2.33
277 +nix-0.11.0
278 +nodrop-0.1.13
279 +normalize-line-endings-0.2.2
280 +num-integer-0.1.39
281 +num-traits-0.1.43
282 +num-traits-0.2.6
283 +num_cpus-1.8.0
284 +number_prefix-0.2.8
285 +openssl-0.10.15
286 +openssl-0.9.24
287 +openssl-probe-0.1.2
288 +openssl-sys-0.9.39
289 +owning_ref-0.4.0
290 +parking_lot-0.6.4
291 +parking_lot_core-0.3.1
292 +percent-encoding-1.0.1
293 +phf-0.7.23
294 +phf_codegen-0.7.23
295 +phf_generator-0.7.23
296 +phf_shared-0.7.23
297 +pkg-config-0.3.14
298 +podio-0.1.6
299 +predicates-0.9.1
300 +predicates-core-0.9.0
301 +predicates-tree-0.9.0
302 +proc-macro2-0.4.24
303 +pulldown-cmark-0.0.3
304 +quick-error-1.2.2
305 +quote-0.3.15
306 +quote-0.6.10
307 +rand-0.3.22
308 +rand-0.4.3
309 +rand-0.5.5
310 +rand-0.6.1
311 +rand_chacha-0.1.0
312 +rand_core-0.2.2
313 +rand_core-0.3.0
314 +rand_hc-0.1.0
315 +rand_isaac-0.1.0
316 +rand_pcg-0.1.1
317 +rand_xorshift-0.1.0
318 +redis-0.9.1
319 +redox_syscall-0.1.42
320 +redox_termios-0.1.1
321 +regex-1.0.6
322 +regex-syntax-0.6.3
323 +relay-0.1.1
324 +remove_dir_all-0.5.1
325 +reqwest-0.8.8
326 +reqwest-0.9.5
327 +retry-0.4.0
328 +ring-0.13.2
329 +rouille-2.2.0
330 +rust-crypto-0.2.36
331 +rustc-demangle-0.1.9
332 +rustc-serialize-0.3.24
333 +rustc_version-0.2.3
334 +ryu-0.2.7
335 +safemem-0.2.0
336 +safemem-0.3.0
337 +same-file-0.1.3
338 +schannel-0.1.14
339 +scoped-tls-0.1.2
340 +scopeguard-0.3.3
341 +security-framework-0.1.16
342 +security-framework-0.2.1
343 +security-framework-sys-0.1.16
344 +security-framework-sys-0.2.1
345 +selenium-rs-0.1.1
346 +semver-0.9.0
347 +semver-parser-0.7.0
348 +serde-1.0.80
349 +serde_derive-1.0.80
350 +serde_json-1.0.33
351 +serde_urlencoded-0.5.4
352 +sha1-0.6.0
353 +signal-hook-0.1.6
354 +siphasher-0.2.3
355 +skeptic-0.4.0
356 +slab-0.4.1
357 +smallvec-0.6.6
358 +socket2-0.3.8
359 +stable_deref_trait-1.1.1
360 +string-0.1.2
361 +strip-ansi-escapes-0.1.0
362 +strsim-0.7.0
363 +syn-0.11.11
364 +syn-0.15.21
365 +synom-0.11.3
366 +synstructure-0.10.1
367 +tar-0.4.20
368 +tempdir-0.3.7
369 +tempfile-3.0.4
370 +term-0.5.1
371 +termcolor-1.0.4
372 +termion-1.5.1
373 +textwrap-0.10.0
374 +thread_local-0.3.6
375 +threadpool-1.7.1
376 +time-0.1.40
377 +tiny_http-0.6.2
378 +tokio-0.1.13
379 +tokio-codec-0.1.1
380 +tokio-core-0.1.17
381 +tokio-current-thread-0.1.4
382 +tokio-executor-0.1.5
383 +tokio-fs-0.1.4
384 +tokio-io-0.1.10
385 +tokio-named-pipes-0.1.0
386 +tokio-process-0.2.3
387 +tokio-reactor-0.1.7
388 +tokio-serde-0.1.0
389 +tokio-serde-bincode-0.1.1
390 +tokio-service-0.1.0
391 +tokio-signal-0.2.7
392 +tokio-tcp-0.1.2
393 +tokio-threadpool-0.1.9
394 +tokio-timer-0.2.8
395 +tokio-tls-0.1.4
396 +tokio-udp-0.1.3
397 +tokio-uds-0.2.4
398 +toml-0.4.9
399 +treeline-0.1.0
400 +try-lock-0.1.0
401 +try-lock-0.2.2
402 +twoway-0.1.8
403 +ucd-util-0.1.3
404 +unicase-1.4.2
405 +unicase-2.2.0
406 +unicode-bidi-0.3.4
407 +unicode-normalization-0.1.7
408 +unicode-width-0.1.5
409 +unicode-xid-0.0.4
410 +unicode-xid-0.1.0
411 +unix_socket-0.5.0
412 +unreachable-1.0.0
413 +untrusted-0.6.2
414 +url-1.7.2
415 +utf8-ranges-1.0.2
416 +utf8parse-0.1.1
417 +uuid-0.6.5
418 +uuid-0.7.1
419 +vcpkg-0.2.6
420 +vec_map-0.8.1
421 +version_check-0.1.5
422 +void-1.0.2
423 +vte-0.3.3
424 +walkdir-1.0.7
425 +want-0.0.4
426 +want-0.0.6
427 +winapi-0.2.8
428 +winapi-0.3.6
429 +winapi-build-0.1.1
430 +winapi-i686-pc-windows-gnu-0.4.0
431 +winapi-util-0.1.1
432 +winapi-x86_64-pc-windows-gnu-0.4.0
433 +wincolor-1.0.1
434 +ws2_32-sys-0.2.1
435 +which-2.0.0
436 +xattr-0.2.2
437 +zip-0.4.2
438 +"
439 +
440 +inherit cargo eutils
441 +
442 +DESCRIPTION="ccache/distcc like tool with support for rust and cloud storage"
443 +HOMEPAGE="https://github.com/mozilla/sccache/"
444 +SRC_URI="https://github.com/mozilla/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
445 + $(cargo_crate_uris ${CRATES})"
446 +
447 +LICENSE="Apache-2.0"
448 +SLOT="0"
449 +KEYWORDS="~amd64"
450 +IUSE="azure dist-client dist-server gcs memcached redis s3"
451 +
452 +DEPEND="
453 + dist-server? ( dev-libs/openssl:0= )
454 + gcs? ( dev-libs/openssl:0= )
455 +"
456 +
457 +RDEPEND="${DEPEND}
458 + dist-client? ( sys-devel/icecream )
459 + dist-server? ( sys-apps/bubblewrap )
460 +"
461 +
462 +src_configure() {
463 + myfeatures=(
464 + $(usev azure)
465 + $(usev dist-client)
466 + $(usev dist-server)
467 + $(usev gcs)
468 + $(usev memcached)
469 + $(usev redis)
470 + $(usev s3)
471 + )
472 +}
473 +
474 +src_compile(){
475 + cargo_src_compile ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
476 +}
477 +
478 +src_install() {
479 + cargo_src_install --path=. ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
480 +
481 + keepdir /etc/sccache
482 +
483 + einstalldocs
484 + dodoc -r docs/.
485 +
486 + if use dist-server; then
487 + newinitd "${FILESDIR}"/server.initd sccache-server
488 + newconfd "${FILESDIR}"/server.confd sccache-server
489 +
490 + newinitd "${FILESDIR}"/scheduler.initd sccache-scheduler
491 + newconfd "${FILESDIR}"/scheduler.confd sccache-scheduler
492 +
493 + insinto /etc/logrotate.d
494 + newins "${FILESDIR}/logrotated" sccache
495 + fi
496 +}
497 +
498 +src_test() {
499 + cargo_src_test ${myfeatures:+--features "${myfeatures[*]}"} --no-default-features
500 +}
501 +
502 +pkg_postinst() {
503 + ewarn "${PN} is experimental, please use with care"
504 + ewarn ""
505 + ewarn "Currently there are no initscripts"
506 + use memcached && optfeature "memcached backend support" net-misc/memcached
507 + use redis && optfeature "redis backend support" dev-db/redis
508 +}