* [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/
@ 2016-10-20 7:48 Zac Medico
0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2016-10-20 7:48 UTC (permalink / raw
To: gentoo-commits
commit: 3db391486f339af5536d7942bc51d9c5ad60cabe
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 20 07:47:29 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 20 07:48:12 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3db39148
app-admin/vault: add logrotate config
Package-Manager: portage-2.3.2
app-admin/vault/files/vault.logrotated | 8 ++++++++
app-admin/vault/vault-0.5.3.ebuild | 2 ++
app-admin/vault/vault-0.6.2.ebuild | 2 ++
3 files changed, 12 insertions(+)
diff --git a/app-admin/vault/files/vault.logrotated b/app-admin/vault/files/vault.logrotated
new file mode 100644
index 00000000..db24363
--- /dev/null
+++ b/app-admin/vault/files/vault.logrotated
@@ -0,0 +1,8 @@
+/var/log/vault/vault.log {
+ su vault vault
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-admin/vault/vault-0.5.3.ebuild b/app-admin/vault/vault-0.5.3.ebuild
index 2a42585..31c138a 100644
--- a/app-admin/vault/vault-0.5.3.ebuild
+++ b/app-admin/vault/vault-0.5.3.ebuild
@@ -44,6 +44,8 @@ src_install() {
dodoc "${S}"/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
diff --git a/app-admin/vault/vault-0.6.2.ebuild b/app-admin/vault/vault-0.6.2.ebuild
index ade0af0..f16d491 100644
--- a/app-admin/vault/vault-0.6.2.ebuild
+++ b/app-admin/vault/vault-0.6.2.ebuild
@@ -91,6 +91,8 @@ src_install() {
dodoc "${S}"/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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/
@ 2017-02-21 20:49 Robin H. Johnson
0 siblings, 0 replies; 5+ messages in thread
From: Robin H. Johnson @ 2017-02-21 20:49 UTC (permalink / raw
To: gentoo-commits
commit: 3f5392d50cf4319f82e102b71119f403b6f9fc24
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 20:44:23 2017 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 20:49:22 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f5392d5
app-admin/vault: security bump.
See 0.6.4 release notes for notes about the security changes, as manual
actions may be required in addition to the upgrade.
See-Also: https://www.vaultproject.io/docs/install/upgrade-to-0.6.4.html
Package-Manager: portage-2.3.3
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
app-admin/vault/Manifest | 1 +
app-admin/vault/files/vault.initd | 2 +-
app-admin/vault/vault-0.5.3.ebuild | 2 +-
app-admin/vault/vault-0.6.2.ebuild | 2 +-
app-admin/vault/{vault-0.6.2.ebuild => vault-0.6.5.ebuild} | 4 ++--
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index d18a5bade7..a013336805 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -2,3 +2,4 @@ DIST gox-c9740af9c6574448fd48eb30a71f964014c7a837.tar.gz 15772 SHA256 826666828f
DIST iochan-87b45ffd0e9581375c491fef3d32130bb15c5bd7.tar.gz 1785 SHA256 71c117246bb1d4d78ad5c3bc5d301942bcebaae5b1e35da1ad7851ceac71a675 SHA512 2efc0e3cbca496240e3e24550fd0d2aab742eb9b227230ff1ed4ee47344b994642b028bd4644cd45cd697f5f5ef6a729aad65537b10c6555bd52d9ca4b9c717c WHIRLPOOL 15dfd50bfc992a7b6a1b5d672d5bf9bfcb71a357eae371eac773e7fe9ad4ec8d4d0578e0dc6b12bb14689d1497129616b0eb300bbcb483a6865ac315bced562a
DIST vault-0.5.3.tar.gz 3591764 SHA256 b312f3d098ebabd4ed7647cf54bc219a0d2afeba49ee8b614a38e455900b2dae SHA512 d0706e045a674aab81c09d9c75d089896e44162bbeece7a92e03eb605997617ba3f8a4d7eeac65c40c4b68d8ea4bb76b3f3893d57466d83d9db6ca5e37ccb05e WHIRLPOOL a1893985d8acb788702fa3d5ce89b05179be23fab03e6fe34249c7554cacc5836bb6b0fc10c1aac8446dd7374c6c5df1abc58990104a59b63ec4f552160fbeea
DIST vault-0.6.2.tar.gz 4862801 SHA256 295197e8ec7d03d4e141733579250ed653b13862a2d83dfd0d11a6e82f28b436 SHA512 5d444c32ee1dc464f9210331ed26ab56b9aaeb5fbdcb5c2fcc4d9363c6d1e60780d7c2f5020ebc3345fb8c3f32b3b8f8acc58533d5a036202685252b2affbe3e WHIRLPOOL d378f57598f6a9e8ce2e0a92382c2496ef1d78a714d3666d12b53760043e97b9eab4eea291a99745af59efcd2323907885d228f43a2154252ab2da1d47592a38
+DIST vault-0.6.5.tar.gz 5628341 SHA256 ef4c2fffbc80e126e027e76b30e37351fcaf0baf1178e1fba0e8912276441c00 SHA512 3a135281a2135aae45e9a659b0492d37069b080f42956f8a1fdbf842a8a1e54b474b7c5b48c0e6170b206fdb52da7a718a9702d5a14d3aa99f8e560839268374 WHIRLPOOL 9b2b564cefd1a1bd2858b3b34937314437f6b5dc5fd183f4be58d0517b75465064a860054102a286fd29ae5bb1cb2ba7b0c8b7ff7d52c911905c0ccedc053fd8
diff --git a/app-admin/vault/files/vault.initd b/app-admin/vault/files/vault.initd
index 0d473fc26b..5840381151 100644
--- a/app-admin/vault/files/vault.initd
+++ b/app-admin/vault/files/vault.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2015 Gentoo Foundation
+# Copyright 2015-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/app-admin/vault/vault-0.5.3.ebuild b/app-admin/vault/vault-0.5.3.ebuild
index 31c138aaeb..973cbcf3ad 100644
--- a/app-admin/vault/vault-0.5.3.ebuild
+++ b/app-admin/vault/vault-0.5.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/app-admin/vault/vault-0.6.2.ebuild b/app-admin/vault/vault-0.6.2.ebuild
index 48720ff886..b9b2b5375c 100644
--- a/app-admin/vault/vault-0.6.2.ebuild
+++ b/app-admin/vault/vault-0.6.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/app-admin/vault/vault-0.6.2.ebuild b/app-admin/vault/vault-0.6.5.ebuild
similarity index 97%
copy from app-admin/vault/vault-0.6.2.ebuild
copy to app-admin/vault/vault-0.6.5.ebuild
index 48720ff886..09483c9bae 100644
--- a/app-admin/vault/vault-0.6.2.ebuild
+++ b/app-admin/vault/vault-0.6.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -20,7 +20,7 @@ IUSE=""
RESTRICT="test"
-DEPEND=">=dev-lang/go-1.6:="
+DEPEND=">=dev-lang/go-1.7:="
RDEPEND=""
FILECAPS=(
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/
@ 2017-09-01 19:26 Zac Medico
0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2017-09-01 19:26 UTC (permalink / raw
To: gentoo-commits
commit: 090a2be8642f6de680cfe1e93c5e12b8074adf91
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 1 19:19:49 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Sep 1 19:26:08 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=090a2be8
app-admin/vault: revbump to 0.7.3-r1 for bug 628656
Package-Manager: Portage-2.3.8, Repoman-2.3.2
app-admin/vault/files/vault.initd | 17 ++++++-----------
.../vault/{vault-0.7.3.ebuild => vault-0.7.3-r1.ebuild} | 0
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/app-admin/vault/files/vault.initd b/app-admin/vault/files/vault.initd
index 3568a447c4b..d430bb8d39a 100644
--- a/app-admin/vault/files/vault.initd
+++ b/app-admin/vault/files/vault.initd
@@ -3,22 +3,17 @@
# Distributed under the terms of the GNU General Public License v2
description="vault server"
-group=${group:-${SVCNAME}}
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
-user=${user:-${SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
-command="/usr/bin/${SVCNAME}"
+command="/usr/bin/${RC_SVCNAME}"
command_args="server ${command_args}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
- --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
- --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
depend() {
need net
- after net
-}
-
-start_pre() {
- checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
}
diff --git a/app-admin/vault/vault-0.7.3.ebuild b/app-admin/vault/vault-0.7.3-r1.ebuild
similarity index 100%
rename from app-admin/vault/vault-0.7.3.ebuild
rename to app-admin/vault/vault-0.7.3-r1.ebuild
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/
@ 2021-09-16 22:07 William Hubbs
0 siblings, 0 replies; 5+ messages in thread
From: William Hubbs @ 2021-09-16 22:07 UTC (permalink / raw
To: gentoo-commits
commit: 7fa16bc47f1c8d140656cfa0492e989da5c1bf67
Author: Austin English <austin.m.english <AT> sony <DOT> com>
AuthorDate: Thu Sep 16 16:45:05 2021 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep 16 22:07:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fa16bc4
app-admin/vault: fix build with newer golang
Closes: https://bugs.gentoo.org/808791
Closes: https://bugs.gentoo.org/810317
Signed-off-by: Austin English <austin.m.english <AT> sony.com>
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
app-admin/vault/Manifest | 4 +-
app-admin/vault/files/vault-1.8.2-go-limiter.patch | 264 +++++++++++++++++++++
app-admin/vault/vault-1.8.2.ebuild | 6 +-
3 files changed, 270 insertions(+), 4 deletions(-)
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index 26de2c69e80..42ba4317b9e 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -1120,8 +1120,8 @@ DIST github.com%2Fsean-%2Fconswriter%2F@v%2Fv0.0.0-20180208195008-f5ae3917a627.m
DIST github.com%2Fsean-%2Fpager%2F@v%2Fv0.0.0-20180208200047-666be9bf53b5.mod 30 BLAKE2B 77431281d4cec52a254453afe8c7438154b0ecae0116ba085401536adc1f71f6a7eea8b0e2181893b004d805e3ff8b3a7f212ac82e41877cd08c2cf0fc47af05 SHA512 5101454134688f96467dbbdf475b1d9bd9e446c29eb2cd04b85430ea0130c09dcbd8141d5ca0d63e63b74349c3dbf59d978ef2115a03c920ff2abfad10fe9a62
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.mod 29 BLAKE2B 8f509981164937fb0aab63b0344ddbf25c183b926a6e87400e745f6aee9dcc478f0ed455c62a9753722954acb3506be5f7810915a15d03647668e7bb707c09c0 SHA512 c7dc34c7a73c5899ca207c0cac88dd38ddebaffa04b5dd511a86dd10160e60be2806dfc6e079a5871b0cb6142f53d7d7dc87ddbe3fb19240bf894430feac5875
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.zip 4415 BLAKE2B f50a9fd1f74506625ae9460c6071bbbd1dd3ad3d83264fb7def028c757e8ad8f865fc7255db6e9b5cdb7a1744ac1f741bc6184f064eee7108f6fc0facc81f639 SHA512 acd19ece301ac146ae50dd784e3dc1c2cbc0c00a562fc5d2759b7b8a4acf0b5bf83d5bcd54122130877a1568a13709c28ab7e1cc7ba269ec91aa1b1a86c2065a
-DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.3.0.mod 48 BLAKE2B 33ddfe8d645092d307c8b8acd8b1c0c8c0c91224a6b0eb3bac20d707be49acc3d437cf00d341d4d37857a9ac4b5303d1df717d2a46ce717941ab7eedbfd133bd SHA512 4266c966fbdba482455fdd13f37891847cff194d1a6d169be35167b729c6e36e9517d72c5a5fda048d8465ada31927b0f3d00fe455e5339c554829e7fb914d2a
-DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.3.0.zip 32198 BLAKE2B d779ed09d9e00d6ff18be20b48068a1877d623070d2f74bebb6816d3a139b311276caf8f3f3099a6b6940e8d5ddaaae07719fb86f117f9ec987483b1573561d5 SHA512 35f0ae21b2af7e125e4c18a36a0c6695b024f9f53facf6f025c71237cd12658cd507d05b6d8e8249c53477b56ed7c8e0a960232715e7243da2a3f00d6dcdcd68
+DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.7.1.mod 48 BLAKE2B 33ddfe8d645092d307c8b8acd8b1c0c8c0c91224a6b0eb3bac20d707be49acc3d437cf00d341d4d37857a9ac4b5303d1df717d2a46ce717941ab7eedbfd133bd SHA512 4266c966fbdba482455fdd13f37891847cff194d1a6d169be35167b729c6e36e9517d72c5a5fda048d8465ada31927b0f3d00fe455e5339c554829e7fb914d2a
+DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.7.1.zip 24454 BLAKE2B 4958546c0be405c760d03db84554b582ae770c08893c1dd77445f655d76714a93a5c1f2a9d5cc9590564002df9c6e81eafc2d44082c6da50a0f2ef18152e1d17 SHA512 e303b4042ed3f18743bc0d11700c40e5661a32472802dd1a5f9cd4131d520c774dd98cd62c056b6bf45739600cea5cb6052eb02a113fb091316cf1c11b5c819b
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.mod 34 BLAKE2B 790ec7277e4654961540dd09fcb7962328547009b0181183b7cb64972b872d30986d1e53ded5961588d89508c913b2b56dd7af3625d0e8d7be2253b6bcf59576 SHA512 a5f5d88a767a855b6ff24d7e2e0c4aeb81fb1365a7e81ed989b4c605a7a6c61dc52d7ce97fc672c21020ef56f597dce679184e5e8d3d199678487e6bebaa8127
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.zip 257791 BLAKE2B d0c44078120582d20e3c3eb60d0ecfc2c8547323ea68eddaffee5614243b4410518eabaf0c17b24351cd269d85bfc5f32151bcb56680793682a17b61e8881204 SHA512 c2d405ad66b1e3d6860ef21dacb6b7f0a5daef57267c32773cb26ea9983ba75df39e6b3ab5bc97c4c0eb133e17eb587a565da30d89139982fd90102765d27ca9
DIST github.com%2Fshopspring%2Fdecimal%2F@v%2Fv0.0.0-20180709203117-cd690d0c9e24.mod 37 BLAKE2B 9945435440e0d3be57cdb12cab697382fe91c56329289bbde332bbd1fd15928a5101d7fcadd89064ecbd103130514a1cad383db097d02d596138fad0348c15d0 SHA512 7f46d39bc8f24a5c5c1ff513c0f0018d5341a008526a49bf0b3694008c272b3080b0386a44ba6c27f2894bef19dfbec5095c9189ed222ed5a55797788668315e
diff --git a/app-admin/vault/files/vault-1.8.2-go-limiter.patch b/app-admin/vault/files/vault-1.8.2-go-limiter.patch
new file mode 100644
index 00000000000..3aef43e5c17
--- /dev/null
+++ b/app-admin/vault/files/vault-1.8.2-go-limiter.patch
@@ -0,0 +1,264 @@
+This is a combination of upstream commits:
+b368a675955707db4e940da29a1043871a3781b6
+21ea03e0f874991086d2f1bcdc285216878bd566
+
+Fixes https://bugs.gentoo.org/808791
+Fixes https://bugs.gentoo.org/810317
+
+diff --git a/go.mod b/go.mod
+index 548c0590f..22a8833e2 100644
+--- a/go.mod
++++ b/go.mod
+@@ -150,7 +150,7 @@ require (
+ github.com/ryanuber/go-glob v1.0.0
+ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da
+ github.com/sasha-s/go-deadlock v0.2.0
+- github.com/sethvargo/go-limiter v0.3.0
++ github.com/sethvargo/go-limiter v0.7.1
+ github.com/shirou/gopsutil v3.21.5+incompatible
+ github.com/stretchr/testify v1.7.0
+ github.com/tidwall/pretty v1.0.1 // indirect
+diff --git a/go.sum b/go.sum
+index c5b3b410d..98a5dd0a8 100644
+--- a/go.sum
++++ b/go.sum
+@@ -1120,8 +1120,8 @@ github.com/sean-/conswriter v0.0.0-20180208195008-f5ae3917a627/go.mod h1:7zjs06q
+ github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod h1:BeybITEsBEg6qbIiqJ6/Bqeq25bCLbL7YFmpaFfJDuM=
+ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
+ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+-github.com/sethvargo/go-limiter v0.3.0 h1:yRMc+Qs2yqw6YJp6UxrO2iUs6DOSq4zcnljbB7/rMns=
+-github.com/sethvargo/go-limiter v0.3.0/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU=
++github.com/sethvargo/go-limiter v0.7.1 h1:wWNhTj0pxjyJ7wuJHpRJpYwJn+bUnjYfw2a85eu5w9U=
++github.com/sethvargo/go-limiter v0.7.1/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU=
+ github.com/shirou/gopsutil v3.21.5+incompatible h1:OloQyEerMi7JUrXiNzy8wQ5XN+baemxSl12QgIzt0jc=
+ github.com/shirou/gopsutil v3.21.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
+diff --git a/http/util.go b/http/util.go
+index 0550a93c7..cbb364843 100644
+--- a/http/util.go
++++ b/http/util.go
+@@ -48,7 +48,7 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
+ return
+ }
+
+- quotaResp, err := core.ApplyRateLimitQuota("as.Request{
++ quotaResp, err := core.ApplyRateLimitQuota(r.Context(), "as.Request{
+ Type: quotas.TypeRateLimit,
+ Path: path,
+ MountPath: strings.TrimPrefix(core.MatchingMount(r.Context(), path), ns.Path),
+diff --git a/vault/core.go b/vault/core.go
+index 3b6e461fd..27741e8c6 100644
+--- a/vault/core.go
++++ b/vault/core.go
+@@ -2744,7 +2744,7 @@ func (c *Core) setupQuotas(ctx context.Context, isPerfStandby bool) error {
+
+ // ApplyRateLimitQuota checks the request against all the applicable quota rules.
+ // If the given request's path is exempt, no rate limiting will be applied.
+-func (c *Core) ApplyRateLimitQuota(req *quotas.Request) (quotas.Response, error) {
++func (c *Core) ApplyRateLimitQuota(ctx context.Context, req *quotas.Request) (quotas.Response, error) {
+ req.Type = quotas.TypeRateLimit
+
+ resp := quotas.Response{
+@@ -2758,7 +2758,7 @@ func (c *Core) ApplyRateLimitQuota(req *quotas.Request) (quotas.Response, error)
+ return resp, nil
+ }
+
+- return c.quotaManager.ApplyQuota(req)
++ return c.quotaManager.ApplyQuota(ctx, req)
+ }
+
+ return resp, nil
+diff --git a/vault/quotas/quotas.go b/vault/quotas/quotas.go
+index 68cc72f9f..80ee59521 100644
+--- a/vault/quotas/quotas.go
++++ b/vault/quotas/quotas.go
+@@ -168,7 +168,7 @@ type Manager struct {
+ // Quota represents the common properties of every quota type
+ type Quota interface {
+ // allow checks the if the request is allowed by the quota type implementation.
+- allow(*Request) (Response, error)
++ allow(context.Context, *Request) (Response, error)
+
+ // quotaID is the identifier of the quota rule
+ quotaID() string
+@@ -181,7 +181,7 @@ type Quota interface {
+
+ // close defines any cleanup behavior that needs to be executed when a quota
+ // rule is deleted.
+- close() error
++ close(context.Context) error
+
+ // handleRemount takes in the new mount path in the quota
+ handleRemount(string)
+@@ -287,7 +287,7 @@ func (m *Manager) setQuotaLocked(ctx context.Context, qType string, quota Quota,
+ // If there already exists an entry in the db, remove that first.
+ if raw != nil {
+ quota := raw.(Quota)
+- if err := quota.close(); err != nil {
++ if err := quota.close(ctx); err != nil {
+ return err
+ }
+ err = txn.Delete(qType, raw)
+@@ -518,7 +518,7 @@ func (m *Manager) DeleteQuota(ctx context.Context, qType string, name string) er
+ }
+
+ quota := raw.(Quota)
+- if err := quota.close(); err != nil {
++ if err := quota.close(ctx); err != nil {
+ return err
+ }
+
+@@ -541,7 +541,7 @@ func (m *Manager) DeleteQuota(ctx context.Context, qType string, name string) er
+ // ApplyQuota runs the request against any quota rule that is applicable to it. If
+ // there are multiple quota rule that matches the request parameters, rule that
+ // takes precedence will be used to allow/reject the request.
+-func (m *Manager) ApplyQuota(req *Request) (Response, error) {
++func (m *Manager) ApplyQuota(ctx context.Context, req *Request) (Response, error) {
+ var resp Response
+
+ quota, err := m.QueryQuota(req)
+@@ -562,7 +562,7 @@ func (m *Manager) ApplyQuota(req *Request) (Response, error) {
+ return resp, nil
+ }
+
+- return quota.allow(req)
++ return quota.allow(ctx, req)
+ }
+
+ // SetEnableRateLimitAuditLogging updates the operator preference regarding the
+diff --git a/vault/quotas/quotas_rate_limit.go b/vault/quotas/quotas_rate_limit.go
+index 64117b002..ad58b2af3 100644
+--- a/vault/quotas/quotas_rate_limit.go
++++ b/vault/quotas/quotas_rate_limit.go
+@@ -1,6 +1,7 @@
+ package quotas
+
+ import (
++ "context"
+ "encoding/hex"
+ "fmt"
+ "math"
+@@ -264,7 +265,7 @@ func (rlq *RateLimitQuota) QuotaName() string {
+ // returned if the request ID or address is empty. If the path is exempt, the
+ // quota will not be evaluated. Otherwise, the client rate limiter is retrieved
+ // by address and the rate limit quota is checked against that limiter.
+-func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
++func (rlq *RateLimitQuota) allow(ctx context.Context, req *Request) (Response, error) {
+ resp := Response{
+ Headers: make(map[string]string),
+ }
+@@ -300,7 +301,11 @@ func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
+ }
+ }
+
+- limit, remaining, reset, allow := rlq.store.Take(req.ClientAddress)
++ limit, remaining, reset, allow, err := rlq.store.Take(ctx, req.ClientAddress)
++ if err != nil {
++ return resp, err
++ }
++
+ resp.Allowed = allow
+ resp.Headers[httplimit.HeaderRateLimitLimit] = strconv.FormatUint(limit, 10)
+ resp.Headers[httplimit.HeaderRateLimitRemaining] = strconv.FormatUint(remaining, 10)
+@@ -320,13 +325,13 @@ func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
+
+ // close stops the current running client purge loop.
+ // It should be called with the write lock held.
+-func (rlq *RateLimitQuota) close() error {
++func (rlq *RateLimitQuota) close(ctx context.Context) error {
+ if rlq.purgeBlocked {
+ close(rlq.closePurgeBlockedCh)
+ }
+
+ if rlq.store != nil {
+- return rlq.store.Close()
++ return rlq.store.Close(ctx)
+ }
+
+ return nil
+diff --git a/vault/quotas/quotas_rate_limit_test.go b/vault/quotas/quotas_rate_limit_test.go
+index 27225e338..21f35dac3 100644
+--- a/vault/quotas/quotas_rate_limit_test.go
++++ b/vault/quotas/quotas_rate_limit_test.go
+@@ -37,7 +37,7 @@ func TestNewRateLimitQuota(t *testing.T) {
+ err := tc.rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink())
+ require.Equal(t, tc.expectErr, err != nil, err)
+ if err == nil {
+- require.Nil(t, tc.rlq.close())
++ require.Nil(t, tc.rlq.close(context.Background()))
+ }
+ })
+ }
+@@ -46,7 +46,7 @@ func TestNewRateLimitQuota(t *testing.T) {
+ func TestRateLimitQuota_Close(t *testing.T) {
+ rlq := NewRateLimitQuota("test-rate-limiter", "qa", "/foo/bar", 16.7, time.Second, time.Minute)
+ require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
+- require.NoError(t, rlq.close())
++ require.NoError(t, rlq.close(context.Background()))
+
+ time.Sleep(time.Second) // allow enough time for purgeClientsLoop to receive on closeCh
+ require.False(t, rlq.getPurgeBlocked(), "expected blocked client purging to be disabled after explicit close")
+@@ -66,14 +66,14 @@ func TestRateLimitQuota_Allow(t *testing.T) {
+ }
+
+ require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
+- defer rlq.close()
++ defer rlq.close(context.Background())
+
+ var wg sync.WaitGroup
+
+ reqFunc := func(addr string, atomicNumAllow, atomicNumFail *atomic.Int32) {
+ defer wg.Done()
+
+- resp, err := rlq.allow(&Request{ClientAddress: addr})
++ resp, err := rlq.allow(context.Background(), &Request{ClientAddress: addr})
+ if err != nil {
+ return
+ }
+@@ -141,7 +141,7 @@ func TestRateLimitQuota_Allow_WithBlock(t *testing.T) {
+ }
+
+ require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
+- defer rlq.close()
++ defer rlq.close(context.Background())
+ require.True(t, rlq.getPurgeBlocked())
+
+ var wg sync.WaitGroup
+@@ -149,7 +149,7 @@ func TestRateLimitQuota_Allow_WithBlock(t *testing.T) {
+ reqFunc := func(addr string, atomicNumAllow, atomicNumFail *atomic.Int32) {
+ defer wg.Done()
+
+- resp, err := rlq.allow(&Request{ClientAddress: addr})
++ resp, err := rlq.allow(context.Background(), &Request{ClientAddress: addr})
+ if err != nil {
+ return
+ }
+@@ -221,5 +221,5 @@ func TestRateLimitQuota_Update(t *testing.T) {
+ require.NoError(t, qm.SetQuota(context.Background(), TypeRateLimit.String(), quota, true))
+ require.NoError(t, qm.SetQuota(context.Background(), TypeRateLimit.String(), quota, true))
+
+- require.Nil(t, quota.close())
++ require.Nil(t, quota.close(context.Background()))
+ }
+diff --git a/vault/quotas/quotas_util.go b/vault/quotas/quotas_util.go
+index dc2fcdfac..7c0732f67 100644
+--- a/vault/quotas/quotas_util.go
++++ b/vault/quotas/quotas_util.go
+@@ -40,7 +40,7 @@ func (*entManager) Reset() error {
+
+ type LeaseCountQuota struct{}
+
+-func (l LeaseCountQuota) allow(request *Request) (Response, error) {
++func (l LeaseCountQuota) allow(_ context.Context, _ *Request) (Response, error) {
+ panic("implement me")
+ }
+
+@@ -56,7 +56,7 @@ func (l LeaseCountQuota) initialize(logger log.Logger, sink *metricsutil.Cluster
+ panic("implement me")
+ }
+
+-func (l LeaseCountQuota) close() error {
++func (l LeaseCountQuota) close(_ context.Context) error {
+ panic("implement me")
+ }
+
diff --git a/app-admin/vault/vault-1.8.2.ebuild b/app-admin/vault/vault-1.8.2.ebuild
index 57bba092722..7f8468a86e1 100644
--- a/app-admin/vault/vault-1.8.2.ebuild
+++ b/app-admin/vault/vault-1.8.2.ebuild
@@ -1130,8 +1130,8 @@ EGO_SUM=(
"github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod"
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529"
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod"
-"github.com/sethvargo/go-limiter v0.3.0"
-"github.com/sethvargo/go-limiter v0.3.0/go.mod"
+"github.com/sethvargo/go-limiter v0.7.1"
+"github.com/sethvargo/go-limiter v0.7.1/go.mod"
"github.com/shirou/gopsutil v3.21.5+incompatible"
"github.com/shirou/gopsutil v3.21.5+incompatible/go.mod"
"github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24"
@@ -1780,6 +1780,8 @@ FILECAPS=(
-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
)
+PATCHES=( "${FILESDIR}"/${P}-go-limiter.patch )
+
RESTRICT+=" test"
src_prepare() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/
@ 2024-03-29 21:21 Zac Medico
0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2024-03-29 21:21 UTC (permalink / raw
To: gentoo-commits
commit: 90acc6a830b4aad16e75e7395db7fd1b7e854390
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 29 21:15:09 2024 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 21:21:50 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90acc6a8
app-admin/vault: add 1.15.6
Includes stubmaker patch from here:
https://github.com/hashicorp/vault/pull/24678
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
app-admin/vault/Manifest | 3 +
...t-1.15.6-stubmaker-outside-git-repo-24678.patch | 92 ++++++++++++++++++++++
app-admin/vault/vault-1.15.6.ebuild | 86 ++++++++++++++++++++
3 files changed, 181 insertions(+)
diff --git a/app-admin/vault/Manifest b/app-admin/vault/Manifest
index ed9fdd0f316c..e143138c3666 100644
--- a/app-admin/vault/Manifest
+++ b/app-admin/vault/Manifest
@@ -4,3 +4,6 @@ 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
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}
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-29 21:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-01 19:26 [gentoo-commits] repo/gentoo:master commit in: app-admin/vault/, app-admin/vault/files/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2024-03-29 21:21 Zac Medico
2021-09-16 22:07 William Hubbs
2017-02-21 20:49 Robin H. Johnson
2016-10-20 7:48 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox