1 |
# $Id: smeserver-freepbx.spec,v 1.2 2021/11/11 04:56:32 jpp Exp $ |
2 |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
4 |
|
5 |
#%define fpbxversion 2.5.0 |
6 |
%define version 13 |
7 |
%define release 17 |
8 |
%define name smeserver-freepbx |
9 |
|
10 |
Summary: Asterisk web GUI |
11 |
Name: %{name} |
12 |
Version: %{version} |
13 |
Release: %{release}%{?dist} |
14 |
License: GPL |
15 |
Group: System/Servers |
16 |
Source: %{name}-%{version}.tar.gz |
17 |
|
18 |
Patch0: smeserver-freepbx-13.bz9702.udpports.patch |
19 |
Patch1: smeserver-freepbx-13.bz9744.patch |
20 |
Patch2: smeserver-freepbx-13.bz9702-2.patch |
21 |
Patch3: smeserver-freepbx-13.bz9760.patch |
22 |
Patch4: smeserver-freepbx-13.bz9918.defaultUDPports.patch |
23 |
Patch5: smeserver-freepbx-13.bz9860.AutoUpgradeModules.patch |
24 |
Patch6: smeserver-freepbx-13.bz9637.backupFBX.patch |
25 |
Patch7: smeserver-freepbx-13.bz10120.noiseAmportal.patch |
26 |
Patch8: smeserver-freepbx-13.bz10268.updatetktauth.patch |
27 |
Patch9: smeserver-freepbx-13.bz10496.missing-tampered-files.patch |
28 |
Patch10: smeserver-freepbx-13.bz10503.DeviceAndUser.patch |
29 |
#### start SME10 patch |
30 |
Patch11: smeserver-freepbx-bz11613-sme10.patch |
31 |
|
32 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
33 |
URL: http://www.freepbx.org/ |
34 |
|
35 |
BuildRequires: e-smith-devtools |
36 |
BuildRequires: tar |
37 |
|
38 |
Requires: mariadb |
39 |
Requires: nodejs >= 10 |
40 |
#Requires: php-pear php-cgi php-common php-curl php-mbstring php-gd php-mysql php-gettext php-bcmath php-zip php-xml php-imap php-json php-process php-snmp |
41 |
Requires: php74-php-pear php74-php-cgi php74-php-common php74-php-curl php74-php-mbstring php74-php-gd php74-php-mysql php74-php-gettext php74-php-bcmath php74-php-zip php74-php-xml php74-php-imap php74-php-json php74-php-process php74-php-snmp |
42 |
Requires: httpd |
43 |
Requires: php-pear |
44 |
Requires: /usr/sbin/asterisk |
45 |
# not available for SME10 need to find module for mysql Requires: asterisk-addons |
46 |
#Requires: dahdi-tools |
47 |
#Requires: dahdi-linux |
48 |
Requires: sox |
49 |
Requires: mod_auth_tkt |
50 |
Requires: e-smith-base |
51 |
Requires: freepbx-src |
52 |
Requires: asterisk-sounds-core-en-ulaw |
53 |
# not available for sme10 Requires: asterisk-sounds-extra-en-ulaw |
54 |
# not available for sme10 Requires: asterisk-resample |
55 |
Requires: asterisk-voicemail |
56 |
Requires: asterisk-configs |
57 |
#SME10 |
58 |
Requires: asterisk-mysql asterisk-odbc asterisk-pjsip asterisk-sip asterisk-festival asterisk-moh-opsound asterisk-snmp asterisk-mp3 asterisk-sounds-core-en asterisk-moh-opsound |
59 |
# conlicts with imap asterisk-voicemail-odbc asterisk-voicemail-plain |
60 |
Requires: ffmpeg |
61 |
Requires: mpg123 |
62 |
Requires: mysql-connector-odbc |
63 |
Requires: unixODBC |
64 |
Requires: asterisk-odbc |
65 |
Requires: lame |
66 |
Requires: xz |
67 |
|
68 |
#Buildarch: noarch |
69 |
AutoReqProv: no |
70 |
|
71 |
|
72 |
%description |
73 |
FreePBX is a Standardised Implementation of Asterisk that gives you a GUI to manage your system. If you have looked into Asterisk, you would know that it does not come with any built in programming. You cannot plug a phone into it and make it work without editing configuration files, writing dialplans, and various messing about. FreePBX simplifies this by giving you a pre-written set of dialplans that allow you to have a fully functional PBX pretty much straight away. |
74 |
This package provide the integration of FreePBX on SME Server. |
75 |
|
76 |
|
77 |
%changelog |
78 |
* Wed Nov 10 2021 Jean-Philippe Pialasse <tests@pialasse.com> 13-17.sme |
79 |
- first import to SME10 [SME: 11613] |
80 |
- make it Freepbx 14 compatible [SME: 10705] |
81 |
add dependencies for SME10 mariadb nodejs >= 10 php74* |
82 |
remove missing rpms asterisk-sounds-extra-en-ulaw asterisk-resample asterisk-addons |
83 |
remove double owned folders /etc/asterisk /var/lib/asterisk |
84 |
systemd ready for asterisk(disabled), freepbx, httpd-fpbx |
85 |
smeserver-freepbx-update event created NEED TEST |
86 |
php74-php-fpm fragment |
87 |
update httpd-fpbx template for php-fpm use |
88 |
TODO : update httpd-e-smith to use php-fpm for fpbx |
89 |
TODO : update install script for php74 |
90 |
add a copy of safe_asterisk |
91 |
TODO : create php folders and set rights |
92 |
improve logrotate |
93 |
|
94 |
* Mon Jan 20 2020 Jean-Philipe Pialasse <tests@pialasse.com> 13-16.sme |
95 |
- add required modules to enable cel and cdr logging and search [SME: 10620] |
96 |
- add requires lame [SME: 9859] |
97 |
|
98 |
* Mon Jan 29 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13-15.sme |
99 |
- fix warning tampered files in GUI [SME: 10496] |
100 |
- remove DeviceAndUser property [SME: 10503] |
101 |
|
102 |
* Wed May 03 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-14.sme |
103 |
- update TKT auth parameter for SME 9.2 [SME: 10268] |
104 |
|
105 |
* Sat Feb 25 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-13.sme |
106 |
- fix noise rebooting and restarting freepbx [SME: 10120] |
107 |
|
108 |
* Wed Jan 25 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-11.sme |
109 |
- NFR: auto backup of whole FBX config during pre-backup event [SME: 9637] |
110 |
- both asdb and fpbx, asterisk config files, freepbx folders, voicemails are part of backup |
111 |
- 2 versions are kepts |
112 |
- weekly backup is also done. |
113 |
|
114 |
* Mon Jan 23 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-10.sme |
115 |
- fix Missing HTML5 format converters [SME: 9859] |
116 |
- added requirement for mpg123 and ffmpeg available in smecontribs |
117 |
|
118 |
* Mon Jan 23 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-9.sme |
119 |
- update framework before other modules [SME: 9860] |
120 |
|
121 |
* Mon Jan 09 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-8.sme |
122 |
- autoupgrade modules [SME: 9860] |
123 |
|
124 |
* Mon Jan 09 2017 Jean-Philipe Pialasse <tests@pialasse.com> 13-7.sme |
125 |
- fix wrong default UDPPorts on new install [SME: 9918] |
126 |
|
127 |
* Mon Oct 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-6.sme |
128 |
- fix error while backup with workstation [SME: 9760] |
129 |
|
130 |
* Mon Oct 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-5.sme |
131 |
-fix typo in smeserver-freepbx-13.bz9744.patch |
132 |
|
133 |
* Sun Oct 23 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-4.sme |
134 |
- fix [SME: 9702] |
135 |
- corrected syntax for port range |
136 |
|
137 |
* Sun Oct 23 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-3.sme |
138 |
- fix [SME: 9744] |
139 |
- fix wrong /tmp folder permission after update |
140 |
- Thank you Hsing-Foo Wang. |
141 |
|
142 |
* Tue Jul 26 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-2.sme |
143 |
- fix wrong UDP ports change 1000:2000 to 10000:20000 [SME: 9702] |
144 |
|
145 |
* Mon Jun 13 2016 Jean-Philipe Pialasse <tests@pialasse.com> 13-1.sme |
146 |
- bump version to current Freepbx version 13 |
147 |
|
148 |
* Mon Jun 13 2016 Jean-Philipe Pialasse <tests@pialasse.com> -47.sme |
149 |
- add all needed port for Freepbx sip pjsip and RTP [SME: 9495] |
150 |
|
151 |
* Sat Jun 11 2016 Jean-Philipe Pialasse <tests@pialasse.com> -46.sme |
152 |
- fix missing config files (requires asterisk-configs) [SME: 9577] |
153 |
- fix recuring reconfiguration error while installing digium phone module [SME: 9575] |
154 |
- added port 5061 for tls to TCP ports [SME: 9576] |
155 |
|
156 |
* Thu Jun 09 2016 Jean-Philipe Pialasse <tests@pialasse.com> -45.sme |
157 |
- fix wrong logrotate pattern [SME: 9516] |
158 |
- as the contrib is only in smedev, i do not fix existing log files badly rotated |
159 |
|
160 |
* Mon May 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-44.sme |
161 |
- remove fop db [SME: 9495] |
162 |
- add some mysql setting for freepbxdb (user, email) |
163 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-7.patch |
164 |
|
165 |
* Sun May 15 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-43.sme |
166 |
- add path to ucp module [SME: 9495] |
167 |
- add 256Mo as default for freepbx php Memory |
168 |
- add AllowOveride All for .htaccess |
169 |
- remove httpd config to old FOP panel |
170 |
- add port 5061 for freepbx |
171 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-5.patch |
172 |
- configuration of amportal.conf and its mysql equivalent |
173 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-6.patch |
174 |
|
175 |
* Sun May 15 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-42.sme |
176 |
- remove FOP patches [SME: 9495] |
177 |
- deleted link to expand amportal.conf |
178 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-4.patch |
179 |
|
180 |
* Sun May 15 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-41.sme |
181 |
- remove heading of /etc/asterisk/asterisk.conf [SME: 9495] |
182 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-3.patch |
183 |
- bump |
184 |
|
185 |
* Sun May 15 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-38.sme |
186 |
- remove expand template amportal.conf [SME: 9495] |
187 |
- chown /var/lib/asterisk |
188 |
- installation configuration options |
189 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-2.patch |
190 |
- Requires: asterisk-sounds-core-en-ulaw asterisk-sounds-extra-en-ulaw asterisk-voicemail |
191 |
|
192 |
* Sun May 15 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-37.sme |
193 |
- new path to sql files [SME: 9495] |
194 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-1.patch |
195 |
|
196 |
* Fri May 06 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-36.sme |
197 |
- adapt script to fpbx13 and asterisk 13 [SME: 9495] |
198 |
- change Requires Requires: %{_libdir}/asterisk/modules/app_addon_sql_mysql.so to |
199 |
- Requires: asterisk-addons as this is the paquet providing it, and it changed name to app_mysql.so |
200 |
|
201 |
* Fri May 06 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-35.sme |
202 |
- adapt script to fpbx13 and asterisk 13 [SME: 9495] |
203 |
- smeserver-freepbx-0.1-Sme9Ast13Fpbx13-0.patch |
204 |
|
205 |
* Fri May 06 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-34.sme |
206 |
- first import to SME9 [SME: 9495] |
207 |
|
208 |
* Sun May 12 2013 JP Pialasse <tests@pialasse.com> 0.1-33.sme |
209 |
- buildarch removed in order to find the correct %{_libdir}/asterisk/modules/app_addon_sql_mysql.so |
210 |
|
211 |
* Thu Oct 20 2011 Daniel B. <daniel@firewall-services.com> 0.1-32.sme |
212 |
- Protect by locations (so other alias can be defined to protect with LL::NG for example) |
213 |
|
214 |
* Mon Oct 17 2011 Daniel B. <daniel@firewall-services.com> 0.1-31.sme |
215 |
- Add misdn.log to logrotate |
216 |
|
217 |
* Thu Oct 13 2011 Daniel B. <daniel@firewall-services.com> 0.1-30.sme |
218 |
- Change session path [SME: 6661] |
219 |
|
220 |
* Wed Jan 05 2011 Daniel B. <daniel@firewall-services.com> 0.1-29.sme |
221 |
- astdatadir is /var/lib/asterisk |
222 |
- templates for /etc/logrotate.d/asterisk |
223 |
|
224 |
* Mon Sep 20 2010 Daniel B. <daniel@firewall-services.com> 0.1-28.sme |
225 |
- Create and populate the mysql databases in mysql.init |
226 |
- Templates for /etc/asterisk/asterisk.conf |
227 |
|
228 |
* Thu Jul 15 2010 Daniel B. <daniel@firewall-services.com> [0.1-27] |
229 |
- Read ARI password from the DB (and initialize a random one) |
230 |
|
231 |
* Mon Feb 22 2010 Daniel B. <daniel@firewall-services.com> [0.1-26] |
232 |
- Remove hard-coded dependencies on asterisk and asterisk-addons14 |
233 |
Depends now on asterisk binary and app_addon_sql_mysql.so files |
234 |
(so it can work with asterisk or asterisk14) |
235 |
|
236 |
* Mon Feb 15 2010 Daniel B. <daniel@firewall-services.com> [0.1-25] |
237 |
- Remove /etc/logrotate.d/asterisk which is now included in asterisk14 |
238 |
|
239 |
* Tue Feb 09 2010 Daniel B. <daniel@firewall-services.com> [0.1-24] |
240 |
- Depends now on asterisk14 and asterisk-addons14 |
241 |
|
242 |
* Wed Jan 06 2010 Daniel B. <daniel@firewall-services.com> [0.1-23] |
243 |
- disable dynamic hints |
244 |
|
245 |
* Tue Oct 06 2009 Daniel B. <daniel@firewall-services.com> [0.1-22] |
246 |
- include /opt/freepbx/admin/functions.inc.php in freepbx-dump-astdb |
247 |
action script for FreePBX 2.6 compatibility |
248 |
|
249 |
* Tue May 19 2009 Daniel B. <daniel@firewall-services.com> [0.1-21] |
250 |
- Add CHECKREFERER=FALSE in amportal.conf to repvent error message in some |
251 |
modules (due to the ProxyPass configuration) |
252 |
|
253 |
* Tue Apr 28 2009 Daniel B. <daniel@firewall-services.com> [0.1-20] |
254 |
- Fix CDR db password in cdr_mysql.conf template |
255 |
- Use a separate service in SME db for FOP |
256 |
|
257 |
* Thu Apr 16 2009 Daniel B. <daniel@firewall-services.com> [0.1-19] |
258 |
- remove scoreboard directive from httpd-fpbx config |
259 |
- remove some modules (mod_ssl, mod_proxy) |
260 |
|
261 |
* Sat Apr 11 2009 Daniel B. <daniel@firewall-services.com> [0.1-18] |
262 |
- templatize cdr_mysql.conf [SME: 5153] |
263 |
- templatize manager.conf |
264 |
- remove freepbx-cron-scheduler.php from root crontab so only |
265 |
asterisk user runs it (prevent email error sent from cron) |
266 |
|
267 |
* Fri Mar 27 2009 Daniel B. <daniel@firewall-services.com> [0.1-17] |
268 |
- Remove obsolete /admin Alias from apache |
269 |
- Run the security script on bootsrape-console-save event |
270 |
|
271 |
* Mon Mar 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-16] |
272 |
- Security Fixe: put a random password for ARI admin (this should be documented) |
273 |
|
274 |
* Thu Mar 19 2009 Daniel B. <daniel@firewall-services.com> [0.1-15] |
275 |
- Check if /opt/freepbx/admin exists (retry the install if a first one failed) |
276 |
- Remove tabs from spec |
277 |
|
278 |
* Wed Mar 18 2009 Daniel B. <daniel@firewall-services.com> [0.1-14] |
279 |
- Remove speex from dependencies |
280 |
|
281 |
* Thu Mar 12 2009 Daniel B. <daniel@firewall-services.com> [0.1-13] |
282 |
- Remove zaptel dependency, replaced with dahdi-tools and dahdi-linux |
283 |
|
284 |
* Mon Feb 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-12] |
285 |
- Fix logrotate issue (send a sigusr1 signal to httpd-fpbx) |
286 |
|
287 |
* Thu Feb 12 2009 Daniel B. <daniel@firewall-services.com> [0.1-11] |
288 |
- Full support for the new DAHDI driver, droping zaptel |
289 |
|
290 |
* Mon Feb 09 2009 Daniel B. <daniel@firewall-services.com> [0.1-10] |
291 |
- add support for DAHDI channel |
292 |
|
293 |
* Mon Dec 08 2008 Daniel B. <daniel@firewall-services.com> [0.1-9] |
294 |
- move expand-templates from post-upgrade event to bootstrap-console-save |
295 |
|
296 |
* Thu Nov 27 2008 Daniel B. <daniel@firewall-services.com> [0.1-8] |
297 |
- Add support for trunk name in mail alerts |
298 |
|
299 |
* Wed Nov 26 2008 Daniel B. <daniel@firewall-services.com> [0.1-7] |
300 |
- Add a simple script to alert admin by mail on trunk errors |
301 |
|
302 |
* Thu Nov 20 2008 Daniel B. <daniel@firewall-services.com> [0.1-6] |
303 |
- Use AdminPanels props so access can be configured using |
304 |
smeserver-userpanels contrib. AdminUsers and FopUsers |
305 |
props aren't used anymore |
306 |
|
307 |
* Wed Nov 19 2008 Daniel B. <daniel@firewall-services.com> [0.1-5] |
308 |
- add logrotate default config file for asterisk's logs |
309 |
- spec cleanup |
310 |
|
311 |
* Thu Nov 13 2008 Daniel B. <daniel@firewall-services.com> [0.1-4] |
312 |
- fix logrotate issue |
313 |
|
314 |
* Wed Nov 05 2008 Daniel B. <daniel@firewall-services.com> [0.1-3] |
315 |
- split freepbx sources in a separate package (freepbx-src) |
316 |
- alternative genzaptelconf |
317 |
|
318 |
* Mon Oct 13 2008 Daniel B. <daniel@firewall-services.com> [0.1-2] |
319 |
- Fix fop not being displayed in admin page |
320 |
|
321 |
* Sat Sep 20 2008 Daniel B. <daniel@firewall-services.com> [0.1-1] |
322 |
- updated to 2.5.0 final |
323 |
- spec cleaning |
324 |
- templates cleaning |
325 |
- templates to update mysql informations |
326 |
|
327 |
* Mon Aug 04 2008 daniel B. <daniel@firewall-services.com> [0.1-0] |
328 |
- initial release |
329 |
|
330 |
%prep |
331 |
|
332 |
%setup -q -n %{name}-%{version} |
333 |
%patch0 -p1 |
334 |
%patch1 -p1 |
335 |
%patch2 -p1 |
336 |
%patch3 -p1 |
337 |
%patch4 -p1 |
338 |
%patch5 -p1 |
339 |
%patch6 -p1 |
340 |
%patch7 -p1 |
341 |
%patch8 -p1 |
342 |
%patch9 -p1 |
343 |
%patch10 -p1 |
344 |
|
345 |
# until rebuilt of a smeserver-freepbx tar file: |
346 |
rm -rf root/etc/e-smith/db/configuration/defaults/freepbx/DeviceAndUser |
347 |
%patch11 -p1 |
348 |
|
349 |
%build |
350 |
# Build symlinks |
351 |
perl createlinks |
352 |
|
353 |
%install |
354 |
rm -rf $RPM_BUILD_ROOT |
355 |
|
356 |
%{__mkdir_p} $RPM_BUILD_ROOT/var/lib/php/fpbx-session |
357 |
|
358 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
359 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
360 |
--file /usr/share/freepbx/scripts/uninstall.sh 'attr(0750,root,root)' \ |
361 |
--file /usr/share/freepbx/scripts/restore-astdb.php 'attr(0750,root,root)' \ |
362 |
--dir /var/service/httpd-fpbx 'attr(01755,root,root)' \ |
363 |
--dir /var/service/httpd-fpbx/supervise 'attr(0700,root,root)' \ |
364 |
--dir /var/service/httpd-fpbx/log 'attr(0755,root,root)' \ |
365 |
--file /var/service/httpd-fpbx/log/run 'attr(0755,root,root)' \ |
366 |
--dir /var/service/httpd-fpbx/log/supervise 'attr(0700,root,root)' \ |
367 |
--dir /var/log/httpd-fpbx 'attr(0750,smelog,smelog)' \ |
368 |
--file /var/lib/asterisk/bin/genzaptelconf 'attr(0750,root,root)' \ |
369 |
--file /var/lib/asterisk/agi-bin/trunk_alert_mail.agi 'attr(0750,asterisk,asterisk)' \ |
370 |
--file /etc/logrotate.d/asterisk 'config(noreplace)' \ |
371 |
--dir /var/lib/php/fpbx-session 'attr(0770,root,asterisk)' \ |
372 |
--file /usr/local/bin/safe_asterisk 'attr(0755,root,root)' \ |
373 |
|grep -v '/var/lib/asterisk$'| grep -v '/etc/asterisk$' \ |
374 |
> %{name}-%{version}-%{release}-filelist |
375 |
|
376 |
%clean |
377 |
rm -rf $RPM_BUILD_ROOT |
378 |
|
379 |
%files -f %{name}-%{version}-%{release}-filelist |
380 |
%defattr(-,root,root) |
381 |
|
382 |
|
383 |
%post |
384 |
|
385 |
#bug 9744, restore tmp permissions |
386 |
if [ `stat -c %U /tmp` == "asterisk" ]; then |
387 |
chmod o+rwxt /tmp/ |
388 |
chown root:root /tmp/ |
389 |
fi |
390 |
|
391 |
%preun |
392 |
if [ $1 = 0 ] ; then |
393 |
/etc/rc.d/init.d/freepbx stop >& /dev/null || : |
394 |
fi |
395 |
|
396 |
true |
397 |
|