136 lines
4.1 KiB
RPMSpec
136 lines
4.1 KiB
RPMSpec
|
|
Name: graphite-web
|
||
|
|
Version: 1.0.2
|
||
|
|
Release: 3%{?dist}
|
||
|
|
|
||
|
|
Summary: A Django web application for enterprise scalable realtime graphing
|
||
|
|
License: ASL 2.0
|
||
|
|
URL: https://github.com/graphite-project/graphite-web
|
||
|
|
|
||
|
|
%define pversion %{version}
|
||
|
|
Source0: %{name}-%{version}.tar.gz
|
||
|
|
Source1: graphite-web-vhost.conf
|
||
|
|
Source2: graphite-web-README.fedora
|
||
|
|
Source10: %{name}.logrotate
|
||
|
|
Patch0: 0_%{name}-%{pversion}-django-update.patch
|
||
|
|
Patch1: 1_%{name}-%{pversion}-Amend-default-filesystem-locations.patch
|
||
|
|
Patch2: 2_%{name}-%{pversion}-Disable-internal-log-rotation.patch
|
||
|
|
Patch3: 3_%{name}-%{pversion}-Static_url_example.patch
|
||
|
|
Patch4: 4_%{name}-%{pversion}-Fix-build-index.sh-variables.patch
|
||
|
|
|
||
|
|
BuildArch: noarch
|
||
|
|
BuildRequires: python2-devel
|
||
|
|
|
||
|
|
Requires: dejavu-sans-fonts
|
||
|
|
Requires: dejavu-serif-fonts
|
||
|
|
Requires: django-tagging
|
||
|
|
Requires: mod_wsgi
|
||
|
|
Requires: pycairo
|
||
|
|
Requires: pyparsing
|
||
|
|
Requires: python-simplejson
|
||
|
|
Requires: python2-carbon
|
||
|
|
Requires: python2-whisper >= %{version}
|
||
|
|
Requires: python2-whitenoise
|
||
|
|
Requires: python-memcached
|
||
|
|
Requires: pytz
|
||
|
|
|
||
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||
|
|
Requires: python-django >= 1.3
|
||
|
|
%else
|
||
|
|
Requires: Django >= 1.3
|
||
|
|
%endif
|
||
|
|
|
||
|
|
Obsoletes: %{name}-selinux < 0.9.12-7
|
||
|
|
|
||
|
|
|
||
|
|
%description
|
||
|
|
Graphite consists of a storage backend and a web-based visualization frontend.
|
||
|
|
Client applications send streams of numeric time-series data to the Graphite
|
||
|
|
backend (called carbon), where it gets stored in fixed-size database files
|
||
|
|
similar in design to RRD. The web frontend provides user interfaces
|
||
|
|
for visualizing this data in graphs as well as a simple URL-based API for
|
||
|
|
direct graph generation.
|
||
|
|
|
||
|
|
Graphite's design is focused on providing simple interfaces (both to users and
|
||
|
|
applications), real-time visualization, high-availability, and enterprise
|
||
|
|
scalability.
|
||
|
|
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n graphite-web-%{version}
|
||
|
|
rm -rf webapp/graphite/thirdparty
|
||
|
|
find -type f -iname '*.swf' -delete
|
||
|
|
|
||
|
|
%patch0 -p1
|
||
|
|
%patch1 -p1
|
||
|
|
%patch2 -p1
|
||
|
|
%patch3 -p1
|
||
|
|
%patch4 -p1
|
||
|
|
|
||
|
|
install -m0644 %{SOURCE2} README.fedora
|
||
|
|
|
||
|
|
|
||
|
|
%build
|
||
|
|
%py2_build
|
||
|
|
|
||
|
|
|
||
|
|
%install
|
||
|
|
%py2_install \
|
||
|
|
--install-lib=%{python2_sitelib} \
|
||
|
|
--install-data=%{_datadir}/graphite \
|
||
|
|
--install-scripts=%{_bindir}
|
||
|
|
|
||
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/graphite-web
|
||
|
|
mkdir -p %{buildroot}%{_localstatedir}/log/graphite-web
|
||
|
|
mkdir -p %{buildroot}%{_sysconfdir}/graphite-web
|
||
|
|
|
||
|
|
install -Dp -m0644 webapp/graphite/local_settings.py.example \
|
||
|
|
%{buildroot}%{_sysconfdir}/graphite-web/local_settings.py
|
||
|
|
ln -s %{_sysconfdir}/graphite-web/local_settings.py \
|
||
|
|
%{buildroot}%{python_sitelib}/graphite/local_settings.py
|
||
|
|
install -Dp -m0644 conf/dashboard.conf.example \
|
||
|
|
%{buildroot}%{_sysconfdir}/graphite-web/dashboard.conf
|
||
|
|
install -Dp -m0644 %{SOURCE1} \
|
||
|
|
%{buildroot}%{_sysconfdir}/httpd/conf.d/graphite-web.conf
|
||
|
|
install -Dp -m0644 conf/graphite.wsgi.example \
|
||
|
|
%{buildroot}%{_datadir}/graphite/graphite-web.wsgi
|
||
|
|
|
||
|
|
# Log rotation.
|
||
|
|
install -D -p -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||
|
|
|
||
|
|
# Remove unneeded binaries.
|
||
|
|
rm -f %{buildroot}%{_bindir}/run-graphite-devel-server.py
|
||
|
|
|
||
|
|
# Rename build-index.sh.
|
||
|
|
mv %{buildroot}%{_bindir}/build-index %{buildroot}%{_bindir}/graphite-build-index
|
||
|
|
rm %{buildroot}%{_bindir}/build-index.sh
|
||
|
|
|
||
|
|
# Fix permissions.
|
||
|
|
chmod 0644 conf/graphite.wsgi.example
|
||
|
|
|
||
|
|
%clean
|
||
|
|
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
||
|
|
|
||
|
|
%files
|
||
|
|
%license LICENSE
|
||
|
|
%doc README.fedora conf/* examples/*
|
||
|
|
|
||
|
|
%dir %{_sysconfdir}/graphite-web
|
||
|
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/graphite-web.conf
|
||
|
|
%config(noreplace) %{_sysconfdir}/graphite-web/dashboard.conf
|
||
|
|
%config(noreplace) %{_sysconfdir}/graphite-web/local_settings.py*
|
||
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||
|
|
|
||
|
|
%{_bindir}/graphite-build-index
|
||
|
|
%{_datadir}/graphite
|
||
|
|
%attr(0755,apache,apache) %dir %{_localstatedir}/lib/graphite-web
|
||
|
|
%attr(0755,apache,apache) %dir %{_localstatedir}/log/graphite-web
|
||
|
|
|
||
|
|
%{python_sitelib}/graphite/
|
||
|
|
%{python_sitelib}/graphite_web-*-py?.?.egg-info
|
||
|
|
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Sep 16 2017 Daniel Steiner <daniel.steiner@greenmail.ch>
|
||
|
|
- First build for Fedora 26
|
||
|
|
|