PATH for executing external programs from RT?

Dear all,

When I click on ‘graph’ links in the Ticket display I get an error like so:

Command ‘dot’ not found in /bin, /usr/bin at
/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm line 1160 Stack:
[/usr/local/lib/perl5/5.8.9/Carp.pm:44]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:1213]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:2051]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:2758]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:1432]
[/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm:1160]
[/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm:981]
[/usr/local/share/rt38/html/Ticket/Graphs/Elements/ShowGraph:49]
[/usr/local/share/rt38/html/Ticket/Graphs/Elements/ShowGraph:49]
[/usr/local/share/rt38/html/Ticket/Graphs/index.html:57]
[/usr/local/share/rt38/html/autohandler:311]

which is entirely understandable as under FreeBSD, dot is installed as
/usr/local/bin/dot :

/usr/local/bin/dot -V

dot - Graphviz version 2.20.3 (Mon Feb 16 20:41:15 UTC 2009)

Similarly, none of the GPG functionality is working and there are many
instances like the following in the log file:

[Thu Feb 19 13:15:04 2009] [debug]: Probe for GPG failed. Process exitted
with code 13 (/usr/local/lib/perl5/site_perl/5.8.9/RT/Crypt/GnuPG.pm:2362)
[Thu Feb 19 13:15:04 2009] [debug]: RT’s GnuPG libraries couldn’t
successfully execute gpg. PGP support has been disabled
(/usr/local/lib/perl5/site_perl/5.8.9/RT/Config.pm:350)

gpg is installed and working just fine, but again – as /usr/local/bin/gpg:

:# /usr/local/bin/gpg --version
gpg (GnuPG) 2.0.10
libgcrypt 1.4.4
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Now, I had thought this was simply down to the environment Apache is
started up with, or that it would pass through to CGI scripts. However
no amount of fiddling with /usr/local/etc/apache22/envars.d/path.env
or adding ‘PassEnv PATH’ in the apache config or of other similar attempts
has made any difference. Neither have I been able to find any solution by
grepping through quantities of perl modules.

Is there a standard means either for setting the PATH rt applies to
commands it invokes, or for supplying a fully qualified path for
subsidiary programs it invokes?

Cheers,

Matthew

Dr Matthew Seaman The Bunker, Ash Radar Station
PGP: 0x60AE908C on servers Marshborough Rd
Tel: +44 1304 814890 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK

signature.asc (259 Bytes)

Re-install the GraphViz and GnuPG modules using the correct
paths to these programs. Alternatively, you can make a symbolic
link from the actual location to where the module is looking for
these programs.

Cheers,
KenOn Thu, Feb 19, 2009 at 01:32:43PM +0000, Matthew Seaman wrote:

Dear all,

When I click on ‘graph’ links in the Ticket display I get an error like so:

Command ‘dot’ not found in /bin, /usr/bin at
/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm line 1160 Stack:
[/usr/local/lib/perl5/5.8.9/Carp.pm:44]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:1213]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:2051]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:2758]
[/usr/local/lib/perl5/site_perl/5.8.9/IPC/Run.pm:1432]
[/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm:1160]
[/usr/local/lib/perl5/site_perl/5.8.9/GraphViz.pm:981]
[/usr/local/share/rt38/html/Ticket/Graphs/Elements/ShowGraph:49]
[/usr/local/share/rt38/html/Ticket/Graphs/Elements/ShowGraph:49]
[/usr/local/share/rt38/html/Ticket/Graphs/index.html:57]
[/usr/local/share/rt38/html/autohandler:311]

which is entirely understandable as under FreeBSD, dot is installed as
/usr/local/bin/dot :

/usr/local/bin/dot -V

dot - Graphviz version 2.20.3 (Mon Feb 16 20:41:15 UTC 2009)

Similarly, none of the GPG functionality is working and there are many
instances like the following in the log file:

[Thu Feb 19 13:15:04 2009] [debug]: Probe for GPG failed. Process exitted
with code 13 (/usr/local/lib/perl5/site_perl/5.8.9/RT/Crypt/GnuPG.pm:2362)
[Thu Feb 19 13:15:04 2009] [debug]: RT’s GnuPG libraries couldn’t
successfully execute gpg. PGP support has been disabled
(/usr/local/lib/perl5/site_perl/5.8.9/RT/Config.pm:350)

gpg is installed and working just fine, but again – as /usr/local/bin/gpg:

:# /usr/local/bin/gpg --version
gpg (GnuPG) 2.0.10
libgcrypt 1.4.4
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Now, I had thought this was simply down to the environment Apache is
started up with, or that it would pass through to CGI scripts. However
no amount of fiddling with /usr/local/etc/apache22/envars.d/path.env
or adding ‘PassEnv PATH’ in the apache config or of other similar attempts
has made any difference. Neither have I been able to find any solution by
grepping through quantities of perl modules.

Is there a standard means either for setting the PATH rt applies to
commands it invokes, or for supplying a fully qualified path for subsidiary
programs it invokes?

Cheers,

Matthew


Dr Matthew Seaman The Bunker, Ash Radar Station
PGP: 0x60AE908C on servers Marshborough Rd
Tel: +44 1304 814890 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Kenneth Marshall wrote:

Re-install the GraphViz and GnuPG modules using the correct
paths to these programs. Alternatively, you can make a symbolic
link from the actual location to where the module is looking for
these programs.

Both of those modules use the PATH setting in the environment to find
executables. There is no explicit record of where programs were found at
installation time.

And, no, I’m not going to make a rat’s nest of symbolic links everywhere.
Fixing the thing that is broken is what is required, and in this case I’d
say RT is pretty clearly not doing the right thing.

Cheers,

Matthew

Dr Matthew Seaman The Bunker, Ash Radar Station
PGP: 0x60AE908C on servers Marshborough Rd
Tel: +44 1304 814890 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK

signature.asc (259 Bytes)

Matthew Seaman wrote:

Kenneth Marshall wrote:

Re-install the GraphViz and GnuPG modules using the correct
paths to these programs. Alternatively, you can make a symbolic
link from the actual location to where the module is looking for
these programs.

Both of those modules use the PATH setting in the environment to find
executables. There is no explicit record of where programs were found
at installation time.

And, no, I’m not going to make a rat’s nest of symbolic links everywhere.
Fixing the thing that is broken is what is required, and in this case
I’d say RT is pretty clearly not doing the right thing.

A hah! Found it.

splenetic:/usr/local/bin:# diff -u webmux.pl{.save,}
— webmux.pl.save 2009-02-16 15:49:57.000000000 +0000
+++ webmux.pl 2009-02-19 15:21:01.000000000 +0000
@@ -49,7 +49,7 @@
use strict;

BEGIN {

  • $ENV{‘PATH’} = ‘/bin:/usr/bin’; # or whatever
    you need
  • $ENV{‘PATH’} = ‘/bin:/usr/bin:/usr/local/bin’;

or whatever you need

  $ENV{'CDPATH'} = '' if defined $ENV{'CDPATH'};
  $ENV{'SHELL'}  = '/bin/sh' if defined $ENV{'SHELL'};
  $ENV{'ENV'}    = '' if defined $ENV{'ENV'};

Now the graph links work, and the GPG links are actually showing up.
Definately one for the FreeBSD port even if not accepted upstream.

Cheers,

Matthew

Dr Matthew Seaman The Bunker, Ash Radar Station
PGP: 0x60AE908C on servers Marshborough Rd
Tel: +44 1304 814890 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK

signature.asc (259 Bytes)

I just assumed that the values were hardcoded and not something
that changing your PATH setting would affect. Since that is the
case, this is the appropriate change. I am glad you fixed it.

Cheers,
KenOn Thu, Feb 19, 2009 at 03:36:30PM +0000, Matthew Seaman wrote:

Matthew Seaman wrote:

Kenneth Marshall wrote:

Re-install the GraphViz and GnuPG modules using the correct
paths to these programs. Alternatively, you can make a symbolic
link from the actual location to where the module is looking for
these programs.

Both of those modules use the PATH setting in the environment to find
executables. There is no explicit record of where programs were found at
installation time.
And, no, I’m not going to make a rat’s nest of symbolic links everywhere.
Fixing the thing that is broken is what is required, and in this case I’d
say RT is pretty clearly not doing the right thing.

A hah! Found it.

splenetic:/usr/local/bin:# diff -u webmux.pl{.save,}
— webmux.pl.save 2009-02-16 15:49:57.000000000 +0000
+++ webmux.pl 2009-02-19 15:21:01.000000000 +0000
@@ -49,7 +49,7 @@
use strict;

BEGIN {

  • $ENV{‘PATH’} = ‘/bin:/usr/bin’; # or whatever
    you need
  • $ENV{‘PATH’} = ‘/bin:/usr/bin:/usr/local/bin’; # or whatever you
    need
    $ENV{‘CDPATH’} = ‘’ if defined $ENV{‘CDPATH’};
    $ENV{‘SHELL’} = ‘/bin/sh’ if defined $ENV{‘SHELL’};
    $ENV{‘ENV’} = ‘’ if defined $ENV{‘ENV’};

Now the graph links work, and the GPG links are actually showing up.
Definately one for the FreeBSD port even if not accepted upstream.

Cheers,

Matthew


Dr Matthew Seaman The Bunker, Ash Radar Station
PGP: 0x60AE908C on servers Marshborough Rd
Tel: +44 1304 814890 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK