[asterisk-bugs] [JIRA] (ASTERISK-27606) BuildSystem: declare -A assumes shell Bash.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Mon Jan 22 04:08:49 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-27606:
---------------------------------------

    Comment: was deleted

(was: Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].)

> BuildSystem: declare -A assumes shell Bash.
> -------------------------------------------
>
>                 Key: ASTERISK-27606
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27606
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/BuildSystem
>    Affects Versions: 13.19.0, 15.2.0
>         Environment: OpenBSD 6.2
> FreeBSD 11.1
>            Reporter: Alexander Traud
>            Severity: Minor
>
> Makefiles specify which shell they are going to start in the environment. That shell then executes the commands within the Makefile. Normally, this shell is _sh_, which is the default shell of the platform. Some scripts within Asterisk require the specific shell _bash_, for example the script {{./build_tools/download_externals}}. In that case, the header of the that script declares a shift to _bash_.
> However, {{./Makefile.moddir_rules}} uses {{declare -A}}. The parameter A is not available in all shells, for example this fails in the latest OpenBSD 6.2 and FreeBSD 11.1. That part of the script is guarded by a check for the shell _bash_. However, when {{declare -A}} is executed, the default shell has not shifted to _bash_ yet. Therefore {{declare -A}} fails.
> In case of OpenBSD, Asterisk continues with {{gmake install}} and simply does not install any external module. In FreeBSD, {{gmake install}} fails, one has to uninstall _bash_ via {{pkg delete bash}} as root.
> *Steps to reproduce*, for example in FreeBSD 11.1
> # pkg install gmake
> # pkg install libedit jansson e2fsprogs-libuuid sqlite3 libxml2
> # fetch --no-verify-peer http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
> # tar \-zxf asterisk\-*
> # cd asterisk-*
> # ./configure --without-pjproject-bundled
> # gmake
> # gmake install



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list