--- Begin Message ---
- To: tex-live@tug.org
- Subject: [tex-live] wrong shebang in ConTeXt scripts break RPM packaging
- From: "Jindrich Novy" <jindranovy@gmail.com>
- Date: Tue, 13 Feb 2007 12:31:01 +0100
- Message-id: <d954a6590702130331l35d061fdi89be268784e245fd@mail.gmail.com>
Hi all,
I was bitten by a bug in ConTeXt while packaging the TeXLive 2007 texmf
tree. RPM's find-requires script added a bogus dependency to /usr/env
which prevented me to actually install the packages. I tracked it down
to the ConTeXt package ruby scripts, where incorrect shebang is present
in the wwwserver.rb. The cause might be that the ctxtools.rb script,
which contains the add_shebang function, which is used to write a
shebang to newly created scripts, contains a typo, when it refers
to /usr/env, but should refer to /usr/bin/env as usual.
Attaching patch that fixes it.
Jindrich
--- texmf-dist/scripts/context/ruby/wwwserver.rb.badenv 2006-11-18 02:37:52.000000000 +0100
+++ texmf-dist/scripts/context/ruby/wwwserver.rb 2007-02-12 16:54:09.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/env ruby
+#!/usr/bin/env ruby
banner = ['WWWServer', 'version 1.0.0', '2003-2006', 'PRAGMA ADE/POD']
--- texmf-dist/scripts/context/ruby/ctxtools.rb.badenv 2007-01-12 12:44:15.000000000 +0100
+++ texmf-dist/scripts/context/ruby/ctxtools.rb 2007-02-12 16:55:04.000000000 +0100
@@ -1737,7 +1737,7 @@ class Array
def add_shebang(filename,program)
unless self[0] =~ /^\#/ then
- self.insert(0,"\#!/usr/env #{program}")
+ self.insert(0,"\#!/usr/bin/env #{program}")
end
unless self[2] =~ /^\#.*?copyright\=/ then
self.insert(1,"\#")
--- End Message ---