diff options
Diffstat (limited to 'app-admin/vault')
-rw-r--r-- | app-admin/vault/Manifest | 2 | ||||
-rw-r--r-- | app-admin/vault/vault-1.9.4.ebuild | 84 |
2 files changed, 86 insertions, 0 deletions
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest index ab07e3101d06..29e61a0f08d0 100644 --- a/app-admin/vault/Manifest +++ b/app-admin/vault/Manifest @@ -2,3 +2,5 @@ DIST vault-1.9.2-vendor.tar.gz 43356262 BLAKE2B 5975c58cfec150f8b12003c682362cb0 DIST vault-1.9.2-webui.tar.xz 1088616 BLAKE2B 7841a7bb8b1a664692dd9fc89c928dee8767533cf661fa5ed429e6d8e1db6f6633882cd8f919b059d76b95fd2095b9eaaa95237fdd411aef730b2b80ffe9469a SHA512 b6adda55576011389e981ec7b22177623838b5de6246d775e3f360fdf8bd1596d7a01d1e0578301bb28764293eba00fca95265816aba1ecbe7824e104af21bf6 DIST vault-1.9.3-vendor.tar.gz 43363371 BLAKE2B eb07946fa31a18ead488500ceaa73b4b4747a8f9eff8819337fd5f7735e5d034901c365031852e841b5692947b2e2269b1be38e9ff46b66557f71504fb0b1bf0 SHA512 413c9d6b3471ad79784b5f695affcdd2c3e0b0d0772356648ad53225556cd8b872b09b6b91d637bd2d93536a3576e45ea94945cf74a0c2652a6188ed6a45ba35 DIST vault-1.9.3-webui.tar.xz 1088548 BLAKE2B 696006ffc5fe6916630e46a58f111891ac06b57d6dbe09f553f65469781315ba372064af448ad42a6dbf70465ece035b42b93cafcb584942f6d2bc61432acfd9 SHA512 bd5808eb045793b1b32d1b623ed60e84cebaddd3aa9a1f2fa9e72cf45f1b1bf33f3f3a4131fc49be8cdaa8fde32d9d16e9221e728fb06b7d84b0596a05ca0d05 +DIST vault-1.9.4-vendor.tar.gz 44536444 BLAKE2B 0ad5eb4b621f3dba4cd996516850d30085293b70938967e15e76c65c34e153fcfba4f3b62fbec0163e046fcd4b7f8e30baeb98fc610c59b0d36e5ed067aacc70 SHA512 6710af7e72ddccce143450ad49fba2ec225a5be84b5d84c59efe1eea0f2d193a994b2d4a0aa194e8ef853dcd5ddff733522fca08cfa58de120e24da9b308a26b +DIST vault-1.9.4-webui.tar.xz 1088656 BLAKE2B da1b0de1a1cd1630639c8bd31ecb20a9e3bbec9df60bdc6cc6e3f160b6b3d00717cec8039683ccd540332c7521fb40d9735d3a734c6df5b54e39628b56d2bb81 SHA512 c166420857bee3189cc56be13e268da33ece298c3a00a16582537edb96e57bdf38e1c7e214e54779d128f6b7aa97af7b120b5f94ade19582dd4128c7ab43f722 diff --git a/app-admin/vault/vault-1.9.4.ebuild b/app-admin/vault/vault-1.9.4.ebuild new file mode 100644 index 000000000000..4e28e5ec5108 --- /dev/null +++ b/app-admin/vault/vault-1.9.4.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps go-module systemd + +DESCRIPTION="A tool for managing secrets" +HOMEPAGE="https://vaultproject.io/" + +VAULT_WEBUI_ARCHIVE="${P}-webui.tar.xz" +SRC_URI="https://github.com/zmedico/vault/archive/refs/tags/v${PV}-vendor.tar.gz -> ${P}-vendor.tar.gz + webui? ( + https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE} + )" + +LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+webui" + +BDEPEND=" + app-arch/zip + dev-go/gox + >=dev-lang/go-1.15.3" +COMMON_DEPEND="acct-group/vault + acct-user/vault" + DEPEND="${COMMON_DEPEND}" + RDEPEND="${COMMON_DEPEND}" + +FILECAPS=( + -m 755 'cap_ipc_lock=+ep' usr/bin/${PN} +) + +RESTRICT+=" test" +S=${WORKDIR}/${P}-vendor + +src_unpack() { + default +} + +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 scripts/build.sh || die + sed -e "/hooks/d" \ + -e 's|^\([[:space:]]*\)goimports .*)|\1true|' \ + -e "s/gofumpt/gofmt/g" \ + -i Makefile || die + if [[ -d "${WORKDIR}/http/web_ui" ]]; then + mv "${WORKDIR}/http/web_ui" "${S}/http/web_ui" || + die "mv failed" + else + mkdir "${S}/http/web_ui" || die + touch "${S}/http/web_ui/no_web_ui" || die + fi +} + +src_compile() { + mkdir "${T}"/bin || die + BUILD_TAGS="$(usex webui ui '')" \ + GOPATH="${T}" \ + XC_ARCH=$(go env GOARCH) \ + XC_OS=$(go env GOOS) \ + XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \ + emake bin +} + +src_install() { + dobin bin/${PN} + dodoc CHANGELOG.md CONTRIBUTING.md README.md + insinto /etc/${PN}.d + doins "${FILESDIR}/"*.json.example + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + keepdir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} +} |