mod_perl fails with 5.91_01?

2002-04-27 Thread Ken Williams

Hey,

Can anyone else verify that mod_perl fails with MakeMaker 5.91_01 ?  I 
used to be able to compile  test with just this:

  perl Makefile.PL EVERYTHING=1
  make test

Now I'm seeing 'taint' errors up the wazoo:

===
[junior:~/Downloads/perl/mod_perl-1.26] ken% make test
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
/usr/local/src/apache_1.3.23/src/httpd -f `pwd`/t/conf/httpd.conf -X -d 
`pwd`/t 
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
[Sun Apr 28 12:36:05 2002] [error] Insecure $ENV{PATH} while running 
with -T switch at /System/Library/Perl/Cwd.pm line 92.
BEGIN failed--compilation aborted at /Library/Perl/ExtUtils/testlib.pm 
line 6.
Compilation failed in require at 
/Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
BEGIN failed--compilation aborted at 
/Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
Compilation failed in require at (eval 1) line 1.

===

I don't know for sure that this is related to MakeMaker, because I've 
also done things like OS upgrades since last time I tried this.  I 
haven't gone so far as to reinstall an old version of MakeMaker yet.

  -Ken

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
 osname=darwin, osvers=5.2, archname=darwin
 uname='darwin junior 5.2 darwin kernel version 5.2: fri dec 7 
21:39:35 pst 2001; root:xnuxnu-201.14.obj~1release_ppc power macintosh 
powerpc '
 config_args='-des -Dfirstmakefile=GNUmakefile 
-Dldflags=-flat_namespace'
 hint=previous, useposix=true, d_sigaction=define
 usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
 cc='cc', ccflags ='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE 
-fno-strict-aliasing',
 optimize='-O3',
 cppflags='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE 
-fno-strict-aliasing'
 ccversion='', gccversion='Apple devkit-based CPP 6.02', 
gccosandvers=''
 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
 alignbytes=8, usemymalloc=n, prototype=define
   Linker and Libraries:
 ld='cc', ldflags ='-flat_namespace -L/usr/local/lib'
 libpth=/usr/local/lib /usr/lib
 libs=-lm -lc
 perllibs=-lm -lc
 libc=/System/Library/Frameworks/System.framework/System, so=dylib, 
useshrplib=true, libperl=libperl.dylib
   Dynamic Linking:
 dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
 cccdlflags=' ', lddlflags='-flat_namespace -bundle -undefined 
suppress -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under darwin
   Compiled at 12/31/01 02:02:01
   INC:
 /System/Library/Perl/darwin
 /System/Library/Perl
 /Library/Perl/darwin
 /Library/Perl
 /Library/Perl
 /Network/Library/Perl/darwin
 /Network/Library/Perl
 /Network/Library/Perl
 .




Re: mod_perl fails with 5.91_01?

2002-04-27 Thread Michael G Schwern

On Sun, Apr 28, 2002 at 12:46:01PM +1000, Ken Williams wrote:
 [Sun Apr 28 12:36:05 2002] [error] Insecure $ENV{PATH} while running 
 with -T switch at /System/Library/Perl/Cwd.pm line 92.
 BEGIN failed--compilation aborted at /Library/Perl/ExtUtils/testlib.pm 
 line 6.
 Compilation failed in require at 
 /Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
 BEGIN failed--compilation aborted at 
 /Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
 Compilation failed in require at (eval 1) line 1.

ExtUtils::testlib calls File::Spec-rel2abs() which is not taint clean in
5.6.1.  It is in bleadperl.  Dunno what to do about that.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl Quality Assurance  [EMAIL PROTECTED] Kwalitee Is Job One
The desired effect is what you get when you improve your interplanetary 
funksmanship.



Re: mod_perl fails with 5.91_01?

2002-04-27 Thread Stas Bekman

Michael G Schwern wrote:
 On Sun, Apr 28, 2002 at 12:46:01PM +1000, Ken Williams wrote:
 
