internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: borgbackup/borg

Issue:
increase rpc api version and check it
due to the locking changes, the rpc api slightly changed and this leads to borgbackup crashing if server and client are different.



Discussion:

Resolving patch:
diff --git a/borg/remote.py b/borg/remote.py
--- a/borg/remote.py
+++ b/borg/remote.py
@@ -15,6 +15,8 @@
 
 import msgpack
 
+RPC_PROTOCOL_VERSION = 2
+
 BUFSIZE = 10 * 1024 * 1024
 
 
@@ -96,7 +98,7 @@ def serve(self):
                 return
 
     def negotiate(self, versions):
-        return 1
+        return RPC_PROTOCOL_VERSION
 
     def open(self, path, create=False, lock_wait=None, lock=True):
         path = os.fsdecode(path)
@@ -150,10 +152,10 @@ def __init__(self, location, create=False, lock_wait=None, lock=True):
         self.x_fds = [self.stdin_fd, self.stdout_fd]
 
         try:
-            version = self.call('negotiate', 1)
+            version = self.call('negotiate', RPC_PROTOCOL_VERSION)
         except ConnectionClosed:
             raise ConnectionClosedWithHint('Is borg working on the server?')
-        if version != 1:
+        if version != RPC_PROTOCOL_VERSION:
             raise Exception('Server insisted on using unsupported protocol version %d' % version)
         self.id = self.call('open', location.path, create, lock_wait, lock)
 


Test patch:
Repository: borgbackup/borg

Issue:
wrong output formatting for umask
from the upgrade help output:

```
  --umask M           set umask to M (local and remote, default: 63)
```

Of course that should not display 63, but rather 0077.



Discussion:

Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -675,7 +675,7 @@ def build_parser(self, args=None, prog=None):
         common_parser.add_argument('--no-files-cache', dest='cache_files', action='store_false',
                                    help='do not load/update the file metadata cache used to detect unchanged files')
         common_parser.add_argument('--umask', dest='umask', type=lambda s: int(s, 8), default=RemoteRepository.umask, metavar='M',
-                                   help='set umask to M (local and remote, default: %(default)s)')
+                                   help='set umask to M (local and remote, default: %(default)04o)')
         common_parser.add_argument('--remote-path', dest='remote_path', default=RemoteRepository.remote_path, metavar='PATH',
                                    help='set remote path to executable (default: "%(default)s")')
 


Test patch:
Repository: borgbackup/borg

Issue:
BORG_CHECK_I_KNOW_WHAT_I_AM_DOING
... is not only used for "borg check", but also for "borg delete".

This is due to a misinterpretation as (borg) + (check i know what i am doing), but it likely was meant as (borg check) + (i know what i am doing).

Thus, the latter one should be renamed to BORG_DELETE_I_KNOW_WHAT_I_AM_DOING.



Discussion:

Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -351,7 +351,7 @@ def do_delete(self, args):
                 msg.append("Type 'YES' if you understand this and want to continue: ")
                 msg = '\n'.join(msg)
                 if not yes(msg, false_msg="Aborting.", default_notty=False,
-                           env_var_override='BORG_CHECK_I_KNOW_WHAT_I_AM_DOING', truish=('YES', )):
+                           env_var_override='BORG_DELETE_I_KNOW_WHAT_I_AM_DOING', truish=('YES', )):
                     self.exit_code = EXIT_ERROR
                     return self.exit_code
                 repository.destroy()
diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py
--- a/borg/testsuite/archiver.py
+++ b/borg/testsuite/archiver.py
@@ -199,6 +199,7 @@ class ArchiverTestCaseBase(BaseTestCase):
 
     def setUp(self):
         os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = '1'
+        os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = '1'
         self.archiver = not self.FORK_DEFAULT and Archiver() or None
         self.tmpdir = tempfile.mkdtemp()
         self.repository_path = os.path.join(self.tmpdir, 'repository')
