forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
589dc43
commit 5a38ca4
Showing
3 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/util/testutil/context.go b/util/testutil/context.go | ||
index 0c9e0f6..02a06e3 100644 | ||
--- a/util/testutil/context.go | ||
+++ b/util/testutil/context.go | ||
@@ -49,8 +49,8 @@ func (c *MockContext) Value(interface{}) interface{} { | ||
// MockContextErrAfter is a MockContext that will return an error after a certain | ||
// number of calls to Err(). | ||
type MockContextErrAfter struct { | ||
- MockContext | ||
count atomic.Uint64 | ||
+ MockContext | ||
FailAfter uint64 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/model/histogram/test_utils.go b/model/histogram/test_utils.go | ||
index 9e9a711..6e0472b 100644 | ||
--- a/model/histogram/test_utils.go | ||
+++ b/model/histogram/test_utils.go | ||
@@ -19,12 +19,12 @@ func GenerateBigTestHistograms(numHistograms, numBuckets int) []*Histogram { | ||
bucketsPerSide := numBuckets / 2 | ||
spanLength := uint32(bucketsPerSide / numSpans) | ||
// Given all bucket deltas are 1, sum bucketsPerSide + 1. | ||
- observationCount := bucketsPerSide * (1 + bucketsPerSide) | ||
+ observationCount := uint64(bucketsPerSide) * (1 + uint64(bucketsPerSide)) | ||
|
||
var histograms []*Histogram | ||
for i := 0; i < numHistograms; i++ { | ||
h := &Histogram{ | ||
- Count: uint64(i + observationCount), | ||
+ Count: uint64(uint64(i) + observationCount), | ||
ZeroCount: uint64(i), | ||
ZeroThreshold: 1e-128, | ||
Sum: 18.4 * float64(i+1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Template file for 'prometheus' | ||
pkgname=prometheus | ||
version=2.53.1 | ||
revision=2 | ||
version=3.0.1 | ||
revision=1 | ||
build_style=go | ||
go_import_path="github.com/prometheus/prometheus" | ||
go_package="github.com/prometheus/prometheus/cmd/prometheus github.com/prometheus/prometheus/cmd/promtool" | ||
|
@@ -19,18 +19,28 @@ license="Apache-2.0, MIT" | |
homepage="https://prometheus.io/" | ||
changelog="https://raw.githubusercontent.com/prometheus/prometheus/master/CHANGELOG.md" | ||
distfiles="https://github.com/prometheus/prometheus/archive/v${version}.tar.gz" | ||
checksum=6a36ad9fd6ce2813c78aab1da98d7725143bcb73e4fe1e2597c873537f7072af | ||
checksum=bd40fd54d5a8f63cbbf5355ee056d23efce29c4af3fbf3fd754238c5d2a27425 | ||
|
||
system_accounts="_prometheus" | ||
|
||
make_dirs="/var/lib/prometheus 700 _prometheus _prometheus" | ||
|
||
if [ "${XBPS_BUILD_ENVIRONMENT}" != "void-packages-ci" ]; then | ||
make_check_args+=" -skip (TestQueryLog|TestDelayedCompaction)" | ||
fi | ||
|
||
pre_build() { | ||
# Need to patch node fs to avoid using too many file descriptors | ||
(cd web/ui && yarn add --dev -W [email protected]) | ||
echo "require('graceful-fs').gracefulify(require('fs'));" \ | ||
> "${wrksrc}/web/ui/use-graceful-fs.js" | ||
export NODE_OPTIONS="--require ${wrksrc}/web/ui/use-graceful-fs.js" | ||
|
||
# rollup doesn't support native i686, use wasm instead | ||
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then | ||
(cd web/ui && npm install --override rollup@npm:@rollup/wasm-node@latest) | ||
fi | ||
|
||
CGO_ENABLED=0 GOARCH= make assets assets-compress | ||
} | ||
|
||
|
@@ -39,8 +49,6 @@ post_install() { | |
vmkdir etc/prometheus | ||
vmkdir usr/share/doc/prometheus | ||
vmkdir usr/share/examples/prometheus | ||
vcopy consoles etc/prometheus | ||
vcopy console_libraries etc/prometheus | ||
vcopy documentation/examples/* usr/share/examples/prometheus/ | ||
vcopy documentation/examples/prometheus.yml etc/prometheus/ | ||
vcopy documentation/images usr/share/doc/prometheus/ | ||
|