Blob Blame History Raw
Summary:	Backup and Recovery Manager for PostgreSQL
Name:		barman
Version:	1.3.3
Release:	6%{?dist}
License:	GPLv3+
Group:		Applications/Databases
Url:		http://www.pgbarman.org/
Source0:	http://downloads.sourceforge.net/project/pgbarman/%{version}/%{name}-%{version}.tar.gz
Source1:	barman.cron
Source2:	barman.logrotate
BuildArch:	noarch
BuildRequires:	python-setuptools, python2-devel
Requires(pre):	shadow-utils	
Requires:	python-psycopg2, python-argh >= 0.21.2, python-argcomplete, python-dateutil

%description
Barman (backup and recovery manager) is an administration
tool for disaster recovery of PostgreSQL servers written in Python.
It allows to perform remote backups of multiple servers
in business critical environments and help DBAs during the recovery phase.
Barman's most wanted features include backup catalogs, retention policies,
remote recovery, archiving and compression of WAL files and backups.
Barman is written and maintained by PostgreSQL professionals 2ndQuadrant.

%prep
%setup -q

%build
python setup.py build

%install
python setup.py install -O1 --skip-build --root %{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/barman
mkdir -p %{buildroot}%{_sysconfdir}/cron.d/
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
mkdir -p %{buildroot}/var/lib/barman
mkdir -p %{buildroot}/var/log/barman
mkdir -p %{buildroot}%{_sysconfdir}/barman/conf.d
install -pm 644 doc/barman.conf %{buildroot}%{_sysconfdir}/barman/barman.conf
install -pm 644 scripts/barman.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/barman
install -pm 644 %SOURCE1 %{buildroot}%{_sysconfdir}/cron.d/barman
install -pm 644 %SOURCE2 %{buildroot}%{_sysconfdir}/logrotate.d/barman
touch %{buildroot}/var/log/barman/barman.log
sed -i 's|/etc/barman.d/|/etc/barman/conf.d|g' %{buildroot}%{_sysconfdir}/barman/barman.conf

%files
%doc NEWS README LICENSE
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info/
%{python_sitelib}/%{name}/
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man5/%{name}.5.gz
%config(noreplace) %{_sysconfdir}/bash_completion.d/barman
%config(noreplace) %{_sysconfdir}/barman/%{name}.conf
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(755,barman,barman) %dir /var/lib/%{name}
%attr(755,barman,barman) %dir /var/log/%{name}
%attr(600,barman,barman) %ghost /var/log/%{name}/%{name}.log

%pre
getent group barman >/dev/null || groupadd -r barman
getent passwd barman >/dev/null || \
    useradd -r -g barman -d /var/lib/barman -s /bin/bash \
    -c "Backup and Recovery Manager for PostgreSQL" barman
exit 0

%changelog
* Tue Feb 17 2015 - Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3.3-6
- Revert dependency on python-dateutil15 (#1183341)

* Mon Feb 02 2015 - Dale Macartney <dbmacartney@fedoraproject.org> - 1.3.3-5
- Replacing python-dateutil with python-dateutil15

* Wed Jan 21 2015 - Dale Macartney <dbmacartney@fedoraproject.org> - 1.3.3-4
- Resolve RPM dependencies with older version of python-dateutil

* Wed Jan 14 2015 - Dale Macartney <dbmacartney@fedoraproject.org> - 1.3.3-3
- Update barman to 1.3.3

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Apr 15 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.3.1-1
- Update barman to 1.3.1

* Tue Feb 4 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.3.0-1
- Update barman to 1.3.0

* Wed Jan 15 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.2.3-9
- Corrected rpmlint warning permissions

* Tue Jan 14 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.2.3-7
- Change license from GPLv3 to GPLv3+

* Mon Jan 13 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.2.3-6
- Clean up of rpmlint errors

* Mon Jan 13 2014 - Dale Macartney <dbmacartney@fedoraproject.org> 1.2.3-5
- Remove non-required variables for older fedora/rhel releases. 

* Wed Oct 16 2013 - Dale Macartney <dbmacartney@gmail.com> 1.2.3-4
- Clean up of package dependencies and removal of unnecessary variables

* Thu Oct 10 2013 - Dale Macartney <dbmacartney@gmail.com> 1.2.3-1
- Initial packaging for Fedora Project