Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Update RPM to 1.4.3 and fix build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
ants committed May 8, 2018
1 parent 051f3c9 commit 06726b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1,460 deletions.
3 changes: 1 addition & 2 deletions RPM/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/sh
mkdir -p /root/rpmbuild/SOURCES
tar -czf /root/rpmbuild/SOURCES/patroni-customizations.tar.gz patroni.2.service patroni-watchdog.service postgres-telia.yml
curl -L https://github.com/zalando/patroni/archive/v1.3.6.tar.gz -o /root/rpmbuild/SOURCES/patroni-1.3.6.tar.gz
cp telia-patch.diff /root/rpmbuild/SOURCES/
curl -L https://github.com/zalando/patroni/archive/v1.4.3.tar.gz -o /root/rpmbuild/SOURCES/patroni-1.4.3.tar.gz
rpmbuild -bb patroni.spec
mkdir -p rpms
cp /root/rpmbuild/RPMS/x86_64/patroni-*.rpm rpms/
13 changes: 6 additions & 7 deletions RPM/patroni.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
%define INSTALLPATH /opt/app/patroni
%define debug_package %{nil}
Name: patroni
Version: 1.3.6
Version: 1.4.3
Release: 1.rhel7
License: MIT
Summary: PostgreSQL high-availability manager
Source: patroni-1.3.6.tar.gz
Source: patroni-1.4.3.tar.gz
Source1: patroni-customizations.tar.gz
Patch0: telia-patch.diff
BuildRoot: %{_tmppath}/%{buildprefix}-buildroot
Requires: /usr/bin/python2.7, python-psycopg2 >= 2.6.1, postgresql-server, libyaml
BuildRequires: prelink libyaml-devel gcc
Expand All @@ -21,7 +20,6 @@ Packaged version of Patroni HA manager.
%prep
%setup
%setup -D -T -a 1
%patch0 -p1

%build
# remove some things
Expand All @@ -31,7 +29,7 @@ Packaged version of Patroni HA manager.
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{INSTALLPATH}
virtualenv --distribute $RPM_BUILD_ROOT%{INSTALLPATH}
grep -v psycopg2 requirements.txt > requirements-venv.txt
grep -v psycopg2 requirements.txt | sed 's/kubernetes=.*/kubernetes/' > requirements-venv.txt
$RPM_BUILD_ROOT%{INSTALLPATH}/bin/pip install -U setuptools
$RPM_BUILD_ROOT%{INSTALLPATH}/bin/pip install -r requirements-venv.txt
$RPM_BUILD_ROOT%{INSTALLPATH}/bin/pip install --no-deps .
Expand All @@ -57,8 +55,6 @@ chmod 0600 $RPM_BUILD_ROOT%{INSTALLPATH}/etc/postgresql.yml.sample
find $RPM_BUILD_ROOT%{INSTALLPATH}/bin/ -type f -perm /u+x,g+x -exec /usr/sbin/prelink -u {} \;
# Remove debug info containing BUILDROOT. Hopefully nobody needs to debug or profile the python modules
find $RPM_BUILD_ROOT%{INSTALLPATH}/lib/ -type f -name '*.so' -exec /usr/bin/strip -g {} \;
# Fix up permissions on prettytable
find $RPM_BUILD_ROOT%{INSTALLPATH}/lib/ -type f -not -perm /o+r | xargs chmod o+r


%post
Expand All @@ -83,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT

%changelog

* Tue May 8 2018 Ants Aasma 1.4.3-1.rhel7
- Update to 1.4.3

* Fri Dec 8 2017 Ants Aasma 1.3.6-1.rhel7
- Update to 1.3.6

Expand Down
Loading

0 comments on commit 06726b8

Please sign in to comment.