CPANTS: suggestion for a new metric

2007-05-26 Thread David Cantrell
Some modules' tarballs don't set the x bit on directories, which makes 
it impossible for a non-root user to run Makefile.PL or the module's 
tests.  The usual cause is that the author suffers from Windows, and the 
fix is to use '--mode 755' when creating the tarball.


I think it would be a good idea for CPANTS to check that directories 
have the x bits set.  This would either be a new metric, or could be 
rolled into 'extracts_nicely', or could be combined with 'no_symlinks' 
and called 'uses_portable_filesystem_features' or something similar.


--
David Cantrell


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread A. Pagaltzis
* David Cantrell [EMAIL PROTECTED] [2007-05-26 16:45]:
 I think it would be a good idea for CPANTS to check that
 directories have the x bits set.

++

 This would either be a new metric

+=0

 or could be rolled into 'extracts_nicely'

++

 or could be combined with 'no_symlinks' and called
 'uses_portable_filesystem_features' or something similar.

--

It doesn’t have to do with filesystem features, it has to do with
OS permission semantics. You can mount FAT32 and NTFS in unixoid
systems and likewise mount ext2/3 in Windows, and a sufficiently
abled tool could then correctly extract archives preserving non-
portable features, but the permission semantics don’t carry over
correctly anyway because the respective kernels are not able to
convey them.

The `extracts_nicely` metric is the right place for this, IMO.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread demerphq

On 5/26/07, David Cantrell [EMAIL PROTECTED] wrote:

Some modules' tarballs don't set the x bit on directories, which makes
it impossible for a non-root user to run Makefile.PL or the module's
tests.  The usual cause is that the author suffers from Windows, and the
fix is to use '--mode 755' when creating the tarball.


Can you explain this please? Why would the lack of a set x bit on a
directory prevent you from doing

 perl Makefile.PL
 make
 make test

Is this simply so you dont have to type 'perl'?

cheers
Yves


--
perl -Mre=debug -e /just|another|perl|hacker/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread A. Pagaltzis
* demerphq [EMAIL PROTECTED] [2007-05-26 17:35]:
 Can you explain this please? Why would the lack of a set x bit
 on a directory prevent you from doing
 
  perl Makefile.PL
  make
  make test

Yes.

 Is this simply so you dont have to type 'perl'?

No.

The x bit on a directory determines whether you can resolve paths
that cross it.

~ $ cd Proc-Fork
~/Proc-Fork $ chmod -x lib
~/Proc-Fork $ perl Build.PL 
Can't find file lib/Proc/Fork.pm to determine version at \
/usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 937.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread demerphq

On 5/26/07, A. Pagaltzis [EMAIL PROTECTED] wrote:

* demerphq [EMAIL PROTECTED] [2007-05-26 17:35]:
 Can you explain this please? Why would the lack of a set x bit
 on a directory prevent you from doing

  perl Makefile.PL
  make
  make test

Yes.


Im assuming this means Yes it prevents this

(Excessive terseness)--


 Is this simply so you dont have to type 'perl'?

No.

The x bit on a directory determines whether you can resolve paths
that cross it.

~ $ cd Proc-Fork
~/Proc-Fork $ chmod -x lib
~/Proc-Fork $ perl Build.PL
Can't find file lib/Proc/Fork.pm to determine version at \
/usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 937.


Ok.

Thanks.

BTW, id say that if this is an issue for Unix users then they should
file a bug with the people that wrote their decompression software
and/or installer software.

I dont see it as being my problem as a Win32 developer at all. Im
sympathetic to the annoyance it causes but to me its like opening a
book written in a language you dont read and complaining that it isnt
written in one you do. I mean if Win32 doesnt even support this
concept how is it my problem what your software does when unpacking?

Yves
--
perl -Mre=debug -e /just|another|perl|hacker/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Andy Armstrong

On 26 May 2007, at 18:16, demerphq wrote:

I dont see it as being my problem as a Win32 developer at all. Im
sympathetic to the annoyance it causes but to me its like opening a
book written in a language you dont read and complaining that it isnt
written in one you do. I mean if Win32 doesnt even support this
concept how is it my problem what your software does when unpacking?


Lack of attention to detail?

Supposed to work on any platform but doesn't?

As a Win32 developer you have to appreciate that quite a lot of the  
Perl stuff you use (including Perl itself possibly) wouldn't exist if  
Win32 were the only OS in the World.


--
Andy Armstrong, hexten.net



Re: CPANTS: suggestion for a new metric

2007-05-26 Thread demerphq

On 5/26/07, A. Pagaltzis [EMAIL PROTECTED] wrote:

* demerphq [EMAIL PROTECTED] [2007-05-26 19:20]:
 BTW, id say that if this is an issue for Unix users then they
 should file a bug with the people that wrote their
 decompression software and/or installer software.

It's the decompression software's fault that it correctly
preserves the data in the archive when decompressing?! Are you
serious?

Sorry, but it is *the _compression_ software's* bug.


Fine, then what do i do about it? File a bug with Archive::Tar
(maintained by a non windows programmer)?


 I dont see it as being my problem as a Win32 developer at all.
 Im sympathetic to the annoyance it causes but to me its like
 opening a book written in a language you dont read and
 complaining that it isnt written in one you do. I mean if Win32
 doesnt even support this concept how is it my problem what your
 software does when unpacking?

Tarballs are a Unix concept and use Unix permission semantics.
Win32 developers creating tarballs are writing books in a
language they don't speak. Then they get annoyed that native
(or fluid) speakers of the language complain when their books
are full of mistakes.

(What a silly metaphor… but anyway.)


Ok fair enough. I sit corrected.



Sorry, you're wrong. I'm sorry if the silly Unix people are
grating on your nerves, but they're right.


Ok im wrong, and yes comments like suffering from windows do grate
on my nerves.

Maybe ill just upload my files in zip format from now on only, then
its not my problem anymore right? Would that be better?

Yves

--
perl -Mre=debug -e /just|another|perl|hacker/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Andy Armstrong

On 26 May 2007, at 18:45, demerphq wrote:

Maybe ill just upload my files in zip format from now on only, then
its not my problem anymore right? Would that be better?


That would be fine.

You know - you've kind of tickled a raw nerve here.

One of the very few reasons I maintain a Windows box here and endure  
the pain (for me - subjective I know) that goes with it is so I can  
test my modules against Win32. And the only reason I bang my head off  
Win32 related problems is because I have a deeply held conviction  
that my stuff should - if possible - work on any platform Perl supports.


I honestly don't think - given the hassle that supporting Win32 is  
for so many people who otherwise wouldn't touch it - that you have  
much room to bitch about a Unix specific problem.


--
Andy Armstrong, hexten.net



Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Gabor Szabo

On 5/26/07, Andy Armstrong [EMAIL PROTECTED] wrote:

On 26 May 2007, at 18:45, demerphq wrote:
 Maybe ill just upload my files in zip format from now on only, then
 its not my problem anymore right? Would that be better?

That would be fine.

You know - you've kind of tickled a raw nerve here.


did you all wake up on the wrong side ?
Could you please calm down?

Gabor


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread demerphq

On 5/26/07, Andy Armstrong [EMAIL PROTECTED] wrote:

On 26 May 2007, at 18:45, demerphq wrote:
 Maybe ill just upload my files in zip format from now on only, then
 its not my problem anymore right? Would that be better?

That would be fine.


Fine then. The fact that ExtUtils make dist automatically produces a
.tar.gz and the fact that Archive::Tar does not do the right thing is
not exactly my fault however.


You know - you've kind of tickled a raw nerve here.


As did David in his original post for me.


One of the very few reasons I maintain a Windows box here and endure
the pain (for me - subjective I know) that goes with it is so I can
test my modules against Win32. And the only reason I bang my head off
Win32 related problems is because I have a deeply held conviction
that my stuff should - if possible - work on any platform Perl supports.


Yes i agree with this as well. I go to similar lengths to ensure my
code works on *nix. And yes i appreciate your efforts, although to the
best of my knowledge ive never directly benefitted from them.


I honestly don't think - given the hassle that supporting Win32 is
for so many people who otherwise wouldn't touch it - that you have
much room to bitch about a Unix specific problem.


I was out of line in how i put things. I apologise.

yves

--
perl -Mre=debug -e /just|another|perl|hacker/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Andy Armstrong

On 26 May 2007, at 19:03, Gabor Szabo wrote:

did you all wake up on the wrong side ?
Could you please calm down?


I can confirm that I'm spectacularly calm :)

--
Andy Armstrong, hexten.net



testing on other platforms

2007-05-26 Thread Gabor Szabo

If you have already started to argue about Windows vs Unix issues
is there a way - besides uploading to CPAN and waiting for the CPAN testers
to test my modules on platforms I don't have? [*]

Is there some publicly available Solaris/HP-UX/etc
(see full list on this page http://www.cpan.org/ports/index.html )
set of servers where one could test his modules?

Maybe even setup CPAN smoking?

Gabor
[*] and actually even the CPAN testers provide only a relatively small
set of platforms.


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Andy Armstrong

On 26 May 2007, at 19:06, demerphq wrote:

I was out of line in how i put things. I apologise.


Thanks Yves. I /still/ think it's pretty cool that basically we're  
all friends :)


--
Andy Armstrong, hexten.net



Re: testing on other platforms

2007-05-26 Thread Andy Armstrong

On 26 May 2007, at 19:08, Gabor Szabo wrote:

Is there some publicly available Solaris/HP-UX/etc
(see full list on this page http://www.cpan.org/ports/index.html )
set of servers where one could test his modules?


There's the HP Testdrive thing - and there may be similar things for  
other platforms.


I can give you an account on a Linux box if it's useful?

--
Andy Armstrong, hexten.net



Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Eric Wilhelm
# from demerphq
# on Saturday 26 May 2007 10:45 am:

 Sorry, but it is *the _compression_ software's* bug.

Fine, then what do i do about it? File a bug with Archive::Tar
(maintained by a non windows programmer)?

This should be properly handled by the dist action of any sufficiently 
modern Module::Build or Module::Install or ExtUtils::MakeMaker.

If it isn't, that's where the bug is.

--Eric
-- 
Atavism  n:  The recurrence of any peculiarity or disease of an ancestor
in a subsequent generation, usually due to genetic recombination.
---
http://scratchcomputing.com
---


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread A. Pagaltzis
* Andy Armstrong [EMAIL PROTECTED] [2007-05-26 19:50]:
 One of the very few reasons I maintain a Windows box here and
 endure the pain (for me - subjective I know) that goes with it
 is so I can test my modules against Win32.

So do I. And yeah, I find it painful too. But it’s not open for
debate.

Btw, if any people with strong Win32 skills can help me stop
Proc::Fork from “segfaulting” on Windows, I’d appreciate it.
I tried a whole bunch of things but ran out of ideas and it’s
still broken. I asked around but no one seemed to know any
better.


* demerphq [EMAIL PROTECTED] [2007-05-26 20:10]:
 Fine then. The fact that ExtUtils make dist automatically
 produces a .tar.gz and the fact that Archive::Tar does not do
 the right thing is not exactly my fault however.

No – *but* it does affect users that are interested in such
brokenly packaged modules, so deducting Kwalitee is the correct
thing to do IMO.

Even if MakeMaker or Archive::Tar or whatever it is that’s broken
were fixed,  not every author uses the same tools, and someone
might decide to use something different without knowing it’s
broken. Again then it’s the author who needs to fix his distro,
even though he couldn’t know that the tool he used was broken and
isn’t to blame for that. So again – having this check in the
metrics would serve a useful purpose.

I’m not singling out Win32 people, btw. If a similar error was
likely to be a Unix-based author’s gaffe, I’d still advocate a
check. The collective goal is to make things that work as
painlessly as possible for as many people as possible.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/


Re: CPANTS: suggestion for a new metric

2007-05-26 Thread Andreas J. Koenig
 On Sat, 26 May 2007 20:06:18 +0200, demerphq [EMAIL PROTECTED] said:

   On 5/26/07, Andy Armstrong [EMAIL PROTECTED] wrote:
  On 26 May 2007, at 18:45, demerphq wrote:
   Maybe ill just upload my files in zip format from now on only, then
   its not my problem anymore right? Would that be better?
  
  That would be fine.

   Fine then.

You do not have to change anything, Yves. Your tarballs were all fine
as far as I know. Do not switch to zip format, please, without a
reason. While ZIP has several significant advantages over TAR.GZ, it
is inferior in compression metrics. CPAN is not fond of seeing zip
files because they usually are 10-30 percent bigger.

   The fact that ExtUtils make dist automatically produces a
   .tar.gz and the fact that Archive::Tar does not do the right thing is
   not exactly my fault however.

AFAIK it is not Archive::Tar either. I have not found out which
compression software packages do it right and which do it wrong. I
have communicated with several authors about it but being Windows
users, they do not know it either.

On new metrics: I agree with the OP that software packaged with absurd
permission bits offends kwality. But everybody should know that PAUSE
cannot index these beasts anyway and sends mail to the authors that it
cannot read the contents of the distro and that they need to make a new
upload when they want to be indexed.

-- 
andreas