diff --git a/influxdb.service b/influxdb.service index 6d2e38f..5ff08c7 100644 --- a/influxdb.service +++ b/influxdb.service @@ -4,9 +4,7 @@ Documentation=https://docs.influxdata.com/influxdb/ After=network.target [Service] -Environment="INFLUXD_CONFIG_PATH=/etc/influxdb2/config.toml" -LimitNOFILE=65536 -ExecStart=/usr/bin/influxd +ExecStart=/usr/bin/influxd --assets-path="/usr/share/influxdb2/ui" Type=simple StandardOutput=journal StandardError=journal diff --git a/influxdb2.changes b/influxdb2.changes index f188ab3..2527161 100644 --- a/influxdb2.changes +++ b/influxdb2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 27 20:56:22 UTC 2021 - Michal Hrusecky + +- Include prebuild UI assets +- Drop the last mention of config file in service file + ------------------------------------------------------------------- Wed May 19 21:51:38 UTC 2021 - Michal Hrusecky diff --git a/influxdb2.spec b/influxdb2.spec index 9a1b772..c7de906 100644 --- a/influxdb2.spec +++ b/influxdb2.spec @@ -27,6 +27,8 @@ Source: %{name}-%{version}.tar.xz Source1: influxdb.service Source2: influxdb.tmpfiles Source3: influxdb-user.conf +# Prebuild UI assets as specified in ./ui/fetch_ui_assets.sh +Source98: ui-assets-2.0.5.tar.gz Source99: vendor.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: sysuser-tools @@ -55,6 +57,9 @@ Go sources and other development files for InfluxDB %prep %setup -q %setup -q -T -D -a 99 +%setup -q -T -D -a 98 +mv build ui +echo 'UI assets predownloaded!' > ui/fetch_ui_assets.sh %build export GO111MODULE=on @@ -74,6 +79,8 @@ export GO111MODULE=on mkdir -p %{buildroot}%{_localstatedir}/log/influxdb mkdir -p %{buildroot}%{_localstatedir}/lib/influxdb +mkdir -p %{buildroot}%{_datadir}/influxdb2/ui +cp ui/build/* %{buildroot}%{_datadir}/influxdb2/ui mkdir -p %{buildroot}%{_sbindir} install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/influxdb.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcinfluxdb @@ -106,6 +113,7 @@ install -D -m 0755 -t %{buildroot}%{_bindir} %{_builddir}/go/bin/* %{_bindir}/telemetryd %{_sbindir}/rcinfluxdb %{_unitdir}/influxdb.service +%{_datadir}/influxdb2 %{_sysusersdir}/influxdb-user.conf %dir %{_tmpfilesdir} %{_tmpfilesdir}/influxdb.conf diff --git a/ui-assets-2.0.5.tar.gz b/ui-assets-2.0.5.tar.gz new file mode 100644 index 0000000..139e1a9 --- /dev/null +++ b/ui-assets-2.0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37ffbc072ba801ec5a0abdd76a3f19a8cd75f59856274e20630929f73cedaf55 +size 76859523