Installing Truecrypt by building the sources in Feisty is incredibly painful.
There are several "howtos" and "great ideas", out there, but the truth is, there is a serious problem that is not mentioned elsewhere:
The infamous "dash as sh" link in (K)Ubuntu is breaking the build.sh and the install.sh scripts in the Truecrypt 4.3 source. I have posted (user Hallaco-Ocumo) already on this in the Truecrypt forum, (http://forums.truecrypt.org/viewtopic.php?p=30722#30722)
As some people knows, [K]Ubuntu uses dash instead of sh (i.e., there is a link sh -> dash) and this is breaking a lot of scripts.
The build.sh and install.sh scripts in Truecrypt v4.3 are calling for sh on their first line:
The problem is, that Ubuntu Edgy and Feisty will follow the link sh->dash and use dash instead. Now, dash has important differences from bash, specially: sourcing files from the current directory with a relative path, does not work if the current directory is not in the PATH. This is why there are so many problems and bugs reported (for getting it all, google for dash sh ubuntu) for scripts that don't work and give strange syntax errors or missing files, etc.
The question is: are the Truecrypt build and install scripts written for sh/dash and not for bash?
In the mean time, there are different ways of fixing this particular problem:
1.- Edit the Truecrypt's build.sh and install.sh scripts so that instead of having this line:
it should show this:
and then Ubuntu will use the correct shell. Or,
2.- Change the infamous link in (K)Ubuntu:
Or, the Debian way:
2.- You can restore bash, by running
and then, when asked if you want to install dash, select 'NO', and restore bash
The long discussion in the Ubuntu developers community, is whether the link for sh should revert to bash to avoid that so many scripts are broken, or whether this should be the responsibility of the writers of scripts that should know what shell to invoke: bash, sh or whatever. The reasoning seems to be, that if a script calls sh but expects to find bash features, then this script is wrong.
Perhaps the solution is to have the build.sh and install.sh scripts of Truecrypt calling bash instead, since it obvious gets broken by using sh, at least in [K]Ubuntu.
Ocumo
There are several "howtos" and "great ideas", out there, but the truth is, there is a serious problem that is not mentioned elsewhere:
The infamous "dash as sh" link in (K)Ubuntu is breaking the build.sh and the install.sh scripts in the Truecrypt 4.3 source. I have posted (user Hallaco-Ocumo) already on this in the Truecrypt forum, (http://forums.truecrypt.org/viewtopic.php?p=30722#30722)
As some people knows, [K]Ubuntu uses dash instead of sh (i.e., there is a link sh -> dash) and this is breaking a lot of scripts.
The build.sh and install.sh scripts in Truecrypt v4.3 are calling for sh on their first line:
Code:
#!/bin/sh
The question is: are the Truecrypt build and install scripts written for sh/dash and not for bash?
In the mean time, there are different ways of fixing this particular problem:
1.- Edit the Truecrypt's build.sh and install.sh scripts so that instead of having this line:
Code:
#!/bin/sh
Code:
#!/bin/bash
2.- Change the infamous link in (K)Ubuntu:
Code:
sudo rm /bin/sh ln -s /bin/bash /bin/sh
Or, the Debian way:
2.- You can restore bash, by running
Code:
sudo dpkg-reconfigure dash
The long discussion in the Ubuntu developers community, is whether the link for sh should revert to bash to avoid that so many scripts are broken, or whether this should be the responsibility of the writers of scripts that should know what shell to invoke: bash, sh or whatever. The reasoning seems to be, that if a script calls sh but expects to find bash features, then this script is wrong.
Perhaps the solution is to have the build.sh and install.sh scripts of Truecrypt calling bash instead, since it obvious gets broken by using sh, at least in [K]Ubuntu.
Ocumo
Comment