Hello community,

here is the log from the commit of package borgmatic for openSUSE:Factory 
checked in at 2020-06-22 17:44:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/borgmatic (Old)
 and      /work/SRC/openSUSE:Factory/.borgmatic.new.2956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "borgmatic"

Mon Jun 22 17:44:17 2020 rev:21 rq:816065 version:1.5.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/borgmatic/borgmatic.changes      2020-06-19 
16:49:03.326264238 +0200
+++ /work/SRC/openSUSE:Factory/.borgmatic.new.2956/borgmatic.changes    
2020-06-22 17:44:46.149628359 +0200
@@ -1,0 +2,21 @@
+Mon Jun 15 17:22:18 UTC 2020 - Martin Rey <m...@suse.com>
+
+- Update to 1.5.6
+  * #292: Allow before_backup and similiar hooks to exit with a
+    soft failure without altering the monitoring status on
+    Healthchecks or other providers. Support this by waiting to
+    ping monitoring services with a "start" status until after
+    before_* hooks finish. Failures in before_* hooks still trigger
+    a monitoring "fail" status.
+  * #316: Fix hang when a stale database dump named pipe from an
+    aborted borgmatic run remains on disk.
+  * #323: Fix for certain configuration options like ssh_command
+    impacting Borg invocations for separate configuration files.
+  * #324: Add "borgmatic extract --strip-components" flag to remove
+    leading path components when extracting an archive.
+  * Tweak comment indentation in generated configuration file for
+    clarity.
+  * Link to Borgmacator GNOME AppIndicator from monitoring
+    documentation.
+
+-------------------------------------------------------------------

Old:
----
  borgmatic-1.5.5.tar.gz

New:
----
  borgmatic-1.5.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ borgmatic.spec ++++++
--- /var/tmp/diff_new_pack.By6APZ/_old  2020-06-22 17:44:47.549632853 +0200
+++ /var/tmp/diff_new_pack.By6APZ/_new  2020-06-22 17:44:47.553632866 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           borgmatic
-Version:        1.5.5
+Version:        1.5.6
 Release:        0
 Summary:        Automation tool for borgbackup
 License:        GPL-3.0-only

++++++ borgmatic-1.5.5.tar.gz -> borgmatic-1.5.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/NEWS new/borgmatic-1.5.6/NEWS
--- old/borgmatic-1.5.5/NEWS    2020-05-26 22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/NEWS    2020-06-07 00:01:56.000000000 +0200
@@ -1,3 +1,17 @@
+1.5.6
+ * #292: Allow before_backup and similiar hooks to exit with a soft failure 
without altering the
+   monitoring status on Healthchecks or other providers. Support this by 
waiting to ping monitoring
+   services with a "start" status until after before_* hooks finish. Failures 
in before_* hooks
+   still trigger a monitoring "fail" status.
+ * #316: Fix hang when a stale database dump named pipe from an aborted 
borgmatic run remains on
+   disk.
+ * #323: Fix for certain configuration options like ssh_command impacting Borg 
invocations for
+   separate configuration files.
+ * #324: Add "borgmatic extract --strip-components" flag to remove leading 
path components when
+   extracting an archive.
+ * Tweak comment indentation in generated configuration file for clarity.
+ * Link to Borgmacator GNOME AppIndicator from monitoring documentation.
+
 1.5.5
  * #314: Fix regression in support for PostgreSQL's "directory" dump format. 
Unlike other dump
    formats, the "directory" dump format does not stream directly to/from Borg.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/borg/environment.py 
new/borgmatic-1.5.6/borgmatic/borg/environment.py
--- old/borgmatic-1.5.5/borgmatic/borg/environment.py   2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/borg/environment.py   2020-06-07 
00:01:56.000000000 +0200
@@ -22,6 +22,8 @@
         value = storage_config.get(option_name)
         if value:
             os.environ[environment_variable_name] = value
+        else:
+            os.environ.pop(environment_variable_name, None)
 
     for (
         option_name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/borg/extract.py 
new/borgmatic-1.5.6/borgmatic/borg/extract.py
--- old/borgmatic-1.5.5/borgmatic/borg/extract.py       2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/borg/extract.py       2020-06-07 
00:01:56.000000000 +0200
@@ -64,6 +64,7 @@
     local_path='borg',
     remote_path=None,
     destination_path=None,
+    strip_components=None,
     progress=False,
     extract_to_stdout=False,
 ):
@@ -91,6 +92,7 @@
         + (('--info',) if logger.getEffectiveLevel() == logging.INFO else ())
         + (('--debug', '--list', '--show-rc') if 
logger.isEnabledFor(logging.DEBUG) else ())
         + (('--dry-run',) if dry_run else ())
+        + (('--strip-components', str(strip_components)) if strip_components 
else ())
         + (('--progress',) if progress else ())
         + (('--stdout',) if extract_to_stdout else ())
         + ('::'.join((repository if ':' in repository else 
os.path.abspath(repository), archive)),)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/commands/arguments.py 
new/borgmatic-1.5.6/borgmatic/commands/arguments.py
--- old/borgmatic-1.5.5/borgmatic/commands/arguments.py 2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/commands/arguments.py 2020-06-07 
00:01:56.000000000 +0200
@@ -341,6 +341,13 @@
         help='Directory to extract files into, defaults to the current 
directory',
     )
     extract_group.add_argument(
+        '--strip-components',
+        type=int,
+        metavar='NUMBER',
+        dest='strip_components',
+        help='Number of leading path components to remove from each extracted 
path. Skip paths with fewer elements',
+    )
+    extract_group.add_argument(
         '--progress',
         dest='progress',
         default=False,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/commands/borgmatic.py 
new/borgmatic-1.5.6/borgmatic/commands/borgmatic.py
--- old/borgmatic-1.5.5/borgmatic/commands/borgmatic.py 2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/commands/borgmatic.py 2020-06-07 
00:01:56.000000000 +0200
@@ -59,11 +59,10 @@
     try:
         if prune_create_or_check:
             dispatch.call_hooks(
-                'ping_monitor',
+                'initialize_monitor',
                 hooks,
                 config_filename,
                 monitor.MONITOR_HOOK_NAMES,
-                monitor.State.START,
                 monitoring_log_level,
                 global_arguments.dry_run,
             )
@@ -91,6 +90,16 @@
                 'pre-check',
                 global_arguments.dry_run,
             )
+        if prune_create_or_check:
+            dispatch.call_hooks(
+                'ping_monitor',
+                hooks,
+                config_filename,
+                monitor.MONITOR_HOOK_NAMES,
+                monitor.State.START,
+                monitoring_log_level,
+                global_arguments.dry_run,
+            )
     except (OSError, CalledProcessError) as error:
         if command.considered_soft_failure(config_filename, error):
             return
@@ -123,6 +132,16 @@
 
     if not encountered_error:
         try:
+            if prune_create_or_check:
+                dispatch.call_hooks(
+                    'ping_monitor',
+                    hooks,
+                    config_filename,
+                    monitor.MONITOR_HOOK_NAMES,
+                    monitor.State.FINISH,
+                    monitoring_log_level,
+                    global_arguments.dry_run,
+                )
             if 'prune' in arguments:
                 command.execute_hook(
                     hooks.get('after_prune'),
@@ -155,16 +174,6 @@
                     'post-check',
                     global_arguments.dry_run,
                 )
-            if {'prune', 'create', 'check'}.intersection(arguments):
-                dispatch.call_hooks(
-                    'ping_monitor',
-                    hooks,
-                    config_filename,
-                    monitor.MONITOR_HOOK_NAMES,
-                    monitor.State.FINISH,
-                    monitoring_log_level,
-                    global_arguments.dry_run,
-                )
         except (OSError, CalledProcessError) as error:
             if command.considered_soft_failure(config_filename, error):
                 return
@@ -176,6 +185,15 @@
 
     if encountered_error and prune_create_or_check:
         try:
+            dispatch.call_hooks(
+                'ping_monitor',
+                hooks,
+                config_filename,
+                monitor.MONITOR_HOOK_NAMES,
+                monitor.State.FAIL,
+                monitoring_log_level,
+                global_arguments.dry_run,
+            )
             command.execute_hook(
                 hooks.get('on_error'),
                 hooks.get('umask'),
@@ -186,15 +204,6 @@
                 error=encountered_error,
                 output=getattr(encountered_error, 'output', ''),
             )
-            dispatch.call_hooks(
-                'ping_monitor',
-                hooks,
-                config_filename,
-                monitor.MONITOR_HOOK_NAMES,
-                monitor.State.FAIL,
-                monitoring_log_level,
-                global_arguments.dry_run,
-            )
         except (OSError, CalledProcessError) as error:
             if command.considered_soft_failure(config_filename, error):
                 return
@@ -319,6 +328,7 @@
                 local_path=local_path,
                 remote_path=remote_path,
                 destination_path=arguments['extract'].destination,
+                strip_components=arguments['extract'].strip_components,
                 progress=arguments['extract'].progress,
             )
     if 'mount' in arguments:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/config/generate.py 
new/borgmatic-1.5.6/borgmatic/config/generate.py
--- old/borgmatic-1.5.5/borgmatic/config/generate.py    2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/config/generate.py    2020-06-07 
00:01:56.000000000 +0200
@@ -37,9 +37,7 @@
                 for item_schema in schema['seq']
             ]
         )
