From 31d4000b150a5a9daa37aeed5a75f9a183706b2f Mon Sep 17 00:00:00 2001 From: André Draszik Date: Wed, 9 Nov 2016 14:48:53 +0000 Subject: openssl: fix bashism in c_rehash shell script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This script claims to be a /bin/sh script, but it uses a bashism: from checkbashisms: possible bashism in meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh line 151 (should be 'b = a'): if [ "x/" == "x$( echo ${FILE} | cut -c1 -)" ] This causes build issues on systems that don't have /bin/sh symlinked to bash: Updating certificates in ${WORKDIR}/rootfs/etc/ssl/certs... /tmp/sysroots/x86_64-linux/usr/bin/c_rehash: 151: [: x/: unexpected operator ... Fix this by using POSIX shell syntax for the comparison. (From OE-Core rev: 0526524c74d4c9019fb014a2984119987f6ce9d3) (From OE-Core rev: 2ece9c0e955ee99543968ddfd14da909e23ae611) Signed-off-by: André Draszik Reviewed-by: Sylvain Lemieux Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh b/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh index 25ea729ac1..6620fdcb53 100644 --- a/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh +++ b/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh @@ -148,7 +148,7 @@ hash_dir() then FILE=$( readlink ${FILE} ) # check the symlink is absolute (or dangling in other word) - if [ "x/" == "x$( echo ${FILE} | cut -c1 -)" ] + if [ "x/" = "x$( echo ${FILE} | cut -c1 -)" ] then REAL_FILE=${SYSROOT}/${FILE} fi -- cgit v1.2.3-54-g00ecf