[asterisk-bugs] [JIRA] (ASTERISK-27715) [patch] BuildSystem: AC_PATH_PROG sets to colon character when not found.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Mon Mar 5 03:30:12 CST 2018


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

Alexander Traud updated ASTERISK-27715:
---------------------------------------

    Description: 
NetBSD is one of those platforms which does not ship with the tool {{ldconfig}}. The script {{./configure}} checks correctly for its existence. The Makefile uses that finding not to call {{ldconfig}}. However, the authors of that code assumed the tool name would be empty. For those tools, not found by {{./configure}}, the name is set to a colon.

The Makefile was scanned for more issues via the Regular Expression: {code} ifn?eq\s*\(\s*\$\s*\(\s*[A-Z0-9]*\s*\)\s*,\s*\){code}The tool {{awk}} is detected by {{AC_PROG_AWK}} and therefore is not a colon when not present. This affects those tools detected via {{AC_PATH_PROG}}. Therefore, only {{ldconfig}} and {{grep}} were affected.

These two issues were introduced with [commit 92ef8a6|http://github.com/asterisk/asterisk/commit/92ef8a6fe1fe2adb79f1e928ffaf909e9afade67] and [commit 5bf283d|http://github.com/asterisk/asterisk/commit/5bf283d4060b2a8f90e347a42bbcfd40f5073942]. In case of the tool {{grep}}, another alternative would be to go for [{{AC_PROG_GREP}}|http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Programs] instead of {{AC_PATH_PROG}}. With that, only the file {{third-party/pjproject/configure.m4}} would have to be changed, because that tests for a colon already.

Similar was found by [~coreyfarrell] in [code review 8076|http://gerrit.asterisk.org/#/c/8076/] and re-reported for the tool {{ldconfig}} in [code review 7999|http://gerrit.asterisk.org/7999].

  was:
NetBSD is one of those platforms which does not ship with the tool {{ldconfig}}. The script {{./configure}} checks correctly for its existence. The Makefile uses that finding not to call {{ldconfig}}. However, the authors of that code assumed the tool name would be empty. For those tools, not found by {{./configure}}, the name is set to a colon.

The Makefile was scanned for more issues via the Regular Expression: {code} ifn?eq\s*\(\s*\$\s*\(\s*[A-Z0-9]*\s*\)\s*,\s*\){code}The tool {{awk}} is detected by {{AC_PROG_AWK}} and therefore is not a colon when not present. This affects those tools detected via {{AC_PATH_PROG}}. Therefore, only {{ldconfig}} and {{grep}} were affected.

These two issues were introduced with [commit 92ef8a6|http://github.com/asterisk/asterisk/commit/92ef8a6fe1fe2adb79f1e928ffaf909e9afade67] and [commit 5bf283d|http://github.com/asterisk/asterisk/commit/5bf283d4060b2a8f90e347a42bbcfd40f5073942]. In case of the tool {{grep}}, another alternative would be to go for [{{AC_PROG_GREP}}|http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Programs] instead of {{AC_PATH_PROG}}. With that, only the file {{third-party/pjproject/configure.m4}} would have to be changed, because that tests for a colon already.

Similar was found by Corey Farrell in [code review 8076|http://gerrit.asterisk.org/#/c/8076/] and re-reported for the tool {{ldconfig}} in [code review 7999|http://gerrit.asterisk.org/7999].


> [patch] BuildSystem: AC_PATH_PROG sets to colon character when not found.
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-27715
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27715
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/BuildSystem
>    Affects Versions: 13.19.2, 15.2.2
>         Environment: NetBSD 7.1.1
>            Reporter: Alexander Traud
>              Labels: patch
>         Attachments: detect_missing_tools.patch
>
>
> NetBSD is one of those platforms which does not ship with the tool {{ldconfig}}. The script {{./configure}} checks correctly for its existence. The Makefile uses that finding not to call {{ldconfig}}. However, the authors of that code assumed the tool name would be empty. For those tools, not found by {{./configure}}, the name is set to a colon.
> The Makefile was scanned for more issues via the Regular Expression: {code} ifn?eq\s*\(\s*\$\s*\(\s*[A-Z0-9]*\s*\)\s*,\s*\){code}The tool {{awk}} is detected by {{AC_PROG_AWK}} and therefore is not a colon when not present. This affects those tools detected via {{AC_PATH_PROG}}. Therefore, only {{ldconfig}} and {{grep}} were affected.
> These two issues were introduced with [commit 92ef8a6|http://github.com/asterisk/asterisk/commit/92ef8a6fe1fe2adb79f1e928ffaf909e9afade67] and [commit 5bf283d|http://github.com/asterisk/asterisk/commit/5bf283d4060b2a8f90e347a42bbcfd40f5073942]. In case of the tool {{grep}}, another alternative would be to go for [{{AC_PROG_GREP}}|http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Programs] instead of {{AC_PATH_PROG}}. With that, only the file {{third-party/pjproject/configure.m4}} would have to be changed, because that tests for a colon already.
> Similar was found by [~coreyfarrell] in [code review 8076|http://gerrit.asterisk.org/#/c/8076/] and re-reported for the tool {{ldconfig}} in [code review 7999|http://gerrit.asterisk.org/7999].



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



More information about the asterisk-bugs mailing list