You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Juan Miscaro <jm...@gmail.com> on 2008/09/02 15:30:17 UTC
error: gpg required but not found!
I have sa-update running from cron every Sunday and on one of my
machines I get the output:
error: gpg required but not found!
I don't understand why I'm getting this. The script says it ouputs
this when it can't find the gpg executable but it is there:
/usr/local/bin/gpg
Just like on all my other machines. I'm thinking
Mail::SpamAssassin::Util::find_executable_in_env_path is not working
correctly. The pertinent excerpt is:
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};
dbg("gpg: Searching for '$GPGPath'");
if ($GPGPath =
Mail::SpamAssassin::Util::find_executable_in_env_path($GPGPath)) {
dbg("gpg: found $GPGPath");
# bug 5030: if GPGPath has a space, put it in quotes
if ($GPGPath =~ / /) {
$GPGPath =~ s/"/\\"/g;
$GPGPath = qq/"$GPGPath"/;
dbg("gpg: path changed to $GPGPath");
}
}
else {
die "error: gpg required but not found!\n";
}
When I run the script at the command line I don't get any output.
Any ideas?
/juan
Re: error: gpg required but not found!
Posted by Juan Miscaro <jm...@gmail.com>.
2008/9/2 Karsten Bräckelmann <gu...@rudersport.de>:
> On Tue, 2008-09-02 at 09:30 -0400, Juan Miscaro wrote:
>> I have sa-update running from cron every Sunday and on one of my
> ^^^^
>> machines I get the output:
>>
>> error: gpg required but not found!
>>
>> I don't understand why I'm getting this. The script says it ouputs
>> this when it can't find the gpg executable but it is there:
>>
>> /usr/local/bin/gpg
> ^^^^^^^^^^^^^^
>
>> When I run the script at the command line I don't get any output.
> ^^^^^^^^^^^^^^^^^^^
>> Any ideas?
>
> Cron does not use the same $PATH as your interactive shell. You'd need
> to set the $PATH variable in your crontab to contain that path.
Thank you.
Re: error: gpg required but not found!
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2008-09-02 at 09:30 -0400, Juan Miscaro wrote:
> I have sa-update running from cron every Sunday and on one of my
^^^^
> machines I get the output:
>
> error: gpg required but not found!
>
> I don't understand why I'm getting this. The script says it ouputs
> this when it can't find the gpg executable but it is there:
>
> /usr/local/bin/gpg
^^^^^^^^^^^^^^
> When I run the script at the command line I don't get any output.
^^^^^^^^^^^^^^^^^^^
> Any ideas?
Cron does not use the same $PATH as your interactive shell. You'd need
to set the $PATH variable in your crontab to contain that path.
guenther
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: error: gpg required but not found!
Posted by Greg Troxel <gd...@ir.bbn.com>.
error: gpg required but not found!
/usr/local/bin/gpg
As someone else noted, cron typically has a restricted path.
I have
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/pkg/bin/
at the beginning of crontab so that sa-update will find /usr/pkg/bin/gpg
I think it would be better if sa-update found gpg at configure time and
substituted in the path - I'd like to patch sa-update (in pkgsrc) to
work without /usr/pkg/bin in the path, but it seemed non-obvious how to
do that. Perhaps just replace all the searching with
$GPGPath = "/usr/pkg/bin/gpg";