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 namebase polemarch
%define user polemarch %define user polemarch
%define datad poledata %define datad poledata
%define version 1.8.2 %define version 1.8.5
%define release 1 %define release 1
%define __prelink_undo_cmd %{nil} %define __prelink_undo_cmd %{nil}
%define _binaries_in_noarch_packages_terminate_build 0 %define _binaries_in_noarch_packages_terminate_build 0
@@ -31,14 +31,12 @@ Vendor: VST Consulting <sergey.k@vstconsulting.net>
License: AGPL-3+ License: AGPL-3+
AutoReq: No AutoReq: No
AutoProv: No AutoProv: No
Source0: %name-%version.tar.gz Source0: %name.tgz
Source1: %name-settings Source1: %name-settings
Source2: %name-redis-patch.sh Source2: %name.service
Source3: %name-mysql-patch.sh Source3: %name.tmpfiles.conf
# compiled binary tree: # compiled binary tree:
Source10: %name-bin-%{version}.tgz Source10: %name-bin-%{version}.tar.gz
Patch0: %name-python3.patch
Patch1: %name-venvctrl.patch
# Note: these two packages must not be installed by distribution (fedora): python3-pyyaml, python3-blockdiag-devel # Note: these two packages must not be installed by distribution (fedora): python3-pyyaml, python3-blockdiag-devel
# Build fails, if these two packages are installed! # 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. Simply WEB gui for orchestration infrastructure by ansible playbooks.
%prep %prep
%setup -q -n %name-%version %setup -q -n %name
#patch0 -b python3-patch
%patch1 -b venvctrl-patch
%install %install
#/usr/bin/make BUILD_DIR=%{buildroot} #/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 . # tar czf ~/rpmbuild/SOURCES/polemarch-bin-1.7.3.tgz .
# don't forget to replace version and release number! # don't forget to replace version and release number!
tar xzf %{S:10} -C %{buildroot} tar xzf %{S:10} -C %{buildroot}
/usr/bin/install %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini install -D %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini
# fix for python3 redis access: install -D %{S:1} %{buildroot}%{_sysconfdir}/%{namebase}/settings.ini.template
bash %{S:2}
# fix or workaround for mysqlclient version check:
bash %{S:3}
# fix for fedora rundir config: # 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: # create additional directories:
install -d %{buildroot}/%{_var}/log/%{name} install -d %{buildroot}/%{_var}/log/%{name}
install -d %{buildroot}/opt/%{datad} install -d %{buildroot}/opt/%{datad}
@@ -131,7 +127,7 @@ sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate
%dir %{_sysconfdir}/%{namebase} %dir %{_sysconfdir}/%{namebase}
%{_rundir}/%{namebase} %{_rundir}/%{namebase}
%{_var}/lock/%{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 %attr(755,root,root) %{_sysconfdir}/tmpfiles.d/%{namebase}.conf
%config(noreplace) %{_sysconfdir}/%{namebase}/settings.ini %config(noreplace) %{_sysconfdir}/%{namebase}/settings.ini
%config(noreplace) %{_sysconfdir}/%{namebase}/settings.ini.template %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}/* [ "%{_builddir}" != "/" ] && [ -d "%{_builddir}" ] && rm -rf %{_builddir}/*
%changelog %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. - 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. - 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. - 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. - Update to 1.8.0 version.
* Mon May 18 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org> * Mon May 18 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>