chiark / gitweb /
automatic agpl compliance: wip fixes, need to check output tarballs are what we expect
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Feb 2013 17:04:18 +0000 (17:04 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 18 Feb 2013 17:04:18 +0000 (17:04 +0000)
cgi-auth-flexible.pm

index a462bf8..ea83348 100644 (file)
@@ -289,6 +289,9 @@ sub srcdump_dir_cpio ($$$$$) {
     }
     $!=0; (waitpid $pid, 0) == $pid or die "$!";
     die "$dir ($script) $outfile $?" if $?;
+    print STDERR
+       "CGI::Auth::Flexible srcdump_dir_cpio saved $dir into $outfile\n"
+       or die $!;
     $$tarballcounter++;
     return $outfile;
 }
@@ -321,8 +324,12 @@ sub srcdump_dirscan_prepare ($$) {
                                \$srctarballcounter, \$needlicence, \%dirsdone);
        $dirsdone{$incdir}++;
     }
+    $!=0;
+    my $r = system qw(tar -zvvc -f), "$dumpdir/source.tmp", '--', @srcfiles;
+    die "tar $r $!" if $r;
     die "licence file not found" unless defined $needlicence;
     srcdump_install($c,$v, $dumpdir, 'licence', 'text/plain');
+    srcdump_install($c,$v, $dumpdir, 'source', 'application/octet-stream');
     close $lockf or die $!;
 }