-
Notifications
You must be signed in to change notification settings - Fork 20
/
pglookout.spec
52 lines (39 loc) · 1.66 KB
/
pglookout.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Name: pglookout
Version: %{major_version}
Release: %{minor_version}%{?dist}
Url: https://github.com/aiven/pglookout
Summary: PostgreSQL replication monitoring and failover daemon
License: ASL 2.0
Source0: pglookout-rpm-src.tar
Obsoletes: python3-pglookout
Requires: python3-packaging, python3-psycopg2, python3-requests, python3-setuptools, systemd-python3, systemd
BuildRequires: python3-packaging, python3-psycopg2, python3-requests, python3-setuptools, systemd-python3, systemd
BuildRequires: python3-pytest, python3-pylint
BuildArch: noarch
%description
pglookout is a PostgreSQL replication monitoring and failover daemon.
pglookout monitors PG database nodes and their replication status and acts
according to that status, for example calling a predefined failover command
to promote a new primary in case the previous one goes missing.
%prep
%setup -q -n pglookout
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
sed -e "s@#!/bin/python@#!%{_bindir}/python@" -i %{buildroot}%{_bindir}/*
%{__install} -Dm0644 pglookout.unit %{buildroot}%{_unitdir}/pglookout.service
%check
make test PYTHON=python3
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst pglookout.json
%{_bindir}/pglookout*
%{_unitdir}/pglookout.service
%{python3_sitelib}/*
%changelog
* Wed Mar 25 2015 Oskari Saarenmaa <[email protected]> - 1.1.0-9
* Build just a single package using Python 3 if possible, Python 2 otherwise
* Fri Feb 27 2015 Oskari Saarenmaa <[email protected]> - 1.1.0
- Refactored
- Python 3 support
* Tue Dec 16 2014 Hannu Valtonen <[email protected]> - 1.0.0
- Initial RPM package spec