Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 148848360b8520b89ad768c6b82e20ba > files > 5

borgbackup-1.2.0-0.a9.1.mga7.src.rpm

%define pypi_name borgbackup
%define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so

# comment out if not pre rel
%define prel    a9

# rel for bumping
%define rel     1

Name:           borgbackup
Version:        1.2.0
Release:        %mkrel %{?prel:0.%prel.}%{rel}
Group:          Archiving/Backup
Summary:        Deduplicated backups

License:        BSD
URL:            https://borgbackup.github.io/
%if 0%{?prel:1}
Source0:        https://github.com/borgbackup/borg/releases/download/%{version}%{?prel:%prel}/%{pypi_name}-%{version}%{?prel:%prel}.tar.gz
%else
Source0:        https://pypi.io/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
%endif
Patch0:         0001-Remove-codecov.io-and-travis-ci.org-badges.patch
Patch1:         0002-README.rst-Replace-img-src-with-text-link.patch
Patch2:         0003-disable-sphinx-man-page-build.patch
BuildRequires:  libacl-devel
BuildRequires:  libzstd-devel
BuildRequires:  xxhash-devel
BuildRequires:  pkgconfig(liblz4)
BuildRequires:  pkgconfig(openssl) >= 1.1
BuildRequires:  pkgconfig(python3)
BuildRequires:  python3dist(cython)
BuildRequires:  python3dist(llfuse)
BuildRequires:  python3dist(msgpack)
BuildRequires:  python3dist(pkgconfig)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(sphinx)
BuildRequires:  python3dist(sphinx-rtd-theme)

Requires:       python3dist(setuptools)
Recommends:     python3dist(llfuse)


%description
BorgBackup (short: Borg) is a deduplicating backup program.
Optionally, it supports compression and authenticated encryption.

The main goal of Borg is to provide an efficient and secure way to backup data.
The data deduplication technique used makes Borg suitable for daily backups
since only changes are stored. The authenticated encryption technique makes
it suitable for backups to not fully trusted targets.


%prep
%setup -q -n %{pypi_name}-%{version}%{?prel:%prel}
%autopatch -p1

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# remove .c files so cython rebuild them
for i in $(find . -type f -name "*.pyx"); do
  rm -rf ${i%.pyx}.c
done

%build
BORG_OPENSSL_PREFIX=%{_libdir} \
BORG_LIBLZ4_PREFIX=%{_libdir} \
BORG_LIBXXHASH_PREFIX=%{_libdir} \
BORG_LIBZSTD_PREFIX=%{_libdir} \
%py3_build

# MANPAGE GENERATION
# workaround to dump sphinx_rtd_theme dependency - not needed for manpages
export READTHEDOCS=True

# workaround to include borg module for usage generation
export PYTHONPATH=$(pwd)/build/$(ls build/ | grep 'lib.')

make -C docs SPHINXBUILD=sphinx-build-3 man


%install
%py3_install

install -D -m 0644 docs/_build/man/borg*.1* %{buildroot}%{_mandir}/man1/borg.1

# add shell completions
%define bash_compdir %{_prefix}/share/bash-completion/completions
%define zsh_compdir %{_prefix}/share/zsh/site-functions

install -d  %{buildroot}%{bash_compdir}
install -d  %{buildroot}%{zsh_compdir}