diff --git a/borg/testsuite/benchmark.py b/borg/testsuite/benchmark.py
--- a/borg/testsuite/benchmark.py
+++ b/borg/testsuite/benchmark.py
@@ -17,6 +17,7 @@
 def repo_url(request, tmpdir):
     os.environ['BORG_PASSPHRASE'] = '123456'
     os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = '1'
+    os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = '1'
     os.environ['BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK'] = '1'
     os.environ['BORG_KEYS_DIR'] = str(tmpdir.join('keys'))
     os.environ['BORG_CACHE_DIR'] = str(tmpdir.join('cache'))


Test patch:
Repository: borgbackup/borg

Issue:
add borg version to sysinfo shown below tracebacks
```
Platform: Linux pi 3.18.0-trunk-rpi #1 PREEMPT Debian 3.18.5-1~exp1+rpi19 (2015-08-08) armv6l 
Linux: debian 8.0   LibC: glibc 2.9
Python: CPython 3.4.2
```

lots of info there, just not the borg version.

also: the linux/libc and python lines could be merged into 1 line.



Discussion:

Resolving patch:
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -22,7 +22,7 @@ def get_terminal_size(fallback=(80, 24)):
 from fnmatch import translate
 from operator import attrgetter
 
-
+from . import __version__ as borg_version
 from . import hashindex
 from . import chunker
 from . import crypto
@@ -968,6 +968,6 @@ def sysinfo():
     info.append('Platform: %s' % (' '.join(platform.uname()), ))
     if sys.platform.startswith('linux'):
         info.append('Linux: %s %s %s  LibC: %s %s' % (platform.linux_distribution() + platform.libc_ver()))
-    info.append('Python: %s %s' % (platform.python_implementation(), platform.python_version()))
+    info.append('Borg: %s Python: %s %s' % (borg_version, platform.python_implementation(), platform.python_version()))
     info.append('')
     return '\n'.join(info)


Test patch:
Repository: borgbackup/borg

Issue:
check RepoCache usage at sync time
when borg re-syncs the chunks cache, it fetches a lot of file metadata from the repo and uses a RepoCache on TEMP for that. Can easily be > 2GB and thus sometimes too much for TEMP.

Check if that cache is really useful for the different scenarios:
- with "borg create"
- with other commands



Discussion:
notes:
- it is ONLY used within sync (not re-used from/for any op before/afterwards)
- it is useful if the chunks used by the archives' item metadata streams have significant duplication, see also #547.


Resolving patch:
diff --git a/borg/archive.py b/borg/archive.py
--- a/borg/archive.py
+++ b/borg/archive.py
@@ -34,6 +34,9 @@
 # defaults, use --chunker-params to override
 CHUNKER_PARAMS = (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE)
 
+# chunker params for the items metadata stream, finer granularity
+ITEMS_CHUNKER_PARAMS = (12, 16, 14, HASH_WINDOW_SIZE)
+
 utime_supports_fd = os.utime in getattr(os, 'supports_fd', {})
 utime_supports_follow_symlinks = os.utime in getattr(os, 'supports_follow_symlinks', {})
 has_mtime_ns = sys.version >= '3.3'
@@ -75,7 +78,7 @@ def fetch_many(self, ids, is_preloaded=False):
 class ChunkBuffer:
     BUFFER_SIZE = 1 * 1024 * 1024
 
-    def __init__(self, key, chunker_params=CHUNKER_PARAMS):
+    def __init__(self, key, chunker_params=ITEMS_CHUNKER_PARAMS):
         self.buffer = BytesIO()
         self.packer = msgpack.Packer(unicode_errors='surrogateescape')
         self.chunks = []
@@ -110,7 +113,7 @@ def is_full(self):
 
 class CacheChunkBuffer(ChunkBuffer):
 
-    def __init__(self, cache, key, stats, chunker_params=CHUNKER_PARAMS):
+    def __init__(self, cache, key, stats, chunker_params=ITEMS_CHUNKER_PARAMS):
         super().__init__(key, chunker_params)
         self.cache = cache
         self.stats = stats