[Sun Apr 28 12:36:05 2002] [error] Insecure $ENV{PATH} while running 
with -T switch at /System/Library/Perl/Cwd.pm line 92.
BEGIN failed--compilation aborted at /Library/Perl/ExtUtils/testlib.pm 
line 6.
Compilation failed in require at 
/Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
BEGIN failed--compilation aborted at 
/Users/ken/Downloads/perl/mod_perl-1.26/t//docs/startup.pl line 9.
Compilation failed in require at (eval 1) line 1.
 
 
 ExtUtils::testlib calls File::Spec-rel2abs() which is not taint clean in
 5.6.1.  It is in bleadperl.  Dunno what to do about that.

The patch at the bottom should be applied to 5.6.2 (Should this be sent 
to Sarathy?).

The workaround is to overload (re-alias) Cwd::_backtick_pwd with a fixed 
version where you need it in MM, by forcing 'require Cwd' if it wasn't 
loaded yet before doing the re-alias. Remember to shutdown warnings, or 
even better undef the *Cwd::_backtick_pwd{CODE} symbol if Cwd is in %INC 
already.


--- /tmp/Cwd.pmSun Apr 28 11:44:38 2002
+++ /home/stas/perl.org/perl-5.6.1/lib/Cwd.pmFri Sep 14 17:09:10 2001
@@ -89,7 +89,6 @@
  # The 'natural and safe form' for UNIX (pwd may be setuid root)

  sub _backtick_pwd {
+local @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
  my $cwd = `pwd`;
  # `pwd` may fail e.g. if the disk is full
  chomp($cwd) if defined $cwd;



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com





Module::Build design plans

2002-04-27 Thread Ken Williams

[I just sent this message to the 'Fink' list, I thought it might 
be of some interest to the people here, too.]

Hi,

I'm the author of the relatively experimental Module::Build 
module.  It, or something like it, will eventually become the 
replacement for ExtUtils::MakeMaker (EU::MM).  EU:MM needs to be 
replaced for several reasons, some of which I mention in the 
Module::Build documentation on CPAN.  Michael Schwern, current 
maintainer of EU::MM, agrees.

I want to ask the Fink community what kinds of considerations I 
should be putting into the design.  So far I've been focusing on 
its flexibility and extendibility in customizing build 
processes, which I think is already a big improvement over 
EU::MM.  I haven't given much thought to packaging, though, so 
I'd appreciate any feedback you can give me.

Currently in EU::MM, dependencies are handled by a PREREQ 
field in a function call.  This means that it's impossible to 
programmatically determine dependency hierarchies in advance, 
which makes automatic installation very tricky (tools like 
CPAN.pm basically just try to forge ahead, and allow you to 
auto-install dependencies that fail at runtime).  It also 
doesn't allow for build dependencies, or optional 
dependencies, etc.

I'm thinking of creating meta-data files for Perl modules, 
similar to Fink's .info files.  The first step in the build 
process (similar to perl Makefile.PL) would read this file and 
configure itself appropriately.  This file would NOT contain 
Perl code to be evaluated, since this opens up the possibilities 
of dynamically-determined dependencies.  It would just be a 
flat configuration file.  I haven't decided on a format for 
the file yet, but options might be Fink's format, YAML [1], XML 
(shudder), or something else.

What other things need to be in the info-files?  Module 
(distribution) name should be there, but version should probably 
not be (they're specified in the module files themselves).  
Patches aren't relevant, of course.

One of the larger goals with this is to get the standard 
mechanism for building  installing Perl modules closer to a 
real package management system.  Currently if you just use 
perl Makefile.PL  make test  make install, you don't keep 
a record of dependencies, and it's very difficult to properly 
uninstall things later.

Thanks in advance for any advice.

  -Ken

[1] http://search.cpan.org/search?mode=modulequery=YAML