MDEV-33837: Remove false-positive Bash warnings from

lintian output

Lintian have many warnings that there is shebang '/bin/sh' which can
be populary /bin/bash or /bin/zsh but also many others like Ksh
or even Fish.

Warned lintian problems are testing that are run under Bash or some other
shell so they are or they are words in comments like let

 * I: mariadb-client: bash-term-in-posix-shell '`echo "testing\c"' [usr/bin/mariadb-secure-installation:191]
 * I: mariadb-server: bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/wsrep_notify:86]
 * I: mariadb-server: bash-term-in-posix-shell '[ "$url" ==' [usr/bin/mariadbd-safe:216]
 * I: mariadb-server: bash-term-in-posix-shell 'let' [usr/bin/mariadbd-safe:41]
 * I: mariadb-server: bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:712]
 * I: mariadb-server: bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:832]
 * I: mariadb-server-core: bash-term-in-posix-shell 'source tree,' [usr/bin/mariadb-install-db:93]
 * I: mariadb-test-data: bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mysql-test/std_data/wsrep_notify.sh:87]
 * I: mariadb-test-data: bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mysql-test/std_data/wsrep_notify_ssl.sh:87]
This commit is contained in:
Tuukka Pasanen 2024-05-14 11:51:27 +03:00 committed by Daniel Black
parent ddefc59bc8
commit 517d9515f1
4 changed files with 16 additions and 0 deletions

View file

@ -1,2 +1,5 @@
# Mainly for BSD family to make sure that perl is found
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/bin/mytop]
# Used to determine which shell we have. False-positive situation
bash-term-in-posix-shell '`echo "testing\c"' [usr/bin/mariadb-secure-installation:191]

View file

@ -0,0 +1,2 @@
# Bash word source used in comment
bash-term-in-posix-shell 'source tree,' [usr/bin/mariadb-install-db:93]

View file

@ -0,0 +1,8 @@
# Used to check if running in Bash
bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/wsrep_notify:86]
bash-term-in-posix-shell '[ "$url" ==' [usr/bin/mariadbd-safe:216]
# In comment so false-positive
bash-term-in-posix-shell 'let' [usr/bin/mariadbd-safe:41]
# Supported in Zsh and Bash (also Dash)
bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:712]
bash-term-in-posix-shell 'ulimit' [usr/bin/mariadbd-safe:832]

View file

@ -8,6 +8,9 @@ incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mys
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mysql-test/suite/funcs_1/lib/DataGen_modify.pl]
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mysql-test/suite/funcs_2/lib/gen_charset_utf8.pl]
incorrect-path-for-interpreter /usr/bin/env perl != /usr/bin/perl [usr/share/mysql/mysql-test/suite/rpl/extension/checksum.pl]
# This is used to check if we are running under Bash
bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mysql-test/std_data/wsrep_notify.sh:87]
bash-term-in-posix-shell '${BASH_VERSION' [usr/share/mysql/mysql-test/std_data/wsrep_notify_ssl.sh:87]
# These files are result files and they are supposed to be
# Natial encoded (ISO/IEC 8859-1) not UTF-8
national-encoding [usr/share/mysql/mysql-test/include/ctype_E05C.inc]