[asterisk-users] CM for menuselect choices

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun May 7 05:42:03 CDT 2017


On Fri, May 05, 2017 at 11:21:20AM -0400, Richard Kenner wrote:
> I'd like to be able to save the choices made in menuselect in a way
> that they can be tracked in a CM system and applied to a later release
> of Asterisk using an automated tool like Ansible.  What's the best
> way to do that?

Use menuselect's command line (--enable and --disable). Note that this
requires an extra build stage:

  $MAKE menuselect.makeopts
  ./menuselect/menuselect \
  	--enable foo \
	--disable bar \
	#

Alternatively, patch the sources of Asterisk to have foo enabled and bar
disabled. This should be simple if you maintain your own stack of patches
anyway. Examples:

--- a/addons/res_config_mysql.c
+++ b/addons/res_config_mysql.c
@@ -24,7 +24,6 @@
 
 /*** MODULEINFO
 	<depend>mysqlclient</depend>
-	<defaultenabled>no</defaultenabled>
 	<support_level>extended</support_level>
  ***/
 


and:

--- a/sounds/sounds.xml
+++ b/sounds/sounds.xml
@@ -10,7 +10,6 @@
 		</member>
 		<member name="CORE-SOUNDS-EN-GSM" displayname="English, GSM format" >
 			<support_level>core</support_level>
-			<defaultenabled>yes</defaultenabled>
 		</member>
 		<member name="CORE-SOUNDS-EN-G729" displayname="English, G.729 format">
 			<support_level>core</support_level>
@@ -246,7 +245,6 @@
 	</category>
 	<category name="MENUSELECT_MOH" displayname="Music On Hold File Packages" positive_output="yes">
 		<member name="MOH-OPSOUND-WAV" displayname="opsound.org Music On Hold Files, WAV format" >
-			<defaultenabled>yes</defaultenabled>
 			<support_level>core</support_level>
 		</member>
 		<member name="MOH-OPSOUND-ULAW" displayname="opsound.org Music On Hold Files, mu-Law format" >

You can also add 'defaultenabled' to set the default, if needed.


menuselect.makeopts is not a file to keep as it is a generated file that
is overly verbose and breaks all too often (on a change of version. And
also potentially on a change of configure options?).

I tried in the past to replace menuselect. In my replacement it had a
simple configuration file (build_tools/conf) that cuild be easily hand
edited. See menuselect/contrib/menuselect-dummy . However, it takes
effort to keep it up-to-date with menuselect, and I never bothered for
quite some time.

-- 
               Tzafrir Cohen
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com



More information about the asterisk-users mailing list