Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 289818

Summary: app-text/texlive-core-2008-r7: epstopdf does not use a shebang, breaks dev-tex/rubber
Product: Gentoo Linux Reporter: David Mohr <bugs>
Component: Current packagesAssignee: Alexis Ballier <aballier>
Status: RESOLVED FIXED    
Severity: normal CC: ephemient, tex
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 355085    

Description David Mohr 2009-10-19 22:26:14 UTC
epstopdf does not start with a shebang, but instead tries to execute some shell code to find the perl executable. Shells deal with this, but i.e. trying to use it from python (as does rubber) breaks.

Isn't env used to find executables these days? The following works for me as the first line of epstopdf:
#!/usr/bin/env perl

Reproducible: Always

Steps to Reproduce:
python -c 'import os; os.execv("/usr/bin/epstopdf",());'
Actual Results:  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 8] Exec format error

Expected Results:  
EPSTOPDF 2.9.8gw, 2007/05/18 - Copyright 1998-2001 by Sebastian Rahtz et al., 2002-2007 by Gerben Wierda et al. Free software under a BSD-style license.
Syntax:  epstopdf [options] <eps file>
<CUT>
Comment 1 Daniel Lin 2010-03-04 04:46:17 UTC
"No shebang" seems to be popular in tex-world:

/usr/bin/epstopdf
/usr/bin/latex2html
/usr/bin/pdfatfi
/usr/bin/pdfcrop
/usr/bin/pkfix
/usr/bin/pstoimg
/usr/bin/texexpand
/usr/bin/thumbpdf
/usr/bin/vpe

Not to mention starting with #!/bin/sh and then unconditionally exec'ing perl with no changes.

/usr/bin/a2ping

Debian patches a few of these to start with #!/usr/bin/perl properly.

http://patch-tracker.debian.org/package/texlive-bin/2009-5
Comment 2 Ryan May 2010-03-05 20:51:27 UTC
Yeah, this breaks rubber (and hence the Gedit Latex plugin) for me.  Changing to a shebang at the top fixes it.
Comment 3 Alexis Ballier gentoo-dev 2011-02-17 15:12:31 UTC
should be fixed in texlive-2010 by upgrading dev-texlive/texlive-fontutils-2010 to -r1, thanks for the report