Update to 1.8.5. Build polemarch via virtualenv and pip

This commit is contained in:
2022-01-02 11:55:43 +01:00
parent f4952395ce
commit a42bab335a

View File

@@ -16,7 +16,7 @@
%define namebase polemarch
%define user polemarch
%define datad poledata
%define version 1.8.2
%define version 1.8.5
%define release 1
%define __prelink_undo_cmd %{nil}
%define _binaries_in_noarch_packages_terminate_build 0
@@ -31,14 +31,12 @@ Vendor: VST Consulting <sergey.k@vstconsulting.net>
License: AGPL-3+
AutoReq: No
AutoProv: No
Source0: %name-%version.tar.gz
Source0: %name.tgz
Source1: %name-settings
Source2: %name-redis-patch.sh
Source3: %name-mysql-patch.sh
Source2: %name.service
Source3: %name.tmpfiles.conf
# compiled binary tree:
Source10: %name-bin-%{version}.tgz
Patch0: %name-python3.patch
Patch1: %name-venvctrl.patch
Source10: %name-bin-%{version}.tar.gz
# Note: these two packages must not be installed by distribution (fedora): python3-pyyaml, python3-blockdiag-devel
# Build fails, if these two packages are installed!
@@ -65,9 +63,7 @@ Polemarch is service for orchestration infrastructure by ansible.
Simply WEB gui for orchestration infrastructure by ansible playbooks.
%prep
%setup -q -n %name-%version
#patch0 -b python3-patch
%patch1 -b venvctrl-patch
%setup -q -n %name
%install
#/usr/bin/make BUILD_DIR=%{buildroot}
@@ -79,13 +75,13 @@ Simply WEB gui for orchestration infrastructure by ansible playbooks.
# tar czf ~/rpmbuild/SOURCES/polemarch-bin-1.7.3.tgz .
# 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:
bash %{S:3}
install -D %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini
install -D %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini.template
# fix for fedora rundir config:
mv %{buildroot}/var/run %{buildroot}/
install -d %{buildroot}/run/%name
install -D %{S:2} %{buildroot}%{_systemd_util_dir}/system/%{name}.service
install -d %{buildroot}%{_var}/lock/%{name}
install -D %{S:3} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
# create additional directories:
install -d %{buildroot}/%{_var}/log/%{name}
install -d %{buildroot}/opt/%{datad}
@@ -131,7 +127,7 @@ sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate
%dir %{_sysconfdir}/%{namebase}
%{_rundir}/%{namebase}
%{_var}/lock/%{namebase}
%attr(755,%{user},%{user}) %{_sysconfdir}/systemd/system/%{shortname}.service
%attr(755,%{user},%{user}) %{_systemd_util_dir}/system/%{name}.service
%attr(755,root,root) %{_sysconfdir}/tmpfiles.d/%{namebase}.conf
%config(noreplace) %{_sysconfdir}/%{namebase}/settings.ini
%config(noreplace) %{_sysconfdir}/%{namebase}/settings.ini.template
@@ -141,16 +137,19 @@ sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate
[ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
%changelog
* Fri May 21 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
* Sun Jan 2 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 1.8.5 version.
* Fri May 21 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- First build on Fedora 34.
* Fri Apr 9 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
* Fri Apr 9 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 1.8.2 version.
* Sat Oct 31 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
* Sat Oct 31 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 1.8.1 version, first build on Fedora 33 and python 3.9.
* Fri Aug 14 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
* Fri Aug 14 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 1.8.0 version.
* Mon May 18 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>