summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorenkore <public@enkore.de>2016-08-21 00:16:24 +0200
committerGitHub <noreply@github.com>2016-08-21 00:16:24 +0200
commit81dd38170138af300d71bf3482be43ee49b1becb (patch)
tree796a84cef0bf9d0019baabeb40371b7634ae5602 /src
parent9baa024f4a5a617c9bbfe63ab832c7586576ea75 (diff)
parente7fccaccb2ee46da252f616ac7a57dde45873826 (diff)
Merge pull request #1507 from ThomasWaldmann/use-modified-pyinstaller
use patched LDLP-preserving pyinstaller
Diffstat (limited to 'src')
-rw-r--r--src/borg/remote.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/borg/remote.py b/src/borg/remote.py
index c3c3f7282..c0fda9639 100644
--- a/src/borg/remote.py
+++ b/src/borg/remote.py
@@ -167,9 +167,15 @@ class RemoteRepository:
env = dict(os.environ)
if not testing:
borg_cmd = self.ssh_cmd(location) + borg_cmd
- # pyinstaller binary adds LD_LIBRARY_PATH=/tmp/_ME... but we do not want
- # that the system's ssh binary picks up (non-matching) libraries from there
- env.pop('LD_LIBRARY_PATH', None)
+ # pyinstaller binary modifies LD_LIBRARY_PATH=/tmp/_ME... but we do not want
+ # that the system's ssh binary picks up (non-matching) libraries from there.
+ # thus we install the original LDLP, before pyinstaller has modified it:
+ lp_key = 'LD_LIBRARY_PATH'
+ lp_orig = env.get(lp_key + '_ORIG') # pyinstaller >= 20160820 has this
+ if lp_orig is not None:
+ env[lp_key] = lp_orig
+ else:
+ env.pop(lp_key, None)
env.pop('BORG_PASSPHRASE', None) # security: do not give secrets to subprocess
env['BORG_VERSION'] = __version__
self.p = Popen(borg_cmd, bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)