commit 005ee8fd5625beb9b95d06037ffe185c0e5e4fa0
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Sat Nov 3 13:56:37 2018 -0500
Add patch to fix SMB browse crash - RFBZ 5001
Kodi pulls in libmicrohttpd, which pulls in gnutls, which dlopens
trousers, but Kodi's CMake macros are compile-time linking with
trousers instead. The compile-time link pulls in "read_data()"
that libsmbclient tries to use and causes a crash.
kodi-18-trousers.patch | 12 ++++++++++++
kodi.spec | 5 ++++-
2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/kodi-18-trousers.patch b/kodi-18-trousers.patch
new file mode 100644
index 0000000..2179455
--- /dev/null
+++ b/kodi-18-trousers.patch
@@ -0,0 +1,12 @@
+--- kodi-18.0b4/cmake/scripts/common/Macros.cmake.orig 2018-10-23 04:00:54.000000000
-0500
++++ kodi-18.0b4/cmake/scripts/common/Macros.cmake 2018-11-03 13:50:45.626391925 -0500
+@@ -331,6 +331,9 @@
+
+ # helper macro to set modified variables in parent scope
+ macro(export_dep)
++ #message(WARNING "Original libraries to link: ${DEPLIBS}")
++ string(REGEX REPLACE "tspi" "" DEPLIBS "${DEPLIBS}")
++ #message(WARNING "Adding these libraries to link: ${DEPLIBS}")
+ set(SYSTEM_INCLUDES ${SYSTEM_INCLUDES} PARENT_SCOPE)
+ set(DEPLIBS ${DEPLIBS} PARENT_SCOPE)
+ set(DEP_DEFINES ${DEP_DEFINES} PARENT_SCOPE)
diff --git a/kodi.spec b/kodi.spec
index 4190995..cfafad5 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -64,6 +64,9 @@ Source5: ffmpeg-4.0.2-Leia-Alpha3.tar.gz
# Set program version parameters
Patch1: kodi-18.0-versioning.patch
+# Prevent trousers from being linked, which breaks Samba
+Patch2: kodi-18-trousers.patch
+
%ifarch x86_64 i686
%global _with_crystalhd 1
%endif
@@ -196,7 +199,6 @@ BuildRequires: systemd-devel
BuildRequires: taglib-devel >= 1.10
BuildRequires: tinyxml-devel
BuildRequires: tre-devel
-BuildRequires: trousers-devel
BuildRequires: wavpack-devel
%if 0%{?_with_wayland}
BuildRequires: wayland-protocols-devel
@@ -329,6 +331,7 @@ This package contains the Kodi binary for X11 servers.
%prep
%setup -q -n %{name}-%{DIRVERSION}
%patch1 -p1 -b.versioning
+%patch2 -p1 -b.trousers
# Fix up Python shebangs
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \
tools/EventClients/lib/python/zeroconf.py \
Show replies by date