From 1da28b87e80ab1e8751d504ba1f314bea1fd7c5d Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 2 Nov 2022 18:47:32 -0500 Subject: [PATCH] Revise fatal to throw an exception and move report phase accordingly This is an intermediate step towards collecting reporting at top-level. This commit also enables the cleanup processing that has long been present, but was skipped due to fatal calling exit instead of throwing an exception. The testsuite is adjusted accordingly. --- gatekeeper.pl | 66 +++++++++++++----------- testsuite/gatekeeper.all/01_loose.exp | 58 ++++++++++----------- testsuite/gatekeeper.all/03_triplet.exp | 68 ++++++++++++------------- testsuite/gatekeeper.all/11_am_cve.exp | 2 +- testsuite/gatekeeper.all/11_ratchet.exp | 4 +- 5 files changed, 102 insertions(+), 96 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index 9a4427e..c5eb442 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1192,11 +1192,6 @@ sub fatal { my $directive_file_contents = shift; my $exit_code = shift; - $directive_file_contents ||= ''; - if (($directive_file_contents ne '') && DEBUG) { - mail ($directive_file_contents,0,"debug: directive file contents"); - } - ftp_syslog('err', "$tainted_msg"); # Don't let them do perl or shell quoting tricks, but show everything @@ -1206,20 +1201,10 @@ sub fatal { $tainted_msg =~ m=^([-.:,/@\w\s]+)$=; my $msg = $1; - mail ($msg,$send_to_user); - - my $pid = open(PWD, "-|"); - my $cwd; - - if ($pid) { # parent - while () { - chomp ($cwd = $_); - } - close (PWD) or warn "pwd exited $?"; - } else { # child - exec ("/bin/pwd") or ftp_abort("can't exec pwd: $!"); - } - ftp_abort("(in $cwd) $msg",$exit_code); + our $Phase; + die {Phase => $Phase, + message => $msg, + send_to_user => $send_to_user}; } @@ -2433,6 +2418,12 @@ foreach my $packet (@packets) { # each list element is an array reference my $directive_file = $packet->[0]; my $upload_file = ''; my $sig_file = ''; + unless ($directive_only) { + foreach (@{$packet}[1..$#$packet]) { + if (m/[.]sig$/) { $sig_file =$_ } else { $upload_file = $_ } + } + } + eval { # trap exceptions encountered while processing a packet local $Phase = 'PV'; $directive_text = slurp_clearsigned_message($packet->[0]); @@ -2443,12 +2434,6 @@ foreach my $packet (@packets) { # each list element is an array reference fatal("directive file $directive_file has no signature",0) if $directive_text eq ''; - unless ($directive_only) { - foreach (@{$packet}[1..$#$packet]) { - if (m/[.]sig$/) { $sig_file =$_ } else { $upload_file = $_ } - } - } - # this function just updates $info{email} guess_email_address_from_signature($directive_text); @@ -2484,19 +2469,40 @@ foreach my $packet (@packets) { # each list element is an array reference # do the work execute_commands($oplist); - $Phase = 'RP'; # temporary; TODO: move to after eval {} + $complete = 1; + }; + + if ($complete) { + local $Phase = 'RP'; + # report success if (!$directive_only) { success_upload($sig_file, $upload_file, $directive_file); } else { success_directive($directive_file); } + } else { + local $Phase = 'RP'; - $complete = 1; - }; + if (ref $@) { + # Processing explicitly threw an exception + my $E = $@; # preserve the exception, since many functions use eval + + unless ($oplist) { + # The directive text is emailed immediately after $oplist is set, + # so if $oplist is not set, then we still need to send it. Do so now. + mail($directive_text,0,'debug: directive file contents') + if $directive_text && DEBUG; + } - unless ($complete) { - warn "eval failed: $@"; + # If a send_to_user key is set, then this came from a call to fatal(). + if (defined $E->{send_to_user}) { + mail($E->{message},$E->{send_to_user}); + } + } else { + # Exceptions thrown by perl itself come out as strings + warn "error during processing: $@"; + } # clean up files if we abort while processing a triplet cleanup ($sig_file, $upload_file, $directive_file) diff --git a/testsuite/gatekeeper.all/01_loose.exp b/testsuite/gatekeeper.all/01_loose.exp index 72b927a..43d04d5 100644 --- a/testsuite/gatekeeper.all/01_loose.exp +++ b/testsuite/gatekeeper.all/01_loose.exp @@ -103,7 +103,7 @@ check_loose_directive "bogus: unsigned with no directory specified" { } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { unsigned-directive,foo.directive.asc "unsigned directive" } email-to { @@ -119,7 +119,7 @@ check_loose_directive "bogus: unsigned for bogus package" { } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { unsigned-directive,foo.directive.asc "unsigned directive" } email-to { @@ -135,7 +135,7 @@ check_loose_directive "bogus: unsigned for package with no email address" { } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { unsigned-directive,foo.directive.asc "unsigned directive" } email-to { @@ -151,7 +151,7 @@ check_loose_directive "bogus: unsigned for valid package" { } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { unsigned-directive,foo.directive.asc "unsigned directive" } email-to { @@ -166,7 +166,7 @@ check_loose_directive "bogus: signed with no directory specified" { } dsig { good 00 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,no-directory-given "directive rejected: no directory specified" } email-to { @@ -183,7 +183,7 @@ check_loose_directive "bogus: signed with wrong key" { } dsig { good 01 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { gpgv,directive-verify-failed "incorrect signature rejected" } email-to { @@ -201,7 +201,7 @@ check_loose_directive "bogus: signed with wrong key and directory repeated" { } dsig { good 01 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,bad-directory-repeat "duplicate directory rejected" } email-to { @@ -219,7 +219,7 @@ check_loose_directive "bogus: signed with wrong key and directory ambiguous" { } dsig { good 01 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,bad-directory-repeat "ambiguous directory rejected" } email-to { @@ -236,7 +236,7 @@ check_loose_directive "bogus: signed with wrong key and too deep" { } dsig { good 01 1001 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,bad-directory-depth "excessively deep directory rejected" } email-to { @@ -252,7 +252,7 @@ check_loose_directive "bogus: signed for bogus package" { } dsig { good 02 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { unknown-package "unknown package from directive" } email-to { @@ -280,7 +280,7 @@ check_loose_directive "bogus: no actual command" { } dsig { good 04 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,no-op "null directive rejected" } email-to { @@ -297,7 +297,7 @@ check_loose_directive "bogus: set 'replace' but no actual command" { } dsig { good 05 1000 } } file-tree { { incoming stage pub archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } } log { validate,no-op "null directive rejected" } email-to { @@ -358,7 +358,7 @@ check_loose_directive "error: create symlink using /../ in name" { } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin foo/bar/README } } log { validate,bad-parameter,symlink \ @@ -378,7 +378,7 @@ check_loose_directive "error: create symlink using /../ in target" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink \ @@ -398,7 +398,7 @@ check_loose_directive "error: create symlink with bogus name" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "bogus symlink name rejected" @@ -417,7 +417,7 @@ check_loose_directive "error: create symlink with bogus target" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "bogus symlink target rejected" @@ -436,7 +436,7 @@ check_loose_directive "error: create symlink with absolute name" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "absolute symlink name rejected" @@ -455,7 +455,7 @@ check_loose_directive "error: create symlink with absolute target" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "absolute symlink target rejected" @@ -474,7 +474,7 @@ check_loose_directive "error: create symlink with only one parameter" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "bogus symlink command rejected" @@ -493,7 +493,7 @@ check_loose_directive "error: create symlink with too many parameters" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,symlink "bogus symlink command rejected" @@ -558,7 +558,7 @@ check_loose_directive "error: remove symlink using /../" { pub { foo-1.2.bin foo/foo-latest.bin } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.2.bin foo/foo-latest.bin } { pub } symlink-targets { foo-1.2.bin foo/foo-latest.bin } } log { @@ -579,7 +579,7 @@ check_loose_directive "error: remove symlink with bogus name" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,rmsymlink \ @@ -601,7 +601,7 @@ check_loose_directive "error: remove symlink with absolute name" { pub { foo-1.0.bin foo/foo-latest.bin } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin foo/foo-latest.bin } { pub } symlink-targets { foo-1.0.bin foo/foo-latest.bin } } log { @@ -622,7 +622,7 @@ check_loose_directive "error: remove symlink with too many parameters" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { validate,bad-parameter,rmsymlink \ @@ -642,7 +642,7 @@ check_loose_directive "error: remove file as if symlink" { pub { foo/foo-1.0.bin { good 05 1000 } } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin } } log { action,rm-symlink-failure,not-link \ @@ -665,7 +665,7 @@ check_loose_directive "error: replace file with symlink" { } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin foo/foo-1.2.bin } } log { action,make-symlink-failure "overwrite with symlink fails" @@ -760,7 +760,7 @@ check_loose_directive "error: archive non-existent file" { } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.2.bin } } log { action,archive-failure,not-found "cannot archive nonexistent file" @@ -782,7 +782,7 @@ check_loose_directive "error: archive bogus name" { } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin foo/foo-1.2.bin } } log { validate,bad-parameter,archive \ @@ -805,7 +805,7 @@ check_loose_directive "error: archive name using /../" { } } file-tree { { incoming stage archive } empty {} - { in-stage } files { foo.directive.asc } + { in-stage } files { .foo.directive.asc } { pub } files { foo/foo-1.0.bin foo/foo-1.2.bin } } log { validate,bad-parameter,archive \ diff --git a/testsuite/gatekeeper.all/03_triplet.exp b/testsuite/gatekeeper.all/03_triplet.exp index 7d32e79..9af852f 100644 --- a/testsuite/gatekeeper.all/03_triplet.exp +++ b/testsuite/gatekeeper.all/03_triplet.exp @@ -106,7 +106,7 @@ check_triplet "bogus: signature from unknown key in directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.tar.gz.directive.asc foo.tar.gz.sig foo.tar.gz + .foo.tar.gz.directive.asc .foo.tar.gz.sig .foo.tar.gz } } log { found,foo.tar.gz.directive.asc "found directive in triplet" @@ -143,7 +143,7 @@ check_triplet "bogus: signature from unknown key on file" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.tar.gz.directive.asc foo.tar.gz.sig foo.tar.gz + .foo.tar.gz.directive.asc .foo.tar.gz.sig .foo.tar.gz } } log { found,foo.tar.gz.directive.asc "found directive in triplet" @@ -182,7 +182,7 @@ check_triplet "bogus: bad signature in directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.tar.gz.directive.asc foo.tar.gz.sig foo.tar.gz + .foo.tar.gz.directive.asc .foo.tar.gz.sig .foo.tar.gz } } log { found,foo.tar.gz.directive.asc "found directive in triplet" @@ -219,7 +219,7 @@ check_triplet "bogus: bad signature on file" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.tar.gz.directive.asc foo.tar.gz.sig foo.tar.gz + .foo.tar.gz.directive.asc .foo.tar.gz.sig .foo.tar.gz } } log { found,foo.tar.gz.directive.asc "found directive in triplet" @@ -251,7 +251,7 @@ check_triplet "bogus: empty directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin foo.bin.sig foo.bin.directive.asc + .foo.bin .foo.bin.sig .foo.bin.directive.asc } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -284,7 +284,7 @@ check_triplet "bogus: directive with unknown key" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin foo.bin.sig foo.bin.directive.asc + .foo.bin .foo.bin.sig .foo.bin.directive.asc } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -321,7 +321,7 @@ check_triplet "bogus: signed for unknown package" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -362,7 +362,7 @@ check_triplet "bogus: signed but package has no keys" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -407,7 +407,7 @@ check_triplet "bogus: signed but package has no email addresses" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -442,7 +442,7 @@ check_triplet "bogus: directive signature from the future" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -485,7 +485,7 @@ check_triplet "bogus: signed with wrong key" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -527,7 +527,7 @@ check_triplet "bogus: signed with wrong key in directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -570,7 +570,7 @@ check_triplet "bogus: signed with wrong key on file" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - bar.tar.gz.directive.asc bar.tar.gz.sig bar.tar.gz + .bar.tar.gz.directive.asc .bar.tar.gz.sig .bar.tar.gz } } log { found,bar.tar.gz.directive.asc "found directive in triplet" @@ -616,7 +616,7 @@ check_triplet "bogus: version field not a number" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -650,7 +650,7 @@ check_triplet "bogus: invalid v1.0 format directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -682,7 +682,7 @@ check_triplet "obsolete: v1.0 format directive" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -717,7 +717,7 @@ check_triplet "bogus: duplicated version key" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -752,7 +752,7 @@ check_triplet "bogus: ambiguous version declaration" setup { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -789,7 +789,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -823,7 +823,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -859,7 +859,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -895,7 +895,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -930,7 +930,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -964,7 +964,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -999,7 +999,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1043,7 +1043,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1079,7 +1079,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1115,7 +1115,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1152,7 +1152,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1270,7 +1270,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage pub archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } } log { found,foo.bin.directive.asc "found directive in triplet" @@ -1346,7 +1346,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { pub } files { foo/foo.bin foo/foo.bin.sig @@ -1389,7 +1389,7 @@ foreach FVER $DIRECTIVE_FORMAT_VERSIONS { file-tree { { incoming stage archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { pub } files { foo/foo.bin @@ -1433,7 +1433,7 @@ check_triplet "bogus: v1.1 format directive to replace file" setup { file-tree { { incoming stage archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { pub } files { foo/foo.bin foo/foo.bin.sig @@ -1515,7 +1515,7 @@ check_triplet "bogus: v1.2 format directive with bogus replace value" setup { file-tree { { incoming stage archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { pub } files { foo/foo.bin foo/foo.bin.sig diff --git a/testsuite/gatekeeper.all/11_am_cve.exp b/testsuite/gatekeeper.all/11_am_cve.exp index 3c4523b..e70317a 100644 --- a/testsuite/gatekeeper.all/11_am_cve.exp +++ b/testsuite/gatekeeper.all/11_am_cve.exp @@ -71,7 +71,7 @@ proc check_am_cve_upload {desc fragment {log {}}} { { incoming stage pub archive } empty {} analyze_file_tree $tenv "am_cve: $desc" \ { in-stage } files { - foo.tar.gz.directive.asc foo.tar.gz.sig foo.tar.gz + .foo.tar.gz.directive.asc .foo.tar.gz.sig .foo.tar.gz } close_test_environment $tenv diff --git a/testsuite/gatekeeper.all/11_ratchet.exp b/testsuite/gatekeeper.all/11_ratchet.exp index acc3b2c..b56ac5b 100644 --- a/testsuite/gatekeeper.all/11_ratchet.exp +++ b/testsuite/gatekeeper.all/11_ratchet.exp @@ -137,7 +137,7 @@ check_ratchet_handling "simple replay of new upload" setup { file-tree { { incoming stage archive } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { pub } files { foo/foo.bin.sig foo/foo.bin @@ -297,7 +297,7 @@ check_ratchet_handling "replay replaced upload" setup { file-tree { { incoming stage } empty {} { in-stage } files { - foo.bin.directive.asc foo.bin.sig foo.bin + .foo.bin.directive.asc .foo.bin.sig .foo.bin } { archive } archived-files { foo/foo.bin -- 2.25.1