From f9414266ee6c1bb92785fcba6ab94b5066d8dab5 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Tue, 21 Mar 2023 22:05:15 -0500 Subject: [PATCH] Add options for specifying gpgv and lsof tools This aligns the gatekeeper with the keymaster and permits the external tools to be placed in a nonstandard location if desired. --- gatekeeper.pl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index 73b8a5a..62a78a8 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -70,6 +70,16 @@ Used for system distributions hosted or mirrored on ftp.gnu.org. =back +=item B<--with-gpgv> + +Specify alternate location for GPG signature verfication tool. Default is +C. + +=item B<--with-lsof> + +Specify alternate location for lsof(8) open file checking tool. Default is +C. + =back There are also intentionally undocumented options, which can be found in @@ -233,6 +243,9 @@ BEGIN { my $want_help = ''; my $want_version = ''; + my $GPGV_Bin = '/usr/bin/gpgv'; + my $LSOF_Bin = '/usr/bin/lsof'; + # Set this to 1 or higher to get debug output in the log file. my $DEBUG = 1; @@ -247,6 +260,8 @@ BEGIN { GetOptions('help' => \$want_help, 'version' => \$want_version, 'zone|z|s=s' => \$ZONE, + 'with-gpgv=s' => \$GPGV_Bin, + 'with-lsof=s' => \$LSOF_Bin, 'tstampcheck=i' => \$TSTAMPCHECK, 'nomail=i' => \$NOMAIL, 'debug|d=i' => \$DEBUG, @@ -274,8 +289,8 @@ BEGIN { my $sys_mock = File::Spec->catfile($1, qw(testsuite lib exec mocktool)); constant->import(LSOF_BIN => $sys_mock, 'lsof'); } else { - constant->import(GPGV_BIN => '/usr/bin/gpgv'); - constant->import(LSOF_BIN => '/usr/bin/lsof'); + constant->import(GPGV_BIN => $GPGV_Bin); + constant->import(LSOF_BIN => $LSOF_Bin); } } -- 2.25.1