From fb4f8992c3ebd0d7b65b539e8c1e00c8b570bb4c Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 14 May 2012 01:07:04 +1000 Subject: [PATCH] Fix broken secring references in dev-camput and dev-camget. Fix dev-pass-camput. Change-Id: I35102e5fa955d8aa58d7aa25c043245b2ec54231 --- dev-camget | 2 +- dev-camput | 8 +++++++- dev-pass-camput | 19 +++---------------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/dev-camget b/dev-camget index c953e38b0..94f8b98fe 100755 --- a/dev-camget +++ b/dev-camget @@ -26,7 +26,7 @@ my $camget = build_bin("./cmd/camget"); $ENV{"CAMLI_CONFIG_DIR"} = "$Bin/config/dev-client-dir"; # Respected by env expansions in config/dev-client-dir/config -$ENV{"CAMLI_SECRET_RING"} = "$Bin/lib/go/camli/jsonsign/testdata/test-secring.gpg"; +$ENV{"CAMLI_SECRET_RING"} = "$Bin/pkg/jsonsign/testdata/test-secring.gpg"; $ENV{"CAMLI_KEYID"} = "26F5ABDA"; $ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs"; $ENV{CAMLI_AUTH} = "userpass:camlistore:pass3179"; diff --git a/dev-camput b/dev-camput index 25aec9706..283a99a59 100755 --- a/dev-camput +++ b/dev-camput @@ -26,7 +26,7 @@ my $camput = build_bin("./cmd/camput"); $ENV{"CAMLI_CONFIG_DIR"} = "$Bin/config/dev-client-dir"; # Respected by env expansions in config/dev-client-dir/config -$ENV{"CAMLI_SECRET_RING"} = "$Bin/lib/go/camli/jsonsign/testdata/test-secring.gpg"; +$ENV{"CAMLI_SECRET_RING"} = "$Bin/pkg/jsonsign/testdata/test-secring.gpg"; $ENV{"CAMLI_KEYID"} = "26F5ABDA"; $ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs"; $ENV{"CAMLI_AUTH"} = "userpass:camlistore:pass3179"; @@ -34,6 +34,12 @@ my $blobserver = "http://localhost:3179/bs"; if ($opt_tls) { $blobserver =~ s/^http/https/; } +if ($ENV{"CAMLI_WANT_CAMPUT_PASSWORD"}) { # Set by dev-pass-camput + $ENV{"CAMLI_SECRET_RING"} = "$Bin/pkg/jsonsign/testdata/password-foo-secring.gpg"; + $ENV{"CAMLI_KEYID"} = "C7C3E176"; + $ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs"; + print "**\n** Note: password is \"foo\"\n**\n"; +} exec("$camput", "--verbose", diff --git a/dev-pass-camput b/dev-pass-camput index aae7cec52..422ae3c41 100755 --- a/dev-pass-camput +++ b/dev-pass-camput @@ -3,19 +3,6 @@ use strict; use FindBin qw($Bin); -system("$Bin/build.pl", "camput") and die "failed to build camput"; - -# Respected by camli/osutil: -$ENV{"CAMLI_CONFIG_DIR"} = "$Bin/config/dev-client-dir"; - -# Respected by env expansions in config/dev-client-dir/config -$ENV{"CAMLI_SECRET_RING"} = "$Bin/lib/go/camli/jsonsign/testdata/password-foo-secring.gpg"; -$ENV{"CAMLI_KEYID"} = "C7C3E176"; -$ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs"; - -print "**\n** Note: password is \"foo\"\n**\n"; -system("$Bin/clients/go/camput/camput", - "--verbose", - "--blobserver=http://localhost:3179/bs", - "--password=pass3179", - @ARGV); +$ENV{"CAMLI_WANT_CAMPUT_PASSWORD"} = 1; +exec("$Bin/dev-camput", @ARGV); +die "failed to find/run $Bin/dev-camput";