netdata.spec.in 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. # SPDX-License-Identifier: GPL-3.0-or-later
  2. %global contentdir %{_datadir}/netdata
  3. %global version @PACKAGE_VERSION@
  4. #TODO: Temporary fix for the build-id error during go.d plugin set up
  5. %global _missing_build_ids_terminate_build 0
  6. # XXX: We are using automatic `Requires:` generation for libraries
  7. # whenever possible, DO NOT LIST LIBRARY DEPENDENCIES UNLESS THE RESULTANT
  8. # PACKAGE IS BROKEN WITHOUT THEM.
  9. AutoReqProv: yes
  10. # This is temporary and should eventually be resolved. This bypasses
  11. # the default rhel __os_install_post which throws a python compile
  12. # error.
  13. %global __os_install_post %{nil}
  14. # We don’t want LTO as it has a minimal performance impact at runtime
  15. # but a huge impact on build times (we want our CI to not take multiple
  16. # hours to finish).
  17. %global _lto_cflags %nil
  18. # Disable eBPF for architectures other than x86
  19. %ifarch x86_64 i386
  20. %global _have_ebpf 1
  21. %else
  22. %global _have_ebpf 0
  23. %endif
  24. # Mitigate the cross-distro mayhem by strictly defining the libexec destination
  25. %define _prefix /usr
  26. %define _sysconfdir /etc
  27. %define _localstatedir /var
  28. %define _libexecdir /usr/libexec
  29. %define _libdir /usr/lib
  30. # Redefine centos_ver to standardize on a single macro
  31. %{?rhel:%global centos_ver %rhel}
  32. #
  33. # Conditional build:
  34. %bcond_without systemd # systemd
  35. %bcond_without netns # build with netns support (cgroup-network)
  36. %if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
  37. %else
  38. %undefine with_systemd
  39. %undefine with_netns
  40. %endif
  41. %if %{with systemd}
  42. %if 0%{?suse_version}
  43. %global netdata_initd_buildrequires \
  44. BuildRequires: systemd-rpm-macros \
  45. %{nil}
  46. %global netdata_initd_requires \
  47. %{?systemd_requires} \
  48. %{nil}
  49. %global netdata_init_post %service_add_post netdata.service \
  50. /sbin/service netdata restart > /dev/null 2>&1 \
  51. %{nil}
  52. %global netdata_init_preun %service_del_preun netdata.service \
  53. /sbin/service netdata stop > /dev/null 2>&1 \
  54. %{nil}
  55. %global netdata_init_postun %service_del_postun netdata.service
  56. %else
  57. %global netdata_initd_buildrequires \
  58. BuildRequires: systemd
  59. %global netdata_initd_requires \
  60. Requires(preun): systemd-units \
  61. Requires(postun): systemd-units \
  62. Requires(post): systemd-units \
  63. %{nil}
  64. %global netdata_init_post %systemd_post netdata.service \
  65. /usr/bin/systemctl enable netdata.service \
  66. /usr/bin/systemctl daemon-reload \
  67. /usr/bin/systemctl restart netdata.service \
  68. %{nil}
  69. %global netdata_init_preun %systemd_preun netdata.service
  70. %global netdata_init_postun %systemd_postun_with_restart netdata.service
  71. %endif
  72. %else
  73. %global netdata_initd_buildrequires %{nil}
  74. %global netdata_initd_requires \
  75. Requires(post): chkconfig \
  76. %{nil}
  77. %global netdata_init_post \
  78. /sbin/chkconfig --add netdata \
  79. /sbin/service netdata restart > /dev/null 2>&1 \
  80. %{nil}
  81. %global netdata_init_preun %{nil} \
  82. if [ $1 = 0 ]; then \
  83. /sbin/service netdata stop > /dev/null 2>&1 \
  84. /sbin/chkconfig --del netdata \
  85. fi \
  86. %{nil}
  87. %global netdata_init_postun %{nil} \
  88. if [ $1 != 0 ]; then \
  89. /sbin/service netdata condrestart 2>&1 > /dev/null \
  90. fi \
  91. %{nil}
  92. %endif
  93. Summary: Real-time performance monitoring, done right!
  94. Name: netdata
  95. Version: %{version}
  96. Release: 1%{?dist}
  97. License: GPLv3+
  98. Group: Applications/System
  99. Source0: https://github.com/netdata/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
  100. URL: http://my-netdata.io
  101. # Remove conflicting EPEL packages
  102. Obsoletes: %{name}-conf
  103. Obsoletes: %{name}-data
  104. # #####################################################################
  105. # Core build/install/runtime dependencies
  106. # #####################################################################
  107. # Build dependencies
  108. #
  109. BuildRequires: gcc
  110. BuildRequires: gcc-c++
  111. BuildRequires: make
  112. BuildRequires: git-core
  113. BuildRequires: autoconf
  114. %if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
  115. BuildRequires: autoconf-archive
  116. %if 0%{?rhel} <= 8
  117. BuildRequires: autogen
  118. %endif
  119. %endif
  120. BuildRequires: automake
  121. BuildRequires: cmake
  122. BuildRequires: pkgconfig
  123. BuildRequires: curl
  124. BuildRequires: findutils
  125. BuildRequires: zlib-devel
  126. BuildRequires: libuuid-devel
  127. BuildRequires: libuv-devel >= 1
  128. BuildRequires: openssl-devel
  129. %if 0%{?suse_version}
  130. BuildRequires: protobuf-devel
  131. BuildRequires: libprotobuf-c-devel
  132. BuildRequires: liblz4-devel
  133. BuildRequires: libjson-c-devel
  134. %else
  135. %if 0%{?fedora}
  136. BuildRequires: protobuf-devel
  137. BuildRequires: protobuf-c-devel
  138. BuildRequires: lz4-devel
  139. BuildRequires: json-c-devel
  140. %else
  141. %if 0%{?centos_ver} >= 8
  142. BuildRequires: protobuf-devel
  143. BuildRequires: protobuf-c-devel
  144. %endif
  145. BuildRequires: lz4-devel
  146. BuildRequires: json-c-devel
  147. %endif
  148. %endif
  149. # Core build requirements for service install
  150. %{netdata_initd_buildrequires}
  151. # Runtime dependencies
  152. #
  153. %if 0%{?centos_ver} == 7 || 0%{?centos_ver} == 6
  154. Requires: python
  155. %else
  156. %if 0%{?centos_ver} == 8
  157. Requires: python38
  158. %else
  159. Requires: python3
  160. %endif
  161. %endif
  162. # Core requirements for the install to succeed
  163. Requires(pre): /usr/sbin/groupadd
  164. Requires(pre): /usr/sbin/useradd
  165. %{netdata_initd_requires}
  166. # #####################################################################
  167. # Functionality-dependent package dependencies
  168. # #####################################################################
  169. # Note: Some or all of the Packages may be found in the EPEL repo,
  170. # rather than the standard ones
  171. # epbf dependencies
  172. %if 0%{?_have_ebpf}
  173. %if 0%{?suse_version}
  174. BuildRequires: libelf-devel
  175. %else
  176. BuildRequires: elfutils-libelf-devel
  177. %endif
  178. %endif
  179. # end - ebpf dependencies
  180. # nfacct plugin dependencies
  181. BuildRequires: libmnl-devel
  182. %if 0%{?fedora} || 0%{?suse_version} >= 1140
  183. BuildRequires: libnetfilter_acct-devel
  184. %endif
  185. # end nfacct plugin dependencies
  186. # freeipmi plugin dependencies
  187. BuildRequires: freeipmi-devel
  188. # end - freeipmi plugin dependencies
  189. # CUPS plugin dependencies
  190. %if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7
  191. BuildRequires: cups-devel >= 1.7
  192. %endif
  193. # end - cups plugin dependencies
  194. # Prometheus remote write dependencies
  195. BuildRequires: snappy-devel
  196. # end - prometheus remote write dependencies
  197. # #####################################################################
  198. # End of dependency management configuration
  199. # #####################################################################
  200. %description
  201. netdata is the fastest way to visualize metrics. It is a resource
  202. efficient, highly optimized system for collecting and visualizing any
  203. type of realtime timeseries data, from CPU usage, disk activity, SQL
  204. queries, API calls, web site visitors, etc.
  205. netdata tries to visualize the truth of now, in its greatest detail,
  206. so that you can get insights of what is happening now and what just
  207. happened, on your systems and applications.
  208. %prep
  209. %setup -q -n %{name}-%{version}
  210. # Only bundle protobuf on CentOS 7 or earlier
  211. %if 0%{?centos_ver:1}
  212. %if %{centos_ver} < 8
  213. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-protobuf.sh ${RPM_BUILD_DIR}/%{name}-%{version}
  214. %endif
  215. %endif
  216. %if 0%{?_have_ebpf}
  217. %if 0%{?centos_ver:1}
  218. %if %{centos_ver} < 8
  219. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} centos7
  220. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf-co-re.sh ${RPM_BUILD_DIR}/%{name}-%{version}
  221. %else
  222. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} centos8
  223. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf-co-re.sh ${RPM_BUILD_DIR}/%{name}-%{version}
  224. %endif
  225. %else
  226. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} other
  227. export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf-co-re.sh ${RPM_BUILD_DIR}/%{name}-%{version}
  228. %endif
  229. %endif
  230. %build
  231. # Conf step
  232. autoreconf -ivf
  233. %configure \
  234. %if 0%{!?_have_ebpf}
  235. --disable-ebpf
  236. %endif
  237. %if 0%{?centos_ver:1}
  238. %if %{centos_ver} < 8
  239. --with-bundled-protobuf \
  240. %endif
  241. %endif
  242. --prefix="%{_prefix}" \
  243. --sysconfdir="%{_sysconfdir}" \
  244. --localstatedir="%{_localstatedir}" \
  245. --libexecdir="%{_libexecdir}" \
  246. --libdir="%{_libdir}" \
  247. --with-zlib \
  248. --with-math \
  249. --with-user=netdata \
  250. --disable-dependency-tracking
  251. # Build step
  252. %{__make} %{?_smp_mflags}
  253. %install
  254. # ###########################################################
  255. # Clear the directory, if already exists and install
  256. rm -rf "${RPM_BUILD_ROOT}"
  257. %{__make} %{?_smp_mflags} DESTDIR="${RPM_BUILD_ROOT}" install
  258. install -m 644 -p system/netdata.conf "${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}"
  259. # ###########################################################
  260. # Install updater script
  261. install -m 755 -p packaging/installer/netdata-updater.sh "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/netdata-updater.sh"
  262. # ###########################################################
  263. # logrotate settings
  264. install -m 755 -d "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d"
  265. install -m 644 -p system/logrotate/netdata "${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}"
  266. # ###########################################################
  267. # Install freeipmi
  268. install -m 4750 -p freeipmi.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/freeipmi.plugin"
  269. # ###########################################################
  270. # Install apps.plugin
  271. install -m 4750 -p apps.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/apps.plugin"
  272. # ###########################################################
  273. # Install perf.plugin
  274. install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/perf.plugin"
  275. # ###########################################################
  276. # Install ebpf.plugin
  277. %if 0%{?_have_ebpf}
  278. install -m 4750 -p ebpf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf.plugin"
  279. %endif
  280. # ###########################################################
  281. # Install cups.plugin
  282. %if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7
  283. install -m 0750 -p cups.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/cups.plugin"
  284. %endif
  285. # ###########################################################
  286. # Install slabinfo.plugin
  287. install -m 4750 -p slabinfo.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/slabinfo.plugin"
  288. # ###########################################################
  289. # Install cache and log directories
  290. install -m 755 -d "${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}"
  291. install -m 755 -d "${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}"
  292. # ###########################################################
  293. # Install registry directory
  294. install -m 755 -d "${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}/registry"
  295. # ###########################################################
  296. # Install netdata service
  297. %if %{with systemd}
  298. install -m 755 -d "${RPM_BUILD_ROOT}%{_unitdir}"
  299. install -m 644 -p system/systemd/netdata.service "${RPM_BUILD_ROOT}%{_unitdir}/netdata.service"
  300. %else
  301. # install SYSV init stuff
  302. install -d "${RPM_BUILD_ROOT}/etc/rc.d/init.d"
  303. install -m 755 system/initd/init.d/netdata \
  304. "${RPM_BUILD_ROOT}/etc/rc.d/init.d/netdata"
  305. %endif
  306. # ############################################################
  307. # Package Go within netdata (TBD: Package it separately)
  308. safe_sha256sum() {
  309. # Within the context of the installer, we only use -c option that is common between the two commands
  310. # We will have to reconsider if we start non-common options
  311. if command -v sha256sum >/dev/null 2>&1; then
  312. sha256sum $@
  313. elif command -v shasum >/dev/null 2>&1; then
  314. shasum -a 256 $@
  315. else
  316. fatal "I could not find a suitable checksum binary to use"
  317. fi
  318. }
  319. download_go() {
  320. url="${1}"
  321. dest="${2}"
  322. if command -v curl >/dev/null 2>&1; then
  323. curl -sSL --connect-timeout 10 --retry 3 "${url}" > "${dest}"
  324. elif command -v wget >/dev/null 2>&1; then
  325. wget -T 15 -O - "${url}" > "${dest}"
  326. else
  327. echo >&2
  328. echo >&2 "Downloading go.d plugin from '${url}' failed because of missing mandatory packages."
  329. echo >&2 "Either add packages or disable it by issuing '--disable-go' in the installer"
  330. echo >&2
  331. exit 1
  332. fi
  333. }
  334. install_go() {
  335. # When updating this value, ensure correct checksums in packaging/go.d.checksums
  336. GO_PACKAGE_VERSION="$(cat packaging/go.d.version)"
  337. ARCH_MAP=(
  338. 'i386::386'
  339. 'i686::386'
  340. 'x86_64::amd64'
  341. 'aarch64::arm64'
  342. 'armv64::arm64'
  343. 'armv6l::arm'
  344. 'armv7l::arm'
  345. 'armv5tel::arm'
  346. )
  347. if [ -z "${NETDATA_DISABLE_GO+x}" ]; then
  348. echo >&2 "Install go.d.plugin"
  349. ARCH=$(uname -m)
  350. OS=$(uname -s | tr '[:upper:]' '[:lower:]')
  351. for index in "${ARCH_MAP[@]}" ; do
  352. KEY="${index%%::*}"
  353. VALUE="${index##*::}"
  354. if [ "$KEY" = "$ARCH" ]; then
  355. ARCH="${VALUE}"
  356. break
  357. fi
  358. done
  359. tmp=$(mktemp -d /tmp/netdata-go-XXXXXX)
  360. GO_PACKAGE_BASENAME="go.d.plugin-${GO_PACKAGE_VERSION}.${OS}-${ARCH}.tar.gz"
  361. download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/${GO_PACKAGE_BASENAME}" "${tmp}/${GO_PACKAGE_BASENAME}"
  362. download_go "https://github.com/netdata/go.d.plugin/releases/download/${GO_PACKAGE_VERSION}/config.tar.gz" "${tmp}/config.tar.gz"
  363. if [ ! -f "${tmp}/${GO_PACKAGE_BASENAME}" ] || [ ! -f "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/${GO_PACKAGE_BASENAME}" ]; then
  364. echo >&2 "Either check the error or consider disabling it by issuing '--disable-go' in the installer"
  365. echo >&2
  366. return 1
  367. fi
  368. grep "${GO_PACKAGE_BASENAME}\$" "packaging/go.d.checksums" > "${tmp}/sha256sums.txt" 2>/dev/null
  369. grep "config.tar.gz" "packaging/go.d.checksums" >> "${tmp}/sha256sums.txt" 2>/dev/null
  370. # Checksum validation
  371. if ! (cd "${tmp}" && safe_sha256sum -c "sha256sums.txt"); then
  372. echo >&2 "go.d plugin checksum validation failure."
  373. echo >&2 "Either check the error or consider disabling it by issuing '--disable-go' in the installer"
  374. echo >&2
  375. echo "go.d.plugin package files checksum validation failed."
  376. exit 1
  377. fi
  378. # Install files
  379. tar -xf "${tmp}/config.tar.gz" -C "${RPM_BUILD_ROOT}%{_libdir}/%{name}/conf.d/"
  380. tar xf "${tmp}/${GO_PACKAGE_BASENAME}"
  381. mv "${GO_PACKAGE_BASENAME/\.tar\.gz/}" "go.d.plugin"
  382. rm -rf "${tmp}"
  383. fi
  384. return 0
  385. }
  386. install_go
  387. install -m 0640 -p go.d.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/go.d.plugin"
  388. %if 0%{?_have_ebpf}
  389. ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d
  390. %endif
  391. %pre
  392. if ! getent group netdata > /dev/null; then
  393. groupadd --system netdata
  394. fi
  395. if ! getent passwd netdata > /dev/null; then
  396. useradd --system -g netdata --home %{contentdir} --no-create-home -s /sbin/nologin -c "Netdata pseudo user" netdata
  397. fi
  398. # I am not sure that the corresponding group names are exactly the same as in Debian, but we should start somewhere, shouldn't we?
  399. for item in docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C; do
  400. if getent group $item > /dev/null 2>&1; then
  401. usermod -a -G $item netdata
  402. fi
  403. done
  404. %post
  405. %{netdata_init_post}
  406. %preun
  407. %{netdata_init_preun}
  408. %postun
  409. %{netdata_init_postun}
  410. %clean
  411. rm -rf "${RPM_BUILD_ROOT}"
  412. %files
  413. %doc README.md
  414. %{_sysconfdir}/%{name}
  415. %config(noreplace) %{_sysconfdir}/%{name}/netdata.conf
  416. %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
  417. %dir %{_libdir}/%{name}
  418. %dir %{_datadir}/%{name}
  419. %{_libdir}/%{name}
  420. %{_libdir}/%{name}/conf.d/
  421. %{_libexecdir}/%{name}
  422. %{_sbindir}/%{name}
  423. %{_sbindir}/netdatacli
  424. %{_sbindir}/netdata-claim.sh
  425. %if %{with systemd}
  426. %{_unitdir}/netdata.service
  427. %else
  428. %{_sysconfdir}/rc.d/init.d/netdata
  429. %endif
  430. %defattr(0750,root,netdata,0750)
  431. %dir %{_libexecdir}/%{name}/python.d
  432. %dir %{_libexecdir}/%{name}/charts.d
  433. %dir %{_libexecdir}/%{name}/plugins.d
  434. %{_libexecdir}/%{name}/python.d
  435. %{_libexecdir}/%{name}/plugins.d
  436. %caps(cap_dac_read_search,cap_sys_ptrace=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/apps.plugin
  437. %if %{with netns}
  438. # cgroup-network detects the network interfaces of CGROUPs
  439. # it must be able to use setns() and run cgroup-network-helper.sh as root
  440. # the helper script reads /proc/PID/fdinfo/* files, runs virsh, etc.
  441. %attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/cgroup-network
  442. %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/cgroup-network-helper.sh
  443. %endif
  444. # ebpf plugin
  445. %if 0%{?_have_ebpf}
  446. %attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/ebpf.plugin
  447. %endif
  448. # perf plugin
  449. # This should be CAP_PERFMON once RPM finally learns about it, but needs to be CAP_SYS_ADMIN for now.
  450. # %caps(cap_perfmon=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/perf.plugin
  451. %caps(cap_sys_admin=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/perf.plugin
  452. # perf plugin
  453. %caps(cap_dac_read_search=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/slabinfo.plugin
  454. # freeipmi files
  455. %attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
  456. # go.d.plugin (the capability required for wireguard module)
  457. %caps(cap_net_admin,cap_net_raw=eip) %{_libexecdir}/%{name}/plugins.d/go.d.plugin
  458. # Enforce 0644 for files and 0755 for directories
  459. # for the netdata web directory
  460. %defattr(0644,root,root,0755)
  461. %{_datadir}/%{name}/web
  462. # Enforce 0660 for files and 0770 for directories
  463. # for the netdata lib, cache and log dirs
  464. %defattr(0660,root,netdata,0770)
  465. %attr(0770,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
  466. %attr(0755,netdata,root) %dir %{_localstatedir}/log/%{name}
  467. %attr(0770,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
  468. %attr(0770,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry
  469. # Free IPMI belongs to a different sub-package
  470. %exclude %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
  471. # CUPS belongs to a different sub package
  472. %if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7
  473. %exclude %{_libexecdir}/%{name}/plugins.d/cups.plugin
  474. %package plugin-cups
  475. Summary: The Common Unix Printing System plugin for netdata
  476. Group: Applications/System
  477. Requires: cups >= 1.7
  478. Requires: netdata = %{version}
  479. %description plugin-cups
  480. This is the Common Unix Printing System plugin for the netdata daemon.
  481. Use this plugin to enable metrics collection from cupsd, the daemon running when CUPS is enabled on the system
  482. %files plugin-cups
  483. %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/cups.plugin
  484. %endif
  485. %package plugin-freeipmi
  486. Summary: FreeIPMI - The Intelligent Platform Management System
  487. Group: Applications/System
  488. Requires: freeipmi
  489. Requires: netdata = %{version}
  490. %description plugin-freeipmi
  491. The IPMI specification defines a set of interfaces for platform management.
  492. It is implemented by a number vendors for system management. The features of IPMI that most users will be interested in
  493. are sensor monitoring, system event monitoring, power control, and serial-over-LAN (SOL).
  494. %files plugin-freeipmi
  495. %attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
  496. %changelog
  497. * Thu Feb 16 2023 Konstantin Shalygin <k0ste@k0ste.ru> 0.0.0-17
  498. - Added eBPF build dependency
  499. * Fri Feb 03 2022 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-16
  500. - Bundle updater script in native packages.
  501. * Mon Oct 11 2021 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-15
  502. - Remove support code for legacy ACLK implementation.
  503. * Wed Sep 16 2020 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-14
  504. - Convert to using 'AutoReq: yes' for library dependencies.
  505. * Thu Feb 13 2020 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-13
  506. - Add handling for custom libmosquitto fork
  507. * Wed Jan 01 2020 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-12
  508. - Add explicit installation of log and cache directories
  509. - Clean up build dependencies.
  510. * Thu Dec 19 2019 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-11
  511. - Fix remaining ownership and permissions issues.
  512. * Mon Nov 04 2019 Konstantinos Natsakis <konstantinos.natsakis@gmail.com> 0.0.0-10
  513. - Fix /etc/netdata permissions
  514. * Mon Sep 23 2019 Konstantinos Natsakis <konstantinos.natsakis@gmail.com> 0.0.0-9
  515. - Do not build CUPS plugin subpackage on CentOS 6 and CentOS 7
  516. * Tue Aug 20 2019 Pavlos Emm. Katsoulakis <paul@netdat.acloud> - 0.0.0-8
  517. - Split CUPS functionality on separate package
  518. * Fri Jun 28 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-7
  519. - Raise the path overrides to the spec file level, not just the configure.
  520. - Adjust tighter permissions on some folders, based on what we did on our installer
  521. - Introduce go.d plugin download and install, to include it on the package (Temporarily, to become separate package on next iteration)
  522. * Tue Jun 25 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-6
  523. - Adjust dependency list: Some packages are missing on some distros, adopt to build successfully
  524. * Mon Jun 24 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-5
  525. Another pass on cleaning up pre/post installation steps
  526. - Sync permission and ownership on files and directories
  527. * Sun Jun 16 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-4
  528. First draft refactor on package dependencies section
  529. - Remove freeipmi/nfacct plugin flags. We auto-detect all plugins by decision
  530. - Start refactor of package dependencies
  531. - Add missing dependencies, with respect to distro peculiarities
  532. - Adjust existing dependencies, so that distro-specific package names is applied
  533. * Wed Jan 02 2019 Pawel Krupa <pkrupa@redhat.com> - 0.0.0-3
  534. - Temporary set version statically
  535. - Fix changelog ordering
  536. - Comment-out node.d configuration directory
  537. * Wed Jan 02 2019 Pawel Krupa <pkrupa@redhat.com> - 0.0.0-2
  538. - Fix permissions for log files
  539. * Sun Nov 15 2015 Alon Bar-Lev <alonbl@redhat.com> - 0.0.0-1
  540. - Initial add.