]>
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 | |
72 | %if "%{_rpmversion}" >= "5" | |
73 | BuildArch: noarch | |
74 | %endif | |
75 | ||
76 | %description charts | |
77 | Charts.d is BaSH script that allows you to write simple scripts for | |
78 | collecting data. | |
79 | ||
80 | It has been designed so that the actual script that will do data | |
81 | collection will be permanently in memory, collecting data with as | |
82 | little overheads as possible (i.e. initialize once, repeatedly collect | |
83 | values with minimal overhead). | |
84 | ||
85 | Charts.d looks for scripts in charts.d. The scripts should have the | |
86 | filename suffix: .chart.sh. | |
87 | ||
87a77388 JB |
88 | %description charts -l pl.UTF-8 |
89 | Charts.d to skrypt Basha pozwalający na pisanie prostych skryptów do | |
90 | zbierania danych. | |
91 | ||
92 | Jest zaprojektowany tak, że właściwy skrypt zbierający dane jest | |
93 | trzymany cały czas w pamięci, zbierając dane z możliwie małym narzutem | |
94 | (z pojedynczą inicjacją, regularnie zbierając wartości). | |
95 | ||
96 | Charts.d wyszukuje skrypty w katalogu charts.d. Skrypty powinny mieć | |
97 | rozszerzenie nazwy pliku: .chart.sh. | |
98 | ||
f241237d ER |
99 | %package nodejs |
100 | Summary: netdata node.js plugins | |
87a77388 | 101 | Summary(pl.UTF-8): Wtyczki node.js dla netdata |
f241237d ER |
102 | Group: Applications/System |
103 | URL: https://github.com/firehol/netdata/wiki/General-Info---node.d | |
104 | Requires: %{name} = %{version}-%{release} | |
f241237d ER |
105 | %if "%{_rpmversion}" >= "5" |
106 | BuildArch: noarch | |
107 | %endif | |
108 | ||
109 | %description nodejs | |
110 | node.d.plugin is a netdata plugin that provides an abstraction layer | |
111 | to allow easy and quick development of data collectors in node.js. It | |
112 | also manages all its data collectors (placed in node.d) using a single | |
113 | instance of node, thus lowering the memory footprint of data | |
114 | collection. | |
115 | ||
87a77388 JB |
116 | %description nodejs -l pl.UTF-8 |
117 | Wtyczka node.d zapewnia warstwę abstrakcji, pozwalającą na łatwe i | |
118 | szybkie tworzenie modułów zbierających dane w node.js. Zarządza też | |
119 | wszystkimi modułami zbierającymi dane (umieszczonymi w node.d) przy | |
120 | użyciu prostej instancji węzła, obniżając narzut pamięciowy zbierania | |
121 | danych. | |
122 | ||
a0a202fb ER |
123 | %package python |
124 | Summary: netdata Python plugins | |
87a77388 | 125 | Summary(pl.UTF-8): Wtyczki Pythona dla netdata |
a0a202fb ER |
126 | Group: Applications/System |
127 | URL: https://github.com/firehol/netdata/wiki/How-to-write-new-module | |
128 | Requires: %{name} = %{version}-%{release} | |
129 | %if "%{_rpmversion}" >= "5" | |
130 | BuildArch: noarch | |
131 | %endif | |
132 | ||
133 | %description python | |
134 | Netdata Python plugins. | |
135 | ||
87a77388 JB |
136 | %description python -l pl.UTF-8 |
137 | Wtyczki Pythona dla netdata. | |
138 | ||
dbcc502d ER |
139 | %prep |
140 | %setup -q | |
ea1ae9aa | 141 | %patch0 -p1 |
dbcc502d ER |
142 | |
143 | %build | |
144 | %{__aclocal} -I m4 | |
145 | %{__autoconf} | |
146 | %{__autoheader} | |
147 | %{__automake} | |
148 | %configure \ | |
f241237d | 149 | --libdir=%{_libexecdir} \ |
8f8c2ec5 | 150 | %{__enable_disable freeipmi plugin-freeipmi} \ |
dbcc502d | 151 | %{__enable_disable nfacct plugin-nfacct} \ |
8f8c2ec5 JB |
152 | --with-math \ |
153 | --with-zlib \ | |
dbcc502d ER |
154 | --with-user=netdata |
155 | %{__make} | |
156 | ||
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | %{__make} install \ | |
160 | DESTDIR=$RPM_BUILD_ROOT | |
161 | ||
a0a202fb ER |
162 | %{__rm} $RPM_BUILD_ROOT/var/{cache,lib,log}/netdata/.keep |
163 | %{__rm} $RPM_BUILD_ROOT/var/lib/netdata/registry/.keep | |
1aa35efd | 164 | |
2f40a1c0 | 165 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},%{_localstatedir}/lib/%{name}/registry} |
f241237d | 166 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf |
1aa35efd | 167 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
f5dc427f | 168 | cp -p system/netdata.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service |
01f0b59e | 169 | |
1aa35efd ER |
170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
dbcc502d | 173 | %pre |
1229dd1c ER |
174 | %groupadd -g 329 netdata |
175 | %useradd -u 329 -g netdata -c netdata -s /sbin/nologin -d / netdata | |
176 | ||
dbcc502d | 177 | %post |
1aa35efd ER |
178 | /sbin/chkconfig --add netdata |
179 | %service netdata restart | |
dbcc502d ER |
180 | %systemd_post netdata.service |
181 | ||
182 | %preun | |
1aa35efd ER |
183 | if [ "$1" = "0" ]; then |
184 | %service -q netdata stop | |
185 | /sbin/chkconfig --del netdata | |
186 | fi | |
dbcc502d ER |
187 | %systemd_preun netdata.service |
188 | ||
189 | %postun | |
1aa35efd ER |
190 | if [ "$1" = "0" ]; then |
191 | %userremove netdata | |
192 | %groupremove netdata | |
193 | fi | |
194 | %systemd_reload | |
dbcc502d ER |
195 | |
196 | %files | |
197 | %defattr(644,root,root,755) | |
8f8c2ec5 | 198 | %doc ChangeLog LICENSE.md LICENSE-REDISTRIBUTED.md README.md |
dbcc502d | 199 | %dir %{_sysconfdir}/%{name} |
c8a7f904 ER |
200 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/apps_groups.conf |
201 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/netdata.conf | |
5fb515da JR |
202 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fping.conf |
203 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health_alarm_notify.conf | |
204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health_email_recipients.conf | |
205 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/stream.conf | |
a0a202fb ER |
206 | %dir %{_sysconfdir}/%{name}/health.d |
207 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/health.d/*.conf | |
1aa35efd | 208 | %attr(754,root,root) /etc/rc.d/init.d/netdata |
dbcc502d | 209 | %attr(755,root,root) %{_sbindir}/%{name} |
cf647efe | 210 | %dir %{_datadir}/%{name} |
5c048d80 | 211 | %dir %{_libexecdir}/%{name} |
dbcc502d ER |
212 | %{systemdunitdir}/netdata.service |
213 | %attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name} | |
214 | %attr(755,netdata,netdata) %dir %{_localstatedir}/log/%{name} | |
2f40a1c0 ER |
215 | %attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name} |
216 | %attr(755,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry | |
5c048d80 ER |
217 | |
218 | %defattr(-,root,root,-) | |
5c048d80 | 219 | %{_libexecdir}/%{name}/plugins.d |
bd51d1ce | 220 | # subpackages |
9c1cee53 | 221 | %exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin |
bd51d1ce ER |
222 | %exclude %{_libexecdir}/%{name}/plugins.d/charts.d* |
223 | ||
cf647efe ER |
224 | %defattr(-,root,netdata,-) |
225 | %{_datadir}/%{name}/web | |
226 | ||
bd51d1ce ER |
227 | %files charts |
228 | %defattr(644,root,root,755) | |
c8a7f904 | 229 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf |
5fb515da JR |
230 | %dir %{_sysconfdir}/%{name}/charts.d |
231 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d/*.conf | |
bd51d1ce ER |
232 | %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/charts.d* |
233 | %dir %{_libexecdir}/%{name}/charts.d | |
234 | %{_libexecdir}/%{name}/charts.d/README.md | |
235 | %attr(755,root,root) %{_libexecdir}/%{name}/charts.d/*.chart.sh | |
f241237d ER |
236 | |
237 | %files nodejs | |
238 | %defattr(644,root,root,755) | |
5fb515da JR |
239 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/node.d.conf |
240 | %dir %{_sysconfdir}/%{name}/node.d | |
9c1cee53 | 241 | %attr(755,root,root) %{_libexecdir}/%{name}/plugins.d/node.d.plugin |
f241237d ER |
242 | %dir %{_libexecdir}/%{name}/node.d |
243 | %{_libexecdir}/%{name}/node.d/README.md | |
244 | %{_libexecdir}/%{name}/node.d/node_modules | |
245 | %attr(755,root,root) %{_libexecdir}/%{name}/node.d/*.node.js | |
a0a202fb ER |
246 | |
247 | %files python | |
248 | %defattr(644,root,root,755) | |
249 | %dir %{_sysconfdir}/%{name}/python.d | |
250 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/python.d.conf | |
251 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/python.d/*.conf | |
252 | %dir %{_libexecdir}/%{name}/python.d | |
253 | %{_libexecdir}/%{name}/python.d/README.md | |
254 | %attr(755,root,root) %{_libexecdir}/%{name}/python.d/*.chart.py | |
255 | ||
256 | # XXX system packages | |
257 | %{_libexecdir}/%{name}/python.d/python-modules-installer.sh | |
258 | %dir %{_libexecdir}/%{name}/python.d/python_modules | |
259 | %{_libexecdir}/%{name}/python.d/python_modules/*.py | |
260 | %{_libexecdir}/%{name}/python.d/python_modules/pyyaml2 | |
261 | %{_libexecdir}/%{name}/python.d/python_modules/pyyaml3 | |
8f8c2ec5 | 262 | %{_libexecdir}/%{name}/python.d/python_modules/urllib3 |