bugGNU TeXmacs - Bugs: bug #18519, plugins depend on bash but use...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18519: plugins depend on bash but use #!/bin/sh

Submitter:  -Deleted Account- <adrianmatematico>
Submitted:  Wed 13 Dec 2006 06:30:13 PM UTC
   
 
Category:  Plugins Priority:  5 - Normal
Item Group:  Error Status:  Wont Fix
Privacy:  Public Assigned to:  grozin
Originator Name:  Open/Closed:  Closed
Release:  None Release:  1.0.6.7
Fixed Release:  None Fixed Release: 
Keywords: 

Thu 28 Nov 2013 10:57:05 PM UTC, comment #3: 

This issue regularly comes up once and a while.  Both solutions (bash and sh) seem to have their advantages and disadvantages.  The shell plug-in seems to work fine on most systems, so I will leave things as they are...  Andrey, please re-open if necessary.

Joris van der Hoeven <vdhoeven>
Group administrator
Sat 30 Dec 2006 12:50:01 AM UTC, comment #2: 

In the file

plugins/shell/src/tm_shell.cpp

it says:

volatile void
invoke_shell () {
  charp argv[3];
  argv[0] = "sh";
  argv[1] = "-i";
  argv[2] = 0;
  execve("/bin/sh", argv, environ);
  exit(127);
}

One should change the sh to bash.

Likewise in the file plugins/shell/progs/init-shell.scm it says

  (:require (url-exists-in-path? "sh"))

and one should change it to bash.

I commit those changes and it still did not work.  I don't know why (probably made a mistake in cutting and pasting).

removing /bin/sh and doing ln -s /bin/bash /bin/sh did solve the problem. 

Furthermore, now texmacs started as if it was the first time, so I guess /bin/sh is used somewhere else too.



-Deleted Account- <adrianmatematico>
Wed 13 Dec 2006 06:38:54 PM UTC, comment #1: 

This is for release 1.0.6.7

-Deleted Account- <adrianmatematico>
Wed 13 Dec 2006 06:30:13 PM UTC, original submission:  

In Ubuntu Edgy Eft, /bin/sh is no longer a link to /bin/bash but rather to /bin/dash, and some scripts brake, since they do need bash.  Here is a list of files that might need revision to ensure that they work with /bin/dash or to change them to use /bin/bash:

./plugins/dratex/bin/tm_dratex~ #!/bin/sh
./plugins/dratex/examples #!/bin/sh
./plugins/dratex/examples/texts #!/bin/sh
./plugins/eukleides/bin/tm_eukleides~ #!/bin/sh
./plugins/eukleides/progs #!/bin/sh
./plugins/gnuplot/bin/tm_gnuplot~ #!/bin/sh
./plugins/gnuplot/progs #!/bin/sh
./plugins/lisp/bin/tm_lisp~ #!/bin/sh
./plugins/lisp/clisp #!/bin/sh
./plugins/lush/bin/tm_lush~ #!/bin/sh
./plugins/lush/lush #!/bin/sh
./plugins/maple/bin/tm_maple~ #!/bin/sh
./plugins/mathematica/bin/tm_mathematica~ #!/bin/sh
./plugins/mathematica/ps #!/bin/sh
./plugins/matlab/bin/tm_matlab~ #!/bin/sh
./plugins/matlab/code #!/bin/sh
./plugins/maxima/bin/maxima_detect~ #!/bin/sh
./plugins/maxima/bin/tm_maxima~ #!/bin/sh
./plugins/maxima/lisp #!/bin/sh
./plugins/octave/bin/tm_octave~ #!/bin/sh
./plugins/octave/doc #!/bin/sh
./plugins/r/bin/r_install~ #!/bin/sh
./plugins/r/r #!/bin/sh
./plugins/r/r/TeXmacs #!/bin/sh
./plugins/r/r/TeXmacs/R #!/bin/sh
./plugins/xypic/bin/tm_xypic~ #!/bin/sh
./plugins/xypic/progs #!/bin/sh

I found that list with the command:

for i in `find ./`; do read b < $i 2>/dev/null;if [ $? -a $b = '#!/bin/sh' ] ;then echo $i $b;fi 2>/dev/null; done 2>/dev/null


In particular, the file maxima_detect must be changed for the maxima plugin to work. 

The plotting facility in the graphics menu does not work.  After modifying all of those files to use /bin/bash instead of /bin/sh   the plots worked again.  I don't know which is the file that caused the problem.

The solution seems simple:  Change /bin/sh to /bin/bash if they actually need it.  I read some discussions saying that /bin/dash was faster.

-Deleted Account- <adrianmatematico>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by fbreuer (Updated the item)
  • -email is unavailable- added by adrianmatematico (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-28 vdhoeven StatusNone Wont Fix
        Assigned toNone grozin
        Open/ClosedOpen Closed
    2006-12-18 fbreuer CategoryNone Plugins
        Item GroupNone Error
        Release 1.0.6.7
        SummarySeveral bugs in Ubuntu Edgy Eft.(e.g. Maxima, and plots) plugins depend on bash but use #!/bin/sh

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code