From 2d4970a6c7d17e4361f5da7879d788c852b75478 Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Sun, 3 May 2020 09:44:22 +0200 Subject: [PATCH] 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.