Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions srcpkgs/chronograf/patches/musl-cargo-target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# patch target libc, returns *-unknown-linux-gnu on musl builds without --static
--- a/vendor/github.com/influxdata/pkg-config/libs/flux/build.go 2026-09-07 10:06:29.318714673 -0400
+++ b/vendor/github.com/influxdata/pkg-config/libs/flux/build.go 2026-09-07 10:06:29.319620871 -0400
@@ -43,24 +43,27 @@

// Determine the cargo target.
func (t Target) DetermineCargoTarget(logger *zap.Logger) string {
+ musl := t.Static || os.Getenv("XBPS_TARGET_LIBC") == "musl"
switch {
- case t.OS == "linux" && t.Arch == "amd64" && t.Static:
+ case t.OS == "linux" && t.Arch == "amd64" && musl:
return "x86_64-unknown-linux-musl"
- case t.OS == "linux" && t.Arch == "amd64" && !t.Static:
+ case t.OS == "linux" && t.Arch == "amd64" && !musl:
return "x86_64-unknown-linux-gnu"
- case t.OS == "linux" && t.Arch == "386" && !t.Static:
+ case t.OS == "linux" && t.Arch == "386" && musl:
+ return "i686-unknown-linux-musl"
+ case t.OS == "linux" && t.Arch == "386" && !musl:
return "i686-unknown-linux-gnu"
- case t.OS == "linux" && t.Arch == "arm" && t.Arm == "6" && !t.Static:
+ case t.OS == "linux" && t.Arch == "arm" && t.Arm == "6" && !musl:
return "arm-unknown-linux-gnueabihf"
- case t.OS == "linux" && t.Arch == "arm" && t.Arm == "6" && t.Static:
+ case t.OS == "linux" && t.Arch == "arm" && t.Arm == "6" && musl:
return "arm-unknown-linux-musleabihf"
- case t.OS == "linux" && t.Arch == "arm" && t.Arm == "7" && !t.Static:
+ case t.OS == "linux" && t.Arch == "arm" && t.Arm == "7" && !musl:
return "armv7-unknown-linux-gnueabihf"
- case t.OS == "linux" && t.Arch == "arm" && t.Arm == "7" && t.Static:
+ case t.OS == "linux" && t.Arch == "arm" && t.Arm == "7" && musl:
return "armv7-unknown-linux-musleabihf"
- case t.OS == "linux" && t.Arch == "arm64" && !t.Static:
+ case t.OS == "linux" && t.Arch == "arm64" && !musl:
return "aarch64-unknown-linux-gnu"
- case t.OS == "linux" && t.Arch == "arm64" && t.Static:
+ case t.OS == "linux" && t.Arch == "arm64" && musl:
return "aarch64-unknown-linux-musl"
case t.OS == "linux" && t.Arch == "s390x":
return "s390x-unknown-linux-gnu"
23 changes: 19 additions & 4 deletions srcpkgs/chronograf/template
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# Template file for 'chronograf'
pkgname=chronograf
version=1.10.7
version=1.11.4
revision=1
build_style=go
build_helper="rust"
go_import_path="github.com/influxdata/${pkgname}"
go_package="${go_import_path}/cmd/chronograf"
go_ldflags="-X main.version=${version}"
hostmakedepends="dep go-bindata nodejs yarn python3"
# flux parse pulls in libflux cgo, built with cargo
hostmakedepends="nodejs yarn pkg-config cargo"
makedepends="rust-std"
short_desc="Open source monitoring and visualization UI for the TICK stack"
maintainer="Orphaned <orphan@voidlinux.org>"
license="AGPL-3.0-or-later"
homepage="https://www.influxdata.com/time-series-platform/chronograf/"
changelog="https://raw.githubusercontent.com/influxdata/chronograf/master/CHANGELOG.md"
distfiles="https://github.com/influxdata/chronograf/archive/${version}.tar.gz"
checksum=1b88a6a1d7eb36d8b6b5ac1506d9647c978bc9bd466cba37c45bed2d86bd20e5
checksum=7d3c567b38e0c38807aedbc63fb0840db68ab08a8aeeb57a719c77f579baf538
system_accounts="_chronograf"
_chronograf_homedir="/var/lib/${pkgname}"
make_dirs="${_chronograf_homedir} 0755 _chronograf _chronograf"
# flux pkg-config sets an absolute path for include/lib
no_generic_pkgconfig_link=yes

case "$XBPS_TARGET_MACHINE" in
i686*) broken="yarn not available" ;;
ppc*) broken="ftbfs in some js module" ;;
esac

post_extract() {
# vendor influxdata/pkg-config and patch for musl
go get -tool github.com/influxdata/pkg-config@v0.3.0
go mod vendor
}

pre_build() {
CFLAGS="$CFLAGS -fPIC" CXXFLAGS="$CXXFLAGS -fPIC" make .jsdep assets
make .jsdep assets

# chronograf embeds influxdata/flux cgo bindings
CGO_ENABLED=0 GOOS="$(go env GOHOSTOS)" GOARCH="$(go env GOHOSTARCH)" go build -o "${wrksrc}/.flux-pkg-config" github.com/influxdata/pkg-config
export PKG_CONFIG="${wrksrc}/.flux-pkg-config"
}

post_install() {
Expand Down