mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
app-backup/duplicity: fix log output w/ --concurrency; fix build w/ lld
Closes: https://bugs.gentoo.org/946846 Closes: https://bugs.gentoo.org/960239 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
60
app-backup/duplicity/duplicity-3.0.5-r1.ebuild
Normal file
60
app-backup/duplicity/duplicity-3.0.5-r1.ebuild
Normal file
@@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
DISTUTILS_EXT=1
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Secure backup system using gnupg to encrypt data"
|
||||
HOMEPAGE="https://duplicity.gitlab.io/"
|
||||
SRC_URI="https://gitlab.com/duplicity/duplicity/-/archive/rel.${PV}/${PN}-rel.${PV}.tar.bz2"
|
||||
S="${WORKDIR}"/${PN}-rel.${PV}
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="s3 test"
|
||||
|
||||
COMMON_DEPEND="
|
||||
net-libs/librsync
|
||||
app-crypt/gnupg
|
||||
dev-python/fasteners[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools-scm[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
|| ( app-arch/par2cmdline app-arch/par2cmdline-turbo )
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
dev-python/paramiko[${PYTHON_USEDEP}]
|
||||
s3? ( dev-python/boto3[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
EPYTEST_DESELECT=(
|
||||
# Linting tests (black, pylint, etc); not relevant for us
|
||||
testing/test_code.py::CodeTest::test_black
|
||||
testing/test_code.py::CodeTest::test_pep8
|
||||
testing/test_code.py::CodeTest::test_pylint
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.0.4.0-fix-docs-cmd.patch
|
||||
"${FILESDIR}"/${PN}-3.0.5-dont-repeat-standard-paths.patch
|
||||
"${FILESDIR}"/${PN}-3.0.5-TotalDestinationSizeChange-concurrency.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Duplicity has many optional dependencies to support various backends."
|
||||
elog "Currently it's up to you to install them as necessary."
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
https://bugs.gentoo.org/960239
|
||||
https://gitlab.com/duplicity/duplicity/-/commit/3bc1bb974c252ceb170b8e3edd8f791af30c719f
|
||||
|
||||
From 3bc1bb974c252ceb170b8e3edd8f791af30c719f Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Fri, 27 Jun 2025 14:53:12 +0000
|
||||
Subject: [PATCH] fix:usr: fix TotalDestinationSizeChange with concurrency.
|
||||
|
||||
With --concurrency n (n \> 1), duplicity always prints TotalDestinationSizeChange 0 (0 bytes).
|
||||
|
||||
Fix it by returning bytes_written from collect_put_results(). Fixes #880.
|
||||
---
|
||||
duplicity/dup_main.py | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/duplicity/dup_main.py b/duplicity/dup_main.py
|
||||
index b98dd7a4..b6f08984 100644
|
||||
--- a/duplicity/dup_main.py
|
||||
+++ b/duplicity/dup_main.py
|
||||
@@ -376,7 +376,8 @@ def write_multivol(backup_type, tarblock_iter, man_outfp, sig_outfp, backend):
|
||||
transfer_success = False
|
||||
manifest_written = False
|
||||
|
||||
- def collect_put_results(bytes_written: int, backend_pooler, command2vol_map: Dict[int, CommandMetaData]):
|
||||
+ def collect_put_results(backend_pooler, command2vol_map: Dict[int, CommandMetaData]):
|
||||
+ bytes_written = 0
|
||||
for result in backend_pooler.results_since_last_call():
|
||||
track_id = result.track_id
|
||||
size = result.result
|
||||
@@ -392,6 +393,7 @@ def write_multivol(backup_type, tarblock_iter, man_outfp, sig_outfp, backend):
|
||||
f"Transfer of {command2vol_map[track_id].path_obj.get_filename()} with id {track_id} and size "
|
||||
f"{size} took {result.get_runtime()}"
|
||||
)
|
||||
+ return bytes_written
|
||||
|
||||
def write_manifest_in_sequence(mf, mf_file, command2vol_map: Dict[int, CommandMetaData]):
|
||||
"""
|
||||
@@ -499,7 +501,7 @@ def write_multivol(backup_type, tarblock_iter, man_outfp, sig_outfp, backend):
|
||||
progress.report_transfer(0, tdp.getsize())
|
||||
track_id = backend_pooler.command_throttled(backend.put_validated.__name__, args=(tdp, dest_filename))
|
||||
command2vol_map[track_id] = CommandMetaData(vol_num, tdp, vi)
|
||||
- collect_put_results(bytes_written, backend_pooler, command2vol_map)
|
||||
+ bytes_written += collect_put_results(backend_pooler, command2vol_map)
|
||||
write_manifest_in_sequence(mf, man_outfp, command2vol_map)
|
||||
except (Exception, SystemExit) as e:
|
||||
# ensure pool processes terminate clean
|
||||
@@ -529,7 +531,7 @@ def write_multivol(backup_type, tarblock_iter, man_outfp, sig_outfp, backend):
|
||||
# wait for background commands, collect some stats and shutdown clean.
|
||||
log.Debug("Collecting remaining results from backend pool.")
|
||||
while True and backend_pooler:
|
||||
- collect_put_results(bytes_written, backend_pooler, command2vol_map)
|
||||
+ bytes_written += collect_put_results(backend_pooler, command2vol_map)
|
||||
write_manifest_in_sequence(mf, man_outfp, command2vol_map)
|
||||
if backend_pooler.get_queue_length() == 0:
|
||||
break
|
||||
--
|
||||
GitLab
|
||||
@@ -0,0 +1,20 @@
|
||||
The toolchain will already search these locations by default if appropriate,
|
||||
but /usr/lib isn't right on a 64-bit system where native objects are in /usr/lib64
|
||||
and /usr/lib has multilib 32-bit ones. bfd warns on this but lld rejects it.
|
||||
|
||||
https://bugs.gentoo.org/946846
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -84,12 +84,6 @@ if os.environ.get("READTHEDOCS", None) is None:
|
||||
)
|
||||
)
|
||||
|
||||
- # add standard locs
|
||||
- incdir_list.append("/usr/local/include")
|
||||
- libdir_list.append("/usr/local/lib")
|
||||
- incdir_list.append("/usr/include")
|
||||
- libdir_list.append("/usr/lib")
|
||||
-
|
||||
# build the librsync extension
|
||||
ext_modules = [
|
||||
Extension(
|
||||
Reference in New Issue
Block a user