Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286574 - FEATURE REQUEST: install net-misc/asterisk's sample dialplan *.conf to anywhere but /etc/asterisk/
Summary: FEATURE REQUEST: install net-misc/asterisk's sample dialplan *.conf to anywhe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
: 286718 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-26 21:38 UTC by Jeremy Johnson
Modified: 2010-05-13 14:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Johnson 2009-09-26 21:38:47 UTC
It would be nice if net-misc/asterisk installed astererisk's sample dialplan *.conf to e.g. /usr/share/asterisk/<version>/
Then the user could decide, which if any, of the new configuration options should be include in their dialplan.
For example, I keep my dialplans in
/etc/dialplans/<freepbx-asterisk-version>
with a symlink /etc/asterisk -> choosen dialplan
so that asterisk can configure itself

Reproducible: Always

Actual Results:  
For for than a year, I had put off upgrading from asterisk 1.4 to 1.6
But asterisk-1.4 got masked pending removal from portage.
So I decided to test out asterisk-1.6

I backed up all of portage's asterisk*-1.4 ebuilds,
backed up my /etc/dialplan/freepbs-asterisk-1.4
and did a quickpkg of asterisk*-1.4 files + zaptel

Then I unmasked asterisk-1.6 and dahdi, 
uninstalled zaptel and replaced with dahdi-2.2.0.2
ran dahdi_cfg to generate /etc/dahdi/system.conf (replacement for /etc/zaptel)
and upgraded to asterisk-1.6.1.6

Then etc-update wanted to change ~50 files.
So I manually merged some of the files if the new file deleted lines, 
and updated others that didn't delete anything (other than comments)

I ended up with a functioning but partially broken dialplan.

So I untarred freepbx-2.6.0RC2
then copied the freepbx dialplan stubs back to /etc/asterisk
cd amp_conf; 
for f in `find . -name *.conf`; do B=`basename $f`; cp $f /etc/asterisk/$B; done
Then I set
/etc/asterisk/asterisk.conf:dahdichanname = no
/etc/amportal.conf:ZAP2DAHDICOMPAT=true
and let freepbx update (from the database backend) the supplemental configuration files which get included from the stub files.



Expected Results:  
Asterisk should be able to upgrade without overwriting users' dialplan.
I know I could point /etc/asterisk symlink to (say) /etc/dialplans/samples
but sometimes one does "emerge -uvDN world" and it would be nice not to have to
shutdown the phone system, point /etc/asterisk to somewhere innocuous, let things emerge, then restore symlink and restart phone system.



I know I could probably use CONFIG_PROTECT to spare my dialplan, 
but the configuration files from asterisk are merely templates with mostly comments, and some arbitrary phones and users. They are not a real working dialplan. My 2 cents suggestion is to put them in /usr/share/asterisk/<version>/
Comment 1 Sebastian Luther (few) 2009-09-28 10:28:27 UTC
*** Bug 286718 has been marked as a duplicate of this bug. ***
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2010-02-02 21:54:14 UTC
Based on IRC comments, this may have been addressed. Could you confirm that 1.6.2.1 still exhibits this behaviour for you please?
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2010-05-13 14:51:50 UTC
I am confident that your "overwrite" problem has been fully addressed in the 1.6.2.7 ebuild. If the samples USE-flag is unset (it defaults to on), /etc/asterisk will not be touched.


+*asterisk-1.6.2.7 (13 May 2010)
+
+  13 May 2010; <chainsaw@gentoo.org> +asterisk-1.6.2.7.ebuild,
+  +files/1.6.2/asterisk-1.6.2.7-gsm-pic.patch,
+  +files/1.6.2/asterisk-1.6.2.7-pri-missing-keyword.patch, metadata.xml:
+  Bugfix release from upstream, closes bug #318535 by Thomas Stein. Many
+  thanks to Oliver Jaksch for his patch rediffing & scavenging activities.
+  /etc/asterisk will no longer be polluted with any sample files if the
+  samples USE-flag is unset, closes bug #286574 by Jeremy Johnson and bug
+  #305313 by Michael Higgins.