From 38b1860f09c6724a3582ba2fabdcb7d0096ce03e Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Jun 06 2022 07:40:07 +0000 Subject: borgbackup 1.2.x does not support bundling msgpack anymore so we can clean up the spec file --- diff --git a/borgbackup.spec b/borgbackup.spec index 4fe0517..a12171b 100644 --- a/borgbackup.spec +++ b/borgbackup.spec @@ -1,23 +1,10 @@ %global srcname borgbackup -# F36+ has borgbackup 1.2 which is compatible with msgpack 1.x so no need to -# bundle -%if 0%{?fedora} < 36 || 0%{?rhel} == 8 - %global bundle_msgpack 1 -%else - %global bundle_msgpack 0 -%endif - Name: %{srcname} Version: 1.2.1 Release: 1%{?dist} Summary: A deduplicating backup program with compression and authenticated encryption - -%if %bundle_msgpack -License: BSD and ASL 2.0 and zlib -%else License: BSD and zlib -%endif URL: https://borgbackup.readthedocs.org Source0: %pypi_source @@ -36,15 +23,9 @@ BuildRequires: python3-Cython BuildRequires: python3-devel BuildRequires: python3-pkgconfig -%if %bundle_msgpack -Provides: bundled(python%{python3_pkgversion}-msgpack) = 0.5.6 -# requirements for bundled msgpack -BuildRequires: gcc-c++ -%else # upstream requires: msgpack >=0.5.6, <=1.0.4, !=1.0.1 BuildRequires: python3-msgpack >= 0.5.6 BuildRequires: python3-msgpack <= 1.0.4 -%endif # test BuildRequires: python3-dateutil @@ -83,27 +64,14 @@ rm -rf src/borg/algorithms/{lz4,xxh64,zstd} # remove precompiled Cython code to ensure we always built "from source" find src/ -name '*.pyx' | sed -e 's/.pyx/.c/g' | xargs rm -f -%if %bundle_msgpack - # bundled msgpack uses C++ for its generated sources - find src/ -name '*.pyx' | sed -e 's/.pyx/.cpp/g' | xargs rm -f - - # better name for inclusion in %%license - cp -a docs/3rd_party/msgpack/COPYING COPYING.msgpack -%else - rm -rf src/borg/algorithms/msgpack - - # https://bugzilla.redhat.com/show_bug.cgi?id=1630992 - sed -i 's/msgpack-python/msgpack/' setup.py -%endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1630992 +sed -i 's/msgpack-python/msgpack/' setup.py %generate_buildrequires %pyproject_buildrequires -x fuse %build -%if ! %bundle_msgpack - export BORG_EXTERNAL_MSGPACK=True -%endif %pyproject_wheel # MANPAGE GENERATION @@ -147,9 +115,6 @@ py.test-3 -x -vk "$TEST_SELECTOR" $PYTHONPATH/borg/testsuite/*.py %files %license LICENSE -%if %bundle_msgpack - %license COPYING.msgpack -%endif %doc README.rst AUTHORS %doc docs/changes.rst %{_mandir}/man1/*