diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/serf | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/serf')
-rw-r--r-- | app-admin/serf/Manifest | 9 | ||||
-rw-r--r-- | app-admin/serf/files/serf.confd | 7 | ||||
-rw-r--r-- | app-admin/serf/files/serf.initd | 27 | ||||
-rw-r--r-- | app-admin/serf/files/serf.logrotated | 7 | ||||
-rw-r--r-- | app-admin/serf/files/serf.service | 14 | ||||
-rw-r--r-- | app-admin/serf/metadata.xml | 10 | ||||
-rw-r--r-- | app-admin/serf/serf-0.8.1-r1.ebuild | 83 |
7 files changed, 157 insertions, 0 deletions
diff --git a/app-admin/serf/Manifest b/app-admin/serf/Manifest new file mode 100644 index 000000000000..57c1e967b311 --- /dev/null +++ b/app-admin/serf/Manifest @@ -0,0 +1,9 @@ +AUX serf.confd 240 BLAKE2B 1eda4261a82a35e8b70cd0192180b4f3cf534656fc96092643b524f63bcf58c0f2621a0a4fac8b0ed1551fe6b23a136e11bfaf1059f1dcb6f43c0036159bd8c5 SHA512 9bb726725a6116d23f4095a3e8f7d401d854c80ee9a5993d718c4aebef77f36a597d7a2e504e3dc95f0a177f2184d79fd253f330fb48b9c028d3bdf2db90b7d9 +AUX serf.initd 683 BLAKE2B 3e6fcda3250eabcec44daa3b51b36fff0cdb49b4b232123d69b1e29b8100874c4e126f5e3aaffebcac898651f4f84a8515308422b867e55a79f189c4d9a322b9 SHA512 a223d1e002eae3f91b941eb75a2741bb5fc22c78f4ab8ada430ee5e34f85f28410acc26e503eae672911161fab6847c6a7733b51cdad29fa4b4f67cfdc879597 +AUX serf.logrotated 81 BLAKE2B 7f09c81d7efa52d1e970b0603fa2c89809aca99166efb1026e0794957dfd4229a961a345e27da045c2f34ab1785e6e2bd5e796d32814787244656e97ad5cb518 SHA512 9d3664c123e846de81a2f574a9c2610e254d5ddad1c23b67ef7b8841e933c7aea93a419becaf45af9594ea98ac36d23883bebf3d344205c4756f3e1df9e87518 +AUX serf.service 286 BLAKE2B d0a7157101e18f80047688318a16995d24f0d06d444104ace3aaea9cb4c43b3ea164804f105dc94a03aa8e800228db9d2007510885cddb82e50b41d7aa8927ed SHA512 928dfca39afd79b113b299e4de25635fc9f68c64c77951d690797ed5796515d060fc36286f0dc1da63923042e3d8612ca8b1696dd511cb2fbd06550151d2a05b +DIST github.com-mitchellh-gox-c9740af9c6574448fd48eb30a71f964014c7a837.tar.gz 15772 BLAKE2B ce589f986762768fc22148963a35a152a48c17aa55b9db5d5cf41e4e349be63ed0cea2afe3f916479bfc82bc951e4d427d223122ec6c472e58de02e55290ca07 SHA512 d4b2d5d9666285584697bc0d6ddc2f1a1e3f23741650e831adb42baffbb5f72fc3d5ae8a8fb6719faf1df75d3da334941b0404387f0c213aabdb5c3d5634c55d +DIST github.com-mitchellh-iochan-87b45ffd0e9581375c491fef3d32130bb15c5bd7.tar.gz 1785 BLAKE2B fdb82b106446b0fe5d5c6c9cca2c8303fbef305ae1c45a82ca7ba5bbc9ce4db3708d7680bfe95099e73a5f5a3d687f25d77c7b535f3e1dc71e5fe8915eb9642e SHA512 2efc0e3cbca496240e3e24550fd0d2aab742eb9b227230ff1ed4ee47344b994642b028bd4644cd45cd697f5f5ef6a729aad65537b10c6555bd52d9ca4b9c717c +DIST serf-0.8.1.tar.gz 1445011 BLAKE2B 5fcf1e3e87c777852656426529daab4ceb3e997d70ac54d81f48bbea37ebe2dab9c27d0b2fff3c4e031a7995eaaa25378ccbbd359ef0cc265cc58db4ddb25c21 SHA512 81a4bc2e1659324980fd59464af021ad5ec80431dc1b49b875bb0c97c8f92766dfee9b204bd8c9ab4e175a281bc23815f5e3008ecfb2848c7354c33603bb5514 +EBUILD serf-0.8.1-r1.ebuild 2087 BLAKE2B c47a6caed4484374dc31448990f81ecbbeb7ddb9c1605d001d95f10389f3b506c7af042b63d88ea98af76bd3a205ba0833175ffb91bb8043277ad2c54c02ccf9 SHA512 7fa41ac143f3532bfe612492ca084aa998c072f346e9897f441f31d55d41468615673ced32ef43c01a5e9962822a3b340997fbf167c34260f7083413faa81731 +MISC metadata.xml 297 BLAKE2B 0d2ca75df2b4667d5b2cfcc0b17ef36c88d2996e661d3393eed3ea61c256a760c4844d9f99c4b280a8409e288392689ab17f46adc40188134307b7ea6060f9b9 SHA512 a4e75bdd3c86842ac3de4852d00f264e877c9784754eb9b2d4d38c39123115ded6beae61628b5315d7c19bfbefd1e0360491b37656e34a87b33498b246521e76 diff --git a/app-admin/serf/files/serf.confd b/app-admin/serf/files/serf.confd new file mode 100644 index 000000000000..f5aeaeddf7e7 --- /dev/null +++ b/app-admin/serf/files/serf.confd @@ -0,0 +1,7 @@ +# you can change the init script behavior by setting those parameters +# - group (default: serf) +# - pidfile (default: /run/serf/serf.pid) +# - user (default: serf) + +# extra arguments for the serf agent +command_args="-config-dir=/etc/serf.d" diff --git a/app-admin/serf/files/serf.initd b/app-admin/serf/files/serf.initd new file mode 100644 index 000000000000..042e4f8018a8 --- /dev/null +++ b/app-admin/serf/files/serf.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="serf agent" +extra_started_commands="reload" +group=${group:-${RC_SVCNAME}} +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} + +command="/usr/bin/${RC_SVCNAME}" +command_args="agent ${command_args:-config-dir=/etc/serf.d}" +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" + +depend() { + need net +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + ${command} reload + eend $? +} diff --git a/app-admin/serf/files/serf.logrotated b/app-admin/serf/files/serf.logrotated new file mode 100644 index 000000000000..e35d7331b247 --- /dev/null +++ b/app-admin/serf/files/serf.logrotated @@ -0,0 +1,7 @@ +/var/log/serf/serf.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff --git a/app-admin/serf/files/serf.service b/app-admin/serf/files/serf.service new file mode 100644 index 000000000000..f2d390fe8222 --- /dev/null +++ b/app-admin/serf/files/serf.service @@ -0,0 +1,14 @@ +[Unit] +Description=serf agent +Requires=network-online.target +After=network-online.target + +[Service] +User=serf +Environment=SERF_AGENT_OPTS="-config-dir=/etc/serf.d" +ExecStart=/usr/bin/serf agent $SERF_AGENT_OPTS +Restart=on-failure +KillSignal=SIGINT + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/serf/metadata.xml b/app-admin/serf/metadata.xml new file mode 100644 index 000000000000..213d2fe2fa81 --- /dev/null +++ b/app-admin/serf/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">hashicorp/serf</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-admin/serf/serf-0.8.1-r1.ebuild b/app-admin/serf/serf-0.8.1-r1.ebuild new file mode 100644 index 000000000000..963e9bcc99ef --- /dev/null +++ b/app-admin/serf/serf-0.8.1-r1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_VENDOR=( + "github.com/mitchellh/gox c9740af9c6574448fd48eb30a71f964014c7a837" + "github.com/mitchellh/iochan 87b45ffd0e9581375c491fef3d32130bb15c5bd7" +) + +inherit golang-vcs-snapshot systemd user + +KEYWORDS="~amd64" +EGO_PN="github.com/hashicorp/serf" +DESCRIPTION="Service orchestration and management tool" +HOMEPAGE="https://www.serfdom.io/" +SRC_URI="https://github.com/hashicorp/serf/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" + +SLOT="0" +LICENSE="MPL-2.0" +IUSE="" +RESTRICT="test" + +DEPEND=" + >=dev-lang/go-1.6:= + >=dev-go/go-tools-0_pre20160121" +RDEPEND="" + +pkg_setup() { + enewgroup serf + enewuser serf -1 -1 /var/lib/${PN} serf +} + +src_prepare() { + eapply_user + # Avoid the need to have a git checkout + sed -e 's:^GIT.*::' \ + -e 's:-X main.GitCommit.*:" \\:' \ + -i "${S}/src/${EGO_PN}/scripts/build.sh" || die + + # go install golang.org/x/tools/cmd/stringer: mkdir /usr/lib/go-gentoo/bin/: permission denied + sed -e 's:go get -u -v $(GOTOOLS)::' \ + -e 's:^GIT.*::' \ + -i "${S}/src/${EGO_PN}/GNUmakefile" || die +} + +src_compile() { + export GOPATH="${S}" + mkdir "${S}/src/github.com/mitchellh" || die + mv "${S}/src/${EGO_PN}/vendor/github.com/mitchellh/"{gox,iochan} \ + "${S}/src/github.com/mitchellh" || die + go install -v -work -x ${EGO_BUILD_FLAGS} "github.com/mitchellh/gox/..." || die + # The dev target sets causes build.sh to set appropriate XC_OS + # and XC_ARCH, and skips generation of an unused zip file, + # avoiding a dependency on app-arch/zip. + PATH=${PATH}:${S}/bin \ + emake -C "${S}/src/${EGO_PN}" dev +} + +src_test() { + emake -C "${S}/src/${EGO_PN}" test +} + +src_install() { + local x + + dobin "${S}/bin/${PN}" + + keepdir /etc/serf.d + insinto /etc/serf.d + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners serf:serf "${x}" + done + + newinitd "${FILESDIR}/serf.initd" "${PN}" + newconfd "${FILESDIR}/serf.confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + systemd_dounit "${FILESDIR}/serf.service" +} |