# HG changeset patch # User Da Risk # Date 1601433518 14400 # Node ID 2dec9f3e7ad54128d1e1b049da71374190456f85 # Parent dd1dccdd8a6c0d192b346bc0d74adc02ae2e6b53 update nomad diff -r dd1dccdd8a6c -r 2dec9f3e7ad5 sys-cluster/nomad/Manifest --- a/sys-cluster/nomad/Manifest Fri May 01 18:28:15 2020 -0400 +++ b/sys-cluster/nomad/Manifest Tue Sep 29 22:38:38 2020 -0400 @@ -2,3 +2,4 @@ DIST nomad-0.10.5.tar.gz 43766198 BLAKE2B 59262459feafcc4883e789416d154fdbc953aeaa3f4d0020997d0bd0a3f226ea527abd0fa9a1552b21875e768f2ce2698383a6b592dee190644f87bccd49a359 SHA512 42f3e55d8f4882a22d017ca2059174274f8b669052c30555925f86c1511b179d6cf1fc118e7d950f9e5c7d6421e48a6001f89cacb8f56ad5e9179318263a4461 DIST nomad-0.11.0.tar.gz 52708805 BLAKE2B 50a2c3ffc7b7f3c0ebcb05a69fe96146b649528aeb6fdf050541cd34d46a290a9da76bfe37495537b5d82fddb0d890ab48ea82544a0c28e5cc6d223750dd9f5a SHA512 1578edf4862caba5ce62a412151c9d4fae94285250895644b38df1ee33ed368c073bc467f71da482a215a4b8059930f50a519d8456159c4f0696fbbd70a9fbb5 DIST nomad-0.11.1.tar.gz 53172787 BLAKE2B 5d89c6c708903f84bf1b3e21749eea2c81a2227f411c8fa7137cb63faf1ced7e4181487cdde62c4d1f7fb799e59743621e505b4ae1fb4a102bfb6c59eee44c82 SHA512 ca959206644a30899b9cc6c60d57a1fde3719a3f78a3d53fd0d7885d8ca60a1c4f86d8253ad7750fb7671b0efea8d4c3a6b178aac6067348060e90589d430448 +DIST nomad-0.12.4.tar.gz 51468076 BLAKE2B 42ca90649263dae6aaa29921853816b6172b285f2675a3fe68aca423bd15213924263433e01d870fa502cfc53372cb6f30f810c7aaadfe63970f91c4bb630912 SHA512 2fb12f96a14772d0a382f40aa686d61823630d49778365447410e7c4a4d7f3cbff275fdeea823f3c397642ce7aeae3618c295d4b08ea884dc51190960f33110e diff -r dd1dccdd8a6c -r 2dec9f3e7ad5 sys-cluster/nomad/files/nomad.confd --- a/sys-cluster/nomad/files/nomad.confd Fri May 01 18:28:15 2020 -0400 +++ b/sys-cluster/nomad/files/nomad.confd Tue Sep 29 22:38:38 2020 -0400 @@ -3,8 +3,7 @@ # - pidfile (default: /run/nomad/nomad.pid) # - user (default: nomad) -# extra arguments for the consul agent -command_args="-config=/etc/nomad.d" - # upstream strongly recommends > 1 GOMAXPROCS=2 +# extra arguments for nomad +command_args="agent -config=/etc/nomad.d" diff -r dd1dccdd8a6c -r 2dec9f3e7ad5 sys-cluster/nomad/files/nomad.initd --- a/sys-cluster/nomad/files/nomad.initd Fri May 01 18:28:15 2020 -0400 +++ b/sys-cluster/nomad/files/nomad.initd Tue Sep 29 22:38:38 2020 -0400 @@ -1,27 +1,24 @@ #!/sbin/openrc-run -# Copyright 2015-2017 Gentoo Foundation +# Copyright 2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -description="nomad agent" -extra_started_commands="reload" export GOMAXPROCS=${GOMAXPROCS:-2} group=${group:-${RC_SVCNAME}} user=${user:-${RC_SVCNAME}} -pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +description="simple and flexible workload orchestrator" command="/usr/bin/${RC_SVCNAME}" -command_args="agent ${command_args:-config-dir=/etc/consul.d}" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} command_background="true" start_stop_daemon_args="--user ${user} --group ${group} \ - --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \ - --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" -stopsig="SIGINT" + --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \ + --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +stopsig=SIGINT +extra_started_commands=reload depend() { - need net + after net } reload() { - ebegin "Reloading ${RC_SVCNAME}" - ${command} reload - eend $? + start-stop-daemon --signal HUP --pidfile "${pidfile}" } diff -r dd1dccdd8a6c -r 2dec9f3e7ad5 sys-cluster/nomad/files/nomad.logrotated --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys-cluster/nomad/files/nomad.logrotated Tue Sep 29 22:38:38 2020 -0400 @@ -0,0 +1,7 @@ +/var/log/nomad/nomad.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff -r dd1dccdd8a6c -r 2dec9f3e7ad5 sys-cluster/nomad/nomad-0.12.4.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys-cluster/nomad/nomad-0.12.4.ebuild Tue Sep 29 22:38:38 2020 -0400 @@ -0,0 +1,43 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module systemd +GIT_COMMIT=ec7bf9de21bfe3623ff04b009f26aaf488bae2b1 + +DESCRIPTION="A simple and flexible workload orchestrator " +HOMEPAGE="https://nomadproject.io" +SRC_URI="https://github.com/hashicorp/nomad/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="nvidia" + +RESTRICT+=" test" + +src_compile() { + local go_ldflags go_tags + go_ldflags="-X github.com/hashicorp/nomad/version.GitCommit=${GIT_COMMIT}" + go_tags="codegen_generated ui $(usex nvidia '' 'nonvidia')" + CGO_ENABLED=1 \ + go build \ + -trimpath \ + -ldflags "${go_ldflags}" \ + -mod=vendor \ + -tags "${go_tags}" \ + -o bin/${PN} || die "compile failed" +} + +src_install() { + dobin bin/${PN} + systemd_dounit dist/systemd/nomad.service + insinto /etc/nomad.d + newins dist/client.hcl client.hcl.example + newins dist/server.hcl server.hcl.example + keepdir /var/lib/nomad /var/log/nomad + newconfd "${FILESDIR}/nomad.confd" nomad + newinitd "${FILESDIR}/nomad.initd" nomad + insinto /etc/logrotate.d + newins "${FILESDIR}/nomad.logrotated" nomad +}