diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-30 01:13:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-30 01:13:30 +0000 |
commit | d9ec8de250ddc362ca4726cd6c055216b529177a (patch) | |
tree | 41583a3d39640bf31918130f91d9f94f0c59b9b0 /app-admin/vault | |
parent | 62090949b4fde34bbcbb4bd770a9635c6ac0c55e (diff) |
gentoo auto-resync : 30:03:2024 - 01:13:30
Diffstat (limited to 'app-admin/vault')
-rw-r--r-- | app-admin/vault/Manifest | 5 | ||||
-rw-r--r-- | app-admin/vault/files/vault-1.15.6-stubmaker-outside-git-repo-24678.patch | 92 | ||||
-rw-r--r-- | app-admin/vault/vault-1.15.6.ebuild | 86 |
3 files changed, 183 insertions, 0 deletions
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest index 5d79e11f025f..4efa411d6de4 100644 --- a/app-admin/vault/Manifest +++ b/app-admin/vault/Manifest @@ -1,4 +1,5 @@ AUX localhost.json.example 130 BLAKE2B c2af154a798286daae8a1804c698a8a8437bb4fbf2c9e928bd8ebd2cc846a7887058695f3715a4e3b9c82232529fe053b40d52fd98fd6b6c4018fbb2009a7da0 SHA512 9f9bc222f3716942b7423fa2ab14afd1d516bf3f3170b7418a75b970a33341426e13f89cf331a5e25bd3159dcbb435e20e75a0c9109e767e67bf777a7dbcd182 +AUX vault-1.15.6-stubmaker-outside-git-repo-24678.patch 2211 BLAKE2B 187506b19be44325811b6b0847721586437cf7f22ee7b9d757dd6a66f8308e0532b35cb5af272ef86f933e70db3c3a13fecc34da876762c9ea0888ee19e32ace SHA512 ba15946e5b83036d319608d72e944915e488290a8ec1994f4ab852780d86e6ae02ee775255631f9e8e558d60cceb67286f66f03b4a9216b261f8aad73df40a69 AUX vault.confd 243 BLAKE2B 6598fa2138c4ca94fdd6b7a02048ee4a4eb2b37d17b8a065ae2f29ac183bd1473de37107b2e141b74933c1b14502cdaaaebe493ee71ad6c9141a889c6e73b977 SHA512 395d823dee49fed30d99fea1fcd1b0c1c3ae2bfd806fa0c169aa14d83a594d224f8966870799a3740a7e52f039616efe78834e0522e7a2802c7df4c56b3bbdd2 AUX vault.initd 573 BLAKE2B 444541b8912910cf6b5d038e466e18baebb7dfd2905d802217baf9e861bb7f2a3e032716545c74e269782aa420fbd052745322576b4bcb8c4cf53ba07471b261 SHA512 11124e6fc656977c20b55b578e30fd76b8f6905760c2f17f93b960a317975f1914c6bd8d4ffd3741ba405bfe5aa0cecb68067f8ce52b2df9015863d31f9a7aad AUX vault.logrotated 83 BLAKE2B 63b106e949f8a2da0ca97f1d07732fdea4dafbe44cb97ea81074472b95489d179deccd14f4d4176043f488f2be68b96dc6bee20748fe68f650d70fd32078d2bd SHA512 83d73760d85dbb731652aa5936d2780208ac4643e975538652f53b49305d024df6d72a8a06d82f430982b07cf940b2fd69f9a6eedb39d380136c8e5bfda280e5 @@ -9,7 +10,11 @@ DIST vault-1.14.8-vendor.tar.gz 71869146 BLAKE2B 5875056d5ec53396ed53db7fd4891a6 DIST vault-1.14.8-webui.tar.xz 1680312 BLAKE2B c698adc325633b1dc59dea3b09692da0476a5f3dbd1f69f1e68243fa903e4590b152846f2dabd4b7f5f492467fcdc52c0afd82bfe1a956b1b69f11da403fab9c SHA512 a25faa74614b31688bb91c4ac2b6a105426be632cc417e94ef14c60a388f076eaec006e07a9784047422b70ce9d9c9fd33e6fb8ef3595b7f1a6468739da8e1c6 DIST vault-1.14.9-vendor.tar.gz 71845081 BLAKE2B ea25a6ba8ac293971170688b4ce3845ba19a5af746c3d96860420d74f8c0af33ea118a47d17117dbd520675739c44ed76118ef126c5b53e4c4adb0924cda58d5 SHA512 00ff45f986889d17ebe59c27aeaf8132270e5f06883bf84ce10721c9e2943a25ad8b86be3271991c824369ad5545258b3c01600f1dda06487751ff806b1d76b9 DIST vault-1.14.9-webui.tar.xz 1677212 BLAKE2B db4da051a8c0a62e99c1f2070f3c022fc934350b255d21b360b3b3b53555942f1ac6c4ef15ed7d8a2519f05752406add63837317615afb387b0fc407f5ab8410 SHA512 2f54dd24fb9a4e2e774dd4212a605126a9d4e4975a97a01c88c94bce8e6f10174fe07235d402dd43ae31aacf4371f77272e4446d972d2e7304745186b0e6dbb7 +DIST vault-1.15.6-deps.tar.xz 20736608 BLAKE2B 53e21d0664f9bbd8c851a486334e04d3b3151aaee709c8fe88ab4969a81ebd4562cf3a350e383647140bd4826a0aa75b34ef136c81920b868dff7ae6f0522e37 SHA512 c1c24c2c646a441c551849af2d3165fc15db2b61f261608f44b7371214cdef0e76263b5b2f295c19606057e80316b4864fff64bc5603b99901fc8a5d900c6550 +DIST vault-1.15.6-webui.tar.xz 1721320 BLAKE2B 3f2d31767c6086e7b17f7445f0cff34ce4ebd7a6a1daeaede96443758096a6b8b94b971af5a74e8bcfb2c95c07b496b1babf3f8ce82f9b360fafe5a4d5138cac SHA512 6a532258a5c7734863967926d95699b2611959177b9dbf4e60cff115331237e65f3dbc41e842443ee5af9020c69280b27a511f887528dc914f9d9e642f9a3a63 +DIST vault-1.15.6.tar.gz 31923253 BLAKE2B 8a4e7b9d8d6753b6f717c6699b2d4822cecff299e3cebd8945d3c34232ff77611611d4e6259ab9c9c4ff91a2e52b7eef707df7da68960be36c314ceba18b124b SHA512 52be0e47f3028f9c1f3ce5d2a72356c955f20fcaf6e8396a6d5938226d72cd8353bed398ba66a6821fc609aaed465e82c3449aeaa0dfaabe80ff0412a73779b3 EBUILD vault-1.14.5.ebuild 2095 BLAKE2B 9381f523b1b70fff142571c5e61627cf211c60b3b5f061b1a7a3dbaa26b0531fc86f430370f5eb48a2a65881a19a1f3142b5dbe21311bc51d9d51bb5163c7227 SHA512 dd949037626cec46c7cc35e3811befb80b78d2a7cba1d91d36d8878f3dea50188a7fb26268e0f26162cfa6206fcd35db8016a6dc1ebf266ed3c65847218ae0dd EBUILD vault-1.14.8.ebuild 2096 BLAKE2B fca083286620ca0cf90fa6f428e627851948afd1b77125171cf8b6c1e6bbfe599ca38cbfed8d22f7c83235d1d27e7fd8c011022d4cba68b3c1518319c7ca6ba0 SHA512 b7888e02d2cea6b5418f09f885391d4ef07da44a810caa866c0a52452e43c78138cde10032a72b7d37e3dd19540c7f03dbf24c84ea2cbd63472030d2af3b6a83 EBUILD vault-1.14.9.ebuild 2094 BLAKE2B 3472fc7a0868be220400af480b23a0f774599224d7acbe89417af075ca7ec2d20fcbe62eaec295216ab3db10d5650eeaedece2dc303a06e15dcbf16079ea5648 SHA512 2b267dcab689aaf9d3116c2bcdfe011efb5ad5ac3200a6818d2f31c1834453700dfa7dea6a95ebe7a878557aa5185676ad59135660d3a3fc56271595e355d874 +EBUILD vault-1.15.6.ebuild 2217 BLAKE2B 76d862c54885ba3e2401163e0a66739c63d2c173d166db0b09bb52ddaeff9c1136bbb429844124c99ecd4c10a0adf459b60fb6af0e84260f0d86a3f7309f639a SHA512 74f37e96b4c6684220efd455cbee220b9a982a2023d41232f7f9edfc1bc790a3c7a7f95eb3b0ee75a06bf9ca415554bcf6dd8719bde37fa02c905660d520b395 MISC metadata.xml 372 BLAKE2B 8e18e03d14e17a6a5d8c6b7bdb0d87ef6aec8530e203edc579a66b0c6ba0809bbddf4d68943281483ed841daa18a87ee13bed427162e40cd6c2fe3c45b0ec4fb SHA512 07bd140cd5152ccf7e9c39a0ad45a9361b56306b773176155fceaee3dbfa4645d74dba5a21a131f0221419aed5a9aeed4a5aef7c4eec2750c803e11c96621b02 diff --git a/app-admin/vault/files/vault-1.15.6-stubmaker-outside-git-repo-24678.patch b/app-admin/vault/files/vault-1.15.6-stubmaker-outside-git-repo-24678.patch new file mode 100644 index 000000000000..5b47f39cb81b --- /dev/null +++ b/app-admin/vault/files/vault-1.15.6-stubmaker-outside-git-repo-24678.patch @@ -0,0 +1,92 @@ +From cd6d0e1c593e158b8641529410d95e4b1722d5b2 Mon Sep 17 00:00:00 2001 +From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> +Date: Thu, 4 Jan 2024 17:03:09 -0600 +Subject: [PATCH] Allow stubmaker to work outside of a git repository + +https://github.com/hashicorp/vault/pull/24678 + +Fixes: https://github.com/hashicorp/vault/issues/24677 +--- + tools/stubmaker/main.go | 58 +++++++++++++++++++++++------------------ + 1 file changed, 33 insertions(+), 25 deletions(-) + +diff --git a/tools/stubmaker/main.go b/tools/stubmaker/main.go +index 53676e08b8c84..15e95b6a45f60 100644 +--- a/tools/stubmaker/main.go ++++ b/tools/stubmaker/main.go +@@ -43,15 +43,21 @@ func main() { + DetectDotGit: true, + }) + if err != nil { +- fatal(err) ++ if err.Error() != "repository does not exist" { ++ fatal(err) ++ } ++ repo = nil + } + +- wt, err := repo.Worktree() +- if err != nil { +- fatal(err) +- } +- if !isEnterprise(wt) { +- return ++ var wt *git.Worktree ++ if repo != nil { ++ wt, err = repo.Worktree() ++ if err != nil { ++ fatal(err) ++ } ++ if !isEnterprise(wt) { ++ return ++ } + } + + // Read the file and figure out if we need to do anything. +@@ -80,26 +86,28 @@ func main() { + + // We'd like to write the file, but first make sure that we're not going + // to blow away anyone's work or overwrite a file already in git. +- head, err := repo.Head() +- if err != nil { +- fatal(err) +- } +- obj, err := repo.Object(plumbing.AnyObject, head.Hash()) +- if err != nil { +- fatal(err) +- } ++ if repo != nil { ++ head, err := repo.Head() ++ if err != nil { ++ fatal(err) ++ } ++ obj, err := repo.Object(plumbing.AnyObject, head.Hash()) ++ if err != nil { ++ fatal(err) ++ } + +- st, err := wt.Status() +- if err != nil { +- fatal(err) +- } ++ st, err := wt.Status() ++ if err != nil { ++ fatal(err) ++ } + +- tracked, err := inGit(wt, st, obj, outputFile) +- if err != nil { +- fatal(err) +- } +- if tracked { +- fatal(fmt.Errorf("output file %s exists in git, not overwriting", outputFile)) ++ tracked, err := inGit(wt, st, obj, outputFile) ++ if err != nil { ++ fatal(err) ++ } ++ if tracked { ++ fatal(fmt.Errorf("output file %s exists in git, not overwriting", outputFile)) ++ } + } + + // Now we can finally write the file diff --git a/app-admin/vault/vault-1.15.6.ebuild b/app-admin/vault/vault-1.15.6.ebuild new file mode 100644 index 000000000000..2a8f84f25ca1 --- /dev/null +++ b/app-admin/vault/vault-1.15.6.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="MPL-2.0 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/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" +S=${WORKDIR}/${P} +PATCHES=("${FILESDIR}/${P}-stubmaker-outside-git-repo-24678.patch") + +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} +} |