1 |
# $Id: smeserver-coova-chilli.spec,v 1.2 2016/05/26 08:53:11 unnilennium Exp $ |
2 |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
4 |
|
5 |
Summary: Coova-Chilli, a captive portal based on ChilliSpot configured for SME server |
6 |
%define name smeserver-coova-chilli |
7 |
Name: %{name} |
8 |
%define version 0.3 |
9 |
%define release 3 |
10 |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
12 |
License: GPL |
13 |
Group: Networking/Remote access |
14 |
Source: %{name}-%{version}.tar.xz |
15 |
Patch0: smeserver-coova-chilli-0.3-MasqUpdate.patch |
16 |
Patch1: smeserver-coova-chilli-0.3-logout_screen.patch |
17 |
URL: https://contribs.org |
18 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
19 |
BuildArchitectures: noarch |
20 |
BuildRequires: e-smith-devtools |
21 |
Requires: e-smith-release >= 7.0 |
22 |
Requires: openssl |
23 |
Requires: coova-chilli >= 1.0.13 |
24 |
Requires: e-smith-radiusd >= 1.0.0-18 |
25 |
Requires: perl(NetAddr::IP) |
26 |
Requires: smeserver-remoteuseraccess |
27 |
|
28 |
%description |
29 |
This package allow you to configure a third interface |
30 |
(eth2). Just plug a WiFi AP on it, and you'll have |
31 |
a secured captive portal. Users will be redirected |
32 |
on a logon page and they'll have to enter credentials |
33 |
(sme accounts) before the server allows them. By default, |
34 |
they'll only have web access if they are members of the group "chilli" |
35 |
This contrib will only work in server&gateway mode |
36 |
|
37 |
%changelog |
38 |
* Tue Jul 05 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.3-3.sme |
39 |
- fix format for logout screen [SME: 9514] |
40 |
|
41 |
* Thu May 26 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.3-2.sme |
42 |
- fix iptables syntax exclamation mark misplaced [SME: 9514] |
43 |
- smeserver-coova-chilli-0.3-MasqUpdate.patch |
44 |
|
45 |
* Fri May 13 2016 Daniel Berteaud <daniel@firewall-services.com> 0.3-1 |
46 |
- Roll new stream for sme9 |
47 |
|
48 |
* Mon Mar 28 2011 Daniel B. <daniel@firewall-services.com> 0.2-20 |
49 |
- Fix uamhomepage setting |
50 |
|
51 |
* Wed Oct 20 2010 Daniel B. <daniel@firewall-services.com> 0.2-19 |
52 |
- Drop all the trafic not going through the external interface |
53 |
|
54 |
* Thu Jul 29 2010 Daniel B. <daniel@firewall-services.com> 0.2-18 |
55 |
- cleanup CGI login script |
56 |
- remove obsolete php templates |
57 |
- add macallowed DB key to bypass auth for some mac addresses |
58 |
- add uamhomepage DB key |
59 |
|
60 |
* Mon Jul 19 2010 Daniel B. <daniel@firewall-services.com> 0.2-17 |
61 |
- Fixes sudo env (bug only in SME8) |
62 |
- Uses TCPPort squid key instead of TransparentPort so coova can |
63 |
work with dansguardian |
64 |
- insert NAT rule just before the ACCEPT (PREROUTING_FROM_CHILLI) |
65 |
- add transparent directive to squid (required for squid => 2.6) |
66 |
|
67 |
* Wed Apr 14 2010 Daniel B. <daniel@firewall-services.com> 0.2-16 |
68 |
- Fixe a bug in conup.sh and condown.sh |
69 |
|
70 |
* Thu Jun 11 2009 Daniel B. <daniel@firewall-services.com> 0.2-15 |
71 |
- Fixe a bug in masq template for uamallowed entries |
72 |
|
73 |
* Thu May 28 2009 Daniel B. <daniel@firewall-services.com> 0.2-14 |
74 |
- Remove space in hotspot-config.pl template |
75 |
|
76 |
* Tue May 26 2009 Daniel B. <daniel@firewall-services.com> 0.2-13 |
77 |
- Add noc2c key (allow to disable the option, but default to enabled) |
78 |
|
79 |
* Thu Apr 30 2009 Daniel B. <daniel@firewall-services.com> 0.2-12 |
80 |
- Create a new user coovachilli |
81 |
- Add support of new options uid and gid to drop privileges |
82 |
- Enabled noc2c (prevent client to client communication) |
83 |
- Use sudo to call conup/condown script (as chilli runs under un |
84 |
unprivileged account now) |
85 |
- Add smeserver-remoteuseraccess as a dependency (for sudoers metadata templates) |
86 |
- move templates2expand in creatlinks script |
87 |
|
88 |
* Wed Mar 13 2009 Daniel B. <daniel@firewall-services.com> 0.2-11 |
89 |
- Automatically allow uamallowed entries in the firewall (no need to |
90 |
explicitly allow it agin in AllowOutgoing) |
91 |
|
92 |
* Thu Mar 12 2009 Daniel B. <daniel@firewall-services.com> 0.2-10 |
93 |
- Small typo correction |
94 |
|
95 |
* Tue Mar 10 2009 Daniel B. <daniel@firewall-services.com> 0.2-9 |
96 |
- Use allready defined localhost NAS to fixe PPTP problem [SME: 4996] |
97 |
(thanks John K Pruder) |
98 |
- fix a typo in squid template |
99 |
|
100 |
* Sun Mar 07 2009 Daniel B. <daniel@firewall-services.com> 0.2-8 |
101 |
- Add dhcpstart and dhcpstop db parameters (thanks John K Pruder) |
102 |
|
103 |
* Sun Mar 07 2009 Daniel B. <daniel@firewall-services.com> 0.2-7 |
104 |
- Fix tundev template [SME: 5054] |
105 |
|
106 |
* Thu Sep 18 2008 Daniel B. <daniel@firewall-services.com> 0.2-6 |
107 |
- Remove warning in httpd.conf file (httpd -t) |
108 |
|
109 |
* Mon Sep 15 2008 Daniel B. <daniel@firewall-services.com> 0.2-5 |
110 |
- Fix Syntax Error in /etc/chilli.conf template (25listen) [SME: 4559] |
111 |
|
112 |
* Mon Sep 08 2008 Daniel B. <daniel@firewall-services.com> 0.2-4 |
113 |
- Requires perl(NetAddr::IP) |
114 |
|
115 |
* Fri Sep 5 2008 Daniel B. <daniel@firewall-services.com> 0.2-3 |
116 |
- Chilli IP computed with NetAddr::IP |
117 |
- Radius timeout set to 3 sec |
118 |
- syntax error in radius users template fixed (for guest access) |
119 |
|
120 |
* Thu Sep 3 2008 Daniel B. <daniel@firewall-services.com> 0.2-2 |
121 |
- Bug fix for guest access |
122 |
|
123 |
* Tue Sep 2 2008 Daniel B. <daniel@firewall-services.com> 0.2-1 |
124 |
- uplink and downlink for guest account are configurable via db keys |
125 |
|
126 |
* Tue Sep 2 2008 Daniel B. <daniel@firewall-services.com> 0.2-0 |
127 |
- Login page is a CGI, with a server-manager login page look |
128 |
- Guest Access can be enabled with guestAccess key (enabled/disabled) |
129 |
- merge patchs in main package |
130 |
|
131 |
* Mon Sep 01 2008 Daniel B. <daniel@firewall-services.com> 0.1-8 |
132 |
- Fix uamallowed not working (since bypass_auth_with_squid_fix patch) |
133 |
- Add WebRequests key (use of squid or direct connexions, default to direct) |
134 |
- disable radconf in /etc/chilli/config |
135 |
- possible to disable https (enabled by default in AllowedOutgoing) |
136 |
- add tcp:static.sourceforge.net:80 in uamallowed so daloradius homepage is displayed correctly |
137 |
- add radiustimeout directive so authentication errors display the standard message quickly |
138 |
|
139 |
* Thu Aug 28 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-7 |
140 |
- Reverted moving of default db entries to SPEC file since common practice is to store them in files |
141 |
|
142 |
* Thu Aug 28 2008 Daniel B. <daniel@firewall-services.com> 0.1-6 |
143 |
- split uamallowed (one per line) |
144 |
- Add dnsparanoia directive |
145 |
- correct cmdsock directive |
146 |
- initialise default configuration db in the spec file |
147 |
|
148 |
* Thu Aug 28 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-5 |
149 |
- Remove the reset of $OUT from the template |
150 |
|
151 |
* Thu Aug 28 2008 Daniel B. <daniel@firewall-services.com> 0.1-4 |
152 |
- Add template to enable auth module unix (replace the template-custom) |
153 |
- Copy images to /opt/chilli/template before removing .rpmnew directory |
154 |
- Correct dependency (e-smith-radiusd not esmith-radiusd) |
155 |
|
156 |
* Wed Aug 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-3 |
157 |
- Split requirements to one per line |
158 |
- Removed .rpmnew directory from package |
159 |
- Removed the need for templates-custom as package now requires e-smith-radiusd >= 1.0.0-18 |
160 |
|
161 |
* Tue Aug 26 2008 Daniel B. <daniel@firewall-services.com> |
162 |
- [0.1-2] |
163 |
- Most firewall customizations (for incomming and forwarded traffic from |
164 |
chilli network only) can be set through db commands (Patch3) |
165 |
- Outgoing DNS is allowed only for the two DNS servers configured |
166 |
- Clean spec file, and put php files in /opt/chilli (Patch4) |
167 |
|
168 |
* Tue Apr 15 2008 Daniel Berteaud <daniel@firewall-services.com> |
169 |
- [0.1-1] |
170 |
- security fixe: auth bypass with squid (patch1) |
171 |
- masq template not expanded (patch2) |
172 |
|
173 |
* Fri Apr 04 2008 Daniel Berteaud <daniel@firewall-services.com> |
174 |
- [0.1] |
175 |
- initiale release |
176 |
|
177 |
%prep |
178 |
%setup |
179 |
%patch0 -p1 |
180 |
%patch1 -p1 |
181 |
|
182 |
%build |
183 |
/usr/bin/perl createlinks |
184 |
|
185 |
%install |
186 |
/bin/rm -rf $RPM_BUILD_ROOT |
187 |
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
188 |
/bin/rm -f %{name}-%{version}-filelist |
189 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
190 |
--file /etc/chilli/conup.sh 'attr(755,root,root)' \ |
191 |
--file /etc/chilli/condown.sh 'attr(750,root,root)' \ |
192 |
--file /etc/chilli/call_conup.sh 'attr(755,root,root)' \ |
193 |
--file /etc/chilli/call_condown.sh 'attr(755,root,root)' \ |
194 |
--file /opt/chilli/cgi-bin/hotspotlogin.cgi 'attr(0750,root,www) %config(noreplace)' \ |
195 |
--file /opt/chilli/lang/hotspotlogin.fr.pl 'config(noreplace)' \ |
196 |
--file /opt/chilli/lang/hotspotlogin.en.pl 'config(noreplace)' \ |
197 |
--file /opt/chilli/css/sme.css 'config(noreplace)' \ |
198 |
> %{name}-%{version}-filelist |
199 |
|
200 |
%files -f %{name}-%{version}-filelist |
201 |
%defattr(-,root,root) |
202 |
|
203 |
%clean |
204 |
rm -rf $RPM_BUILD_ROOT |
205 |
|
206 |
%pre |
207 |
if ! /usr/bin/id coovachilli &>/dev/null; then |
208 |
/usr/sbin/useradd -c 'Coova Chilli User' -s /sbin/nologin -r -d /etc/chilli coovachilli &>/dev/null || \ |
209 |
%logmsg "Unexpected error adding user \"coovachilli\". Abort installation." |
210 |
fi |
211 |
|
212 |
|
213 |
%preun |
214 |
|
215 |
if [ $1 == 0 ]; then |
216 |
/sbin/e-smith/db configuration setprop chilli status disabled |
217 |
/etc/rc.d/init.d/chilli stop >& /dev/null || : |
218 |
fi |
219 |
|