$NetBSD: patch-sa-update,v 1.7 2023/08/15 10:20:00 abs Exp $ Prepare for substitution. Plus switch from rdatastr to rdstring to avoid deprecated warning https://svn.apache.org/viewvc?view=revision&revision=1910601 --- sa-update.raw.orig 2022-12-14 06:03:27.000000000 +0000 +++ sa-update.raw @@ -361,10 +361,10 @@ my $GPGPath; if ($GPG_ENABLED || $opt{'import'}) { # find GPG in the PATH # bug 4958: for *NIX it's "gpg", in Windows it's "gpg.exe" - $GPGPath = 'gpg' . $Config{_exe}; + $GPGPath = '@GPGPATH@' . $Config{_exe}; dbg("gpg: Searching for '$GPGPath'"); - if ($GPGPath = Mail::SpamAssassin::Util::find_executable_in_env_path($GPGPath)) { + if (-f $GPGPath) { dbg("gpg: found $GPGPath"); # bug 5030: if GPGPath has a space, put it in quotes @@ -1458,7 +1458,7 @@ sub do_dns_query { next if !$rr; # no answer records, only rcode next if $rr->type ne $rr_type; # scalar context! - my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : $rr->rdatastr; + my $text = $rr->UNIVERSAL::can('txtdata') ? $rr->txtdata : $rr->rdstring; push(@result,$text) if defined $text && $text ne ''; } printf("DNS %s query: %s -> %s\n", $rr_type, $query, join(", ",@result)) @@ -1628,10 +1628,8 @@ sub http_get { } } } else { - foreach my $try_prog ('curl', 'wget', 'fetch') { - $cmd = Mail::SpamAssassin::Util::find_executable_in_env_path($try_prog); - if (defined $cmd && $cmd ne '') { $ext_prog = $try_prog; last } - } + $ext_prog = '@SA_UPDATE_FETCH_PROG@'; + $cmd = '@SA_UPDATE_FETCH_CMD@'; } if (defined $ext_prog && $ext_prog eq 'curl') {