diff --git a/Makefile b/Makefile index 4098c71..a6c25b4 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ tar: 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/.*<\/a>//g' public/app/features/dashboard/components/ShareModal/template.html && \ yarn install --pure-lockfile && \ grunt release && \ cp -pr tmp/public . && \ @@ -28,6 +30,10 @@ tar: cd .. && \ echo "Updating $$basename/tools $$basename/public in tarball..." && \ tar -rf ../$$tar $$basename/tools $$basename/public && \ + # remove phantomjs binary \ + tar -f ../$$tar --delete $$basename/tools/phantomjs/phantomjs && \ + # remove go.mod and go.sum as we build exclusively using vendor deps \ + tar -f ../$$tar --delete $$basename/go.mod $$basename/go.sum && \ cd .. && \ xz $$tar && \ rm -rf $$tmpdir diff --git a/grafana-6.2.1.tar.xz b/grafana-6.2.1.tar.xz index 579559f..61331e1 100644 --- a/grafana-6.2.1.tar.xz +++ b/grafana-6.2.1.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:594263234768e37ca713ada0b56ddbc0a458b55fe0c71068aad54e0827082df3 -size 14187276 +oid sha256:94f4f5c33b2847a2edd805fe377a09d5f253572654ac04e1c5c69a181682429a +size 14166220 diff --git a/grafana.changes b/grafana.changes index 6dc8417..37463eb 100644 --- a/grafana.changes +++ b/grafana.changes @@ -1,6 +1,9 @@ ------------------------------------------------------------------- Tue May 28 17:30:05 UTC 2019 - jcavalheiro@suse.com +- Remove phantomjs dependency + * Modified: Makefile + - Update to version 6.2.1 * Bug Fixes + Auth Proxy: Resolve database is locked errors. diff --git a/grafana.spec b/grafana.spec index 258ce8d..4f9320a 100644 --- a/grafana.spec +++ b/grafana.spec @@ -38,13 +38,9 @@ Source1: %{name}-rpmlintrc Source2: README # Makefile to automate build process Source3: Makefile -Requires: phantomjs -# Needed as a BuildRequires too, so setting up a symlink will work BuildRequires: fdupes BuildRequires: go >= 1.11 BuildRequires: golang-packaging -BuildRequires: libgcc_s1 -BuildRequires: phantomjs BuildRequires: shadow Requires(post): %insserv_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -101,14 +97,6 @@ install -Dm644 {conf/provisioning/datasources/,%{buildroot}%{_datadir}/%{name}/c cp -pr public %{buildroot}%{_datadir}/%{name}/ install -d -m755 %{buildroot}%{_datadir}/%{name}/vendor install -d -m755 %{buildroot}%{_datadir}/%{name}/tools -# 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 # 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