diff options
-rw-r--r-- | app-admin/vault/Manifest | 3 | ||||
-rw-r--r-- | app-admin/vault/vault-1.17.3.ebuild | 86 |
2 files changed, 89 insertions, 0 deletions
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest index 13e072233ff7..001207c4e4e2 100644 --- a/app-admin/vault/Manifest +++ b/app-admin/vault/Manifest @@ -11,3 +11,6 @@ DIST vault-1.16.1.tar.gz 32997180 BLAKE2B e8c6ccf19ce2c48eee1b4b7544c6d164bd98be DIST vault-1.16.3-deps.tar.xz 21492052 BLAKE2B 5800105ab4f005c9569b4fd9eee567c706d2c0e1d0fbb937af6e3348f06f2a6e8ea7c159a738d04c266d577a5b1e7419735ffae410a106aac4b65740f55c7979 SHA512 9e4d515dad7862f56fef8822852b6989b52b494a786a38b74ce85af60b3f562738f3af5bf1497e5af0c07b42aaff407c1d39c3bd3f18d1f646998b7ac0b100a2 DIST vault-1.16.3-webui.tar.xz 2180172 BLAKE2B b1d8d59c462f7cd60ec5ef5878320591290c1655d1b1727508541faf45e5fe3c6085ff8fb66b3b82d95ca74cc1ee800fed09f0db7eb98580f7cc135a3eebfe6e SHA512 61ead17ceed96f7dda7439e292d0c0497d65c8938491f70927064ed647276ae41ffa35777e2a119dee116233baca9575b82e3e53cbeb9b622eb34f1563f4e164 DIST vault-1.16.3.tar.gz 33353350 BLAKE2B b185b9ad6b1e30da4ca2c2e9425a606e19fbda0b4ac529fb8410d2bff5a215eafe62d12c5c9988423ba7185a0456b7a5e364a466abe00ba9e45b57d59fd115d8 SHA512 b68189b978155168c42bac3e867abc44fcd4b6e9f680bd6951b99208536f1225013e8d336711ea17b9700b0ec75758dd2678e583811918e278849f306ddc9c2e +DIST vault-1.17.3-deps.tar.xz 21557340 BLAKE2B ba26c3921999c76e51d1548472a6e49d9be316f099ca2213879aa384ac6b70a2716d12b8950be56263f78343e8b09708905a03421eceb67e400544241a185a55 SHA512 6aa16d78459ffab1d5356291f196a40c9efc646baa1b10d191ab5d40d712d296e0c89b396afa16719716d178557b970278949967ba0bcacaf77d0b3bfb837e10 +DIST vault-1.17.3-webui.tar.xz 2196772 BLAKE2B c66ce1dcae83b18afb1bc4a76a1c69191d8bec6b7c1f392f58a66df423120a9d38a3b3c5222ae8ad0a960c6100e5dc3acaa11e4bfc04e2a43bf4df68fc036f47 SHA512 b9983126e403c5d4fcfdb25f02deaafe461c490ba67d5295cfdd35c69112e02677fe56e9b50cebe51afc6e896febdb5f6fac7431944f41d3bad38bad4a7670d1 +DIST vault-1.17.3.tar.gz 33565884 BLAKE2B cc39312ada9d889feda72d7659dfab56c53d4351882fcba1d52beed4cb41d387cec3b160413b63b3d031e0b23fe21d95b6d8cce438c274a5f39e4386a8d0b3c8 SHA512 e5d2f25b77e4d50f5f51cd5e2a6060745e147be328e68a9c51c142a40d83b446a6ccc27fe1414ba10f0abf8a37818b369b4d3245d44b0afb0ddf84a0e51c0995 diff --git a/app-admin/vault/vault-1.17.3.ebuild b/app-admin/vault/vault-1.17.3.ebuild new file mode 100644 index 000000000000..c201204925f2 --- /dev/null +++ b/app-admin/vault/vault-1.17.3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/hashicorp/vault/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" webui? ( https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE} )" +SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz" + +LICENSE="BUSL-1.1 MPL-2.0" +LICENSE+=" Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv" +IUSE="+webui" + +BDEPEND=" + app-arch/zip + dev-go/enumer + dev-go/gox + >=dev-lang/go-1.21" +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" + +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}\':: \ + -e "s|^BUILD_DATE=.*|BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%SZ)|" \ + -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 + rm -rf "${S}/http/web_ui" || die + mv "${WORKDIR}/http/web_ui" "${S}/http/web_ui" || + die "mv failed" + else + mkdir -p "${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} +} |