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

Re: magic headers (was: Upload of new texlive packages)

Hi all!

On Mon, 14 Aug 2006, Frank Küster wrote:
> >> You are invited to fix this magic header for me:
> >> eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
> >> argv:q'
> >>   if 0;
> >> use strict;
> >> $^W=1; # turn warning on
> >> #
> >
> This is considered RC by the release team.  There has been discussion
> about this recently (I think it was in a lintian bug that I filed),
> tetex should have an according bug, too.  I think we should simple
> comment the magic and replace it by a 
> #!/usr/bin/perl
> line for Debian.

On Die, 15 Aug 2006, Frank Küster wrote:
> This is #344269.

Interesting reading.

> > comment the magic and replace it by a 
> >
> > #!/usr/bin/perl
> >
> > line for Debian.
> But this was still wrong.  The scripts are not meant to be executed as
> TEXMFDIST/scripts/perl/foo, but by their wrapper in /usr/bin.  Therefore
> I think that the answer to Florent's question
> ,----
> |   - shouldn't the executable-not-elf-or-script overrides in
> |     texlive-pdfetex.override be fixed by inserting a real
> |     "#! /usr/bin/perl ..." shebang line instead of using the override,
> |     as I noted you did somewhere else (in some dpatches)?
> `----
> is: No, not if the script has a proper wrapper in /usr/bin.  At a short
> glance, I couldn't find any dpatches changing magic headers.  Florent,
> can you give a hint?

Ok, I took a look at the various files, here are the bad ones, and note
that all of them are in /usr/bin and no wrappers (they were called
indirectly via texexec, but this would have created an useless dep on
texlive-context from several others, so I preferred to move them to

#! /bin/sh
eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \
;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;
eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+
#!perl -w
package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1;
# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003.
# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib
and continues as perl script

lintian: shell-script-fails-syntax-check

pdfcrop and thumbpdf:
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
  if 0;
use strict;
$^W=1; # turn warning on
# pdfcrop.pl
... perl code

lintian: executable-not-elf-or-script

AFAIR I tried to remove the magic headers and always ended up with
*non-functional* rest. Especially the a2ping header made me go crazy.
Removing the whole bunch just adding the perl shebang didn't work. There
must be some magic hidden in these lines I do not understand - and I am
not sure whether I WANT to understand it!

If one perl guru can fix these three headers for me, you are welcome!
More than welcome!

Best wishes


Dr. Norbert Preining <preining AT logic DOT at>             Università di Siena
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
CRAIL (n. mineral)
Crail is a common kind of rock or gravel found widely across the
British Isles. Each individual stone (due to an as yet undiscovered
gravitational property) is charged with 'negative buoyancy'. This
means that no matter how much crail you remove from the garden, more
of it will rise to the surface. Crail is much employed by the Royal
Navy for making the paperweights and ashtrays used inside submarines.
			--- Douglas Adams, The Meaning of Liff

Reply to: