Bug 271416

Summary: databases/influxdb: Update to version 2 (actually 2.7)
Product: Ports & Packages Reporter: Alexander Ushakov <alexander>
Component: Individual Port(s)Assignee: Dries Michiels <driesm>
Status: New ---    
Severity: Affects Some People CC: fcharlier, nilsjohannsen, pat, rob2g2-freebsd, sdalu, thomas
Priority: --- Flags: bugzilla: maintainer-feedback? (driesm)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://reviews.freebsd.org/D37761
https://reviews.freebsd.org/D31982
Attachments:
Description Flags
Script to clone and build InfluxDB 2.7.1
none
Unsuccessful attempt to create a port for InfluxDB 2.7.1
none
influxdb2 ports (influx-libflux, influx-flux, influxdb2)
none
influxdb2 ports (influx-libflux, influx-flux, influxdb2)
none
libflux build error in poudriere
none
libflux build error in poudriere none

Description Alexander Ushakov 2023-05-14 15:11:06 UTC
InfluxDB has version 2.7.3 currently and in ports tree there is only 1.8
As I can see InfluxDB supports building for FreeBSD in version 2: https://github.com/influxdata/influxdb/issues/16902
Comment 1 rob2g2 2023-07-19 10:35:11 UTC
any info on that?
Comment 2 Nils Johannsen 2023-07-29 13:20:38 UTC
Created attachment 243687 [details]
Script to clone and build InfluxDB 2.7.1
Comment 3 Nils Johannsen 2023-07-29 13:21:27 UTC
Created attachment 243688 [details]
Unsuccessful attempt to create a port for InfluxDB 2.7.1
Comment 4 Nils Johannsen 2023-07-29 13:22:37 UTC
(In reply to Nils Johannsen from comment #3)

Error message on making the port:
```
github.com/influxdata/flux/libflux/go/libflux
go build github.com/influxdata/flux/libflux/go/libflux:
# pkg-config --cflags  -- flux
Package flux was not found in the pkg-config search path.
Perhaps you should add the directory containing `flux.pc'
to the PKG_CONFIG_PATH environment variable
Package 'flux', required by 'virtual:world', not found
pkg-config: exit status 1
```
Comment 5 Dries Michiels freebsd_committer freebsd_triage 2023-07-30 14:23:39 UTC
I did have a look at this earlier, and I added my WIP if someone wants to pick it up. It should be possible but it's not easy. ATM I don't have a lot of cycles to make big progress...
Comment 6 Stéphane D'Alu 2023-08-26 08:20:18 UTC
Don't know how it translates into a port, but influxdb v2 is building fine using the following instructions: 

https://github.com/influxdata/influxdb/issues/16902

And building with noasm for amd64 (like on arm64):

--- a/GNUmakefile
+++ b/GNUmakefile
@@ -12,7 +12,7 @@ export GOPATH=$(shell go env GOPATH)
 export GOOS=$(shell go env GOOS)
 export GOARCH=$(shell go env GOARCH)
 
-ifneq (,$(filter $(GOARCH),amd64 s390x))
+ifneq (,$(filter $(GOARCH),s390x))
 	# Including the assets tag requires the UI to be built for compilation to succeed.
 	# Don't force it for running tests.
 	GO_TEST_TAGS :=
Comment 7 Stéphane D'Alu 2023-08-26 16:45:09 UTC
Created attachment 244365 [details]
influxdb2 ports (influx-libflux, influx-flux, influxdb2)

Based on work from Dries Michiels and infludb url information, I've got all the ports building (influx-libflux, influx-flux, influxdb2). 

See tarball influxdb2.tgz

I've neither checked poudriere or if influxdb is fully working as intended.
Comment 8 Stéphane D'Alu 2023-09-01 20:55:45 UTC
Created attachment 244565 [details]
influxdb2 ports (influx-libflux, influx-flux, influxdb2)

Also build with assets (enabling influxdb web interface)
Comment 9 Nils Johannsen 2023-10-14 10:30:23 UTC
Created attachment 245610 [details]
libflux build error in poudriere

(In reply to Stéphane D'Alu from comment #8)

Hi Stephane,
building libflux in poudriere failed in my case, please find the build log in the attachement.
Comment 10 Nils Johannsen 2023-10-15 12:42:05 UTC
Created attachment 245637 [details]
libflux build error in poudriere
Comment 11 Dries Michiels freebsd_committer freebsd_triage 2024-02-12 10:29:08 UTC
I have some "good" news, and some "bad" news.

Bad news: I don't see influxdb2 ported any time soon.
Good news: influxdb3 is fully written in rust, meaning porting will be a lot easier with our existing infrastructure.

Is there interest in a "beta" influxdb3? As there are no releases cut yet upstream.
Comment 12 Nils Johannsen 2024-02-12 17:29:58 UTC
(In reply to Dries Michiels from comment #11)

There is definitely interest in InfluxDB 3 on FreeBSD.
But as far as I see, there is no OSS variant of InfluxDB 3 available yet.
https://www.influxdata.com/blog/the-plan-for-influxdb-3-0-open-source/