[asterisk-dev] asterisk rpm package: asterisk-config

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Jun 17 03:02:13 CDT 2015


Hi,

On Tue, Jun 16, 2015 at 11:06:02AM +0300, Tzafrir Cohen wrote:
> Hi,
> 
> I'd like to get some feedback on the following:
> 
> In the packaging of asterisk, I'd like to be able to provide an
> alternative set of asterisk configuration files as an rpm package. For
> instance, I know that FreePBX has a general disrespect for packaging,
> but I would still like to package it and would like to provide an
> asterisk-config-freepbx package. But I would not like to make the
> packaging unsuitable for vanila Asterisk.
> 
> On Debian there is a separate package asterisk-config and the main
> package asterisk depends on:
> 
>   asterisk-config (= ${source:Version}) | asterisk-config-custom
> 
> Thus it would normally pull the package asterisk-config built from the
> same source, but may also use another package that Provides:
> asterisk-config-custom. See also
> http://anonscm.debian.org/cgit/pkg-voip/asterisk.git/tree/debian/asterisk-config-custom
> 
> I would like to have the same with an RPM package. However I can't have
> a or-ed dependency. Likewise I can't use the workaround of dpkg-divert
> to have another package take control of some of the files under
> /etc/asterisk.
> 
> The best I came up with is:

Minor updates: There is an existing package called asterisk-config*s*,
and it depends on asterisk-core of the exact same version (but asterisk
didn't depend on it). Hence:


asterisk.spec:

# Main package:
Requires: asterisk-configs

# %package configs
Requires: asterisk-core %{version}


freepbx.spec:

%package asterisk-configs
Provides: asterisk-configs


Any thoughts?

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



More information about the asterisk-dev mailing list