install -D -m 0644 scripts/shell_completions/bash/* %{buildroot}%{bash_compdir}
install -D -m 0644 scripts/shell_completions/zsh/* %{buildroot}%{zsh_compdir}


%check
export PYTHONPATH=$(pwd)/build/$(ls build/ | grep 'lib.')

# exclude test_fuse: there is no modprobe in mock for fuse
# exclude test_non_ascii_acl: collate issue in BS
# exclude benchmark: not relevant for package build
# exclude test_dash_open: pytest stub has a bug and is fixed in 3.0.2 (epel7 uses 2.8.5)
# exclude test_mount_hardlinks: there is no modprobe in mock for fuse
# exclude test_create_stdin and test_swidth_mixed and test_swidth_cjk: collate issue in BS
# exclude test_migrate_lock_alive: there is no modprobe in bs for fuse
py.test-3 -vk "not test_create_stdin and not test_swidth_mixed and not test_swidth_cjk and not test_non_ascii_acl and not test_fuse and not benchmark and not test_dash_open and not test_mount_hardlinks and not test_readonly_mount and not test_migrate_lock_alive" $PYTHONPATH/borg/testsuite/*.py


%files
%license LICENSE
%doc README.rst PKG-INFO AUTHORS
%doc docs/changes.rst
%{_mandir}/man1/*
%{python3_sitearch}/borg
%{python3_sitearch}/%{pypi_name}-%{version}%{?prel:%prel}-py?.?.egg-info
%{_bindir}/borg
%{_bindir}/borgfs
%{_prefix}/share/bash-completion/completions/*
%{_prefix}/share/zsh/site-functions/*



%changelog
* Sat Nov 21 2020 philippem <philippem> 1.2.0-0.a9.1.mga7
+ Revision: 1648167
- exclude test_migrate_lock_alive: there is no modprobe in bs for fuse
- update to 1.2.0.a9 mga#25570
- update to 1.2.0.a9 mga#25570
- add requires python3dist(setuptools) mga#25570

* Thu Mar 21 2019 daviddavid <daviddavid> 1.2.0-0.a4.1.mga7
+ Revision: 1379480
- new version: 1.2.0a4 (added support for msgpack <= 0.6.1) (mga#24529)

* Tue Jan 08 2019 kekepower <kekepower> 1.1.8-2.mga7
+ Revision: 1352914
- Rebuild for Python 3.7

* Mon Dec 10 2018 daviddavid <daviddavid> 1.1.8-1.mga7
+ Revision: 1339979
- new version: 1.1.8

* Fri Sep 21 2018 umeabot <umeabot> 1.1.7-2.mga7
+ Revision: 1295626
- Mageia 7 Mass Rebuild

* Wed Aug 15 2018 daviddavid <daviddavid> 1.1.7-1.mga7
+ Revision: 1251732
- new version: 1.1.7

* Thu Jun 14 2018 daviddavid <daviddavid> 1.1.6-1.mga7
+ Revision: 1236853
- new version: 1.1.6
- rename and rediff mga-switch-to-msgpack patch

* Thu Mar 22 2018 philippem <philippem> 1.1.4-1.mga7
+ Revision: 1211255
- add missing BR on pytest
- build man instead of html, enable tests
- update to 1.1.4

* Sat Feb 10 2018 daviddavid <daviddavid> 1.0.11-3.mga7
+ Revision: 1199987
- switch to msgpack

* Wed Oct 04 2017 pterjan <pterjan> 1.0.11-2.mga7
+ Revision: 1168910
- Add missing BuildRequires

* Sat Aug 05 2017 philippem <philippem> 1.0.11-1.mga7
+ Revision: 1135617
- update to 1.0.11
+ pterjan <pterjan>
- Rebuild for python 3.6

* Wed Aug 31 2016 philippem <philippem> 1.0.7-1.mga6
+ Revision: 1049572
- update to 1.0.7 security fix

* Fri Jul 08 2016 philippem <philippem> 1.0.5-1.mga6
+ Revision: 1039775
- update to 1.0.5

* Mon May 23 2016 philippem <philippem> 1.0.3-1.mga6
+ Revision: 1018045
- update to 1.0.3

* Sun Apr 17 2016 philippem <philippem> 1.0.2-1.mga6
+ Revision: 1003179
- update to 1.0.2

* Sun Apr 10 2016 philippem <philippem> 1.0.1-1.mga6
+ Revision: 1000022
- update to 1.0.1

* Mon Mar 07 2016 philippem <philippem> 1.0.0-1.mga6
+ Revision: 987056
- update to 1.0.0

* Sat Feb 13 2016 philippem <philippem> 0.30.1-1.mga6
+ Revision: 959754
- update to 0.30.1

* Sat Dec 19 2015 philippem <philippem> 0.29.0-1.mga6
+ Revision: 912216
- imported package borgbackup