summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--netdata.spec.in29
1 files changed, 14 insertions, 15 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index 8f11a1d7..756a9d3d 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -143,14 +143,12 @@ BuildRequires: openssl-devel
%if 0%{?suse_version}
BuildRequires: protobuf-devel
BuildRequires: libprotobuf-c-devel
-BuildRequires: judy-devel
BuildRequires: liblz4-devel
BuildRequires: libjson-c-devel
%else
%if 0%{?fedora}
BuildRequires: protobuf-devel
BuildRequires: protobuf-c-devel
-BuildRequires: Judy-devel
BuildRequires: lz4-devel
BuildRequires: json-c-devel
%else
@@ -227,10 +225,6 @@ happened, on your systems and applications.
%prep
%setup -q -n %{name}-%{version}
-# Only bundle libJudy if this isn't Fedora or SUSE
-%if 0%{!?fedora:1} && 0%{!?suse_version:1}
-export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-judy.sh ${RPM_BUILD_DIR}/%{name}-%{version}
-%endif
# Only bundle protobuf on CentOS 7 or earlier
%if 0%{?centos_ver:1}
%if %{centos_ver} < 8
@@ -259,9 +253,6 @@ autoreconf -ivf
%if 0%{!?_have_ebpf}
--disable-ebpf
%endif
- %if 0%{!?fedora:1} && 0%{!?suse_version:1}
- --with-bundled-libJudy \
- %endif
%if 0%{?centos_ver:1}
%if %{centos_ver} < 8
--with-bundled-protobuf \
@@ -447,12 +438,20 @@ ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf.sh ${RPM_BUILD_DIR}/%{
%pre
-# User/Group creations, as needed
-getent group netdata >/dev/null || groupadd -r netdata
-getent group docker >/dev/null || groupadd -r docker
-getent passwd netdata >/dev/null || \
- useradd -r -g netdata -G docker -s /sbin/nologin \
- -d %{contentdir} -c "netdata" netdata
+if ! getent group netdata > /dev/null; then
+ groupadd --system netdata
+fi
+
+if ! getent passwd netdata > /dev/null; then
+ useradd --system -g netdata --home %{contentdir} --no-create-home -s /sbin/nologin -c "Netdata pseudo user" netdata
+fi
+
+# I am not sure that the corresponding group names are exactly the same as in Debian, but we should start somewhere, shouldn't we?
+for item in docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C; do
+ if getent group $item > /dev/null 2>&1; then
+ usermod -a -G $item netdata
+ fi
+done
%post
%{netdata_init_post}