Bug 328294 - bootstrap.local invokes wrong shell [patch]
Summary: bootstrap.local invokes wrong shell [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-Tarball (show other bugs)
Version: 3.5.0
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 17:31 UTC by Sven Coenye
Modified: 2022-02-04 06:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments
Patch to make CLEANROOT test POSIX safe (696 bytes, patch)
2013-12-03 00:22 UTC, Sven Coenye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Coenye 2013-12-01 17:31:17 UTC
In Debian Wheezy and derivatives, the default shell was changed from Bash to Dash. Dash offers better performance during boot but does not support all Bash's extensions to POSIX. 
bootstrap.local invokes /bin/sh but the CLEANROOT test uses Bash specific syntax. As a result, it now fails to run properly.

This script should either invoke /bin/bash, or the CLEANROOT test should be changed to use POSIX syntax (i.e. use = instead of ==).

(There are dozens more scripts in the source tree doing the same thing. At the moment, I can't say which ones would break as I'm just starting to get 3.5.0 to compile.)
Comment 1 caulier.gilles 2013-12-01 18:15:07 UTC
Sven,

If you have a patch, i can apply it to git/master...

Gilles Caulier
Comment 2 Sven Coenye 2013-12-03 00:22:44 UTC
Created attachment 83889 [details]
Patch to make CLEANROOT test POSIX safe

This makes bootstrap.local run properly under Dash without having to invoke Bash.

(Note: I'm an SVN operator. This was my first attempt at a Git patch. Beware... ;-)
Comment 3 caulier.gilles 2013-12-03 07:07:16 UTC
Git commit 9079970a9239b2bed5d12c39e50282957470e5eb by Gilles Caulier.
Committed on 03/12/2013 at 07:01.
Pushed by cgilles into branch 'master'.

Apply patch #83889 to be compatible with POSIX
FIXED-IN: 4.0.0

M  +1    -1    bootstrap.local

http://commits.kde.org/scratch/mwiesweg/digikam-sc/9079970a9239b2bed5d12c39e50282957470e5eb