[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
92/376: Fix NIX_SSHOPTS
From: |
Ludovic Courtès |
Subject: |
92/376: Fix NIX_SSHOPTS |
Date: |
Wed, 28 Jan 2015 22:04:15 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 17ef2346723b96080cc912da646df4f6424e83fa
Author: Eelco Dolstra <address@hidden>
Date: Thu Jul 24 16:24:57 2014 +0200
Fix NIX_SSHOPTS
Closes #302.
---
perl/lib/Nix/CopyClosure.pm | 6 +++---
perl/lib/Nix/SSH.pm | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/perl/lib/Nix/CopyClosure.pm b/perl/lib/Nix/CopyClosure.pm
index 061a15c..e12fef6 100644
--- a/perl/lib/Nix/CopyClosure.pm
+++ b/perl/lib/Nix/CopyClosure.pm
@@ -100,7 +100,7 @@ sub oldCopyTo {
# Optionally use substitutes on the remote host.
if (!$dryRun && $useSubstitutes) {
- system "ssh $sshHost @{$sshOpts} nix-store -r --ignore-unknown
@closure";
+ system "ssh $sshHost @{$sshOpts} @globalSshOpts nix-store -r
--ignore-unknown @closure";
# Ignore exit status because this is just an optimisation.
}
@@ -112,7 +112,7 @@ sub oldCopyTo {
my $missingSize = 0;
while (scalar(@closure) > 0) {
my @ps = splice(@closure, 0, 1500);
- open(READ, "set -f; ssh $sshHost @{$sshOpts} nix-store
--check-validity --print-invalid @ps|");
+ open(READ, "set -f; ssh $sshHost @{$sshOpts} @globalSshOpts nix-store
--check-validity --print-invalid @ps|");
while (<READ>) {
chomp;
push @missing, $_;
@@ -130,7 +130,7 @@ sub oldCopyTo {
if (scalar @missing > 0) {
print STDERR "copying ", scalar @missing, " missing paths to
‘$sshHost’...\n";
unless ($dryRun) {
- open SSH, "| $progressViewer $compressor ssh $sshHost @{$sshOpts}
'$decompressor nix-store --import' > /dev/null" or die;
+ open SSH, "| $progressViewer $compressor ssh $sshHost @{$sshOpts}
@globalSshOpts '$decompressor nix-store --import' > /dev/null" or die;
exportPaths(fileno(SSH), $sign, @missing);
close SSH or die "copying store paths to remote machine `$sshHost'
failed: $?";
}
diff --git a/perl/lib/Nix/SSH.pm b/perl/lib/Nix/SSH.pm
index 76a2099..9e0c10b 100644
--- a/perl/lib/Nix/SSH.pm
+++ b/perl/lib/Nix/SSH.pm
@@ -6,12 +6,16 @@ use IPC::Open2;
our @ISA = qw(Exporter);
our @EXPORT = qw(
+ @globalSshOpts
readN readInt readString readStrings
writeInt writeString writeStrings
connectToRemoteNix
);
+our @globalSshOpts = split ' ', ($ENV{"NIX_SSHOPTS"} or "");
+
+
sub readN {
my ($bytes, $from) = @_;
my $res = "";
@@ -82,7 +86,7 @@ sub connectToRemoteNix {
# Start ‘nix-store --serve’ on the remote host.
my ($from, $to);
# FIXME: don't start a shell, start ssh directly.
- my $pid = open2($from, $to, "exec ssh -x -a $sshHost @{$sshOpts} nix-store
--serve --write $extraFlags");
+ my $pid = open2($from, $to, "exec ssh -x -a $sshHost @globalSshOpts
@{$sshOpts} nix-store --serve --write $extraFlags");
# Do the handshake.
my $SERVE_MAGIC_1 = 0x390c9deb; # FIXME
- 86/376: nix-store --serve: Only monitor stdin during builds, (continued)
- 86/376: nix-store --serve: Only monitor stdin during builds, Ludovic Courtès, 2015/01/28
- 77/376: nix-daemon: Less verbosity, Ludovic Courtès, 2015/01/28
- 74/376: nix-daemon: Use a thread instead of SIGPOLL to catch client disconnects, Ludovic Courtès, 2015/01/28
- 99/376: install-nix-from-closure.sh: Install cacert, Ludovic Courtès, 2015/01/28
- 93/376: nix-copy-closure: Implement --gzip via ssh's -C flag, Ludovic Courtès, 2015/01/28
- 91/376: Remove obsolete SSH master connection code, Ludovic Courtès, 2015/01/28
- 100/376: Rename nixPath to __nixPath, Ludovic Courtès, 2015/01/28
- 95/376: Change the default for use-ssh-substituter to ‘true’, Ludovic Courtès, 2015/01/28
- 90/376: Implement nix-copy-closure --from via nix-store --serve, Ludovic Courtès, 2015/01/28
- 97/376: Remove outdated AUTHORS file, Ludovic Courtès, 2015/01/28
- 92/376: Fix NIX_SSHOPTS,
Ludovic Courtès <=
- 103/376: Allow regular files as GC roots, Ludovic Courtès, 2015/01/28
- 94/376: nix-copy-closure: Drop --bzip2, --xz, --show-progress, Ludovic Courtès, 2015/01/28
- 84/376: Use pthread_cancel instead of a signal, Ludovic Courtès, 2015/01/28
- 102/376: Restore default SIGPIPE handler before invoking ‘man’, Ludovic Courtès, 2015/01/28
- 98/376: nix-profile.sh: Set $SSL_CERT_FILE, Ludovic Courtès, 2015/01/28
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, Ludovic Courtès, 2015/01/28
- 101/376: make clean: Remove Makefile.config, Ludovic Courtès, 2015/01/28
- 105/376: findRoots(): Prevent a call to lstat(), Ludovic Courtès, 2015/01/28
- 108/376: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/01/28
- 107/376: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/01/28