@@ -150,7 +153,7 @@ def __init__(self, repository, key, manifest, name, cache=None, create=False,
         self.end = end
         self.pipeline = DownloadPipeline(self.repository, self.key)
         if create:
-            self.items_buffer = CacheChunkBuffer(self.cache, self.key, self.stats, chunker_params)
+            self.items_buffer = CacheChunkBuffer(self.cache, self.key, self.stats)
             self.chunker = Chunker(self.key.chunk_seed, *chunker_params)
             if name in manifest.archives:
                 raise self.AlreadyExists(name)


Test patch:
Repository: borgbackup/borg

Issue:
dry-run fail with --keep-tag-files
Hello.

I run command: 
`borg create -n -s -v -C lz4 --exclude-if-present debug.txt --keep-tag-files --exclude-caches /backup/site.repo::site.(date +%d-%m-%Y_%H-%M-%S) /xxx/site`

and get error: 

```
/bin/sh: symbol lookup error: /bin/sh: undefined symbol: rl_signal_event_hook
Local Exception.
Traceback (most recent call last):
  File "/vagrant/borg/borg/borg/archiver.py", line 1261, in main
  File "/vagrant/borg/borg/borg/archiver.py", line 1215, in run
  File "/vagrant/borg/borg/borg/archiver.py", line 183, in do_create
  File "/vagrant/borg/borg/borg/archiver.py", line 247, in _process
  File "/vagrant/borg/borg/borg/archiver.py", line 247, in _process
  File "/vagrant/borg/borg/borg/archiver.py", line 247, in _process
  File "/vagrant/borg/borg/borg/archiver.py", line 229, in _process
AttributeError: 'NoneType' object has no attribute 'process_dir'

Platform: Linux www 4.4.0-gentoo #4 SMP Fri Jan 15 00:21:41 MSK 2016 x86_64
Linux: Gentoo Base System 2.2   LibC: glibc 2.3
Python: CPython 3.5.1
```

borg 0.29.0

dry-run work as expected if run command without --keep-tag-files



Discussion:
thanks for reporting, I'll have a look.


Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -228,7 +228,7 @@ def _process(self, archive, cache, excludes, exclude_caches, exclude_if_present,
         elif stat.S_ISDIR(st.st_mode):
             tag_paths = dir_is_tagged(path, exclude_caches, exclude_if_present)
             if tag_paths:
-                if keep_tag_files:
+                if keep_tag_files and not dry_run:
                     archive.process_dir(path, st)
                     for tag_path in tag_paths:
                         self._process(archive, cache, excludes, exclude_caches, exclude_if_present,


Test patch:
Repository: borgbackup/borg

Issue:
upgrade fails without ~/.attic/keys
I moved to a new system, but wish to upgrade an old attic repository on an external drive; I don’t have any keys in `~/.attic/keys`, so borg throws:

```
Local Exception.
Traceback (most recent call last):
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/archiver.py", line 1261, in main
    exit_code = archiver.run(args)
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/archiver.py", line 1215, in run
    return args.func(args)
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/archiver.py", line 515, in do_upgrade
    repo.upgrade(args.dry_run, inplace=args.inplace)
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/upgrader.py", line 45, in upgrade
    keyfile = self.find_attic_keyfile()
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/upgrader.py", line 128, in find_attic_keyfile
    return AtticKeyfileKey.find_key_file(self)
  File "/nix/store/2smxfpi0kiz5lqzy3j6pqkvpkwhmxmf8-borgbackup-0.29.0/lib/python3.4/site-packages/borg/upgrader.py", line 268, in find_key_file
    for name in os.listdir(keys_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/home/philip/.attic/keys'

Platform: Linux katara 4.1.13 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 
Linux:     LibC: glibc 2.2.5
Python: CPython 3.4.4
```

Update: It’s actually pretty minor, since it will work with an empty `~/.attic/keys`.



Discussion:
yeah, but it shouldn't blow up without the dir.


Resolving patch:
diff --git a/borg/upgrader.py b/borg/upgrader.py
--- a/borg/upgrader.py
+++ b/borg/upgrader.py
@@ -267,10 +267,12 @@ def find_key_file(cls, repository):
         get_keys_dir = cls.get_keys_dir
         id = hexlify(repository.id).decode('ascii')
         keys_dir = get_keys_dir()
+        if not os.path.exists(keys_dir):
+            raise KeyfileNotFoundError(repository.path, keys_dir)
         for name in os.listdir(keys_dir):
             filename = os.path.join(keys_dir, name)
             with open(filename, 'r') as fd:
                 line = fd.readline().strip()
                 if line and line.startswith(cls.FILE_ID) and line[10:] == id:
                     return filename
-        raise KeyfileNotFoundError(repository.path, get_keys_dir())
+        raise KeyfileNotFoundError(repository.path, keys_dir)


Test patch:
Repository: borgbackup/borg

Issue:
borg list --short for extracting archive names
Please implement borg list --short for extracting archive names, one per line for scripting.

The current output requires some parsing to extract archive names for scripting. This would be useful for implementing mounting scripts of backups. 



Discussion:
Current --short option lists as such:

```
pm1-2016-01-17T20:43:04.287972.checkpoint Sun, 2016-01-17 21:26:22
pm1-2016-01-18T11:20:09.140282.checkpoint Mon, 2016-01-18 17:37:26
pm1-2016-01-19T14:22:01.970764       Tue, 2016-01-19 14:27:15
```

Useful to have only the archive name. This problem has also been solved below.

Bash one liner example solving this problem (and much more) courtesy of Manwe on irc.
`
 while IFS=$'\t' read -r NAME DATE ; do UNIXTIME=$(date -d "$DATE" +%s); REFTIME=$( date +"%s" -d "40 days ago") ; if [ $UNIXTIME -gt $REFTIME ] ; then echo $NAME ; echo $DATE; echo DoMountingHere; fi ; done < <(borg list /repo/Path |awk '{print $1"\t"$2" "$3" "$4}')`

@abclution likely the current `borg list --short` only works for archives (where it just outputs filenames), but not for repos (where it should output just the archive names).


Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -474,7 +474,10 @@ def do_list(self, args):
             for archive_info in manifest.list_archive_infos(sort_by='ts'):
                 if args.prefix and not archive_info.name.startswith(args.prefix):
                     continue
-                print(format_archive(archive_info))
+                if args.short:
+                    print(archive_info.name)
+                else:
+                    print(format_archive(archive_info))
         return self.exit_code
 
     def do_info(self, args):


Test patch:
Repository: borgbackup/borg

Issue:
trailing slash oddities
system info:

```
Platform: OpenBSD orchid.home 5.9 GENERIC.MP#1854 amd64 amd64
Borg: 0.30.0 Python: CPython 3.4.4
```

Trailing slashes in the path passed to `borg init` seem to matter later when running `borg create`. This should help illustrate the problem:

```
$ mkdir /tmp/backup
$ borg init /tmp/backup/
$ borg create /tmp/backup::test ~/src
Warning: The repository at location /tmp/backup was previously located at /tmp/backup/
Do you want to continue? [yN]
```

Note how `/tmp/backup/` was specified in `borg init`, but `/tmp/backup` (no trailing slash) was used in borg create. The problem is avoided if the pathname passed verbatim to `borg init` is used instead:

```
$ borg create /tmp/backup/::test ~/src
```

---

I'm not sure if this is by design, but I certainly found it surprising given that trailing slashes generally have no importance in Bourne-shell derivatives and the programs run within them.



Discussion:
yes, it's not too clever yet with that check.
but as long as you are consistent (always give same repo path), it is no problem.

see also: https://github.com/jborg/attic/issues/297

When fixing this, also check behaviour of relative pathes and pathes containing `.` and `..`.

> When fixing this, also check behaviour of relative pathes and pathes containing . and ...

Maybe we could pass the path argument through [`os.path.normpath()`](https://docs.python.org/2/library/os.path.html#os.path.abspath)? It should remove trailing slashes.


Resolving patch:
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -688,20 +688,20 @@ def _parse(self, text):
             self.user = m.group('user')
             self.host = m.group('host')
             self.port = m.group('port') and int(m.group('port')) or None
-            self.path = m.group('path')
+            self.path = os.path.normpath(m.group('path'))
             self.archive = m.group('archive')
             return True
         m = self.file_re.match(text)
         if m:
             self.proto = m.group('proto')
-            self.path = m.group('path')
+            self.path = os.path.normpath(m.group('path'))
             self.archive = m.group('archive')
             return True
         m = self.scp_re.match(text)
         if m:
             self.user = m.group('user')
             self.host = m.group('host')
-            self.path = m.group('path')
+            self.path = os.path.normpath(m.group('path'))
             self.archive = m.group('archive')
             self.proto = self.host and 'ssh' or 'file'
             return True


Test patch:
Repository: borgbackup/borg

Issue:
add cwd, pid and argv to traceback log
interpreting server logs can be confusing without this information.



Discussion:

Resolving patch:
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -989,7 +989,10 @@ def sysinfo():
     info.append('Platform: %s' % (' '.join(platform.uname()), ))
     if sys.platform.startswith('linux'):
         info.append('Linux: %s %s %s  LibC: %s %s' % (platform.linux_distribution() + platform.libc_ver()))
-    info.append('Borg: %s Python: %s %s' % (borg_version, platform.python_implementation(), platform.python_version()))
+    info.append('Borg: %s  Python: %s %s' % (borg_version, platform.python_implementation(), platform.python_version()))
+    info.append('PID: %d  CWD: %s' % (os.getpid(), os.getcwd()))
+    info.append('sys.argv: %r' % sys.argv)
+    info.append('SSH_ORIGINAL_COMMAND: %r' % os.environ.get('SSH_ORIGINAL_COMMAND'))
     info.append('')
     return '\n'.join(info)
 


Test patch:
Repository: borgbackup/borg

Issue:
start/end times in UTC
Hello,

I'm now using `borg 1.0.0rc1`

My timezone is America/Los_Angeles:

```
% date
Mon Feb  8 08:45:54 PST 2016
```

When a backup is generated, the start and end times are in UTC:

```
Start time: Mon Feb  8 16:46:44 2016
End time: Mon Feb  8 16:46:45 2016
Duration: 1.25 seconds
Number of files: 168
```

However I save the file with my time and date: 2016-02-08-08-46

I believe this is a new behavior for Borg but is it intended? My cron jobs will now report 7 - 8 hours ahead of when they started/ended. I can use the time I received the mail to know when it completed.



Discussion:
There are multiple issues here:
- output formatting for --stats (american format) and "borg info" (iso) is different
- also the labels and alignment are different
- "info" shows localtime, "create --stats" shows utc


Resolving patch:
diff --git a/borg/archive.py b/borg/archive.py
--- a/borg/archive.py
+++ b/borg/archive.py
@@ -1,5 +1,5 @@
 from binascii import hexlify
-from datetime import datetime
+from datetime import datetime, timezone
 from getpass import getuser
 from itertools import groupby
 import errno
@@ -16,7 +16,8 @@
 import time
 from io import BytesIO
 from . import xattr
-from .helpers import parse_timestamp, Error, uid2user, user2uid, gid2group, group2gid, format_timedelta, \
+from .helpers import Error, uid2user, user2uid, gid2group, group2gid, \
+    parse_timestamp, to_localtime, format_time, format_timedelta, \
     Manifest, Statistics, decode_dict, make_path_safe, StableDict, int_to_bigint, bigint_to_int, \
     ProgressIndicatorPercent
 from .platform import acl_get, acl_set
@@ -198,12 +199,16 @@ def duration(self):
         return format_timedelta(self.end - self.start)
 
     def __str__(self):
-        return '''Archive name: {0.name}
+        return '''\
+Archive name: {0.name}
 Archive fingerprint: {0.fpr}
-Start time: {0.start:%c}
-End time: {0.end:%c}
+Time (start): {start}
+Time (end):   {end}
 Duration: {0.duration}
-Number of files: {0.stats.nfiles}'''.format(self)
+Number of files: {0.stats.nfiles}'''.format(
+            self,
+            start=format_time(to_localtime(self.start.replace(tzinfo=timezone.utc))),
+            end=format_time(to_localtime(self.end.replace(tzinfo=timezone.utc))))
 
     def __repr__(self):
         return 'Archive(%r)' % self.name


Test patch:
Repository: borgbackup/borg

Issue:
borg rename should reject invalid destinations
With a bad copy/paste, I ended up doing something like:

```
borg rename /path/to/repo::archive /path/to/repo::renamed-archive
```

And now, `borg list` shows `/path/to/repo::renamed-archive` as the archive name, and commands like `rename`, `delete`, `info` fail saying that `/path/to/repo::/path/to/repo::renamed-archive` is an invalid location format.



Discussion:

Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -15,7 +15,7 @@
 import traceback
 
 from . import __version__
-from .helpers import Error, location_validator, format_time, format_file_size, \
+from .helpers import Error, location_validator, archivename_validator, format_time, format_file_size, \
     parse_pattern, PathPrefixPattern, to_localtime, timestamp, \
     get_cache_dir, get_keys_dir, prune_within, prune_split, \
     Manifest, remove_surrogates, update_excludes, format_archive, check_extension_modules, Statistics, \
@@ -1050,7 +1050,8 @@ def build_parser(self, args=None, prog=None):
         subparser.add_argument('location', metavar='ARCHIVE',
                                type=location_validator(archive=True),
                                help='archive to rename')
-        subparser.add_argument('name', metavar='NEWNAME', type=str,
+        subparser.add_argument('name', metavar='NEWNAME',
+                               type=archivename_validator(),
                                help='the new archive name to use')
 
         delete_epilog = textwrap.dedent("""
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -757,6 +757,14 @@ def validator(text):
     return validator
 
 
+def archivename_validator():
+    def validator(text):
+        if '/' in text or '::' in text or not text:
+            raise argparse.ArgumentTypeError('Invalid repository name: "%s"' % text)
+        return text
+    return validator
+
+
 def decode_dict(d, keys, encoding='utf-8', errors='surrogateescape'):
     for key in keys:
         if isinstance(d.get(key), bytes):


Test patch:
Repository: borgbackup/borg

Issue:
remove libc determination / display
platform.libc_ver() in python stdlib (even in python 3.5) determines the version number incorrectly as it uses string comparison to determine the maximum version number.

that's obviously broken as "2.9" > "2.10". :(

so, we better remove that from borg.



Discussion:

Resolving patch:
diff --git a/borg/helpers.py b/borg/helpers.py
--- a/borg/helpers.py
+++ b/borg/helpers.py
@@ -1051,7 +1051,7 @@ def sysinfo():
     info = []
     info.append('Platform: %s' % (' '.join(platform.uname()), ))
     if sys.platform.startswith('linux'):
-        info.append('Linux: %s %s %s  LibC: %s %s' % (platform.linux_distribution() + platform.libc_ver()))
+        info.append('Linux: %s %s %s' % platform.linux_distribution())
     info.append('Borg: %s  Python: %s %s' % (borg_version, platform.python_implementation(), platform.python_version()))
     info.append('PID: %d  CWD: %s' % (os.getpid(), os.getcwd()))
     info.append('sys.argv: %r' % sys.argv)


Test patch: