summaryrefslogtreecommitdiff
path: root/app-backup/borgmatic/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/borgmatic/files')
-rw-r--r--app-backup/borgmatic/files/borgmatic-1.5.16-flexmock_write_args.patch19
-rw-r--r--app-backup/borgmatic/files/borgmatic-1.5.16-systemd_service_bin_path.patch8
-rw-r--r--app-backup/borgmatic/files/borgmatic-1.5.16-tests_no_vim_dep.patch34
3 files changed, 61 insertions, 0 deletions
diff --git a/app-backup/borgmatic/files/borgmatic-1.5.16-flexmock_write_args.patch b/app-backup/borgmatic/files/borgmatic-1.5.16-flexmock_write_args.patch
new file mode 100644
index 000000000000..32937adadba0
--- /dev/null
+++ b/app-backup/borgmatic/files/borgmatic-1.5.16-flexmock_write_args.patch
@@ -0,0 +1,19 @@
+Apparently in the flexmock universe, sys.stdout.write() takes two
+arguments rather than one. As of late July 2021, upstream hasn't said
+a word of comment on this; see
+https://github.com/flexmock/flexmock/issues/37
+
+--- a/tests/unit/commands/test_borgmatic.py
++++ b/tests/unit/commands/test_borgmatic.py
+@@ -448,7 +448,10 @@
+ ['baz']
+ )
+ stdout = flexmock()
+- stdout.should_receive('write').with_args('["foo", "bar", "baz"]').once()
++ try:
++ stdout.should_receive('write').with_args('["foo", "bar", "baz"]').once()
++ except flexmock.MethodSignatureError:
++ stdout.should_receive('write').with_args('["foo", "bar", "baz"]', None).once()
+ flexmock(module.sys).stdout = stdout
+ arguments = {}
+
diff --git a/app-backup/borgmatic/files/borgmatic-1.5.16-systemd_service_bin_path.patch b/app-backup/borgmatic/files/borgmatic-1.5.16-systemd_service_bin_path.patch
new file mode 100644
index 000000000000..26298625fc1a
--- /dev/null
+++ b/app-backup/borgmatic/files/borgmatic-1.5.16-systemd_service_bin_path.patch
@@ -0,0 +1,8 @@
+--- a/sample/systemd/borgmatic.service
++++ b/sample/systemd/borgmatic.service
+@@ -57,4 +57,4 @@
+ # Delay start to prevent backups running during boot. Note that systemd-inhibit requires dbus and
+ # dbus-user-session to be installed.
+ ExecStartPre=sleep 1m
+-ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --verbosity -1 --syslog-verbosity 1
++ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /usr/bin/borgmatic --verbosity -1 --syslog-verbosity 1
diff --git a/app-backup/borgmatic/files/borgmatic-1.5.16-tests_no_vim_dep.patch b/app-backup/borgmatic/files/borgmatic-1.5.16-tests_no_vim_dep.patch
new file mode 100644
index 000000000000..492743e36e04
--- /dev/null
+++ b/app-backup/borgmatic/files/borgmatic-1.5.16-tests_no_vim_dep.patch
@@ -0,0 +1,34 @@
+From e8b8d86592565acde1ac6e7809947b8a761f2f91 Mon Sep 17 00:00:00 2001
+From: Marek Szuba <marek.szuba@cern.ch>
+Date: Tue, 27 Jul 2021 13:46:51 +0100
+Subject: [PATCH] tests/integration/test_execute: use plain Python rather than
+ xxd
+
+Removes this test's dependencies on vim and /dev/urandom.
+
+Signed-off-by: Marek Szuba <marek.szuba@cern.ch>
+---
+ tests/integration/test_execute.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/integration/test_execute.py b/tests/integration/test_execute.py
+index 6dc6467..3b9bef9 100644
+--- a/tests/integration/test_execute.py
++++ b/tests/integration/test_execute.py
+@@ -1,5 +1,6 @@
+ import logging
+ import subprocess
++import sys
+
+ import pytest
+ from flexmock import flexmock
+@@ -134,7 +135,8 @@ def test_log_outputs_vents_other_processes_when_one_exits():
+ flexmock(module).should_receive('command_for_process').and_return('grep')
+
+ process = subprocess.Popen(
+- ['xxd', '-l', '40000', '-p', '/dev/urandom'], stdout=subprocess.PIPE, stderr=subprocess.PIPE
++ [sys.executable, '-c', "import random, string; print(''.join(random.choice(string.ascii_letters) for _ in range(40000)))"],
++ stdout=subprocess.PIPE, stderr=subprocess.PIPE
+ )
+ other_process = subprocess.Popen(
+ ['true'], stdin=process.stdout, stdout=subprocess.PIPE, stderr=subprocess.STDOUT