Revise fatal to throw an exception and move report phase accordingly
authorJacob Bachmeyer <jcb@gnu.org>
Wed, 2 Nov 2022 23:47:32 +0000 (18:47 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Wed, 2 Nov 2022 23:47:32 +0000 (18:47 -0500)
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
testsuite/gatekeeper.all/01_loose.exp
testsuite/gatekeeper.all/03_triplet.exp
testsuite/gatekeeper.all/11_am_cve.exp
testsuite/gatekeeper.all/11_ratchet.exp

index 9a4427e2329cb060a4ee5fe12e46c0c6c163ce45..c5eb442fafa4c2d5718dbee335f2a7ce5d74a4e4 100755 (executable)
@@ -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 (<PWD>) {
-      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};
 }
 
 \f
@@ -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)
index 72b927a3e3dea9c910643dd0cb28f2f9f01fd737..43d04d594316d38661c611b3cee50c09f36399f2 100644 (file)
@@ -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 \
index 7d32e79846fafff3ef80c328db5749e8bba3688b..9af852f33b8c8bc8b00e3de3609d27c06f38d66b 100644 (file)
@@ -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
index 3c4523b12c1709b30855aa33dbb92305ac4fb236..e70317a2fcc7227f305f9dea8cd4a962482dc016 100644 (file)
@@ -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
index acc3b2cedd475128d29a24689ce25a4da0f10d2f..b56ac5b497f2ed6d8700b01f0149f30360a0ae44 100644 (file)
@@ -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