From 045c269623e44833a85758188b2a70e98986bc82 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: May 16 2019 06:52:53 +0000 Subject: upstream release 1.1.10 (which already bundles msgpack by default) Also "test_mount_hardlinks" was renamed to "test_fuse_mount_hardlinks" specifically to simplify our pytest exclusions. --- diff --git a/0003-test-archiver-fix2.patch b/0003-test-archiver-fix2.patch deleted file mode 100644 index 264feba..0000000 --- a/0003-test-archiver-fix2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/borg/testsuite/archiver.py 2018-12-09 03:18:19.000000000 +0100 -+++ b/src/borg/testsuite/archiver.py.b 2019-03-09 09:54:14.432437648 +0100 -@@ -1491,7 +1491,7 @@ - self.cmd('extract', '--dry-run', self.repository_location + '::test') - output = self.cmd('check', '--show-version', self.repository_location) - self.assert_in('borgbackup version', output) # implied output even without --info given -- self.assert_not_in('Starting repository check', output) # --info not given for root logger -+ #self.assert_not_in('Starting repository check', output) # --info not given for root logger - - name = sorted(os.listdir(os.path.join(self.tmpdir, 'repository', 'data', '0')), reverse=True)[1] - with open(os.path.join(self.tmpdir, 'repository', 'data', '0', name), 'r+b') as fd: diff --git a/0010-msgpack-use-relative-imports.patch b/0010-msgpack-use-relative-imports.patch deleted file mode 100644 index 27400b0..0000000 --- a/0010-msgpack-use-relative-imports.patch +++ /dev/null @@ -1,109 +0,0 @@ -commit 43c500bf080eb1d1df0df1d6b6ccd7e801c663dd -Author: Your Name -Date: Thu May 9 21:28:21 2019 +0200 - - use relative imports - - This makes it possible to vendorize msgpack (with a different module name) more easily. - -diff --git a/msgpack/__init__.py b/msgpack/__init__.py -index 3955a41..3a3cf3a 100644 ---- a/msgpack/__init__.py -+++ b/msgpack/__init__.py -@@ -1,6 +1,6 @@ - # coding: utf-8 --from msgpack._version import version --from msgpack.exceptions import * -+from ._version import version -+from .exceptions import * - - from collections import namedtuple - -@@ -19,13 +19,13 @@ class ExtType(namedtuple('ExtType', 'code data')): - - import os - if os.environ.get('MSGPACK_PUREPYTHON'): -- from msgpack.fallback import Packer, unpackb, Unpacker -+ from .fallback import Packer, unpackb, Unpacker - else: - try: -- from msgpack._packer import Packer -- from msgpack._unpacker import unpackb, Unpacker -+ from ._packer import Packer -+ from ._unpacker import unpackb, Unpacker - except ImportError: -- from msgpack.fallback import Packer, unpackb, Unpacker -+ from .fallback import Packer, unpackb, Unpacker - - - def pack(o, stream, **kwargs): -diff --git a/msgpack/_packer.pyx b/msgpack/_packer.pyx -index 225f24a..c490a5b 100644 ---- a/msgpack/_packer.pyx -+++ b/msgpack/_packer.pyx -@@ -5,8 +5,8 @@ from cpython cimport * - from cpython.version cimport PY_MAJOR_VERSION - from cpython.exc cimport PyErr_WarnEx - --from msgpack.exceptions import PackValueError, PackOverflowError --from msgpack import ExtType -+from .exceptions import PackValueError, PackOverflowError -+from . import ExtType - - - cdef extern from "Python.h": -diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx -index d7fa5bc..0abd9c1 100644 ---- a/msgpack/_unpacker.pyx -+++ b/msgpack/_unpacker.pyx -@@ -32,13 +32,13 @@ from libc.string cimport * - from libc.limits cimport * - ctypedef unsigned long long uint64_t - --from msgpack.exceptions import ( -+from .exceptions import ( - BufferFull, - OutOfData, - UnpackValueError, - ExtraData, - ) --from msgpack import ExtType -+from . import ExtType - - - cdef extern from "unpack.h": -diff --git a/msgpack/fallback.py b/msgpack/fallback.py -index c0e5fd6..fd01bf8 100644 ---- a/msgpack/fallback.py -+++ b/msgpack/fallback.py -@@ -49,7 +49,7 @@ else: - newlist_hint = lambda size: [] - - --from msgpack.exceptions import ( -+from .exceptions import ( - BufferFull, - OutOfData, - UnpackValueError, -@@ -57,7 +57,7 @@ from msgpack.exceptions import ( - PackOverflowError, - ExtraData) - --from msgpack import ExtType -+from . import ExtType - - - EX_SKIP = 0 -diff --git a/msgpack/unpack_define.h b/msgpack/unpack_define.h -index 0dd708d..d681277 100644 ---- a/msgpack/unpack_define.h -+++ b/msgpack/unpack_define.h -@@ -18,7 +18,7 @@ - #ifndef MSGPACK_UNPACK_DEFINE_H__ - #define MSGPACK_UNPACK_DEFINE_H__ - --#include "msgpack/sysdep.h" -+#include "sysdep.h" - #include - #include - #include diff --git a/0011-also-build-msgpack.patch b/0011-also-build-msgpack.patch deleted file mode 100644 index d5b6ff3..0000000 --- a/0011-also-build-msgpack.patch +++ /dev/null @@ -1,87 +0,0 @@ -commit 17cdeebe701c46acb3125a8f46c105ef917d6af7 -Author: Your Name -Date: Thu May 9 21:23:29 2019 +0200 - - use msgpack - -diff --git a/setup.py b/setup.py -index edbccae..93c0c2e 100644 ---- a/setup.py -+++ b/setup.py -@@ -39,7 +39,7 @@ install_requires = [ - # we are rather picky about msgpack versions, because a good working msgpack is - # very important for borg, see https://github.com/borgbackup/borg/issues/3753 - # best versions seem to be 0.4.6, 0.4.7, 0.4.8 and 0.5.6: -- 'msgpack-python >=0.4.6, <=0.5.6, !=0.5.0, !=0.5.1, !=0.5.2, !=0.5.3, !=0.5.4, !=0.5.5', -+ #'msgpack-python >=0.4.6, <=0.5.6, !=0.5.0, !=0.5.1, !=0.5.2, !=0.5.3, !=0.5.4, !=0.5.5', - # if you can't satisfy the above requirement, these are versions that might - # also work ok, IF you make sure to use the COMPILED version of msgpack-python, - # NOT the PURE PYTHON fallback implementation: ==0.5.1, ==0.5.4 -@@ -88,6 +88,8 @@ platform_posix_source = 'src/borg/platform/posix.pyx' - platform_linux_source = 'src/borg/platform/linux.pyx' - platform_darwin_source = 'src/borg/platform/darwin.pyx' - platform_freebsd_source = 'src/borg/platform/freebsd.pyx' -+msgpack_packer_source = 'src/borg/_msgpack/_packer.pyx' -+msgpack_unpacker_source = 'src/borg/_msgpack/_unpacker.pyx' - - cython_sources = [ - compress_source, -@@ -129,6 +131,8 @@ try: - 'src/borg/platform/linux.c', - 'src/borg/platform/freebsd.c', - 'src/borg/platform/darwin.c', -+ 'src/borg/_msgpack/_packer.cpp', -+ 'src/borg/_msgpack/_unpacker.cpp', - ]) - super().make_distribution() - -@@ -147,10 +151,15 @@ except ImportError: - platform_linux_source = platform_linux_source.replace('.pyx', '.c') - platform_freebsd_source = platform_freebsd_source.replace('.pyx', '.c') - platform_darwin_source = platform_darwin_source.replace('.pyx', '.c') -+ -+ msgpack_packer_source = msgpack_packer_source.replace('.pyx', '.cpp') -+ msgpack_unpacker_source = msgpack_unpacker_source.replace('.pyx', '.cpp') -+ - from distutils.command.build_ext import build_ext - if not on_rtd and not all(os.path.exists(path) for path in [ - compress_source, crypto_ll_source, chunker_source, hashindex_source, item_source, checksums_source, -- platform_posix_source, platform_linux_source, platform_freebsd_source, platform_darwin_source]): -+ platform_posix_source, platform_linux_source, platform_freebsd_source, platform_darwin_source, -+ msgpack_packer_source, msgpack_unpacker_source]): - raise ImportError('The GIT version of Borg needs Cython. Install Cython or use a released version.') - - -@@ -788,7 +797,32 @@ if not on_rtd: - crypto_ext_kwargs = setup_b2.b2_ext_kwargs(bundled_path='src/borg/algorithms/blake2', - system_prefix=libb2_prefix, system=libb2_system, - **crypto_ext_kwargs) -+ -+ def cythonize_cpp(src): -+ sys.stderr.write("cythonize: %r\n" % (src,)) -+ cython_compiler.compile([src], cplus=True) -+ return src.replace('.pyx', '.cpp') -+ -+ msgpack_packer_cpp_source = cythonize_cpp(msgpack_packer_source) -+ _msgpack_endian = '__BIG_ENDIAN__' if (sys.byteorder == 'big') else '__LITTLE_ENDIAN__' -+ _msgpack_macros = [(_msgpack_endian, '1')] -+ _msgpack_packer_ext_kwargs = dict( -+ sources=[msgpack_packer_cpp_source], -+ include_dirs=include_dirs, -+ library_dirs=library_dirs, -+ define_macros=_msgpack_macros, -+ ) -+ msgpack_unpacker_cpp_source = cythonize_cpp(msgpack_unpacker_source) -+ _msgpack_unpacker_ext_kwargs = dict( -+ sources=[msgpack_unpacker_cpp_source], -+ include_dirs=include_dirs, -+ library_dirs=library_dirs, -+ define_macros=_msgpack_macros, -+ ) -+ - ext_modules += [ -+ Extension('borg._msgpack._packer', **_msgpack_packer_ext_kwargs), -+ Extension('borg._msgpack._unpacker', **_msgpack_unpacker_ext_kwargs), - Extension('borg.compress', **compress_ext_kwargs), - Extension('borg.crypto.low_level', **crypto_ext_kwargs), - Extension('borg.hashindex', [hashindex_source]), diff --git a/0012-use-bundled-msgpack.patch b/0012-use-bundled-msgpack.patch deleted file mode 100644 index 8cb5055..0000000 --- a/0012-use-bundled-msgpack.patch +++ /dev/null @@ -1,210 +0,0 @@ -commit 4d7f1b33ac971bf5f798de69b60292b0125f3f68 -Author: Felix Schwarz -Date: Sat May 4 21:25:56 2019 +0200 - - use bundled msgpack - -diff --git a/src/borg/archive.py b/src/borg/archive.py -index 2ff77030..db0c142d 100644 ---- a/src/borg/archive.py -+++ b/src/borg/archive.py -@@ -13,7 +13,7 @@ - from itertools import groupby - from shutil import get_terminal_size - --import msgpack -+import borg._msgpack as msgpack - - from .logger import create_logger - -diff --git a/src/borg/archiver.py b/src/borg/archiver.py -index 41e34a83..ce3ec10b 100644 ---- a/src/borg/archiver.py -+++ b/src/borg/archiver.py -@@ -29,7 +29,7 @@ - - logger = create_logger() - --import msgpack -+import borg._msgpack as msgpack - - import borg - from . import __version__ -diff --git a/src/borg/cache.py b/src/borg/cache.py -index 1ae2c4f6..e5e2b3b7 100644 ---- a/src/borg/cache.py -+++ b/src/borg/cache.py -@@ -6,7 +6,7 @@ - from collections import namedtuple - from time import perf_counter - --import msgpack -+import borg._msgpack as msgpack - - from .logger import create_logger - -diff --git a/src/borg/crypto/key.py b/src/borg/crypto/key.py -index e83a0a66..43e612a6 100644 ---- a/src/borg/crypto/key.py -+++ b/src/borg/crypto/key.py -@@ -9,7 +9,7 @@ - from hashlib import sha256, sha512, pbkdf2_hmac - from hmac import HMAC, compare_digest - --import msgpack -+import borg._msgpack as msgpack - - from borg.logger import create_logger - -diff --git a/src/borg/fuse.py b/src/borg/fuse.py -index a6999514..4bc2740c 100644 ---- a/src/borg/fuse.py -+++ b/src/borg/fuse.py -@@ -11,7 +11,7 @@ - from distutils.version import LooseVersion - - import llfuse --import msgpack -+import borg._msgpack as msgpack - - from .logger import create_logger - logger = create_logger() -diff --git a/src/borg/helpers.py b/src/borg/helpers.py -index ed6b3afe..ae60c577 100644 ---- a/src/borg/helpers.py -+++ b/src/borg/helpers.py -@@ -31,8 +31,8 @@ - from string import Formatter - from shutil import get_terminal_size - --import msgpack --import msgpack.fallback -+import borg._msgpack as msgpack -+from borg._msgpack import fallback as msgpack_fallback - - from .logger import create_logger - logger = create_logger() -@@ -1287,7 +1287,7 @@ def int_to_bigint(value): - - - def is_slow_msgpack(): -- return msgpack.Packer is msgpack.fallback.Packer -+ return msgpack.Packer is msgpack_fallback.Packer - - - def is_supported_msgpack(): -diff --git a/src/borg/remote.py b/src/borg/remote.py -index 4a3bba7a..e8250e6d 100644 ---- a/src/borg/remote.py -+++ b/src/borg/remote.py -@@ -16,7 +16,7 @@ - import traceback - from subprocess import Popen, PIPE - --import msgpack -+import borg._msgpack as msgpack - - from . import __version__ - from .compress import LZ4 -diff --git a/src/borg/repository.py b/src/borg/repository.py -index afa6a3f9..4c8369ec 100644 ---- a/src/borg/repository.py -+++ b/src/borg/repository.py -@@ -10,7 +10,7 @@ - from functools import partial - from itertools import islice - --import msgpack -+import borg._msgpack as msgpack - - from .constants import * # NOQA - from .hashindex import NSIndex -diff --git a/src/borg/testsuite/archive.py b/src/borg/testsuite/archive.py -index bc113352..00bb6b22 100644 ---- a/src/borg/testsuite/archive.py -+++ b/src/borg/testsuite/archive.py -@@ -3,7 +3,7 @@ - from io import StringIO - from unittest.mock import Mock - --import msgpack -+import borg._msgpack as msgpack - import pytest - - from . import BaseTestCase -diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py -index 179b41f8..3a7da857 100644 ---- a/src/borg/testsuite/archiver.py -+++ b/src/borg/testsuite/archiver.py -@@ -22,7 +22,7 @@ - from io import BytesIO, StringIO - from unittest.mock import patch - --import msgpack -+import borg._msgpack as msgpack - import pytest - - try: -diff --git a/src/borg/testsuite/cache.py b/src/borg/testsuite/cache.py -index 31ebf55a..87c1a696 100644 ---- a/src/borg/testsuite/cache.py -+++ b/src/borg/testsuite/cache.py -@@ -1,7 +1,7 @@ - import io - import os.path - --from msgpack import packb -+from borg._msgpack import packb - - import pytest - -diff --git a/src/borg/testsuite/helpers.py b/src/borg/testsuite/helpers.py -index 61efb9c7..21b2d021 100644 ---- a/src/borg/testsuite/helpers.py -+++ b/src/borg/testsuite/helpers.py -@@ -9,8 +9,8 @@ - - import pytest - --import msgpack --import msgpack.fallback -+import borg._msgpack as msgpack -+import borg._msgpack.fallback as msgpack_fallback - - from .. import platform - from ..helpers import Location -@@ -576,7 +576,7 @@ def test_parse_file_size_invalid(string): - def test_is_slow_msgpack(): - saved_packer = msgpack.Packer - try: -- msgpack.Packer = msgpack.fallback.Packer -+ msgpack.Packer = msgpack_fallback.Packer - assert is_slow_msgpack() - finally: - msgpack.Packer = saved_packer -diff --git a/src/borg/testsuite/key.py b/src/borg/testsuite/key.py -index 5ba6fb52..3881bda3 100644 ---- a/src/borg/testsuite/key.py -+++ b/src/borg/testsuite/key.py -@@ -4,7 +4,7 @@ - import tempfile - from binascii import hexlify, unhexlify - --import msgpack -+import borg._msgpack as msgpack - import pytest - - from ..crypto.key import Passphrase, PasswordRetriesExceeded, bin_to_hex -diff --git a/src/borg/testsuite/repository.py b/src/borg/testsuite/repository.py -index c6b53df6..ba438f8e 100644 ---- a/src/borg/testsuite/repository.py -+++ b/src/borg/testsuite/repository.py -@@ -6,7 +6,7 @@ - import tempfile - from unittest.mock import patch - --import msgpack -+import borg._msgpack as msgpack - - import pytest - diff --git a/borgbackup.spec b/borgbackup.spec index 325be92..af36c89 100644 --- a/borgbackup.spec +++ b/borgbackup.spec @@ -1,21 +1,16 @@ %global srcname borgbackup Name: %{srcname} -Version: 1.1.9 -Release: 3%{?dist} +Version: 1.1.10 +Release: 1%{?dist} Summary: A deduplicating backup program with compression and authenticated encryption License: BSD and ASL 2.0 URL: https://borgbackup.readthedocs.org Source0: %pypi_source -Source1: https://files.pythonhosted.org/packages/source/m/msgpack/msgpack-0.5.6.tar.gz +# we don't need the guzzley_sphinx theme for only man page generation Patch1: 0002-disable-sphinx-man-page-build.patch -Patch2: 0003-test-archiver-fix2.patch - -Patch10: 0010-msgpack-use-relative-imports.patch -Patch11: 0011-also-build-msgpack.patch -Patch12: 0012-use-bundled-msgpack.patch # build BuildRequires: python%{python3_pkgversion}-devel @@ -53,25 +48,13 @@ BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it supports compression and authenticated encryption. %prep -%setup -n %{srcname}-%{version} +%autosetup -p1 rm -rf %{srcname}.egg-info -%patch11 -p1 -%patch12 -p1 - -# we don't need the guzzley_sphinx theme for only man page generation -%patch1 -p1 -%patch2 -p1 # https://bugzilla.redhat.com/show_bug.cgi?id=1630992 sed -i 's/msgpack-python/msgpack/' setup.py - -cd .. -tar xzf %{SOURCE1} -cd msgpack-0.5.6/ -%patch10 -p1 -cp -a msgpack ../%{srcname}-%{version}/src/borg/_msgpack -cp -a COPYING ../%{srcname}-%{version}/COPYING.msgpack -cd ../%{srcname}-%{version} +# better name for inclusion in %%license +cp -a docs/3rd_party/msgpack/COPYING COPYING.msgpack %build %py3_build @@ -117,8 +100,7 @@ export LANG=en_US.UTF-8 # exclude test_non_ascii_acl: problem with mock # 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 -py.test-3 -x -vk "not test_non_ascii_acl and not test_fuse and not benchmark and not test_dash_open and not test_mount_hardlinks" $PYTHONPATH/borg/testsuite/*.py +py.test-3 -x -vk "not test_non_ascii_acl and not test_fuse and not benchmark and not test_dash_open" $PYTHONPATH/borg/testsuite/*.py %files %license LICENSE @@ -136,6 +118,9 @@ py.test-3 -x -vk "not test_non_ascii_acl and not test_fuse and not benchmark and %changelog +* Thu May 16 2019 Felix Schwarz - 1.1.10-1 +- Upstream Release 1.1.10 + * Thu May 09 2019 Felix Schwarz - 1.1.9-3 - bundle msgpack 0.5.6 (rhbz 1669083) diff --git a/sources b/sources index 1e19666..1216e34 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (borgbackup-1.1.9.tar.gz) = 466288258700fb0b3dae936c79fd423d26bea2d721dd70112b3cfd0f8e2bb335144a00de76743c31d336f6c19793775260d154326ec70d6d6d0a4e5ad6a59e59 -SHA512 (msgpack-0.5.6.tar.gz) = bdbd193bd3bd02e78d9c6e8d9d8fa687d13583dff2813bc77c5e6cbbe0d180765da3c9a80d176f9993589e35f548ad04973e3d523d0b6d41ef7916ecd86195aa +SHA512 (borgbackup-1.1.10.tar.gz) = 9315335208f10427e3105e10819817d15fd05171479252903bd51eaacb016bc3ff792d505b9203ce0b9b41ec350472bdb9a23b0128e7fe156aaa47c1608451c0