Fixes for Fedora 32
This commit is contained in:
@@ -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 <daniel.steiner@daniel-steiner.org>
|
||||
- Fixes for Fedora 32 installation. Git and gitdb packages are now symlinked.
|
||||
|
||||
* Fri Jan 17 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
- Update to 1.6.2 version.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user