bug report: Perl variable expansion in build directory path (very minor)

"Thomas M. Payerle" <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

Perl variable expansion in build directory path (very minor)

In t/conf/extra.last.conf.in, lines 115-138, there are three places where
$PerlConfig or @PerlConfig is being set to values containing
@DocumentRoot@ from autoconf.  Currently, the text being set to is
enclosed in double quotes.  I believe this is incorrect (albeit a very
minor issue) and single quotes should be used.

Because of my directory naming conventions, I am having the lines show up 
in extra.last.conf as
-----
#Single-line $PerlConfig
<Perl>
if (Apache::Test::have_module('mod_alias.c')) {
   $PerlConfig = "Alias /perl_sections_perlconfig_scalar /afs/.glue.umd.edu/project/glue/m/mod_perl/2.0.8/.build-apache-2.2.21-perl-5.16.3-@sys/t/htdocs";
}
</Perl>
----

Note the @sys in the build directory name (I am building in AFS, with
build-foo-bar being a symlink to .build-foo-bar-@sys, and via AFS magic
this becomes a platform specific build directory, i.e. 
.build-foo-bar-amd64_rel60).  Due to the double quotes, I am getting a warning
about possible unintended variable expansion, and $PerlConfig becomes
   "Alias /perl_sections_perlconfig_scalar /afs/.glue.umd.edu/project/glue/m/mod_perl/2.0.8/.build-apache-2.2.21-perl-5.16.3-/t/htdocs";
(Note the null string where @sys was), which is an invalid path and causes
other things to fail.

Since the path is being expanded from the working directory, I cannot see a
situation wherein you would _want_ perl variable expansion here, so it should
be using single quotes.

Again, minor issue in exceptional situation, but I think is an easy fix.

If I am mistaken and there is a valid reason to allow perl variable expansion
here, AFS users can easily work around by either fixing it locally or
creating symlinks 
ln -s .build-foo-bar-@sys .build-foo-bar-

}



2. Used Components and their Configuration:

*** mod_perl version 2.000008

*** using /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/lib/site_perl/5.16.3/x86_64-linux/Apache2/BuildConfig.pm

*** Makefile.PL options:
   MP_APR_LIB     => aprext
   MP_APXS        => /usr/local/apache2/2.2.24/bin/apxs
   MP_AP_DESTDIR  => /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3
   MP_COMPAT_1X   => 1
   MP_GENERATE_XS => 1
   MP_LIBNAME     => mod_perl
   MP_USE_DSO     => 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

  -L/usr/local/apache2/2.2.24/lib -laprutil-1     -lexpat
  -L/usr/local/apache2/2.2.24/lib -lapr-1 -luuid -lrt -lcrypt



*** /usr/local/perl/5.16.3/bin/perl -V
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:

   Platform:
     osname=linux, osvers=2.6.32-279.14.1.el6.x86_64, archname=x86_64-linux
     uname='linux igloo.umd.edu 2.6.32-279.14.1.el6.x86_64 #1 smp mon oct 15 13:44:51 edt 2012 x86_64 x86_64 x86_64 gnulinux '
     config_args='-de -Dprefix=/usr/local/perl/5.16.3 -Dldflags=  -L/usr/local/BerkeleyDB/lib -Wl,-rpath,/usr/local/BerkeleyDB/lib -Dccflags=-fPIC   -I/usr/local/BerkeleyDB/include -Dscriptdir=/usr/local/perl/5.16.3/scripts -Accflags='-fPIC' -Dlibpth=/usr/local/BerkeleyDB/lib /usr/lib64 /usr/lib [email protected]'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=undef, usemultiplicity=undef
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=define, use64bitall=define, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-fPIC -I/usr/local/BerkeleyDB/include -fPIC -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
     optimize='-O2',
     cppflags='-fPIC -I/usr/local/BerkeleyDB/include -fPIC -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
     ccversion='', gccversion='4.4.6 20120305 (Red Hat 4.4.6-4)', gccosandvers=''
     intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
     ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/BerkeleyDB/lib -Wl,-rpath,/usr/local/BerkeleyDB/lib -fstack-protector'
     libpth=/usr/local/BerkeleyDB/lib /usr/lib64 /usr/lib
     libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=/lib/libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.12'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/BerkeleyDB/lib -fstack-protector'


Characteristics of this binary (from libperl):
   Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                         PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                         USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE
                         USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                         USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
   Built under linux
   Compiled at Mar 15 2013 10:13:50
   %ENV:
     PERL5LIB="/usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/lib/site_perl"
     PERL_LWP_USE_HTTP_10="1"
   @INC:
     /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/lib/site_perl/5.16.3/x86_64-linux
     /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/lib/site_perl/5.16.3
     /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/lib/site_perl
     /usr/local/perl/5.16.3/lib/site_perl/5.16.3/x86_64-linux
     /usr/local/perl/5.16.3/lib/site_perl/5.16.3
     /usr/local/perl/5.16.3/lib/5.16.3/x86_64-linux
     /usr/local/perl/5.16.3/lib/5.16.3
     .

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.63
ExtUtils::MakeMaker: 6.63_02
LWP                : 6.05
mod_perl           : -
mod_perl2          : 2.000008


3. This is the core dump trace: (if you get a core dump):


This report was generated by /usr/local/mod_perl/2.0.8/apache-2.2.24/perl-5.16.3/perl/bin/mp2bug on Fri Sep 13 18:33:47 2013 GMT.

-------------8<---------- End Bug Report --------------8<----------

Tom Payerle
IT-ETI-EUS 				[email protected]
University of Maryland			(301) 405-6135
College Park, MD 20742-4111
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.