-        add_comments_to_configuration_sequence(
-            config, schema, indent=(level * INDENT) + SEQUENCE_INDENT
-        )
+        add_comments_to_configuration_sequence(config, schema, indent=(level * 
INDENT))
     elif 'map' in schema:
         config = yaml.comments.CommentedMap(
             [
@@ -86,8 +84,8 @@
     optional = False
 
     for line in rendered_config.split('\n'):
-        # Upon encountering an optional configuration option, commenting out 
lines until the next
-        # blank line.
+        # Upon encountering an optional configuration option, comment out 
lines until the next blank
+        # line.
         if line.strip().startswith('# {}'.format(COMMENTED_OUT_SENTINEL)):
             optional = True
             continue
@@ -142,7 +140,7 @@
 
     ```
     things:
-          # First key description. Added by this function.
+        # First key description. Added by this function.
         - key: foo
           # Second key description. Added by 
add_comments_to_configuration_map().
           other: bar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/cronhub.py 
new/borgmatic-1.5.6/borgmatic/hooks/cronhub.py
--- old/borgmatic-1.5.5/borgmatic/hooks/cronhub.py      2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/cronhub.py      2020-06-07 
00:01:56.000000000 +0200
@@ -13,6 +13,15 @@
 }
 
 
+def initialize_monitor(
+    ping_url, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
+    '''
+    No initialization is necessary for this monitor.
+    '''
+    pass
+
+
 def ping_monitor(ping_url, config_filename, state, monitoring_log_level, 
dry_run):
     '''
     Ping the given Cronhub URL, modified with the monitor.State. Use the given 
configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/cronitor.py 
new/borgmatic-1.5.6/borgmatic/hooks/cronitor.py
--- old/borgmatic-1.5.5/borgmatic/hooks/cronitor.py     2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/cronitor.py     2020-06-07 
00:01:56.000000000 +0200
@@ -13,6 +13,15 @@
 }
 
 
+def initialize_monitor(
+    ping_url, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
+    '''
+    No initialization is necessary for this monitor.
+    '''
+    pass
+
+
 def ping_monitor(ping_url, config_filename, state, monitoring_log_level, 
dry_run):
     '''
     Ping the given Cronitor URL, modified with the monitor.State. Use the 
given configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/dump.py 
new/borgmatic-1.5.6/borgmatic/hooks/dump.py
--- old/borgmatic-1.5.5/borgmatic/hooks/dump.py 2020-05-26 22:15:01.000000000 
+0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/dump.py 2020-06-07 00:01:56.000000000 
+0200
@@ -48,46 +48,24 @@
     os.mkfifo(dump_path, mode=0o600)
 
 
-def remove_database_dumps(dump_path, databases, database_type_name, 
log_prefix, dry_run):
+def remove_database_dumps(dump_path, database_type_name, log_prefix, dry_run):
     '''
-    Remove the database dumps for the given databases in the dump directory 
path. The databases are
-    supplied as a sequence of dicts, one dict describing each database as per 
the configuration
-    schema. Use the name of the database type and the log prefix in any log 
entries. If this is a
-    dry run, then don't actually remove anything.
+    Remove all database dumps in the given dump directory path (including the 
directory itself). If
+    this is a dry run, then don't actually remove anything.
     '''
-    if not databases:
-        logger.debug('{}: No {} databases configured'.format(log_prefix, 
database_type_name))
-        return
-
     dry_run_label = ' (dry run; not actually removing anything)' if dry_run 
else ''
 
     logger.info(
         '{}: Removing {} database dumps{}'.format(log_prefix, 
database_type_name, dry_run_label)
     )
 
-    for database in databases:
-        dump_filename = make_database_dump_filename(
-            dump_path, database['name'], database.get('hostname')
-        )
-
-        logger.debug(
-            '{}: Removing {} database dump {} from {}{}'.format(
-                log_prefix, database_type_name, database['name'], 
dump_filename, dry_run_label
-            )
-        )
-        if dry_run:
-            continue
-
-        if os.path.exists(dump_filename):
-            if os.path.isdir(dump_filename):
-                shutil.rmtree(dump_filename)
-            else:
-                os.remove(dump_filename)
+    expanded_path = os.path.expanduser(dump_path)
 
-        dump_file_dir = os.path.dirname(dump_filename)
+    if dry_run:
+        return
 
-        if os.path.exists(dump_file_dir) and len(os.listdir(dump_file_dir)) == 
0:
-            os.rmdir(dump_file_dir)
+    if os.path.exists(expanded_path):
+        shutil.rmtree(expanded_path)
 
 
 def convert_glob_patterns_to_borg_patterns(patterns):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/healthchecks.py 
new/borgmatic-1.5.6/borgmatic/hooks/healthchecks.py
--- old/borgmatic-1.5.5/borgmatic/hooks/healthchecks.py 2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/healthchecks.py 2020-06-07 
00:01:56.000000000 +0200
@@ -65,20 +65,24 @@
     return payload
 
 
+def initialize_monitor(
+    ping_url_or_uuid, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
+    '''
+    Add a handler to the root logger that stores in memory the most recent 
logs emitted. That
+    way, we can send them all to Healthchecks upon a finish or failure state.
+    '''
+    logging.getLogger().addHandler(
+        Forgetful_buffering_handler(PAYLOAD_LIMIT_BYTES, monitoring_log_level)
+    )
+
+
 def ping_monitor(ping_url_or_uuid, config_filename, state, 
monitoring_log_level, dry_run):
     '''
     Ping the given Healthchecks URL or UUID, modified with the monitor.State. 
Use the given
     configuration filename in any log entries, and log to Healthchecks with 
the giving log level.
     If this is a dry run, then don't actually ping anything.
     '''
-    if state is monitor.State.START:
-        # Add a handler to the root logger that stores in memory the most 
recent logs emitted. That
-        # way, we can send them all to Healthchecks upon a finish or failure 
state.
-        logging.getLogger().addHandler(
-            Forgetful_buffering_handler(PAYLOAD_LIMIT_BYTES, 
monitoring_log_level)
-        )
-        payload = ''
-
     ping_url = (
         ping_url_or_uuid
         if ping_url_or_uuid.startswith('http')
@@ -97,6 +101,8 @@
 
     if state in (monitor.State.FINISH, monitor.State.FAIL):
         payload = format_buffered_logs_for_payload()
+    else:
+        payload = ''
 
     if not dry_run:
         logging.getLogger('urllib3').setLevel(logging.ERROR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/mysql.py 
new/borgmatic-1.5.6/borgmatic/hooks/mysql.py
--- old/borgmatic-1.5.5/borgmatic/hooks/mysql.py        2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/mysql.py        2020-06-07 
00:01:56.000000000 +0200
@@ -118,14 +118,11 @@
 
 def remove_database_dumps(databases, log_prefix, location_config, dry_run):  # 
pragma: no cover
     '''
-    Remove the database dumps for the given databases. The databases are 
supplied as a sequence of
-    dicts, one dict describing each database as per the configuration schema. 
Use the log prefix in
-    any log entries. Use the given location configuration dict to construct 
the destination path. If
-    this is a dry run, then don't actually remove anything.
+    Remove all database dump files for this hook regardless of the given 
databases. Use the log
+    prefix in any log entries. Use the given location configuration dict to 
construct the
+    destination path. If this is a dry run, then don't actually remove 
anything.
     '''
-    dump.remove_database_dumps(
-        make_dump_path(location_config), databases, 'MySQL', log_prefix, 
dry_run
-    )
+    dump.remove_database_dumps(make_dump_path(location_config), 'MySQL', 
log_prefix, dry_run)
 
 
 def make_database_dump_pattern(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/pagerduty.py 
new/borgmatic-1.5.6/borgmatic/hooks/pagerduty.py
--- old/borgmatic-1.5.5/borgmatic/hooks/pagerduty.py    2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/pagerduty.py    2020-06-07 
00:01:56.000000000 +0200
@@ -12,6 +12,15 @@
 EVENTS_API_URL = 'https://events.pagerduty.com/v2/enqueue'
 
 
+def initialize_monitor(
+    integration_key, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
+    '''
+    No initialization is necessary for this monitor.
+    '''
+    pass
+
+
 def ping_monitor(integration_key, config_filename, state, 
monitoring_log_level, dry_run):
     '''
     If this is an error state, create a PagerDuty event with the given 
integration key. Use the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/borgmatic/hooks/postgresql.py 
new/borgmatic-1.5.6/borgmatic/hooks/postgresql.py
--- old/borgmatic-1.5.5/borgmatic/hooks/postgresql.py   2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/borgmatic/hooks/postgresql.py   2020-06-07 
00:01:56.000000000 +0200
@@ -82,14 +82,11 @@
 
 def remove_database_dumps(databases, log_prefix, location_config, dry_run):  # 
pragma: no cover
     '''
-    Remove the database dumps for the given databases. The databases are 
supplied as a sequence of
-    dicts, one dict describing each database as per the configuration schema. 
Use the log prefix in
-    any log entries. Use the given location configuration dict to construct 
the destination path. If
-    this is a dry run, then don't actually remove anything.
+    Remove all database dump files for this hook regardless of the given 
databases. Use the log
+    prefix in any log entries. Use the given location configuration dict to 
construct the
+    destination path. If this is a dry run, then don't actually remove 
anything.
     '''
-    dump.remove_database_dumps(
-        make_dump_path(location_config), databases, 'PostgreSQL', log_prefix, 
dry_run
-    )
+    dump.remove_database_dumps(make_dump_path(location_config), 'PostgreSQL', 
log_prefix, dry_run)
 
 
 def make_database_dump_pattern(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/docs/how-to/monitor-your-backups.md 
new/borgmatic-1.5.6/docs/how-to/monitor-your-backups.md
--- old/borgmatic-1.5.5/docs/how-to/monitor-your-backups.md     2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/docs/how-to/monitor-your-backups.md     2020-06-07 
00:01:56.000000000 +0200
@@ -42,6 +42,7 @@
 software to consume borgmatic JSON output and track when the last
 successful backup occurred. See [scripting
 
borgmatic](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/#scripting-borgmatic)
+and [related 
software](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/#related-software)
 below for how to configure this.
 5. **Borg hosting providers**: Most [Borg hosting
 providers](https://torsion.org/borgmatic/#hosting-providers) include
@@ -116,21 +117,21 @@
 ```
 
 With this hook in place, borgmatic pings your Healthchecks project when a
-backup begins, ends, or errors. Specifically, before the <a
+backup begins, ends, or errors. Specifically, after the <a
 
href="https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/";>`before_backup`
 hooks</a> run, borgmatic lets Healthchecks know that it has started if any of
 the `prune`, `create`, or `check` actions are run.
 
 Then, if the actions complete successfully, borgmatic notifies Healthchecks of
-the success after the `after_backup` hooks run, and includes borgmatic logs in
+the success before the `after_backup` hooks run, and includes borgmatic logs in
 the payload data sent to Healthchecks. This means that borgmatic logs show up
 in the Healthchecks UI, although be aware that Healthchecks currently has a
 10-kilobyte limit for the logs in each ping.
 
-If an error occurs during any action, borgmatic notifies Healthchecks after
-the `on_error` hooks run, also tacking on logs including the error itself. But
-the logs are only included for errors that occur when a `prune`, `create`, or
-`check` action is run.
+If an error occurs during any action or hook, borgmatic notifies Healthchecks
+before the `on_error` hooks run, also tacking on logs including the error
+itself. But the logs are only included for errors that occur when a `prune`,
+`create`, or `check` action is run.
 
 You can customize the verbosity of the logs that are sent to Healthchecks with
 borgmatic's `--monitoring-verbosity` flag. The `--files` and `--stats` flags
@@ -156,13 +157,13 @@
 ```
 
 With this hook in place, borgmatic pings your Cronitor monitor when a backup
-begins, ends, or errors. Specifically, before the <a
+begins, ends, or errors. Specifically, after the <a
 
href="https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/";>`before_backup`
 hooks</a> run, borgmatic lets Cronitor know that it has started if any of the
 `prune`, `create`, or `check` actions are run. Then, if the actions complete
-successfully, borgmatic notifies Cronitor of the success after the
-`after_backup` hooks run. And if an error occurs during any action, borgmatic
-notifies Cronitor after the `on_error` hooks run.
+successfully, borgmatic notifies Cronitor of the success before the
+`after_backup` hooks run. And if an error occurs during any action or hook,
+borgmatic notifies Cronitor before the `on_error` hooks run.
 
 You can configure Cronitor to notify you by a [variety of
 mechanisms](https://cronitor.io/docs/cron-job-notifications) when backups fail
@@ -184,13 +185,13 @@
 ```
 
 With this hook in place, borgmatic pings your Cronhub monitor when a backup
-begins, ends, or errors. Specifically, before the <a
+begins, ends, or errors. Specifically, after the <a
 
href="https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/";>`before_backup`
 hooks</a> run, borgmatic lets Cronhub know that it has started if any of the
 `prune`, `create`, or `check` actions are run. Then, if the actions complete
-successfully, borgmatic notifies Cronhub of the success after the
-`after_backup` hooks run. And if an error occurs during any action, borgmatic
-notifies Cronhub after the `on_error` hooks run.
+successfully, borgmatic notifies Cronhub of the success before the
+`after_backup` hooks run. And if an error occurs during any action or hook,
+borgmatic notifies Cronhub before the `on_error` hooks run.
 
 Note that even though you configure borgmatic with the "start" variant of the
 ping URL, borgmatic substitutes the correct state into the URL when pinging
@@ -227,7 +228,7 @@
 
 With this hook in place, borgmatic creates a PagerDuty event for your service
 whenever backups fail. Specifically, if an error occurs during a `create`,
-`prune`, or `check` action, borgmatic sends an event to PagerDuty after the
+`prune`, or `check` action, borgmatic sends an event to PagerDuty before the
 `on_error` hooks run. Note that borgmatic does not contact PagerDuty when a
 backup starts or ends without error.
 
@@ -250,6 +251,11 @@
 output only shows up at the console, and not in syslog.
 
 
+## Related software
+
+ * [Borgmacator GNOME AppIndicator](https://github.com/N-Coder/borgmacator/)
+
+
 ### Successful backups
 
 `borgmatic list` includes support for a `--successful` flag that only lists
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/docs/how-to/set-up-backups.md 
new/borgmatic-1.5.6/docs/how-to/set-up-backups.md
--- old/borgmatic-1.5.5/docs/how-to/set-up-backups.md   2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/docs/how-to/set-up-backups.md   2020-06-07 
00:01:56.000000000 +0200
@@ -268,6 +268,7 @@
 interested in an [unofficial work-around for Full Disk
 Access](https://projects.torsion.org/witten/borgmatic/issues/293).
 
+
 ## Colored output
 
 Borgmatic produces colored terminal output by default. It is disabled when a
@@ -276,6 +277,7 @@
 setting the environment variable `PY_COLORS=False`, or setting the `color`
 option to `false` in the `output` section of configuration.
 
+
 ## Troubleshooting
 
 ### "found character that cannot start any token" error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/setup.py new/borgmatic-1.5.6/setup.py
--- old/borgmatic-1.5.5/setup.py        2020-05-26 22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/setup.py        2020-06-07 00:01:56.000000000 +0200
@@ -1,6 +1,6 @@
 from setuptools import find_packages, setup
 
-VERSION = '1.5.5'
+VERSION = '1.5.6'
 
 
 setup(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/tests/unit/borg/test_environment.py 
new/borgmatic-1.5.6/tests/unit/borg/test_environment.py
--- old/borgmatic-1.5.5/tests/unit/borg/test_environment.py     2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/tests/unit/borg/test_environment.py     2020-06-07 
00:01:56.000000000 +0200
@@ -60,3 +60,15 @@
         assert os.environ.get('BORG_RELOCATED_REPO_ACCESS_IS_OK') == 'yes'
     finally:
         os.environ = orig_environ
+
+
+def test_initialize_is_not_affected_by_existing_environment():
+    orig_environ = os.environ
+
+    try:
+        os.environ = {'BORG_PASSPHRASE': 'pass', 'BORG_SSH': 'mosh'}
+        module.initialize({'ssh_command': 'ssh -C'})
+        assert 'BORG_PASSPHRASE' not in os.environ
+        assert os.environ.get('BORG_RSH') == 'ssh -C'
+    finally:
+        os.environ = orig_environ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/tests/unit/borg/test_extract.py 
new/borgmatic-1.5.6/tests/unit/borg/test_extract.py
--- old/borgmatic-1.5.5/tests/unit/borg/test_extract.py 2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/tests/unit/borg/test_extract.py 2020-06-07 
00:01:56.000000000 +0200
@@ -220,6 +220,21 @@
     )
 
 
+def test_extract_archive_calls_borg_with_strip_components():
+    flexmock(module.os.path).should_receive('abspath').and_return('repo')
+    insert_execute_command_mock(('borg', 'extract', '--strip-components', '5', 
'repo::archive'))
+
+    module.extract_archive(
+        dry_run=False,
+        repository='repo',
+        archive='archive',
+        paths=None,
+        location_config={},
+        storage_config={},
+        strip_components=5,
+    )
+
+
 def test_extract_archive_calls_borg_with_progress_parameter():
     flexmock(module.os.path).should_receive('abspath').and_return('repo')
     flexmock(module).should_receive('execute_command').with_args(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/borgmatic-1.5.5/tests/unit/hooks/test_dump.py 
new/borgmatic-1.5.6/tests/unit/hooks/test_dump.py
--- old/borgmatic-1.5.5/tests/unit/hooks/test_dump.py   2020-05-26 
22:15:01.000000000 +0200
+++ new/borgmatic-1.5.6/tests/unit/hooks/test_dump.py   2020-06-07 
00:01:56.000000000 +0200
@@ -47,69 +47,28 @@
     module.create_named_pipe_for_dump('/path/to/pipe')
 
 
-def test_remove_database_dumps_removes_dump_for_each_database():
-    databases = [{'name': 'foo'}, {'name': 'bar'}]
-    flexmock(module).should_receive('make_database_dump_filename').with_args(
-        'databases', 'foo', None
-    ).and_return('databases/localhost/foo')
-    flexmock(module).should_receive('make_database_dump_filename').with_args(
-        'databases', 'bar', None
-    ).and_return('databases/localhost/bar')
-
-    flexmock(module.os.path).should_receive('exists').and_return(True)
-    flexmock(module.os.path).should_receive('isdir').and_return(False)
-    
flexmock(module.os).should_receive('remove').with_args('databases/localhost/foo').once()
-    
flexmock(module.os).should_receive('remove').with_args('databases/localhost/bar').once()
-    
flexmock(module.os).should_receive('listdir').with_args('databases/localhost').and_return(
-        ['bar']
-    ).and_return([])
-
-    
flexmock(module.os).should_receive('rmdir').with_args('databases/localhost').once()
-
-    module.remove_database_dumps('databases', databases, 'SuperDB', 
'test.yaml', dry_run=False)
-
-
-def test_remove_database_dumps_removes_dump_in_directory_format():
-    databases = [{'name': 'foo'}]
-    flexmock(module).should_receive('make_database_dump_filename').with_args(
-        'databases', 'foo', None
-    ).and_return('databases/localhost/foo')
-
+def test_remove_database_dumps_removes_dump_path():
+    
flexmock(module.os.path).should_receive('expanduser').and_return('databases/localhost')
     flexmock(module.os.path).should_receive('exists').and_return(True)
-    flexmock(module.os.path).should_receive('isdir').and_return(True)
-    flexmock(module.os).should_receive('remove').never()
-    
flexmock(module.shutil).should_receive('rmtree').with_args('databases/localhost/foo').once()
-    
flexmock(module.os).should_receive('listdir').with_args('databases/localhost').and_return([])
-    
flexmock(module.os).should_receive('rmdir').with_args('databases/localhost').once()
+    
flexmock(module.shutil).should_receive('rmtree').with_args('databases/localhost').once()
 
-    module.remove_database_dumps('databases', databases, 'SuperDB', 
'test.yaml', dry_run=False)
+    module.remove_database_dumps('databases', 'SuperDB', 'test.yaml', 
dry_run=False)
 
 
 def test_remove_database_dumps_with_dry_run_skips_removal():
-    databases = [{'name': 'foo'}, {'name': 'bar'}]
-    flexmock(module.os).should_receive('rmdir').never()
-    flexmock(module.os).should_receive('remove').never()
-
-    module.remove_database_dumps('databases', databases, 'SuperDB', 
'test.yaml', dry_run=True)
+    
flexmock(module.os.path).should_receive('expanduser').and_return('databases/localhost')
+    flexmock(module.os.path).should_receive('exists').never()
+    flexmock(module.shutil).should_receive('rmtree').never()
 
+    module.remove_database_dumps('databases', 'SuperDB', 'test.yaml', 
dry_run=True)
 
-def test_remove_database_dumps_without_dump_present_skips_removal():
-    databases = [{'name': 'foo'}]
-    flexmock(module).should_receive('make_database_dump_filename').with_args(
-        'databases', 'foo', None
-    ).and_return('databases/localhost/foo')
 
+def test_remove_database_dumps_without_dump_path_present_skips_removal():
+    
flexmock(module.os.path).should_receive('expanduser').and_return('databases/localhost')
     flexmock(module.os.path).should_receive('exists').and_return(False)
-    flexmock(module.os.path).should_receive('isdir').never()
-    flexmock(module.os).should_receive('remove').never()
     flexmock(module.shutil).should_receive('rmtree').never()
-    flexmock(module.os).should_receive('rmdir').never()
-
-    module.remove_database_dumps('databases', databases, 'SuperDB', 
'test.yaml', dry_run=False)
-
 
-def test_remove_database_dumps_without_databases_does_not_raise():
-    module.remove_database_dumps('databases', [], 'SuperDB', 'test.yaml', 
dry_run=False)
+    module.remove_database_dumps('databases', 'SuperDB', 'test.yaml', 
dry_run=False)
 
 
 def test_convert_glob_patterns_to_borg_patterns_removes_leading_slash():


Reply via email to