[rt-devel] inplace development environment setup issue

Alex Vandiver alex at chmrr.net
Fri Aug 5 02:48:42 EDT 2016


On Tue, 2 Aug 2016 00:26:51 -0700
Sam Hanes <sam at maltera.com> wrote:

> Hi All,
> 
> I'm trying to get an RT development and testing environment set up, but
> there doesn't seem to be much documentation. The "Setting up a
> development environment" section of the "Hacking" doc is empty:
>  
> https://docs.bestpractical.com/rt/4.4.1/hacking.html#Setting-up-a-development-environment
> 
> 
> I checked out the master branch from git and used the configure command
> from the "Test suite" section of the "Hacking" doc:
>      ./configure.ac --with-my-user-group --enable-layout=inplace 
> --enable-developer
> 
> `make testdeps` is passing. I've set up RT_DBA_USER to give the tests
> access to my local MariaDB 10.0.25 server and I'm running the tests with
> `make test`.
> 
> Unfortunately I'm seeing some failures. I've attached a log of the test
> output. Am I missing some needed configure arguments? Is the full test
> suite currently expected to pass clean on master?
> 
> Is there documentation on developer setup that I've missed?


I note that your @INC does not include "." and its "lib" is not an
absolute one:

---------------------------------8<--------------------------------------
#   Failed test 'etc/upgrade/4.0.19/content syntax is OK'
#   at t/99-policy.t line 105.
#          got: 'Can't locate lib//RT/Generated.pm in @INC (you may
need to install the lib::::RT::Generated module) (@INC contains:
lib /home/sam/code/rt/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.2 /usr/local/share/perl/5.22.2 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base)
at lib/RT.pm line 786.
---------------------------------8<--------------------------------------


I believe this to be because you're running a recently-updated perl,
which is patched for CVE-2016-1238 [1] by enforcing the removal of "."
from @INC.  But you'd _also_ have to be running an ExtUtils::Command::MM
which doesn't make its arguments absolute, which means one from before
2002[2]?

I can replicate this if I run the test with "perl -Ilib t/99-policy.t"
and explicitly strip "." from @INC.

I've pushed 4.0/dotless-inc-path [3], which addresses the issue.  I
believe this only affects installs with --layout=inplace (which are used
almost exclusively for tests), as all other installs already provide a
fully qualified path to `include`.

You can work around this by cherry-picking that patch onto master.
 - Alex


[1] http://perl5.git.perl.org/perl.git/commitdiff/cee96d5
[2] https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blame/master/lib/ExtUtils/Command/MM.pm#L71
[3] https://github.com/bestpractical/rt/commit/0c628220bf


More information about the rt-devel mailing list