# Disable tests %bcond_with check %global goipath github.com/influxdata/influxdb %global influx_usr influxdb %global influx_grp influxdb %global influx_db_dir %{_sharedstatedir}/influxdb %global golicenses LICENSE %global godocs README.md Version: 1.8.10 # Keep in sync Version and main_commit %global main_commit d3be25b251256755d622792ec91826c5670c6106 %global main_branch %(x=%{version}; [[ $x =~ ([0-9]+\.[0-9]+).* ]] && echo "${BASH_REMATCH[1]}") %global gomodulesmode GO111MODULE=on %gometa Name: %{goname} Release: 2%{?dist} Summary: Scalable datastore for metrics, events, and real-time analytics License: MIT URL: %{gourl} Source0: %{gosource} # It is version from v1.8.4 which does not wait on startup # for http endpoint readdiness. # Fixes https://github.com/influxdata/influxdb/issues/22576 Source1: influxdb.service # Upstream post 1.8.10 patch Patch0: https://github.com/influxdata/influxdb/commit/d3be25b251256755d622792ec91826c5670c6106.patch#/golang-github-influxdata-influxdb-fix22754.patch BuildRequires: /usr/bin/git BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/xmlto BuildRequires: /usr/bin/asciidoc BuildRequires: systemd # influxd-systemd-start.sh requires it Requires: /usr/bin/curl Requires(pre): shadow-utils Obsoletes: golang-github-influxdb-influxdb <= 0.9.5.1 %{?systemd_requires} %description InfluxDB is an open source time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics. Features: - Built-in HTTP API so you don't have to write any server side code to get up and running. - Data can be tagged, allowing very flexible querying. - SQL-like query language. - Simple to install and manage, and fast to get data in and out. - It aims to answer queries in real-time. That means every data point is indexed as it comes in and is immediately available in queries that should return in < 100ms. %prep %goprep %patch0 -p1 %build export LDFLAGS="${LDFLAGS} -X main.version=%{version} -X main.branch=%{main_branch} -X main.commit=%{main_commit} " for cmd in influx_stress influxd influx_inspect influx influx_tools; do echo building ${cmd} %gobuild -o %{gobuilddir}/bin/$cmd %{goipath}/cmd/$cmd done # Too avoid later on errors like: # rm: cannot remove 'influxdb-1.8.10/_build/pkg/mod/go.opencensus.io@v0.22.2/zpages/zpages_test.go': Permission denied chmod -R a+w %{gobuilddir} # compile manuals %make_build -C man build %install # install manuals %make_install -C man DESTDIR=%{buildroot}%{_prefix} # install binaries install -p -m 0755 -d %{buildroot}%{_bindir} install -p -m 0755 _build/bin/* %{buildroot}%{_bindir}/ # install configuration file install -p -m 0644 -D etc/config.sample.toml %{buildroot}%{_sysconfdir}/influxdb/influxdb.conf # install service file install -p -m 0644 -D %{SOURCE1} %{buildroot}%{_unitdir}/influxdb.service # db home directory install -d -m 0755 -d %{buildroot}%{influx_db_dir} %if %{with check} %check %gocheck %endif %files %license %{golicenses} %doc %{godocs} %{_bindir}/influx %{_bindir}/influx_inspect %{_bindir}/influx_stress %{_bindir}/influx_tools %{_bindir}/influxd %{_unitdir}/influxdb.service %dir %{_sysconfdir}/influxdb %config(noreplace) %{_sysconfdir}/influxdb/influxdb.conf %{_mandir}/man1/influx.1* %{_mandir}/man1/influx_inspect.1* %{_mandir}/man1/influx_stress.1* %{_mandir}/man1/influxd.1* %{_mandir}/man1/influxd-backup.1* %{_mandir}/man1/influxd-config.1* %{_mandir}/man1/influxd-restore.1* %{_mandir}/man1/influxd-run.1* %{_mandir}/man1/influxd-version.1* %config(noreplace) %dir %attr(0755,%{influx_usr},influxdb) %{influx_db_dir} %pre getent group %{influx_grp} >/dev/null || groupadd -r %{influx_grp} getent passwd %{influx_usr} >/dev/null || \ useradd -r -g %{influx_grp} \ -d %{influx_db_dir} \ -s /sbin/nologin \ -c "influxdb database user" \ %{influx_usr} exit 0 %post %systemd_post influxdb.service %preun %systemd_preun influxdb.service %postun %systemd_postun_with_restart influxdb.service %changelog * Wed Feb 28 2024 Damian Wrobel - 1.8.10-2 - Rebuild for new Fedora * Fri Mar 31 2023 Damian Wrobel - 1.8.10-1 - Update to version 1.8.10 * Fri Sep 24 2021 Damian Wrobel - 1.8.9-3 - Add influxdb.service from 1.8.4 which does not wait on startup * Thu Sep 23 2021 Damian Wrobel - 1.8.9-2 - Add missing Requires curl - Add installation of influxd-systemd-start.sh helper script * Thu Sep 23 2021 Damian Wrobel - 1.8.9-1 - Update to the latest stable version * Tue Mar 02 2021 Damian Wrobel - 1.8.4-2 - Remove BR dep (fix build on >=f33) * Fri Feb 26 2021 Damian Wrobel - 1.8.4-1 - Update to the latest stable version * Mon Dec 21 2020 Damian Wrobel - 1.8.3-1 - Update to the latest stable version * Tue Sep 01 2020 Damian Wrobel - 1.8.2-2 - Fix building on >=f33 * Sun Aug 23 2020 Damian Wrobel - 1.8.2-1 - Update to the latest stable version * Fri Feb 07 2020 Damian Wrobel - 1.7.9-3 - Disable tests on arm platform. * Fri Feb 07 2020 Damian Wrobel - 1.7.9-2 - Stop using forgesetup. * Tue Feb 04 2020 Damian Wrobel - 1.7.9-1 - Update to the latest stable version * Fri Aug 23 2019 Damian Wrobel - 1.7.7-3 - specify main.version * Fri Aug 23 2019 Damian Wrobel - 1.7.7-2 - Update to the latest stable version * Mon Jan 07 2019 Damian Wrobel - 1.7.2-4 - rebuilt * Sun Jan 06 2019 Damian Wrobel - 1.7.2-3 - rebuilt * Sun Jan 06 2019 Damian Wrobel - 1.7.2-2 - rebuilt * Sun Jan 06 2019 Damian Wrobel - 1.7.2-1 - First package for Fedora