Bug#698569: file reports Perl scripts as C++ source, ASCII text

2014-10-08 Thread Sebastian Schmidt
Hi,

On Mon, Jan 21, 2013 at 12:03:29AM +0900, Osamu Aoki wrote:
 How can these clearly perl scripts marked as C++ source, ASCII text?

I second that with AWK false positives:

$ cat test.pl 
#!/usr/bin/perl -w

BEGIN { print hai }
$ file test.pl
test.pl: awk script, ASCII text
$ head -1 test.pl | file -
/dev/stdin: a /usr/bin/perl -w script, ASCII text executable
$

I have attached the gzip'd output of file -d test.pl.

Sebastian


test.pl.debug.gz
Description: application/gzip


signature.asc
Description: Digital signature


Bug#698569: file reports Perl scripts as C++ source, ASCII text

2014-03-30 Thread Christoph Biedl
Osamu Aoki wrote...

 I checked and found:

Status report for upcoming file 5.18-1:

 /usr/bin/apt-rdepends:   C++ source, ASCII text

Still needs work.

 /usr/bin/debconf-mergetemplate:  C++ source, ASCII text

Fixed, now a /usr/bin/perl -w script, ASCII text executable

 /usr/bin/tpage:  C++ source, ASCII text
 /usr/bin/ttree:  C++ source, ASCII text
 /usr/bin/yapp:   C++ source, ASCII text

These three still needs work, too.

 /usr/bin/gvfs-less:  Palm OS dynamic library data 
 #!/bin/sh

Fixed, now POSIX shell script, ASCII text executable

 /usr/sbin/grml2usb:  data

Fixed, now a /usr/bin/env python script executable (binary data)

 /usr/bin/musixtex:   LaTeX 2e document, ASCII text
 /usr/bin/latexmk:TeX document, ASCII text

Still need work.

The work-needing one should be fixed soon, it's quite high on my to do
list for file(1).

Christoph


signature.asc
Description: Digital signature


Bug#698569: file reports Perl scripts as C++ source, ASCII text

2014-03-07 Thread Christoph Biedl
tags 698569 upstream confirmed
retitle buggy magic: '#!' should have a bigger strength
thanks

Osamu Aoki wrote...

 I checked and found:
 
 /usr/bin/apt-rdepends:   C++ source, ASCII text
 /usr/bin/debconf-mergetemplate:  C++ source, ASCII text
 /usr/bin/tpage:  C++ source, ASCII text
 /usr/bin/ttree:  C++ source, ASCII text
 /usr/bin/yapp:   C++ source, ASCII text
(...)
 How can these clearly perl scripts marked as C++ source, ASCII text?

Because the C++ patterns override any she-bang detection. And that's
a bug. And the she-bang detection for Perl is broken, too *sigh*

FWIW, /usr/sbin/grml2usb from your followup is now detected as
| a /usr/bin/env python script executable (binary data)
Yes, there is binary data in that file:
| ^O17^L^X/boot/syslinux/logo.16

Christoph



signature.asc
Description: Digital signature


Bug#698569: file reports Perl scripts as C++ source, ASCII text

2013-01-21 Thread Osamu Aoki
Hi,

As I checked more for executables on Debian, I found more of the strange
file results:

/usr/bin/gvfs-less:  Palm OS dynamic library data 
#!/bin/sh

$ head -1 /usr/bin/gvfs-less
#!/bin/sh

/usr/sbin/grml2usb:  data

$ head -1 /usr/sbin/grml2usb
#!/usr/bin/env python

/usr/bin/musixtex:   LaTeX 2e document, ASCII text

$ head -1 /usr/bin/musixtex
#!/usr/bin/perl -w

/usr/bin/latexmk:TeX document, ASCII text

$ head -1 /usr/bin/latexmk
#!/usr/bin/env perl

All these strange results comes from #!/ started files.  The logic to
decide should put more values to these #!/, I think...

Osamu


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#698569: file reports Perl scripts as C++ source, ASCII text

2013-01-20 Thread Osamu Aoki
Package: file
Version: 5.11-2
Severity: normal

I checked and found:

/usr/bin/apt-rdepends:   C++ source, ASCII text
/usr/bin/debconf-mergetemplate:  C++ source, ASCII text
/usr/bin/tpage:  C++ source, ASCII text
/usr/bin/ttree:  C++ source, ASCII text
/usr/bin/yapp:   C++ source, ASCII text

$ head -1 /usr/bin/apt-rdepends
#!/usr/bin/perl -w
$ head -1 /usr/bin/debconf-mergetemplate
#!/usr/bin/perl -w
$ head -1 /usr/bin/tpage
#!/usr/bin/perl -w
$ head -1 /usr/bin/ttree
#!/usr/bin/perl -w
$ head -1 /usr/bin/yapp
#!/usr/bin/perl

How can these clearly perl scripts marked as C++ source, ASCII text?

Osamu


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (10, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages file depends on:
ii  libc6  2.13-38
ii  libmagic1  5.11-2
ii  zlib1g 1:1.2.7.dfsg-13

file recommends no packages.

file suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org