From 310b8c26575eaab53d648ef48c11c423eec56fa2 Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Sun, 3 May 2020 06:57:42 +0200 Subject: [PATCH 1/2] Updated to Fedora 32 --- fedora/SPECS/kodi.spec | 51 +++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/fedora/SPECS/kodi.spec b/fedora/SPECS/kodi.spec index 638bd0f..04a01d3 100644 --- a/fedora/SPECS/kodi.spec +++ b/fedora/SPECS/kodi.spec @@ -1,8 +1,8 @@ %global PRERELEASE r %global myRELEASE 1 +%global DIRVERSION %{version} #global GITCOMMIT Gotham_r2-ge988513 # use the line below for pre-releases -%global DIRVERSION %{version} %global _hardened_build 1 # We support hte following options: @@ -16,12 +16,15 @@ %if 0%{?fedora} # (libbluray in EPEL 6 is too old.) %global _with_libbluray 1 +%if 0%{?fedora} < 31 %global _with_cwiid 1 +%else +%global _with_cwiid 0 +%endif %global _with_libssh 1 %global _with_libcec 1 +%global _with_external_ffmpeg 1 %global _with_wayland 1 -# only enable it, if you have a nvidia gpu! -%global _with_nvidia_ffmpeg 0 %endif %if 0%{?_with_wayland} %global kodi_backends x11 wayland gbm @@ -31,7 +34,7 @@ Name: kodi Version: 18.6 -Release: 101.%{myRELEASE}.%{PRERELEASE}%{?dist} +Release: 102.%{myRELEASE}.%{PRERELEASE}%{?dist} Summary: Media center License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT @@ -57,6 +60,11 @@ Source3: kodi-libdvdread-6.0.0-Leia-Alpha-3.tar.gz Source4: kodi-libdvdcss-1.4.2-Leia-Beta-5.tar.gz %endif +%if ! 0%{?_with_external_ffmpeg} +# wget -O ffmpeg-4.0.4-Leia-18.4.tar.gz https://github.com/xbmc/FFmpeg/archive/4.0.4-Leia-18.4.tar.gz +Source5: ffmpeg-4.0.4-Leia-18.4.tar.gz +%endif + # Set program version parameters Patch1: kodi-18.0-versioning.patch @@ -72,6 +80,12 @@ Patch3: kodi-18-annobin-workaround.patch Patch4: kodi-18-python3-0001.patch Patch5: kodi-18-python3-0002.patch +# Fix missing include (gcc requirement) +Patch6: kodi-18-assert.patch + +# Workaround for brp-mangle-shebangs behavior (RHBZ#1787088) +Patch7: kodi-18-brp-mangle-shebangs.patch + %ifarch x86_64 i686 %global _with_crystalhd 1 %endif @@ -79,8 +93,6 @@ Patch5: kodi-18-python3-0002.patch # Upstream does not support ppc64 ExcludeArch: %{power64} -BuildRequires: SDL2-devel -BuildRequires: SDL_image-devel BuildRequires: a52dec-devel BuildRequires: afpfs-ng-devel BuildRequires: alsa-lib-devel @@ -100,10 +112,10 @@ BuildRequires: enca-devel BuildRequires: expat-devel BuildRequires: faad2-devel BuildRequires: firewalld-filesystem -%if 0%{?_with_nvidia_ffmpeg} -BuildRequires: ffmpeg-nvidia-devel -%else +%if 0%{?_with_external_ffmpeg} BuildRequires: ffmpeg-devel +%else +BuildRequires: trousers-devel %endif BuildRequires: flac-devel BuildRequires: flatbuffers-devel @@ -151,6 +163,7 @@ BuildRequires: libcrystalhd-devel %endif BuildRequires: libcurl-devel BuildRequires: libdca-devel +BuildRequires: libdrm-devel BuildRequires: libidn2-devel BuildRequires: libinput-devel %if 0%{?el6} @@ -227,14 +240,6 @@ Requires: %{name}-common = %{version}-%{release} Requires: (%{name}-wayland = %{version}-%{release} if libwayland-server) Requires: (%{name}-x11 = %{version}-%{release} if xorg-x11-server-Xorg) Requires: (%{name}-firewalld = %{version}-%{release} if firewalld) -%if 0%{?_with_nvidia_ffmpeg} -Requires: ffmpeg-nvidia -Requires: ffmpeg-nvidia-libs -%else -Requires: ffmpeg -Requires: ffmpeg-libs -%endif - %description @@ -369,6 +374,9 @@ This package contains the Kodi binary for X11 servers. %patch5 -p1 -b.python3-0002 %endif +%patch6 -p1 -b.assert +%patch7 -p1 -b.brp-mangle-shebangs + # Fix up Python shebangs %if 0%{?fedora} > 31 pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ @@ -400,8 +408,12 @@ do -DLIBDVDCSS_URL=%{SOURCE4} \ %else -DENABLE_DVDCSS=OFF \ +%endif +%if ! 0%{?_with_external_ffmpeg} + -DFFMPEG_URL=%{SOURCE5} \ %endif -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_DEBUGFISSION=OFF \ -GNinja \ -DENABLE_EVENTCLIENTS=ON \ -DENABLE_INTERNAL_CROSSGUID=OFF \ @@ -438,9 +450,6 @@ done # remove the doc files from unversioned /usr/share/doc/xbmc, they should be in versioned docdir rm -r $RPM_BUILD_ROOT/%{_datadir}/doc/ -#rm -f ${RPM_BUILD_ROOT}%{_libdir}/debug/usr/bin/*.debug -#/usr/lib/debug/usr/bin/kodi-wiiremote-18.4-99.1.r.fc31.x86_64.debug - desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ $RPM_BUILD_ROOT%{_datadir}/applications/kodi.desktop @@ -456,6 +465,8 @@ ln -s %{python3_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.modul %else ln -s %{python2_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL %endif +#install -d $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib +#ln -s %{python2_sitearch}/pysqlite2 $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib/pysqlite2 # Use external font files instead of bundled ones ln -sf %{_fontbasedir}/dejavu/DejaVuSans-Bold.ttf ${RPM_BUILD_ROOT}%{_datadir}/kodi/addons/skin.estouchy/fonts/ From 2d4970a6c7d17e4361f5da7879d788c852b75478 Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Sun, 3 May 2020 09:44:22 +0200 Subject: [PATCH 2/2] Fixes for Fedora 32 --- fedora/SPECS/polemarch.spec | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/fedora/SPECS/polemarch.spec b/fedora/SPECS/polemarch.spec index 6e5160f..0dfec67 100644 --- a/fedora/SPECS/polemarch.spec +++ b/fedora/SPECS/polemarch.spec @@ -10,13 +10,14 @@ %global __arch_install_post /usr/lib/rpm/check-buildroot # Macros +%define pyversion 3.8 %define name polemarch %define shortname polemarch %define namebase polemarch %define user polemarch %define datad poledata %define version 1.6.2 -%define release 1 +%define release 2 %define __prelink_undo_cmd %{nil} %define _binaries_in_noarch_packages_terminate_build 0 %define unmangled_version %{version} @@ -34,6 +35,8 @@ Source0: %name-%version.tar.gz Source1: %name-settings Source2: %name-redis-patch.sh Source3: %name-mysql-patch.sh +# compiled binary tree: +Source10: %name-bin-%{version}.tgz Patch0: %name-python3.patch Patch1: %name-venvctrl.patch @@ -56,10 +59,15 @@ Simply WEB gui for orchestration infrastructure by ansible playbooks. %prep %setup -q -n %name-%version #patch0 -b python3-patch +%patch1 -b venvctrl-patch %install -make BUILD_DIR=%{buildroot} -install %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini +#/usr/bin/make BUILD_DIR=%{buildroot} +# Install binary package (compiling does not work here! You need to compile it first!) +# /usr/bin/make BUILD_DIR=/root/rpmbuild/BUILDROOT/polemarch-1.6.2-1.fc32.x86_64 +# don't forget to replace version and release number! +tar xzf %{S:10} -C %{buildroot} +/usr/bin/install %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini # fix for python3 redis access: bash %{S:2} # fix or workaround for mysqlclient version check: @@ -69,8 +77,13 @@ mv %{buildroot}/var/run %{buildroot}/ # create additional directories: install -d %{buildroot}/%{_var}/log/%{name} install -d %{buildroot}/opt/%{datad} -ln -s %{python3_sitearch}/MySQLdb %{buildroot}/opt/polemarch/lib/python3.7/site-packages/MySQLdb -ln -s %{python3_sitelib}/pymysql %{buildroot}/opt/polemarch/lib/python3.7/site-packages/pymysql +ln -s %{python3_sitearch}/MySQLdb %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/MySQLdb +ln -s %{python3_sitelib}/pymysql %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/pymysql +# remove compiled git python package, which are not working on Fedora 32 and pyton3.8 +rm -rf %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/git +ln -s %{python3_sitelib}/git %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/git +rm -rf %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/gitdb +ln -s %{python3_sitelib}/gitdb %{buildroot}/opt/polemarch/lib/python%{pyversion}/site-packages/gitdb # remove buildroot path in opt/polemarch/bin/activate.xsh: sed -i -e 's|/root/rpmbuild/BUILDROOT/polemarch.*x86_64||' %{buildroot}/opt/polemarch/bin/activate.xsh @@ -114,6 +127,9 @@ sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate [ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/* %changelog +* Sun May 3 2020 Daniel Steiner +- Fixes for Fedora 32 installation. Git and gitdb packages are now symlinked. + * Fri Jan 17 2020 Daniel Steiner - Update to 1.6.2 version.