Create --disable-binary-modules option.
This new option can be passed for ./configure or ./tests/CI/buildAsterisk.sh to prevent download/install of binary modules. Normally enabling the categories MENUSELECT_CODECS or MENUSELECT_RES will result in binary modules being enabled even if the build target is incompatible with those modules. This includes CI scripts which enable categories before disabling specific modules. If more binary modules are offered in the future this will help avoid accidentally downloading them if unwanted or incompatible. Adding a binary module will only require creating a new menuselect entry similar to the existing ones, it will not be necessary to modify the CI scripts. Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166
This commit is contained in:
parent
9189c266f1
commit
a2001c00e6
|
@ -82,3 +82,4 @@ HAVE_ADDRESS_SANITIZER=@AST_ADDRESS_SANITIZER@
|
|||
HAVE_LEAK_SANITIZER=@AST_LEAK_SANITIZER@
|
||||
HAVE_THREAD_SANITIZER=@AST_THREAD_SANITIZER@
|
||||
HAVE_UNDEFINED_SANITIZER=@AST_UNDEFINED_SANITIZER@
|
||||
NO_BINARY_MODULES=@PBX_NO_BINARY_MODULES@
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<member name="codec_opus" displayname="Download the Opus codec from Digium. See http://downloads.digium.com/pub/telephony/codec_opus/README.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<depend>res_format_attr_opus</depend>
|
||||
|
@ -7,24 +8,28 @@
|
|||
</member>
|
||||
<member name="codec_silk" displayname="Download the SILK codec from Digium. See http://downloads.digium.com/pub/telephony/codec_silk/README.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
</member>
|
||||
<member name="codec_siren7" displayname="Download the Siren7 codec from Digium. See http://downloads.digium.com/pub/telephony/codec_siren7/README.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
</member>
|
||||
<member name="codec_siren14" displayname="Download the Siren14 codec from Digium. See http://downloads.digium.com/pub/telephony/codec_siren14/README.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
</member>
|
||||
<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.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
|
|
|
@ -1201,6 +1201,7 @@ AST_DOWNLOAD_CACHE
|
|||
AST_DEVMODE_STRICT
|
||||
AST_DEVMODE
|
||||
NOISY_BUILD
|
||||
PBX_NO_BINARY_MODULES
|
||||
PTHREAD_CFLAGS
|
||||
PTHREAD_LIBS
|
||||
PTHREAD_CC
|
||||
|
@ -1351,6 +1352,7 @@ ac_subst_files=''
|
|||
ac_user_opts='
|
||||
enable_option_checking
|
||||
with_gnu_ld
|
||||
enable_binary_modules
|
||||
enable_dev_mode
|
||||
with_download_cache
|
||||
with_sounds_cache
|
||||
|
@ -2089,6 +2091,8 @@ Optional Features:
|
|||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--disable-binary-modules
|
||||
Block installation of binary modules.
|
||||
--enable-dev-mode Turn on developer mode
|
||||
--enable-coverage Turn on code coverage tracking (for gcov)
|
||||
--disable-xmldoc Explicitly disable XML documentation
|
||||
|
@ -8914,6 +8918,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
PBX_NO_BINARY_MODULES=0
|
||||
# Check whether --enable-binary-modules was given.
|
||||
if test "${enable_binary_modules+set}" = set; then :
|
||||
enableval=$enable_binary_modules; case "${enableval}" in
|
||||
y|ye|yes) PBX_NO_BINARY_MODULES=0 ;;
|
||||
n|no) PBX_NO_BINARY_MODULES=1 ;;
|
||||
*) as_fn_error $? "bad value ${enableval} for --disable-binary-modules" "$LINENO" 5 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-dev-mode was given.
|
||||
if test "${enable_dev_mode+set}" = set; then :
|
||||
enableval=$enable_dev_mode; case "${enableval}" in
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -385,6 +385,17 @@ AX_PTHREAD
|
|||
|
||||
AC_LANG(C)
|
||||
|
||||
PBX_NO_BINARY_MODULES=0
|
||||
AC_ARG_ENABLE([binary-modules],
|
||||
[AS_HELP_STRING([--disable-binary-modules],
|
||||
[Block installation of binary modules.])],
|
||||
[case "${enableval}" in
|
||||
y|ye|yes) PBX_NO_BINARY_MODULES=0 ;;
|
||||
n|no) PBX_NO_BINARY_MODULES=1 ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --disable-binary-modules) ;;
|
||||
esac])
|
||||
AC_SUBST(PBX_NO_BINARY_MODULES)
|
||||
|
||||
AC_ARG_ENABLE([dev-mode],
|
||||
[AS_HELP_STRING([--enable-dev-mode],
|
||||
[Turn on developer mode])],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<member name="res_digium_phone" displayname="Download the Digium Phone Module for Asterisk. See http://downloads.digium.com/pub/telephony/res_digium_phone/README.">
|
||||
<support_level>external</support_level>
|
||||
<conflict>no_binary_modules</conflict>
|
||||
<depend>xmlstarlet</depend>
|
||||
<depend>bash</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
CIDIR=$(dirname $(readlink -fn $0))
|
||||
COVERAGE=0
|
||||
REF_DEBUG=0
|
||||
DISABLE_BINARY_MODULES=0
|
||||
source $CIDIR/ci.functions
|
||||
|
||||
gen_cats() {
|
||||
|
@ -78,6 +79,10 @@ common_config_args+=" --enable-dev-mode"
|
|||
if [ $COVERAGE -eq 1 ] ; then
|
||||
common_config_args+=" --enable-coverage"
|
||||
fi
|
||||
if [ "$BRANCH_NAME" == "master" -o $DISABLE_BINARY_MODULES -eq 1 ] ; then
|
||||
common_config_args+=" --disable-binary-modules"
|
||||
fi
|
||||
|
||||
export WGET_EXTRA_ARGS="--quiet"
|
||||
|
||||
runner ./configure ${common_config_args} > ${OUTPUT_DIR:+${OUTPUT_DIR}/}configure.txt
|
||||
|
@ -115,7 +120,7 @@ if [ $TESTED_ONLY -eq 1 ] ; then
|
|||
mod_disables+=" res_ael_share res_calendar res_config_ldap res_config_pgsql res_corosync"
|
||||
mod_disables+=" res_http_post res_pktccops res_rtp_multicast res_snmp res_xmpp"
|
||||
fi
|
||||
[ "$BRANCH_NAME" == "master" ] && mod_disables+=" codec_opus codec_silk codec_g729a codec_siren7 codec_siren14"
|
||||
|
||||
runner menuselect/menuselect `gen_mods disable $mod_disables` menuselect.makeopts
|
||||
|
||||
mod_enables="app_voicemail app_directory FILE_STORAGE"
|
||||
|
|
Loading…
Reference in New Issue