summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-03-11 10:36:18 -0400
committerAnthony G. Basile <blueness@gentoo.org>2020-03-11 10:36:31 -0400
commitaf4666896507e86048fd049fe699a4b99c658cbd (patch)
treeb8fc3937a4d34eae9ff561a50296673437a3f7c3 /app-backup
parentdev-python/chameleon: Bump to 3.6.2, py3.{7,8} (diff)
downloadgentoo-af4666896507e86048fd049fe699a4b99c658cbd.tar.gz
gentoo-af4666896507e86048fd049fe699a4b99c658cbd.tar.bz2
gentoo-af4666896507e86048fd049fe699a4b99c658cbd.zip
app-backup/borgbackup: use system msgpack
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/borgbackup/borgbackup-1.1.11-r1.ebuild (renamed from app-backup/borgbackup/borgbackup-1.1.11.ebuild)4
-rw-r--r--app-backup/borgbackup/files/borgbackup-1.1.11-unbundle-msgpack.patch110
2 files changed, 112 insertions, 2 deletions
diff --git a/app-backup/borgbackup/borgbackup-1.1.11.ebuild b/app-backup/borgbackup/borgbackup-1.1.11-r1.ebuild
index 644e3a093322..822bb8bafab7 100644
--- a/app-backup/borgbackup/borgbackup-1.1.11.ebuild
+++ b/app-backup/borgbackup/borgbackup-1.1.11-r1.ebuild
@@ -41,8 +41,8 @@ DEPEND="
"
python_prepare_all() {
- # allow use of new (renamed) msgpack
- sed -i "s|'msgpack-python.*',||g" setup.py || die
+ rm -rf src/borg/algorithms/msgpack
+ eapply "${FILESDIR}"/${P}-unbundle-msgpack.patch
distutils-r1_python_prepare_all
}
diff --git a/app-backup/borgbackup/files/borgbackup-1.1.11-unbundle-msgpack.patch b/app-backup/borgbackup/files/borgbackup-1.1.11-unbundle-msgpack.patch
new file mode 100644
index 000000000000..85b612af2370
--- /dev/null
+++ b/app-backup/borgbackup/files/borgbackup-1.1.11-unbundle-msgpack.patch
@@ -0,0 +1,110 @@
+diff -Naur borgbackup-1.1.11.orig/setup.cfg borgbackup-1.1.11/setup.cfg
+--- borgbackup-1.1.11.orig/setup.cfg 2020-03-07 18:44:15.000000000 -0500
++++ borgbackup-1.1.11/setup.cfg 2020-03-11 10:28:25.168481822 -0400
+@@ -6,7 +6,7 @@
+ F401,F405,F811,
+ W504
+ max-line-length = 255
+-exclude = build,dist,.git,.idea,.cache,.tox,docs/conf.py,src/borg/algorithms/msgpack
++exclude = build,dist,.git,.idea,.cache,.tox,docs/conf.py
+
+ [egg_info]
+ tag_build =
+diff -Naur borgbackup-1.1.11.orig/setup.py borgbackup-1.1.11/setup.py
+--- borgbackup-1.1.11.orig/setup.py 2020-03-07 18:32:06.000000000 -0500
++++ borgbackup-1.1.11/setup.py 2020-03-11 10:28:15.568759338 -0400
+@@ -25,8 +25,6 @@
+ # True: use the shared libb2 from the system, False: use the bundled blake2 code
+ prefer_system_libb2 = True
+
+-# prefer_system_msgpack is another option, but you need to set it in src/borg/helpers.py.
+-
+ min_python = (3, 4)
+ my_python = sys.version_info
+
+@@ -79,8 +77,6 @@
+ platform_syncfilerange_source = 'src/borg/platform/syncfilerange.pyx'
+ platform_darwin_source = 'src/borg/platform/darwin.pyx'
+ platform_freebsd_source = 'src/borg/platform/freebsd.pyx'
+-msgpack_packer_source = 'src/borg/algorithms/msgpack/_packer.pyx'
+-msgpack_unpacker_source = 'src/borg/algorithms/msgpack/_unpacker.pyx'
+
+ cython_c_sources = [
+ # these .pyx will get compiled to .c
+@@ -98,12 +94,6 @@
+ platform_darwin_source,
+ ]
+
+-cython_cpp_sources = [
+- # these .pyx will get compiled to .cpp
+- msgpack_packer_source,
+- msgpack_unpacker_source,
+-]
+-
+ try:
+ from Cython.Distutils import build_ext
+ import Cython.Compiler.Main as cython_compiler
+@@ -133,8 +123,6 @@
+ 'src/borg/platform/syncfilerange.c',
+ 'src/borg/platform/freebsd.c',
+ 'src/borg/platform/darwin.c',
+- 'src/borg/algorithms/msgpack/_packer.cpp',
+- 'src/borg/algorithms/msgpack/_unpacker.cpp',
+ ])
+ super().make_distribution()
+
+@@ -155,14 +143,12 @@
+ 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_syncfilerange_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.')
+
+
+@@ -805,26 +791,7 @@
+ system_prefix=libb2_prefix, system=libb2_system,
+ **crypto_ext_kwargs)
+
+- msgpack_endian = '__BIG_ENDIAN__' if (sys.byteorder == 'big') else '__LITTLE_ENDIAN__'
+- msgpack_macros = [(msgpack_endian, '1')]
+- msgpack_packer_ext_kwargs = dict(
+- sources=[msgpack_packer_source],
+- include_dirs=include_dirs,
+- library_dirs=library_dirs,
+- define_macros=msgpack_macros,
+- language='c++',
+- )
+- msgpack_unpacker_ext_kwargs = dict(
+- sources=[msgpack_unpacker_source],
+- include_dirs=include_dirs,
+- library_dirs=library_dirs,
+- define_macros=msgpack_macros,
+- language='c++',
+- )
+-
+ ext_modules += [
+- Extension('borg.algorithms.msgpack._packer', **msgpack_packer_ext_kwargs),
+- Extension('borg.algorithms.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 -Naur borgbackup-1.1.11.orig/src/borg/helpers.py borgbackup-1.1.11/src/borg/helpers.py
+--- borgbackup-1.1.11.orig/src/borg/helpers.py 2020-03-07 18:32:06.000000000 -0500
++++ borgbackup-1.1.11/src/borg/helpers.py 2020-03-11 10:28:42.519980213 -0400
+@@ -55,7 +55,7 @@
+ # any feedback related to issues caused by this will be ignored.
+ # - especially, it is known that msgpack 0.6.x does NOT work for borg 1.1.x.
+
+-prefer_system_msgpack = False
++prefer_system_msgpack = True
+
+ try:
+ if prefer_system_msgpack: