1 %define contentdir %{_datadir}/netdata
4 %bcond_without systemd # systemd
5 %bcond_with nfacct # build with nfacct plugin
7 %if 0%{?fedora} || 0%{?rhel} >= 7
12 Summary: Real-time performance monitoring, done right
14 Version: @PACKAGE_RPM_VERSION@
15 Release: @PACKAGE_RPM_RELEASE@%{?release_suffix}%{?dist}
17 Group: Applications/System
18 Source0: http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
19 URL: http://netdata.firehol.org/
20 BuildRequires: pkgconfig
22 BuildRequires: zlib-devel
24 # Packages can be found in the EPEL repo
26 BuildRequires: libmnl-devel
27 BuildRequires: libnetfilter_acct-devel
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
34 Requires(preun): systemd-units
35 Requires(postun): systemd-units
36 Requires(post): systemd-units
38 Requires(post): chkconfig
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 netdata is the fastest way to visualize metrics. It is a resource
45 efficient, highly optimized system for collecting and visualizing any
46 type of realtime timeseries data, from CPU usage, disk activity, SQL
47 queries, API calls, web site visitors, etc.
49 netdata tries to visualize the truth of now, in its greatest detail,
50 so that you can get insights of what is happening now and what just
51 happened, on your systems and applications.
54 %setup -q -n %{name}-@PACKAGE_VERSION@
60 %{?with_nfacct:--enable-plugin-nfacct} \
62 %{__make} %{?_smp_mflags}
65 rm -rf $RPM_BUILD_ROOT
66 %{__make} %{?_smp_mflags} install \
67 DESTDIR=$RPM_BUILD_ROOT
69 install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
71 find $RPM_BUILD_ROOT -name .keep | xargs -r rm
74 install -d $RPM_BUILD_ROOT%{_unitdir}
75 install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
77 # install SYSV init stuff
78 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
79 install -m755 system/netdata-init-d \
80 $RPM_BUILD_ROOT/etc/rc.d/init.d/netdata
85 # Add the "netdata" user
86 /usr/sbin/groupadd -r netdata 2> /dev/null || :
87 /usr/sbin/useradd -c "netdata" -g netdata \
88 -s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
91 %systemd_post netdata.service
94 %systemd_preun netdata.service
97 %systemd_postun_with_restart netdata.service
100 # Add the "netdata" user
101 getent group netdata >/dev/null || groupadd -r netdata
102 getent passwd netdata >/dev/null || \
103 useradd -r -g netdata -s /sbin/nologin \
104 -d %{contentdir} -c "netdata" netdata
108 # Register the netdata service
109 /sbin/chkconfig --add netdata
113 /sbin/service netdata stop > /dev/null 2>&1
114 /sbin/chkconfig --del netdata
119 rm -rf $RPM_BUILD_ROOT
122 %attr(-,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
123 %attr(-,netdata,netdata) %dir %{_localstatedir}/log/%{name}
124 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
125 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
126 %dir %{_sysconfdir}/%{name}
127 %{?with_systemd:%{_unitdir}/netdata.service}
128 %{_libexecdir}/%{name}
130 %dir %{_datadir}/%{name}
134 %{_sysconfdir}/rc.d/init.d/netdata
137 # override defattr for web files
138 %defattr(644,root,netdata,755)
139 %{_datadir}/%{name}/web
142 * Tue Jul 26 2016 Jason Barnett <J@sonBarnett.com> - 1.2.0-2
143 - Added support for EL6
144 - Corrected several Requires statements
145 - Changed default to build without nfacct
146 - Removed --docdir from configure
147 * Mon May 16 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.2.0-1
148 - netdata is now 30% faster.
149 - netdata now has a registry (my-netdata menu on the dashboard).
150 - netdata now monitors Linux containers.
151 - Several more improvements, new features and bugfixes.
152 * Wed Apr 20 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.1.0-1
153 - Several new features (IPv6, SYNPROXY, Users, Users Groups).
154 - A lot of bug fixes and optimizations.
155 * Tue Mar 22 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.0.0-1
156 - First public release.
157 * Sun Nov 15 2015 Alon Bar-Lev <alonbl@redhat.com> - 0.0.0-1