Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asterisk: Need simpler conffiles definitions #808

Open
pprindeville opened this issue Mar 31, 2023 · 4 comments
Open

asterisk: Need simpler conffiles definitions #808

pprindeville opened this issue Mar 31, 2023 · 4 comments

Comments

@pprindeville
Copy link
Member

pprindeville commented Mar 31, 2023

Maintainer: @jslachta
Environment: x86_64, generic, HEAD
Description:

Looking at the conffiles definition in the Makefile, it's not clear it's correct.

Instead of enumerating the files in /etc/asterisk/ it would make more sense to just name that directory. For instance, if you make a copy of a config file as:

% cp -a extensions.conf extensions.conf.orig

before editing the file, or perhaps (periodically) a timestamped version of it like:

% cp -a extensions.conf extensions.conf.$(date +%Y%m%d)

then you'd want those files preserved across sysupgrades. I also note the lack of .ael files as being backed up.

The file /etc/init.d/asterisk isn't really modifiable and probably should be updated via sysupgrade (as options are expressed in /etc/config/asterisk instead).

Lastly, cryptographic keys (used by res_crypto) are stored in /var/lib/asterisk/keys/ and definitely should be backed up, along with /var/lib/asterisk/astdb/.

@pprindeville
Copy link
Member Author

Almost forgot, various files like extensions.conf allow for file inclusion, and the names of those additional files can't be known in advance, so another reason to just preserve /etc/asterisk/.

@micmac1
Copy link
Contributor

micmac1 commented Apr 2, 2023

Hi Phillip!

Just my two cents. Regarding /etc/asterisk I agree with you, makes sense to me. Regarding init script I think it doesn't hurt to add that to conffiles. It'll only be copied over during sysupgrade if the user did actually make changes to it. My expectation is that users don't rewrite the initi script. But if for whatever reason they do end up changing it I think it's still nice to save the changes during sysupgrade.

Regarding the keys in /var I don't think I'd want that in conffiles because on OWRT /var is volatile by default. So that's not where I'd save any keys. I'd try to change the configuration and set them up in /etc. I think nowadays there's a config switch in OWRT these days to switch /var to be non-volatile, but that's not default. Not really sure about this one.

@pprindeville
Copy link
Member Author

There are two choices. Support persistent /var (which on any box that you want to run Asterisk, will probably be a thing) or else modify the path of astkeydir in /etc/asterisk/asterisk.conf to point to /etc/asterisk/keys/ or some such.

Most initd scripts aren't listed in conffiles, so this would be bending/breaking the paradigm.

But I don't feel that strongly about it.

@pprindeville
Copy link
Member Author

Well, this issue hasn't advanced much in the last year. Should we close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants