From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-admin/vault/Manifest | 14 ++++++ app-admin/vault/files/localhost.json.example | 9 ++++ app-admin/vault/files/vault.confd | 7 +++ app-admin/vault/files/vault.initd | 19 ++++++++ app-admin/vault/files/vault.logrotated | 7 +++ app-admin/vault/files/vault.service | 18 ++++++++ app-admin/vault/metadata.xml | 10 +++++ app-admin/vault/vault-0.7.3-r1.ebuild | 66 +++++++++++++++++++++++++++ app-admin/vault/vault-0.8.2.ebuild | 67 ++++++++++++++++++++++++++++ app-admin/vault/vault-0.8.3.ebuild | 67 ++++++++++++++++++++++++++++ 10 files changed, 284 insertions(+) create mode 100644 app-admin/vault/Manifest create mode 100644 app-admin/vault/files/localhost.json.example create mode 100644 app-admin/vault/files/vault.confd create mode 100644 app-admin/vault/files/vault.initd create mode 100644 app-admin/vault/files/vault.logrotated create mode 100644 app-admin/vault/files/vault.service create mode 100644 app-admin/vault/metadata.xml create mode 100644 app-admin/vault/vault-0.7.3-r1.ebuild create mode 100644 app-admin/vault/vault-0.8.2.ebuild create mode 100644 app-admin/vault/vault-0.8.3.ebuild (limited to 'app-admin/vault') diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest new file mode 100644 index 000000000000..d64729ef5255 --- /dev/null +++ b/app-admin/vault/Manifest @@ -0,0 +1,14 @@ +AUX localhost.json.example 130 SHA256 b2b5f49e1971ad6500e996ab0e1e84a2f6529670393c4b1019bc457c5e81d030 SHA512 9f9bc222f3716942b7423fa2ab14afd1d516bf3f3170b7418a75b970a33341426e13f89cf331a5e25bd3159dcbb435e20e75a0c9109e767e67bf777a7dbcd182 WHIRLPOOL 360de035d86a7dadd4e004fe0359994e8e3d3882c1740d802baaf6391ab3498c062d949abed76730460019b5415aab41e26bf1104880baced4b467951d57ac5b +AUX vault.confd 243 SHA256 302f038bbe2d20a5b1c034e760dedffa68c11895eb9e7660c50afc52eafd5126 SHA512 395d823dee49fed30d99fea1fcd1b0c1c3ae2bfd806fa0c169aa14d83a594d224f8966870799a3740a7e52f039616efe78834e0522e7a2802c7df4c56b3bbdd2 WHIRLPOOL b22ff911899cac2d483c60d51dc0a5b0eb7d7e69688d1417eb67f1e1ef4b7088d75d771f3f9c617b4fac70d314397289e59186f3cedc3eb7a4eab834d2e26e6e +AUX vault.initd 542 SHA256 9b3fcd29f6677f9e88b9d9ee143836303c0a38b29d82dc8ae78d6f7fe9f1b7a6 SHA512 ac13c688e006799b607c44e94fbdf922befc62131014b714a93ca4bb0205f5f012bb3e4814eeeb47b31034f5c35b187fc8ebaeca02bd02430c5842bc9821f29a WHIRLPOOL 7e23ff9d2ceb23fc7ca64e58ae51fd45b7c38ede2beaf08b1052600f6932cceaf065b390579fc7810ade62ca790b903e3b79870c23e78af3813649b65fe2cfb4 +AUX vault.logrotated 83 SHA256 9c899ee7d0afec8f80aaf66a35fc0c6f0587740e5e46a2a9ff25dcf858ff66a9 SHA512 83d73760d85dbb731652aa5936d2780208ac4643e975538652f53b49305d024df6d72a8a06d82f430982b07cf940b2fd69f9a6eedb39d380136c8e5bfda280e5 WHIRLPOOL 223f5e27f8224d6dfa34c1439104a2eb434183832748c7c75aa90bfe16138c300ae3c75f89f6073fac0bc5752228169a299b22aaaf9a982d8aae183489494b5f +AUX vault.service 409 SHA256 a703ab5c1e57333b8bf03e9757749affbb1472c17ad9b19554bd6ead54da3e0d SHA512 2c4c7c395ebcd06e70de57d93384442ea88346cc2815b509966bd9f12579758e5f43d9a2ca1158e3b25198ad0c82ed9cf5d453f3cd7b5873011b3b13ec60196c WHIRLPOOL c34859683b03c218b7a46e0fa04806014506c67c9d4d9a5a23443a15de4924477671c3348ab21aaa2394649e47e3da492e1f215c9eb161f45f94ef8e111d1644 +DIST vault-0.7.3.tar.gz 6694636 SHA256 98409ae9c0e081e613a0e2288d2b5653582bb8bf57cb775cbff782d061a25708 SHA512 8632b4b721372cb0f5f684564ebe0749b7c1a9b5d0322b083773b3a2fd1734fb2eedee1aeb4b4c9431ce7f44c711ac0a95960c581165e1bac1a3754f8658e783 WHIRLPOOL d8eae9b3ed5d24a8b30dfec90360d2e5e4c94663b1bb168156b03724d6a2ff5dae1345474a02b67b1cde427419c07cc8a12bcbbe9b3db463a6c4f2a503832041 +DIST vault-0.8.2.tar.gz 7293367 SHA256 0e248c6cbf19ce8fb01fd31541d5a28b8c1c534b02256fb72bdc1d4d6aa462f2 SHA512 279056211aefbab09b6533ce5b0fea355511a84c3f21cbbae0fa08b0affd2254fcd0a9479a317d07e9b99c5a2bd6d8c9caa5c32f14f73b21d8c4be3f24345669 WHIRLPOOL f96be6c75a5fc1cf6db26f12270d00c028b665ea37589dba8087ade3e5bcd987cb9914188d990a9c6628045277226823accc4ffabeaf290e62f4f71cbb72a0d7 +DIST vault-0.8.3.tar.gz 8128509 SHA256 f7ba9d620478cbe4f4660f29b627b12244aadb59e87f30d8fed1b20c2fa8688b SHA512 e2b273ebb761246f6d85fc040d911a3f3a7beb0951fed4adcbe5df4106dd0cb013328b5816ef4153b2c4d363f7f2a14ae1c82bae9baaea74ef707ff0934d6c8d WHIRLPOOL 128afef1735add95cc0860fbc6b827d68d135d6a1b8171c176a1e38a96c7c88f8c349563ef46c6022d5937ba9672a0b23e526e57fa7b75c3afec8f6c3f4b54e2 +EBUILD vault-0.7.3-r1.ebuild 1438 SHA256 72b3e448b71e1290f318e9b85ab6321155cadbf257a101fa99315dd8824b7edb SHA512 5c7e1a13b75393f385d491a40c0754e012bc4f7e02f3625a8f4d79c43cfbe2320cbd248bc7d2c462268c843ccb259b91bad1bf44267314abff647eb48ee464a5 WHIRLPOOL f6bdc7e76ecc341b6adb48289563ac3c0cfc264ce89276fb9f7e2c6b294a330281931108a8780b7a3fd6f8cbf374e89e373fed3653a758f15a93adb3161814c9 +EBUILD vault-0.8.2.ebuild 1496 SHA256 d2694a8b31930eb87f2fcef5db4a9594176a1a4cea811948a9a96e05a30f2519 SHA512 6f1c1d653a026a5ba928539007fc999f16bf022e34a79349866ec9e453bbee0a7ad71350948c358cd49758299ce66d15009124221871a0e45b8f7ad7b139bde8 WHIRLPOOL b2fcd2d45f64827791d58a175444787d86bdc06084e15d17672b6438080b8644605d20da55f28c6464736cf7e56b7bccc51eae4edfd172e5d3d94745eefc5363 +EBUILD vault-0.8.3.ebuild 1496 SHA256 d2694a8b31930eb87f2fcef5db4a9594176a1a4cea811948a9a96e05a30f2519 SHA512 6f1c1d653a026a5ba928539007fc999f16bf022e34a79349866ec9e453bbee0a7ad71350948c358cd49758299ce66d15009124221871a0e45b8f7ad7b139bde8 WHIRLPOOL b2fcd2d45f64827791d58a175444787d86bdc06084e15d17672b6438080b8644605d20da55f28c6464736cf7e56b7bccc51eae4edfd172e5d3d94745eefc5363 +MISC ChangeLog 6007 SHA256 9585204b4ddddc0cd73c43f2c2062a006ba9cc0969c305e7565c0f0a87a6e971 SHA512 202c07c201b7bd4eeda2b8a46985fb715dbd880de8c6884ae6209625ccfe3b6d3c742b579c14d2b06b9a31a897a1c2156079d195be7d7847b8245fed1b1521f6 WHIRLPOOL 4dbda498176ac13edb12835eef4a572fdb07c019687daeabbc80519f56ca977d71cdf823e760d681c45314e53208d4bef4f168a69e145984ce48d3cc6fb11add +MISC ChangeLog-2015 978 SHA256 ef1fbb6e2dfc9c03d96bfb5e0f4d764fc61254fb56166c90c42a4965d1139eb6 SHA512 c98580a36115007d5179b91d0d7cae0e8e749cadefc9e1bede62d145b68d7f2709ee84fd4ab81e02df04c603295f11533b2417b6d12f7aabcddc6d83bbf0ad39 WHIRLPOOL 32d816852e126c5126454255ec6e45b0ee26fc0f2f02bfb51931b3df66414629f2dfdc0aa93bbe79714fb804e24679e3c25d39401fee00c64500587ee4caf02e +MISC metadata.xml 306 SHA256 2ad77eb17f40f9cce57e27781bbb02d88c52529219e641a550689bebf94f0318 SHA512 d1fc4040379fb33c7f193f37a1c044000408e47c9df8b17771ed7cb5194f9d8b8c062b8a6804e72fb5a666683a8d5b49ec5a6328394870d9bdc1b7f3e0e4e787 WHIRLPOOL b89d7021ecfd8e98864d4694af37e53c7b02f3330fe6c7d5c97e4b30c3f811cd79194f87f6a2e2965748af088e75e7b211e47f05a82c2670060cc3fa01b24d00 diff --git a/app-admin/vault/files/localhost.json.example b/app-admin/vault/files/localhost.json.example new file mode 100644 index 000000000000..02c377e424a9 --- /dev/null +++ b/app-admin/vault/files/localhost.json.example @@ -0,0 +1,9 @@ +backend "consul" { + address = "127.0.0.1:8500" + path = "vault" +} + +listener "tcp" { + address = "127.0.0.1:8200" + tls_disable = 1 +} diff --git a/app-admin/vault/files/vault.confd b/app-admin/vault/files/vault.confd new file mode 100644 index 000000000000..6263ff00f911 --- /dev/null +++ b/app-admin/vault/files/vault.confd @@ -0,0 +1,7 @@ +# you can change the init script behavior by setting those parameters +# - group (default: vault) +# - pidfile (default: /run/vault/vault.pid) +# - user (default: vault) + +# extra arguments for the consul agent +command_args="-config=/etc/vault.d" diff --git a/app-admin/vault/files/vault.initd b/app-admin/vault/files/vault.initd new file mode 100644 index 000000000000..d430bb8d39a9 --- /dev/null +++ b/app-admin/vault/files/vault.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2015-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="vault server" +group=${group:-${RC_SVCNAME}} +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} + +command="/usr/bin/${RC_SVCNAME}" +command_args="server ${command_args}" +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" + +depend() { + need net +} diff --git a/app-admin/vault/files/vault.logrotated b/app-admin/vault/files/vault.logrotated new file mode 100644 index 000000000000..66b827b9e693 --- /dev/null +++ b/app-admin/vault/files/vault.logrotated @@ -0,0 +1,7 @@ +/var/log/vault/vault.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff --git a/app-admin/vault/files/vault.service b/app-admin/vault/files/vault.service new file mode 100644 index 000000000000..3071d0346277 --- /dev/null +++ b/app-admin/vault/files/vault.service @@ -0,0 +1,18 @@ +[Unit] +Description=vault server +Requires=network-online.target +After=network-online.target + +[Service] +User=vault +Environment=VAULT_SERVER_OPTS="-config=/etc/vault.d" +ExecStart=/usr/bin/vault server $VAULT_SERVER_OPTS +CapabilityBoundingSet=CAP_IPC_LOCK +AmbientCapabilities=CAP_IPC_LOCK +Capabilities=CAP_IPC_LOCK=ep +SecureBits=keep-caps +Restart=on-failure +SuccessExitStatus=2 + +[Install] +WantedBy=default.target diff --git a/app-admin/vault/metadata.xml b/app-admin/vault/metadata.xml new file mode 100644 index 000000000000..9f451f6533d7 --- /dev/null +++ b/app-admin/vault/metadata.xml @@ -0,0 +1,10 @@ + + + + + zmedico@gentoo.org + + + hashicorp/vault + + diff --git a/app-admin/vault/vault-0.7.3-r1.ebuild b/app-admin/vault/vault-0.7.3-r1.ebuild new file mode 100644 index 000000000000..332d32ddfc85 --- /dev/null +++ b/app-admin/vault/vault-0.7.3-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit fcaps golang-base golang-vcs-snapshot systemd user + +EGO_PN="github.com/hashicorp/${PN}" +DESCRIPTION="A tool for managing secrets" +HOMEPAGE="https://vaultproject.io/" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SLOT="0" +LICENSE="MPL-2.0" +KEYWORDS="~amd64" +IUSE="" + +RESTRICT="test" + +DEPEND="dev-lang/go:= + dev-go/gox" + +FILECAPS=( + -m 755 'cap_ipc_lock=+ep' usr/bin/${PN} +) + +src_prepare() { + default + # Avoid the need to have a git checkout + sed -e 's:^\(GIT_COMMIT=\).*:\1:' \ + -e 's:^\(GIT_DIRTY=\).*:\1:' \ + -e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \ + -i src/${EGO_PN}/scripts/build.sh || die +} + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_compile() { + mkdir bin || die + export GOPATH=${S} + cd src/${EGO_PN} || die + XC_ARCH=$(go env GOARCH) \ + XC_OS=$(go env GOOS) \ + XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \ + emake +} + +src_install() { + dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md} + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /etc/${PN}.d + insinto /etc/${PN}.d + doins "${FILESDIR}/"*.json.example + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + dobin bin/${PN} +} diff --git a/app-admin/vault/vault-0.8.2.ebuild b/app-admin/vault/vault-0.8.2.ebuild new file mode 100644 index 000000000000..e41ab098f405 --- /dev/null +++ b/app-admin/vault/vault-0.8.2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit fcaps golang-base golang-vcs-snapshot systemd user + +EGO_PN="github.com/hashicorp/${PN}" +DESCRIPTION="A tool for managing secrets" +HOMEPAGE="https://vaultproject.io/" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SLOT="0" +LICENSE="MPL-2.0" +KEYWORDS="~amd64" +IUSE="" + +RESTRICT="test" + +DEPEND=">=dev-lang/go-1.9:= + dev-go/gox" + +FILECAPS=( + -m 755 'cap_ipc_lock=+ep' usr/bin/${PN} +) + +src_prepare() { + default + # Avoid the need to have a git checkout + sed -e 's:^\(GIT_COMMIT=\).*:\1:' \ + -e 's:^\(GIT_DIRTY=\).*:\1:' \ + -e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \ + -i src/${EGO_PN}/scripts/build.sh || die + sed -e "/hooks/d" -i src/${EGO_PN}/Makefile || die +} + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_compile() { + mkdir bin || die + export GOPATH=${S} + cd src/${EGO_PN} || die + XC_ARCH=$(go env GOARCH) \ + XC_OS=$(go env GOOS) \ + XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \ + emake +} + +src_install() { + dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md} + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /etc/${PN}.d + insinto /etc/${PN}.d + doins "${FILESDIR}/"*.json.example + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + dobin bin/${PN} +} diff --git a/app-admin/vault/vault-0.8.3.ebuild b/app-admin/vault/vault-0.8.3.ebuild new file mode 100644 index 000000000000..e41ab098f405 --- /dev/null +++ b/app-admin/vault/vault-0.8.3.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit fcaps golang-base golang-vcs-snapshot systemd user + +EGO_PN="github.com/hashicorp/${PN}" +DESCRIPTION="A tool for managing secrets" +HOMEPAGE="https://vaultproject.io/" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SLOT="0" +LICENSE="MPL-2.0" +KEYWORDS="~amd64" +IUSE="" + +RESTRICT="test" + +DEPEND=">=dev-lang/go-1.9:= + dev-go/gox" + +FILECAPS=( + -m 755 'cap_ipc_lock=+ep' usr/bin/${PN} +) + +src_prepare() { + default + # Avoid the need to have a git checkout + sed -e 's:^\(GIT_COMMIT=\).*:\1:' \ + -e 's:^\(GIT_DIRTY=\).*:\1:' \ + -e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \ + -i src/${EGO_PN}/scripts/build.sh || die + sed -e "/hooks/d" -i src/${EGO_PN}/Makefile || die +} + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_compile() { + mkdir bin || die + export GOPATH=${S} + cd src/${EGO_PN} || die + XC_ARCH=$(go env GOARCH) \ + XC_OS=$(go env GOOS) \ + XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \ + emake +} + +src_install() { + dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md} + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /etc/${PN}.d + insinto /etc/${PN}.d + doins "${FILESDIR}/"*.json.example + + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + + dobin bin/${PN} +} -- cgit v1.2.3