commit:     5930fb821645d61f5c7f8688b4fa4b1021bf1779
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 17 00:01:22 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jan 17 02:22:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5930fb82

app-admin/vault: version bump to 1.0.2

Closes: https://bugs.gentoo.org/675556
Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-admin/vault/Manifest           |  2 +
 app-admin/vault/metadata.xml       |  3 ++
 app-admin/vault/vault-1.0.2.ebuild | 87 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index ccf528b13b8..79f01037ee4 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -1,2 +1,4 @@
 DIST vault-0.11.5.tar.gz 25459691 BLAKE2B 
9f77e90b71629e1ed341d03830a0376b6731d85189dde0205148c7c8002556521538144cbf1b7bc425253cc55de6ab3d48cbcc1d270165e5804f7f632d06523b
 SHA512 
b290523ee94199d241bbd2477ca686076f645804953181996aefe2a425bc5114db3d375fd5c832d1fa257a790947544406f50777317e854ccf2d4d4477ab6ffd
 DIST vault-1.0.1.tar.gz 25817507 BLAKE2B 
c4882341fbcea2051c8685dfff85739f11898d0406d12611cdda36f19d7badae69e88060d593ba03c333b151d4402b7bfc520f34c0663fe00a77998aa662f161
 SHA512 
b644e419faa8dc1f8a347f7b522ccafbdea9f849de9ad1ca085214d21e50bd2ec6eb868b4eb0abff65537abc4fba93c3e4ffd424afa90ca049068e6eccc99999
+DIST vault-1.0.2-webui.tar.xz 1252768 BLAKE2B 
d4af46bae84eb2e0e76633e5af061b351d486f19eebd0323a0ae5eb13275310e23169a88e3984a753ae45102c1010b54ae2ca789fe0c62e8e302305eec2bd129
 SHA512 
9282135e1f1cf983fb1ea4b72b7b3e5cc49aa42299aa5be40e9697da028c3e0bb8c2869e72a79b27ee2124a1b0f913b1b22ef98f96401289edb9e3407d460465
+DIST vault-1.0.2.tar.gz 25834864 BLAKE2B 
88f3252547e05a70a377d7711c7df279619455ce26003868465df1030da9ffe95bddd094b40b99f7f4698bbacfd883cdee31d14ee47e815299eb41a18ef99b3d
 SHA512 
e90a1db0401778650f16fa01827b274dc8e38e5f6fb420814bdc3f89507d3507a94d6bd3eacabf1ae782e72286dda598106918030b674f9b7d3f8e69cddbd3ec

diff --git a/app-admin/vault/metadata.xml b/app-admin/vault/metadata.xml
index 9f451f6533d..5f19dd15eee 100644
--- a/app-admin/vault/metadata.xml
+++ b/app-admin/vault/metadata.xml
@@ -7,4 +7,7 @@
   <upstream>
     <remote-id type="github">hashicorp/vault</remote-id>
   </upstream>
+  <use>
+    <flag name="webui">Enable the Web UI</flag>
+  </use>
 </pkgmetadata>

diff --git a/app-admin/vault/vault-1.0.2.ebuild 
b/app-admin/vault/vault-1.0.2.ebuild
new file mode 100644
index 00000000000..8eb29218789
--- /dev/null
+++ b/app-admin/vault/vault-1.0.2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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}"
+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"
+KEYWORDS="~amd64"
+IUSE="+webui"
+
+RESTRICT="test"
+
+DEPEND=">=dev-lang/go-1.10:=
+       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" -i src/${EGO_PN}/Makefile || die
+}
+
+pkg_setup() {
+       enewgroup ${PN}
+       enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_compile() {
+       mkdir bin || die
+       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}
+}

Reply via email to