Package: highlight
Version: 2.16-1
Severity: wishlist
Tags: upstream

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attached is a patch (file: patch2.tar.bz2) with updated and new shebang
regexes to account for the following use cases:

 * Whitespace between the starting #! and the executable's path.
 * Usage of the "#!/usr/bin/env executable" form of shebang used
   by some scripts.
 * Recognition of ruby, php and make executable scripts.
 * Recognition of the dash shell and the mawk awk variant.

Many of the above use cases are not corner-case; a survey on my /usr/bin
(which is certainly biased, since no attempt was made to acquire a random
set of packages before running it, but also indicative of the orders of
magnitude involved) showed the following results:

Shebang Type             Count  Percentage
- ------------------------------------------
all (binaries excluded)   1253
with spaces                258        21 %
with /usr/bin/env           71         6 %
with options after         322        26 %
- ------------------------------------------

Since the package uses the quilt format, I attach directly the files in 
debian/patches, to make it also easier to get applied upstream. A diff 
can also be supplied on request.

I also attach a patch for the collab-maint git version (file: 
0002-Change-shebang-regexes-to-account-for-spaces-and-the.patch) which
is currently 3.5 as I see, but have also verified compatibility with the
3.7 version.

A side note: In my tests with the 2.16 version the regexes had not required
the preceeding backslash; I have thus dropped it to make the regexes more
readable.

regards
George Zarkadas

- -- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable'), (450, 'testing-proposed-updates'), (450, 'testing'), (400, 
'unstable')
Architecture: amd64 (x86_64)

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

Versions of packages highlight depends on:
ii  highlight-common             2.16-1      source code to formatted text conv
ii  libc6                        2.11.3-2    Embedded GNU C Library: Shared lib
ii  libgcc1                      1:4.4.5-8   GCC support library
ii  libstdc++6                   4.4.5-8     The GNU Standard C++ Library v3

highlight recommends no packages.

highlight suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJPNUrgAAoJEJWXIVmJ5BwWI/QIAL5hm/mSFYrhiYbElk4M6KvG
xpGCKELkrfZTr6rErzdhuPsZkacr0jvPClC3FYhpo+hOcekCe0rIa51+v4pjWVpW
2A89Gi3WQ4bHb8GogZpuFPsuPIjGhwTZJBIvaTz5Zw+C2dqzsHAItZEcXpckauZ0
rxuK3Kqoip3tXf2KMAnYZmVhE0e66jfIqpRrw5M6vECXxcw0aeREO6sSjkcZtOLS
94bJfDtGHeBdkVy3/YvsPYNsJgqYzYIfOx88M1E8/Yi8flK+uMwlafVdQjbr2Q/T
eK/8PKOyuAgA1N5NZn12zLOC0dCxuyhBOP76Bevgdb3im2KOMHWMRXsdV9d1Bp4=
=Wenc
-----END PGP SIGNATURE-----

Attachment: patch2.tar.bz2
Description: BZip2 compressed data

Attachment: 0002-Change-shebang-regexes-to-account-for-spaces-and-the.patch.tar.bz2
Description: BZip2 compressed data

Reply via email to