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

Re: Bug#344269: etch release policy: scripts "must" set "appropriate" #! line?



Hi,

* Russ Allbery (rra@debian.org) [060622 16:04]:
> Frank Küster <frank@kuesterei.ch> writes:
> 
> > Dear release team,
> 
> > we have not heard from you on this.  Could you please clarify your
> > policy decision?  This was the central question:
> 
> > Release Managers, do you think that (upstream-provided) 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?  Fullquote follows,
> 
> I thought Steve followed up and said that yes, they're unacceptable,
> because that script magic relies on the script being run by a shell
> (something I hadn't realized until he pointed it out).  If you try to run
> a binary that starts with the above and no #! line via, say, execv inside
> a C program, it will fail.  It only works from the command line because
> the shell falls back on trying to interpret binaries with no valid magic
> as shell scripts.

even if Steve didn't say it, that's the reasonable explanation for it,
and that's why it's in the RC policy. Thanks for pointing that out.
(That might be different for private shell scripts where you know how
they are called, but for standard scripts, that is unacceptable.)


Cheers,
Andi
-- 
  http://home.arcor.de/andreas-barth/



Reply to: