Blob Blame History Raw
%global srcname borgmatic
%global debug_package %{nil}

Name:           %{srcname}
Version:        1.1.15
Release:        3%{?dist}
Summary:        Simple Python wrapper script for borgbackup

License:        GPLv3
Source2:        borgmatic.service
Source3:        borgmatic.timer

# build
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

BuildRequires:  systemd

# test
%if 0%{?fedora}
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-pykwalify
BuildRequires:  python%{python3_pkgversion}-ruamel-yaml
BuildRequires:  python%{python3_pkgversion}-flexmock

borgmatic (formerly atticmatic) is a simple Python wrapper script for
the Borg backup software that initiates a backup, prunes any old backups
according to a retention policy, and validates backups for consistency.

%setup -n %{srcname}-%{version}
rm -rf %{srcname}.egg-info


find . -name *.so -type f -exec chmod 0755 {} \;


install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_docdir}
install -d %{buildroot}%{_sysconfdir}/borgmatic
install -d %{buildroot}%{_sysconfdir}/borgmatic.d

install -D -m 644 %{SOURCE1} %{buildroot}%{_docdir}
install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}

# epel lacks of required packages for testing
%if 0%{?fedora}
py.test-3 borgmatic/tests/unit


%attr(0750, root, root) %{_sysconfdir}/borgmatic
%attr(0750, root, root) %{_sysconfdir}/borgmatic.d

%systemd_post borgmatic.timer

%systemd_preun borgmatic.timer

%systemd_postun borgmatic.timer

* Thu Mar 07 2019 Troy Dawson <> - 1.1.15-3
- Rebuilt to change main python from 3.4 to 3.6

* Thu Apr 12 2018 Benjamin Pereto <> - 1.1.15-2
- add empty /etc/borgmatic.d as described in documentation
- add empty /etc/borgmatic as described in documentation

* Thu Apr 12 2018 Benjamin Pereto <> - 1.1.15-1
- Initial packaging for the borgmatic project