commit grafana for openSUSE:Factory
Hello community,
here is the log from the commit of package grafana for openSUSE:Factory checked in at 2019-08-09 16:54:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grafana (Old)
and /work/SRC/openSUSE:Factory/.grafana.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grafana"
Fri Aug 9 16:54:03 2019 rev:2 rq:721810 version:6.2.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/grafana/grafana.changes 2019-07-22 12:19:20.219680952 +0200
+++ /work/SRC/openSUSE:Factory/.grafana.new.9556/grafana.changes 2019-08-09 16:54:08.201457876 +0200
@@ -1,0 +2,5 @@
+Tue Jul 30 14:14:38 CEST 2019 - ro@suse.de
+
+- make phantomjs dependency configurable
+
+-------------------------------------------------------------------
Old:
----
Makefile
New:
----
Makefile.no_phantomjs
Makefile.phantomjs
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ grafana.spec ++++++
--- /var/tmp/diff_new_pack.OMVkE5/_old 2019-08-09 16:54:08.949457696 +0200
+++ /var/tmp/diff_new_pack.OMVkE5/_new 2019-08-09 16:54:08.953457696 +0200
@@ -25,6 +25,8 @@
%define _fillupdir /var/adm/fillup-templates
%endif
+%bcond_with phantomjs
+
Name: grafana
Version: 6.2.5
Release: 0
@@ -37,13 +39,18 @@
# Instructions on the build process
Source2: README
# Makefile to automate build process
-Source3: Makefile
+Source3: Makefile.no_phantomjs
+Source4: Makefile.phantomjs
BuildRequires: fdupes
BuildRequires: go >= 1.11
BuildRequires: golang-packaging
BuildRequires: shadow
Requires(post): %insserv_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if %{with phantomjs}
+BuildRequires: phantomjs
+Requires: phantomjs
+%endif
%{?systemd_requires}
%description
@@ -54,6 +61,11 @@
%prep
%setup -q -n grafana-%{version}
+%if %{with phantomjs}
+cp %{S:4} %_sourcedir/Makefile
+%else
+cp %{S:3} %_sourcedir/Makefile
+%endif
%build
%goprep github.com/grafana/grafana
@@ -98,6 +110,17 @@
install -d -m755 %{buildroot}%{_datadir}/%{name}/vendor
install -d -m755 %{buildroot}%{_datadir}/%{name}/tools
+%if %{with phantomjs}
+# phantomjs is used for rendering PNG images of graphs. The frontend asset
+# build process downloadsa prebuilt x86_64 binary, which ends up in
+# vendor/phantomjs/phantomjs. This is ugly but works for x86_64. It naturally
+# will not work for other architectures, so instead we remove the phantomjs
+# binary and install a symlink to the systemwide /usr/bin/phantomjs.
+cp -pr tools/phantomjs %{buildroot}%{_datadir}/%{name}/tools/
+rm -f %{buildroot}%{_datadir}/%{name}/tools/phantomjs/phantomjs
+ln -s %{_bindir}/phantomjs %{buildroot}%{_datadir}/%{name}/tools/phantomjs/phantomjs
+%endif
+
# Do *not* use %%fudpes -s -- this will result in grafana failing to load
# all the plugins (something in the plugin scanner can't cope with files
# in there being symlinks).
++++++ Makefile.no_phantomjs ++++++
NAME = grafana
SPEC = $(NAME).spec
default: verify-deps clean tar
verify-deps:
@which yarn >/dev/null 2>&1 || ( echo "yarn not found; run \`sudo npm install -g yarn\`" && false )
@which grunt >/dev/null 2>&1 || ( echo "grunt not found; run \`sudo npm install -g grunt-cli\`" && false )
clean:
rm -f $(NAME)-*.tar $(NAME)-*.tar.xz
tar:
osc service disabledrun
@version=$$( awk '/^Version:/ {print $$2}' $(SPEC) ) && \
echo "Package version is $$version" && \
basename=$(NAME)-$$version && \
tar=$$basename.tar && \
tmpdir=$$(mktemp -d -p .) && \
cd $$tmpdir && \
tar -xf ../$$tar && \
cd $$basename && \
sed -i 's/base\///' public/sass/base/_fonts.scss && \
# patch frontend html template to remove phantomjs dependant link \
sed -i 's/
participants (1)
-
root