Rpm packaging and the framework module

Hi all

I make rpm freepbx modules for my own use on fedora/redhat/centos machines.
I usually include a set of up-to-date modules in my rpm package. I often need to apply small patches, and often my changes are overwritten by the code in the framework module. So at packaging time, I have to apply the same patches both to freepbx itself and to the framework module. It’s a bit annoying and error-prone since I have to look for patches that touch files that are in the framework module.
So the question is: is there a reliable way to install the framework module to a freepbx source tree, before installing freepbx?
Something like this:
untar freepbx
apply the framework module
redo the freepbx tar.gz archive with the up-to-date framework included

Thanks

not really, the framework module is not really a module. You can think of it as another form of install_amp. There is an amportal.conf setting to disable Module Admin and then only use your packages, that’s about it.

I already set AMPEXTERNPACKAGES=true, if that’s what you are talking about, because I want to use a new package release to update my freepbx installations. My problem is different.
At package building time, I download the modules I need, and unpack them in amp_conf/htdocs/admin/modules.
Then I simply put some module_admin install in the post install script to activate the modules.
Everything seems to work fine, if it was not for the framework module which updates some freepbx core files (and I like that, because I like to have bugfixes) but it overwrites even my changes I previously applied to the same freepbx core files.
One recent example: I need to patch amp_conf/htdocs/admin/functions.inc.php . If I only patch the version of the file from freepbx-2.4.0.tar.gz (for example), then apply Freepbx Framework v. 2.4.1.0 (which was out prior to freepbx-2.4.1), the functions.php file gets overwritten, and my changes are lost.
It seems that instead of patching freepbx at package building time, and then applying the freepbx framework at install time, I should apply the freepbx framework, then apply my patches both at package building time. Am I right? Do you see some way to achieve this? In other words: am I safe if I unpack the freepbx tar.gz, then rewrite some files with the ones from the framework module, than build my package?

Thanks

Since I haven’t found any completely satisfying solution to integrate the updated framework modules in my rpm freepbx distribution, I would like to try with an example.
When I produce my rpm packages I need to patch, for example, the retrieve_conf script.
So I untar the freepbx distribution packages, patch the retrieve_conf script, and build the rpm package.
The problem is that, after installing the package on the target asterisk machine, I have to activate the modules, among which there is the framework module. This usually contains another version of the retrieve_conf script, which overrides the patched version I prepared at packaging time.
I’m currently applying my pathes to both the file included in the freepbx tarball (i.e. freepbx-2.5.0.tar.gz), and in the framework module I’m going to activate (i.e. framework-2.5.0.1.tgz). This is a tedious and error-prone procedure. So I would really like to find a way to merge freepbx-2.5.0.tar.gz and framework-2.5.0.1.tgz at packaging time, then apply my patches, then produce the package. I would like to know if there is a supported way to do this.

Thank you