]>
Commit | Line | Data |
---|---|---|
dbcc502d ER |
1 | # |
2 | # Conditional build: | |
8f8c2ec5 JB |
3 | %bcond_without freeipmi # freeipmi plugin |
4 | %bcond_without nfacct # nfacct plugin | |
dbcc502d | 5 | |
94cfc344 | 6 | Summary: Linux real time performance monitoring |
87a77388 | 7 | Summary(pl.UTF-8): Monitorowanie wydajności Linuksa w czasie rzeczywistym |
dbcc502d | 8 | Name: netdata |
8f8c2ec5 | 9 | Version: 1.8.0 |
5fb515da | 10 | Release: 1 |
4f48df40 | 11 | License: GPL v3+ |
dbcc502d | 12 | Group: Applications/System |
87a77388 | 13 | #Source0Download: https://github.com/firehol/netdata/releases |
94cfc344 | 14 | Source0: https://github.com/firehol/netdata/releases/download/v%{version}/%{name}-%{version}.tar.xz |
8f8c2ec5 | 15 | # Source0-md5: 4058c3acdda1af5968e7dc636ba322e2 |
01f0b59e | 16 | Source1: %{name}.conf |
1aa35efd | 17 | Source2: %{name}.init |
ea1ae9aa | 18 | Patch0: nodejs.patch |
dbcc502d | 19 | URL: http://netdata.firehol.org/ |
8f8c2ec5 | 20 | BuildRequires: autoconf >= 2.60 |
085a70e6 | 21 | BuildRequires: automake |
8f8c2ec5 JB |
22 | %{?with_freeipmi:BuildRequires: freeipmi-devel} |
23 | BuildRequires: libcap-devel | |
65ecfdca | 24 | %{?with_nfacct:BuildRequires: libmnl-devel} |
dbcc502d | 25 | %{?with_nfacct:BuildRequires: libnetfilter_acct-devel} |
c5372cd5 | 26 | BuildRequires: libuuid-devel |
085a70e6 | 27 | BuildRequires: pkgconfig |
1aa35efd | 28 | BuildRequires: rpmbuild(macros) >= 1.647 |
dbcc502d | 29 | BuildRequires: zlib-devel |
1229dd1c ER |
30 | Provides: group(netdata) |
31 | Provides: user(netdata) | |
1aa35efd ER |
32 | Requires(post,preun): /sbin/chkconfig |
33 | Requires(post,preun,postun): systemd-units >= 38 | |
1229dd1c ER |
34 | Requires(postun): /usr/sbin/groupdel |
35 | Requires(postun): /usr/sbin/userdel | |
36 | Requires(pre): /bin/id | |
37 | Requires(pre): /usr/bin/getgid | |
38 | Requires(pre): /usr/sbin/groupadd | |
39 | Requires(pre): /usr/sbin/useradd | |
1aa35efd | 40 | Requires: rc-scripts |
1aa35efd ER |
41 | Suggests: %{name}-charts |
42 | Suggests: %{name}-nodejs | |
a0a202fb | 43 | Suggests: %{name}-python |
dbcc502d ER |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
f241237d ER |
46 | %define _libexecdir %{_prefix}/lib |
47 | ||
dbcc502d ER |
48 | %description |
49 | netdata is the fastest way to visualize metrics. It is a resource | |
50 | efficient, highly optimized system for collecting and visualizing any | |
51 | type of realtime timeseries data, from CPU usage, disk activity, SQL | |
52 | queries, API calls, web site visitors, etc. | |
53 | ||
54 | netdata tries to visualize the truth of now, in its greatest detail, | |
55 | so that you can get insights of what is happening now and what just | |
56 | happened, on your systems and applications. | |
57 | ||
87a77388 JB |
58 | %description -l pl.UTF-8 |
59 | netdata to najszybszy sposób wizualizacji metryk. Jest to wydajny pod | |
60 | względem zużycia zasobów, znacząco zoptymalizowany system do zbierania | |
61 | i wizualizacji dowolnego rodzaju danych zbieranych w linii czasu | |
62 | rzeczywistego - np. wykorzystania CPU, aktywności dysku, zapytań SQL, | |
63 | wywołań API, odwiedzających stronę WWW. | |
64 | ||
bd51d1ce ER |
65 | %package charts |
66 | Summary: netdata charts plugin | |
87a77388 | 67 | Summary(pl.UTF-8): Wtyczka do wykresów dla netdata |
bd51d1ce ER |
68 | Group: Applications/System |
69 | URL: https://github.com/firehol/netdata/wiki/General-Info---charts.d | |
70 | Requires: %{name} = %{version}-%{release} | |
71 | Requires: bash >= 4 | |
bd51d1ce | 72 | BuildArch: noarch |
bd51d1ce ER |
73 | |
74 | %description charts | |
75 | Charts.d is BaSH script that allows you to write simple scripts for | |
76 | collecting data. | |
77 | ||
78 | It has been designed so that the actual script that will do data | |
79 | collection will be permanently in memory, collecting data with as | |
80 | little overheads as possible (i.e. initialize once, repeatedly collect | |
81 | values with minimal overhead). | |
82 | ||
83 | Charts.d looks for scripts in charts.d. The scripts should have the | |
84 | filename suffix: .chart.sh. | |
85 | ||
87a77388 JB |
86 | %description charts -l pl.UTF-8 |
87 | Charts.d to skrypt Basha pozwalający na pisanie prostych skryptów do | |
88 | zbierania danych. | |
89 | ||
90 | Jest zaprojektowany tak, że właściwy skrypt zbierający dane jest | |
91 | trzymany cały czas w pamięci, zbierając dane z możliwie małym narzutem | |
92 | (z pojedynczą inicjacją, regularnie zbierając wartości). | |
93 | ||
94 | Charts.d wyszukuje skrypty w katalogu charts.d. Skrypty powinny mieć | |
95 | rozszerzenie nazwy pliku: .chart.sh. | |
96 | ||
f241237d ER |
97 | %package nodejs |
98 | Summary: netdata node.js plugins | |
87a77388 | 99 | Summary(pl.UTF-8): Wtyczki node.js dla netdata |
f241237d ER |
100 | Group: Applications/System |
101 | URL: https://github.com/firehol/netdata/wiki/General-Info---node.d | |
102 | Requires: %{name} = %{version}-%{release} | |
f241237d | 103 | BuildArch: noarch |
f241237d ER |
104 | |
105 | %description nodejs | |
106 | node.d.plugin is a netdata plugin that provides an abstraction layer | |
107 | to allow easy and quick development of data collectors in node.js. It | |
108 | also manages all its data collectors (placed in node.d) using a single | |
109 | instance of node, thus lowering the memory footprint of data | |
110 | collection. | |
111 | ||
87a77388 JB |
112 | %description nodejs -l pl.UTF-8 |
113 | Wtyczka node.d zapewnia warstwę abstrakcji, pozwalającą na łatwe i | |
114 | szybkie tworzenie modułów zbierających dane w node.js. Zarządza też | |
115 | wszystkimi modułami zbierającymi dane (umieszczonymi w node.d) przy | |
116 | użyciu prostej instancji węzła, obniżając narzut pamięciowy zbierania | |
117 | danych. | |
118 | ||
a0a202fb ER |
119 | %package python |
120 | Summary: netdata Python plugins | |
87a77388 | 121 | Summary(pl.UTF-8): Wtyczki Pythona dla netdata |
a0a202fb ER |
122 | Group: Applications/System |
123 | URL: https://github.com/firehol/netdata/wiki/How-to-write-new-module | |
124 | Requires: %{name} = %{version}-%{release} | |
a0a202fb | 125 | BuildArch: noarch |
a0a202fb ER |
126 | |
127 | %description python | |
128 | Netdata Python plugins. | |
129 | ||
87a77388 JB |
130 | %description python -l pl.UTF-8 |
131 | Wtyczki Pythona dla netdata. | |
132 | ||
dbcc502d ER |
133 | %prep |
134 | %setup -q | |
ea1ae9aa | 135 | %patch0 -p1 |
dbcc502d ER |
136 | |
137 | %build | |
138 | %{__aclocal} -I m4 | |
139 | %{__autoconf} | |
140 | %{__autoheader} | |
141 | %{__automake} | |
142 | %configure \ | |
f241237d | 143 | --libdir=%{_libexecdir} \ |
8f8c2ec5 | 144 | %{__enable_disable freeipmi plugin-freeipmi} \ |
dbcc502d | 145 | %{__enable_disable nfacct plugin-nfacct} \ |
8f8c2ec5 JB |
146 | --with-math \ |
147 | --with-zlib \ | |
dbcc502d ER |
148 | --with-user=netdata |
149 | %{__make} | |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | %{__make} install \ | |
154 | DESTDIR=$RPM_BUILD_ROOT | |
155 | ||
a0a202fb ER |
156 | %{__rm} $RPM_BUILD_ROOT/var/{cache,lib,log}/netdata/.keep |
157 | %{__rm} $RPM_BUILD_ROOT/var/lib/netdata/registry/.keep | |
1aa35efd | 158 | |
2f40a1c0 | 159 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},%{_localstatedir}/lib/%{name}/registry} |
f241237d | 160 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf |
1aa35efd | 161 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
f5dc427f | 162 | cp -p system/netdata.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service |
01f0b59e | 163 | |
1aa35efd ER |
164 | %clean |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
dbcc502d | 167 | %pre |
1229dd1c ER |
168 | %groupadd -g 329 netdata |
169 | %useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata | |
170 | ||
dbcc502d | 171 | %post |
1aa35efd ER |
172 | /sbin/chkconfig --add netdata |
173 | %service netdata restart | |
dbcc502d ER |
174 | %systemd_post netdata.service |
175 | ||
176 | %preun | |
1aa35efd ER |
177 | if [ "$1" = "0" ]; then |
178 | %service -q netdata stop | |
179 | /sbin/chkconfig --del netdata | |
180 | fi | |
dbcc502d ER |
181 | %systemd_preun netdata.service |
182 | ||
183 | %postun | |
1aa35efd ER |
184 | if [ "$1" = "0" ]; then |
185 | %userremove netdata | |
186 | %groupremove netdata | |
187 | fi | |
188 | %systemd_reload | |
dbcc502d ER |
189 | |
190 | %files | |
191 | %defattr(644,root,root,755) | |
8f8c2ec5 | 192 | %doc ChangeLog LICENSE.md LICENSE-REDISTRIBUTED.md README.md |
dbcc502d | 193 | %dir %{_sysconfdir}/%{name} |
c8a7f904 ER |
194 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/apps_groups.conf |
195 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/netdata.conf | |
5fb515da JR |
196 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fping.conf |
197 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health_alarm_notify.conf | |
198 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health_email_recipients.conf | |
199 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/stream.conf | |
a0a202fb ER |
200 | %dir %{_sysconfdir}/%{name}/health.d |
201 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health.d/*.conf | |
1aa35efd | 202 | %attr(754,root,root) /etc/rc.d/init.d/netdata |
dbcc502d | 203 | %attr(755,root,root) %{_sbindir}/%{name} |
cf647efe | 204 | %dir %{_datadir}/%{name} |
5c048d80 | 205 | %dir %{_libexecdir}/%{name} |
dbcc502d ER |
206 | %{systemdunitdir}/netdata.service |
207 | %attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name} | |
208 | %attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name} | |
2f40a1c0 ER |
209 | %attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name} |
210 | %attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry | |
5c048d80 ER |
211 | |
212 | %defattr(-,root,root,-) | |
5c048d80 | 213 | %{_libexecdir}/%{name}/plugins.d |
bd51d1ce | 214 | # subpackages |
9c1cee53 | 215 | %exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin |
bd51d1ce ER |
216 | %exclude %{_libexecdir}/%{name}/plugins.d/charts.d* |
217 | ||
cf647efe ER |
218 | %defattr(-,root,netdata,-) |
219 | %{_datadir}/%{name}/web | |
220 | ||
bd51d1ce ER |
221 | %files charts |
222 | %defattr(644,root,root,755) | |
c8a7f904 | 223 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf |
5fb515da JR |
224 | %dir %{_sysconfdir}/%{name}/charts.d |
225 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d/*.conf | |
bd51d1ce ER |
226 | %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/charts.d* |
227 | %dir %{_libexecdir}/%{name}/charts.d | |
228 | %{_libexecdir}/%{name}/charts.d/README.md | |
229 | %attr(755,root,root) %{_libexecdir}/%{name}/charts.d/*.chart.sh | |
f241237d ER |
230 | |
231 | %files nodejs | |
232 | %defattr(644,root,root,755) | |
5fb515da JR |
233 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/node.d.conf |
234 | %dir %{_sysconfdir}/%{name}/node.d | |
9c1cee53 | 235 | %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/node.d.plugin |
f241237d ER |
236 | %dir %{_libexecdir}/%{name}/node.d |
237 | %{_libexecdir}/%{name}/node.d/README.md | |
238 | %{_libexecdir}/%{name}/node.d/node_modules | |
239 | %attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js | |
a0a202fb ER |
240 | |
241 | %files python | |
242 | %defattr(644,root,root,755) | |
243 | %dir %{_sysconfdir}/%{name}/python.d | |
244 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/python.d.conf | |
245 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/python.d/*.conf | |
246 | %dir %{_libexecdir}/%{name}/python.d | |
247 | %{_libexecdir}/%{name}/python.d/README.md | |
248 | %attr(755,root,root) %{_libexecdir}/%{name}/python.d/*.chart.py | |
249 | ||
250 | # XXX system packages | |
251 | %{_libexecdir}/%{name}/python.d/python-modules-installer.sh | |
252 | %dir %{_libexecdir}/%{name}/python.d/python_modules | |
253 | %{_libexecdir}/%{name}/python.d/python_modules/*.py | |
254 | %{_libexecdir}/%{name}/python.d/python_modules/pyyaml2 | |
255 | %{_libexecdir}/%{name}/python.d/python_modules/pyyaml3 | |
8f8c2ec5 | 256 | %{_libexecdir}/%{name}/python.d/python_modules/urllib3 |