From 9c66e362c01984b2e1a8644d552bf050488b7258 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Thu, 11 Mar 2021 01:44:11 -0600 Subject: [PATCH] Include state files in the test case directory --- upload-ftp-v1.2.pl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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 { -- 2.25.1