Switched to using system libwebsockets for RPM builds. (#10507)
* Switched to using system libwebsockets for RPM builds. Also cleans up the configure statement in the RPM spec file. * Add version requirement for LWS dep and only use native on platforms that meet it.
Austin S. Hemmelgarn committed
Jan 15, 2021 at 12:38 UTC
0d54bda605232d8d4b45e33274e579f6d98118b9
2 files changed
+12
-3
.travis/package_management/common.py
+2
@@ -111,6 +111,7 @@ def install_common_dependendencies(container):
111
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-devel"])
112
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-c-devel"])
113
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-compiler"])
114
+ run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "libwebsockets-devel"])
115
116
elif str(os.environ["REPO_TOOL"]).count("apt-get") == 1:
117
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "g++"])
@@ -132,6 +133,7 @@ def install_common_dependendencies(container):
133
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-devel"])
134
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-c-devel"])
135
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "protobuf-compiler"])
136
+ run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "libwebsockets-devel"])
137
138
if os.environ["BUILD_STRING"].count("el/6") <= 0:
139
run_command(container, [os.environ["REPO_TOOL"], "install", "-y", "autogen"])
netdata.spec.in
+10
-3
@@ -132,6 +132,9 @@ BuildRequires: zlib-devel
132
BuildRequires: libuuid-devel
133
BuildRequires: libuv-devel >= 1
134
BuildRequires: openssl-devel
135
+%if 0%{?centos_ver} >= 8 || 0%{?fedora}
136
+BuildRequires: libwebsockets-devel >= 3.2
137
+%endif
138
%if 0%{?suse_version}
139
BuildRequires: judy-devel
140
BuildRequires: liblz4-devel
@@ -218,7 +221,9 @@ happened, on your systems and applications.
221
%prep
222
%setup -q -n %{name}-%{version}
223
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-mosquitto.sh ${RPM_BUILD_DIR}/%{name}-%{version}
224
+%if 0%{?centos_ver} >= 8 || 0%{?fedora}
225
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-lws.sh ${RPM_BUILD_DIR}/%{name}-%{version}
226
+%endif
227
# Only bundle libJudy if this isn't Fedora or SUSE
228
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
229
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-judy.sh ${RPM_BUILD_DIR}/%{name}-%{version}
@@ -234,15 +239,17 @@ autoreconf -ivf
239
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
240
--with-libJudy=externaldeps/libJudy \
241
%endif
237
- --with-bundled-lws=externaldeps/libwebsockets
242
+ %if 0%{?centos_ver} >= 8 || 0%{?fedora}
243
+ --with-libwebsockets=externaldeps/libwebsockets \
244
+ %endif
245
--prefix="%{_prefix}" \
246
--sysconfdir="%{_sysconfdir}" \
247
--localstatedir="%{_localstatedir}" \
248
--libexecdir="%{_libexecdir}" \
242
- --libdir="%{_libdir}" \
249
+ --libdir="%{_libdir}" \
250
--with-zlib \
251
--with-math \
245
- --with-user=netdata \
252
+ --with-user=netdata
253
254
# Build step
255
%{__make} %{?_smp_mflags}