<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10006">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve; Approved for Submit
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Create --disable-binary-modules option.<br><br>This new option can be passed for ./configure or<br>./tests/CI/buildAsterisk.sh to prevent download/install of binary<br>modules.<br><br>Normally enabling the categories MENUSELECT_CODECS or MENUSELECT_RES<br>will result in binary modules being enabled even if the build target is<br>incompatible with those modules. This includes CI scripts which enable<br>categories before disabling specific modules.<br><br>If more binary modules are offered in the future this will help avoid<br>accidentally downloading them if unwanted or incompatible. Adding a<br>binary module will only require creating a new menuselect entry similar<br>to the existing ones, it will not be necessary to modify the CI scripts.<br><br>Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166<br>---<br>M build_tools/menuselect-deps.in<br>M codecs/codecs.xml<br>M configure<br>M configure.ac<br>M res/res.xml<br>M tests/CI/buildAsterisk.sh<br>6 files changed, 40 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in</span><br><span>index e62c183..161c67b 100644</span><br><span>--- a/build_tools/menuselect-deps.in</span><br><span>+++ b/build_tools/menuselect-deps.in</span><br><span>@@ -82,3 +82,4 @@</span><br><span> HAVE_LEAK_SANITIZER=@AST_LEAK_SANITIZER@</span><br><span> HAVE_THREAD_SANITIZER=@AST_THREAD_SANITIZER@</span><br><span> HAVE_UNDEFINED_SANITIZER=@AST_UNDEFINED_SANITIZER@</span><br><span style="color: hsl(120, 100%, 40%);">+NO_BINARY_MODULES=@PBX_NO_BINARY_MODULES@</span><br><span>diff --git a/codecs/codecs.xml b/codecs/codecs.xml</span><br><span>index 0b4e2a4..996a355 100644</span><br><span>--- a/codecs/codecs.xml</span><br><span>+++ b/codecs/codecs.xml</span><br><span>@@ -1,5 +1,6 @@</span><br><span> <member name="codec_opus" displayname="Download the Opus codec from Digium. See http://downloads.digium.com/pub/telephony/codec_opus/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <depend>res_format_attr_opus</depend></span><br><span>@@ -7,24 +8,28 @@</span><br><span> </member></span><br><span> <member name="codec_silk" displayname="Download the SILK codec from Digium. See http://downloads.digium.com/pub/telephony/codec_silk/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <defaultenabled>no</defaultenabled></span><br><span> </member></span><br><span> <member name="codec_siren7" displayname="Download the Siren7 codec from Digium. See http://downloads.digium.com/pub/telephony/codec_siren7/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <defaultenabled>no</defaultenabled></span><br><span> </member></span><br><span> <member name="codec_siren14" displayname="Download the Siren14 codec from Digium. See http://downloads.digium.com/pub/telephony/codec_siren14/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <defaultenabled>no</defaultenabled></span><br><span> </member></span><br><span> <member name="codec_g729a" displayname="Download the g729a codec from Digium. A license must be purchased for this codec. See http://downloads.digium.com/pub/telephony/codec_g729/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <defaultenabled>no</defaultenabled></span><br><span>diff --git a/configure b/configure</span><br><span>index b24fedb..c453501 100755</span><br><span>--- a/configure</span><br><span>+++ b/configure</span><br><span>@@ -1201,6 +1201,7 @@</span><br><span> AST_DEVMODE_STRICT</span><br><span> AST_DEVMODE</span><br><span> NOISY_BUILD</span><br><span style="color: hsl(120, 100%, 40%);">+PBX_NO_BINARY_MODULES</span><br><span> PTHREAD_CFLAGS</span><br><span> PTHREAD_LIBS</span><br><span> PTHREAD_CC</span><br><span>@@ -1351,6 +1352,7 @@</span><br><span> ac_user_opts='</span><br><span> enable_option_checking</span><br><span> with_gnu_ld</span><br><span style="color: hsl(120, 100%, 40%);">+enable_binary_modules</span><br><span> enable_dev_mode</span><br><span> with_download_cache</span><br><span> with_sounds_cache</span><br><span>@@ -2089,6 +2091,8 @@</span><br><span> --disable-option-checking ignore unrecognized --enable/--with options</span><br><span> --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)</span><br><span> --enable-FEATURE[=ARG] include FEATURE [ARG=yes]</span><br><span style="color: hsl(120, 100%, 40%);">+ --disable-binary-modules</span><br><span style="color: hsl(120, 100%, 40%);">+ Block installation of binary modules.</span><br><span> --enable-dev-mode Turn on developer mode</span><br><span> --enable-coverage Turn on code coverage tracking (for gcov)</span><br><span> --disable-xmldoc Explicitly disable XML documentation</span><br><span>@@ -8914,6 +8918,18 @@</span><br><span> ac_compiler_gnu=$ac_cv_c_compiler_gnu</span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+PBX_NO_BINARY_MODULES=0</span><br><span style="color: hsl(120, 100%, 40%);">+# Check whether --enable-binary-modules was given.</span><br><span style="color: hsl(120, 100%, 40%);">+if test "${enable_binary_modules+set}" = set; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ enableval=$enable_binary_modules; case "${enableval}" in</span><br><span style="color: hsl(120, 100%, 40%);">+ y|ye|yes) PBX_NO_BINARY_MODULES=0 ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ n|no) PBX_NO_BINARY_MODULES=1 ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *) as_fn_error $? "bad value ${enableval} for --disable-binary-modules" "$LINENO" 5 ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ esac</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # Check whether --enable-dev-mode was given.</span><br><span> if test "${enable_dev_mode+set}" = set; then :</span><br><span> enableval=$enable_dev_mode; case "${enableval}" in</span><br><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 8537aca..431b3da 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -385,6 +385,17 @@</span><br><span> </span><br><span> AC_LANG(C)</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+PBX_NO_BINARY_MODULES=0</span><br><span style="color: hsl(120, 100%, 40%);">+AC_ARG_ENABLE([binary-modules],</span><br><span style="color: hsl(120, 100%, 40%);">+ [AS_HELP_STRING([--disable-binary-modules],</span><br><span style="color: hsl(120, 100%, 40%);">+ [Block installation of binary modules.])],</span><br><span style="color: hsl(120, 100%, 40%);">+ [case "${enableval}" in</span><br><span style="color: hsl(120, 100%, 40%);">+ y|ye|yes) PBX_NO_BINARY_MODULES=0 ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ n|no) PBX_NO_BINARY_MODULES=1 ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-binary-modules) ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ esac])</span><br><span style="color: hsl(120, 100%, 40%);">+AC_SUBST(PBX_NO_BINARY_MODULES)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> AC_ARG_ENABLE([dev-mode],</span><br><span> [AS_HELP_STRING([--enable-dev-mode],</span><br><span> [Turn on developer mode])],</span><br><span>diff --git a/res/res.xml b/res/res.xml</span><br><span>index a340cc2..ace1792 100644</span><br><span>--- a/res/res.xml</span><br><span>+++ b/res/res.xml</span><br><span>@@ -1,5 +1,6 @@</span><br><span> <member name="res_digium_phone" displayname="Download the Digium Phone Module for Asterisk. See http://downloads.digium.com/pub/telephony/res_digium_phone/README."></span><br><span> <support_level>external</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <conflict>no_binary_modules</conflict></span><br><span> <depend>xmlstarlet</depend></span><br><span> <depend>bash</depend></span><br><span> <defaultenabled>no</defaultenabled></span><br><span>diff --git a/tests/CI/buildAsterisk.sh b/tests/CI/buildAsterisk.sh</span><br><span>index 60f0917..992dc94 100755</span><br><span>--- a/tests/CI/buildAsterisk.sh</span><br><span>+++ b/tests/CI/buildAsterisk.sh</span><br><span>@@ -3,6 +3,7 @@</span><br><span> CIDIR=$(dirname $(readlink -fn $0))</span><br><span> COVERAGE=0</span><br><span> REF_DEBUG=0</span><br><span style="color: hsl(120, 100%, 40%);">+DISABLE_BINARY_MODULES=0</span><br><span> source $CIDIR/ci.functions</span><br><span> </span><br><span> gen_cats() {</span><br><span>@@ -78,6 +79,10 @@</span><br><span> if [ $COVERAGE -eq 1 ] ; then</span><br><span> common_config_args+=" --enable-coverage"</span><br><span> fi</span><br><span style="color: hsl(120, 100%, 40%);">+if [ "$BRANCH_NAME" == "master" -o $DISABLE_BINARY_MODULES -eq 1 ] ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ common_config_args+=" --disable-binary-modules"</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> export WGET_EXTRA_ARGS="--quiet"</span><br><span> </span><br><span> runner ./configure ${common_config_args} > ${OUTPUT_DIR:+${OUTPUT_DIR}/}configure.txt</span><br><span>@@ -115,7 +120,7 @@</span><br><span> mod_disables+=" res_ael_share res_calendar res_config_ldap res_config_pgsql res_corosync"</span><br><span> mod_disables+=" res_http_post res_pktccops res_rtp_multicast res_snmp res_xmpp"</span><br><span> fi</span><br><span style="color: hsl(0, 100%, 40%);">-[ "$BRANCH_NAME" == "master" ] && mod_disables+=" codec_opus codec_silk codec_g729a codec_siren7 codec_siren14"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> runner menuselect/menuselect `gen_mods disable $mod_disables` menuselect.makeopts</span><br><span> </span><br><span> mod_enables="app_voicemail app_directory FILE_STORAGE"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10006">change 10006</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10006"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166 </div>
<div style="display:none"> Gerrit-Change-Number: 10006 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>