From: Jacob Bachmeyer Date: Thu, 11 Mar 2021 07:44:11 +0000 (-0600) Subject: Include state files in the test case directory X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9c66e362c01984b2e1a8644d552bf050488b7258;p=gatekeeper.git Include state files in the test case directory --- diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index 9624739..d6172e2 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -240,13 +240,20 @@ if (IN_TEST_MODE) { # override the above for testing # Again, the test environment is trusted, but we still run in taint mode. $ENV{TEST_BASE_DIR} =~ m/^([[:graph:] ]+$)/ && -d $1 or die "ftp-upload: test mode: TEST_BASE_DIR not valid"; - my $basedir = $1; # untainted - $package_config_base = File::Spec->catdir($basedir, 'packages'); - $incoming_dir = File::Spec->catdir($basedir, 'incoming'); - $incoming_tmp = File::Spec->catdir($basedir, 'in-stage'); - $desttmp = File::Spec->catdir($basedir, 'stage'); - $destfinal = File::Spec->catdir($basedir, 'pub'); - $olddestfinal = File::Spec->catdir($basedir, 'archive'); + my $base = $1; # untainted + + $package_config_base = File::Spec->catdir($base, 'packages'); + + $incoming_dir = File::Spec->catdir($base, 'incoming'); + $incoming_tmp = File::Spec->catdir($base, 'in-stage'); + $desttmp = File::Spec->catdir($base, 'stage'); + $destfinal = File::Spec->catdir($base, 'pub'); + $olddestfinal = File::Spec->catdir($base, 'archive'); + + $master_keyring = File::Spec->catfile($base, 'rootring.gpg'); + $email_blacklist = File::Spec->catfile($base, 'email.blacklist'); + $maintainers_bypkg = File::Spec->catfile($base, 'm.bypkg'); + $serials_path = File::Spec->catfile($base, 'serial.txt'); } # verify mock gpgv {