[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: etch release policy: scripts "must" set "appropriate" #! line? (was: lintian: false executable-not-elf-or-script warning with perl magic header)



On Wed, Apr 19, 2006 at 11:20:23AM +0200, Frank K?ster wrote:
> >From the reading of the Etch RC Policy you are right - the RMs raised
> the requirement from a should to a must.  On the other hand, they
> introduced the nice word "appropriate".
> 
> Release Managers, do you think that scripts with a Perl magic header
> like 
> 
> ,----
> | eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
> |   if 0;
> `----
> 
> are inacceptable?
> 
> Of course I would never write a maintainer or otherwise Debian-specific
> script like this; but upstream has a reason for this "trying to be as
> portable as possible", and I'd rather not patch all instances of magic
> headers, as long as they work.

Technically the issue is that the exec(2) system call will not execute
such scripts because the kernel will not recognize it as such. On the 
other hand, a shell will detect it and fork itself to execute it
(instead of forking /bin/sh to execute it).

So unless such script is only meant to be executed from a specific set of
shells, it is a case where the script does not, in fact, work.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here.



Reply to: