summaryrefslogtreecommitdiff
path: root/app-admin/vault
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/vault')
-rw-r--r--app-admin/vault/Manifest3
-rw-r--r--app-admin/vault/vault-1.3.0.ebuild93
2 files changed, 96 insertions, 0 deletions
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index 01e273375b6c..959978fe8311 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -7,6 +7,9 @@ DIST vault-1.2.3-webui.tar.xz 1916848 BLAKE2B 503425336fac45645b837380dcf94be4bd
DIST vault-1.2.3.tar.gz 27773681 BLAKE2B 862b386c96e7d284c5b82a89dca5a0a8668a900a5b32758a472b5d7ea4ed995dce608dfda0398bcf15e703f21099ddc662abb585cca0e2d2f43a0863184e055c SHA512 9543e394f187cd9b06e88b64319504e07519041741650db3b7b905f1b34348ed7d9e22955ce2a456ffd2e06210e9e01b1a0ded459cde4840fbf5903ff6e21e75
DIST vault-1.2.4-webui.tar.xz 1919024 BLAKE2B c1fc1460d70f33695ce9f7571a701035b02a376e4d336a9e368190a5ec08dc3ef417d2553a0e3ca5e745721eef49caeaaf294bd8b44550938ab02c7d63460744 SHA512 9b431083b1850e6e18b5212f04cc2d9305832c02594984caef298b2b33e176b6cc7f767e9e137208e005778d249410e482cfe4b6f6bfdb6f2ba54de9bcc4c7f6
DIST vault-1.2.4.tar.gz 27778766 BLAKE2B 536dd114c0268f91eb6b5c13cc30d22cdb9d1085c1378c6e39a6fcffeb4d5313363d225c85073a4da124962d6f7de8e4800a6648e392909a9595341ac178d94a SHA512 35a91088ac6949863e2de651edac19d73586acc2f42d14e48d3b41236d9458c95e60f8ec2285b3846ff04ebe59a4d4b308686151d758b5af8caad711441e2ee4
+DIST vault-1.3.0-webui.tar.xz 2004176 BLAKE2B f17b51346e694e13cb51779f158116cd1e241ba1a90c5e384b40fafc916386fd12ae7e09e11b083f1ff8cb8aa89a94f811029edc10fceec2a08cbe8e65b1bac4 SHA512 2f3695134ffd9af478568b08fc66b593d00c0990178af2f3d0e8b27c53afeed1f7926d97afa688b21cca931665b435e85c036a9970f71355977815f214c66c0c
+DIST vault-1.3.0.tar.gz 31098388 BLAKE2B 81ac68f47eed4a9e0187774558d38701f4e1481b07bd8a6f310741741a112dcf8e8344e156b6cef2a05e115da998fafab9627d62e261ffb8995ebdd2468f770a SHA512 4011706c2d418e4e13369f5afa5541af8296d6731c12aa670ed0fce66cc4d950edb76a0d24722be6b63538dc3479dcf68bb89ce7d9f37437062635feb6432165
EBUILD vault-1.2.3.ebuild 2356 BLAKE2B c68a7cc7b1b93c93a9a0bb9e4e67ce6900071650f567054a9e4fe5b9b383ea106635ad4a595219f16c877c767ce751d8fbb679cb6d442c2098e5e7e9d7200079 SHA512 55f85e6d4781cd7ad278942f080081bfdc7a6587405a84f79a842680a6142b32a4e32d5547874790556279bd39d9e9279ff3735025552502ffe6ba56159ac4c7
EBUILD vault-1.2.4.ebuild 2356 BLAKE2B c68a7cc7b1b93c93a9a0bb9e4e67ce6900071650f567054a9e4fe5b9b383ea106635ad4a595219f16c877c767ce751d8fbb679cb6d442c2098e5e7e9d7200079 SHA512 55f85e6d4781cd7ad278942f080081bfdc7a6587405a84f79a842680a6142b32a4e32d5547874790556279bd39d9e9279ff3735025552502ffe6ba56159ac4c7
+EBUILD vault-1.3.0.ebuild 2356 BLAKE2B c68a7cc7b1b93c93a9a0bb9e4e67ce6900071650f567054a9e4fe5b9b383ea106635ad4a595219f16c877c767ce751d8fbb679cb6d442c2098e5e7e9d7200079 SHA512 55f85e6d4781cd7ad278942f080081bfdc7a6587405a84f79a842680a6142b32a4e32d5547874790556279bd39d9e9279ff3735025552502ffe6ba56159ac4c7
MISC metadata.xml 371 BLAKE2B bdee8ae91cf8ccf66bfceb7ee5e1a46494d3e1b36cf5159ce9e6ad36eb251ea0ea03b1a9aab034936021d1a0f17c8577dafb30dc76a912ec04d8cfc3ae8c37cc SHA512 2517b0ec49190a14a2261c3544e4115435abcc0824a0fd255f6eb585d2de9e97f6feddeff8bb15c505d0f9e3086839e00e2abbd18bc639b45a25f6a7f384be6a
diff --git a/app-admin/vault/vault-1.3.0.ebuild b/app-admin/vault/vault-1.3.0.ebuild
new file mode 100644
index 000000000000..ba761e123410
--- /dev/null
+++ b/app-admin/vault/vault-1.3.0.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fcaps golang-base golang-vcs-snapshot systemd user
+
+EGO_PN="github.com/hashicorp/${PN}"
+VAULT_WEBUI_ARCHIVE="${P}-webui.tar.xz"
+DESCRIPTION="A tool for managing secrets"
+HOMEPAGE="https://vaultproject.io/"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ webui? (
+ mirror://gentoo/${VAULT_WEBUI_ARCHIVE}
+ https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE}
+ )"
+SLOT="0"
+LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT"
+KEYWORDS="~amd64"
+IUSE="+webui"
+
+RESTRICT="test"
+
+DEPEND=">=dev-lang/go-1.12:=
+ dev-go/gox"
+
+FILECAPS=(
+ -m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
+)
+
+src_unpack() {
+ golang-vcs-snapshot_src_unpack
+ if use webui; then
+ # The webui assets build has numerous nodejs dependencies,
+ # see https://github.com/hashicorp/vault/blob/master/ui/README.md
+ pushd "${S}/src/${EGO_PN}" >/dev/null || die
+ unpack "${VAULT_WEBUI_ARCHIVE}"
+ popd >/dev/null
+ fi
+}
+
+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" \
+ -e 's|^\([[:space:]]*\)goimports .*)|\1true|' \
+ -i src/${EGO_PN}/Makefile || die
+
+ # Avoid network-sandbox violations since go-1.13
+ rm src/${EGO_PN}/go.mod || die
+}
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_compile() {
+ mkdir bin || die
+ export -n GOCACHE XDG_CACHE_HOME #678970
+ export GOBIN=${S}/bin GOPATH=${S}
+ cd src/${EGO_PN} || die
+ # The fmt target may need to be executed if it was previously
+ # executed by an older version of go (bug 665438).
+ emake fmt
+ BUILD_TAGS="$(usex webui ui '')" \
+ 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}
+}