smeserver-coova-chilli/smeserver-coova-chilli.spec

243 lines
9.5 KiB
RPMSpec

# $Id: smeserver-coova-chilli.spec,v 1.4 2022/07/29 05:25:17 jpp Exp $
# Authority: vip-ire
# Name: Daniel Berteaud
Summary: Coova-Chilli, a captive portal based on ChilliSpot configured for SME server
%define name smeserver-coova-chilli
Name: %{name}
%define version 0.3
%define release 8
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Remote access
Source: %{name}-%{version}.tar.xz
URL: https://contribs.org
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: smeserver-devtools
Requires: smeserver-apache >= 2.6.0-19
Requires: smeserver-release >= 10.0
Requires: openssl
Requires: coova-chilli >= 1.0.13
Requires: smeserver-radiusd >= 1.0.0-18
Requires: perl(NetAddr::IP)
Requires: smeserver-remoteuseraccess
%description
This package allow you to configure a third interface
(eth2). Just plug a WiFi AP on it, and you'll have
a secured captive portal. Users will be redirected
on a logon page and they'll have to enter credentials
(sme accounts) before the server allows them. By default,
they'll only have web access if they are members of the group "chilli"
This contrib will only work in server&gateway mode
%changelog
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 0.3-8.sme
- Fix e-smith references in smeserver-coova-chilli [SME: 12732]
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.3-7.sme
- Roll up patches and move to git repo [SME: 12338]
* Sat Sep 07 2024 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Fri Jul 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.3-6.sme
- update access syntax for httpd 2.4 [SME: 12041]
* Mon Dec 21 2020 Brian Read <brianr@bjsystems.co.uk> 0.3-5.sme
- Initial Import in SME10 [SME: 11289]
* Tue Jul 05 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.3-4.sme
- fix old dns default are not available [SME: 9514]
* Tue Jul 05 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.3-3.sme
- fix format for logout screen [SME: 9514]
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
Thu Sep 03 2008 --> Thu Aug 28 2008 or Wed Sep 03 2008 or Thu Sep 04 2008 or ....
Sun Mar 07 2009 --> Sun Mar 01 2009 or Sat Mar 07 2009 or Sun Mar 08 2009 or ....
Wed Mar 13 2009 --> Wed Mar 11 2009 or Fri Mar 13 2009 or Wed Mar 18 2009 or ....
* Thu May 26 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.3-2.sme
- fix iptables syntax exclamation mark misplaced [SME: 9514]
- smeserver-coova-chilli-0.3-MasqUpdate.patch
* Fri May 13 2016 Daniel Berteaud <daniel@firewall-services.com> 0.3-1
- Roll new stream for sme9
* Mon Mar 28 2011 Daniel B. <daniel@firewall-services.com> 0.2-20
- Fix uamhomepage setting
* Wed Oct 20 2010 Daniel B. <daniel@firewall-services.com> 0.2-19
- Drop all the trafic not going through the external interface
* Thu Jul 29 2010 Daniel B. <daniel@firewall-services.com> 0.2-18
- cleanup CGI login script
- remove obsolete php templates
- add macallowed DB key to bypass auth for some mac addresses
- add uamhomepage DB key
* Mon Jul 19 2010 Daniel B. <daniel@firewall-services.com> 0.2-17
- Fixes sudo env (bug only in SME8)
- Uses TCPPort squid key instead of TransparentPort so coova can
work with dansguardian
- insert NAT rule just before the ACCEPT (PREROUTING_FROM_CHILLI)
- add transparent directive to squid (required for squid => 2.6)
* Wed Apr 14 2010 Daniel B. <daniel@firewall-services.com> 0.2-16
- Fixe a bug in conup.sh and condown.sh
* Thu Jun 11 2009 Daniel B. <daniel@firewall-services.com> 0.2-15
- Fixe a bug in masq template for uamallowed entries
* Thu May 28 2009 Daniel B. <daniel@firewall-services.com> 0.2-14
- Remove space in hotspot-config.pl template
* Tue May 26 2009 Daniel B. <daniel@firewall-services.com> 0.2-13
- Add noc2c key (allow to disable the option, but default to enabled)
* Thu Apr 30 2009 Daniel B. <daniel@firewall-services.com> 0.2-12
- Create a new user coovachilli
- Add support of new options uid and gid to drop privileges
- Enabled noc2c (prevent client to client communication)
- Use sudo to call conup/condown script (as chilli runs under un
unprivileged account now)
- Add smeserver-remoteuseraccess as a dependency (for sudoers metadata templates)
- move templates2expand in creatlinks script
* Fri Mar 13 2009 Daniel B. <daniel@firewall-services.com> 0.2-11
Wed Mar 13 2009 --> Wed Mar 11 2009 or Fri Mar 13 2009 or Wed Mar 18 2009 or ....
- Automatically allow uamallowed entries in the firewall (no need to
explicitly allow it agin in AllowOutgoing)
* Thu Mar 12 2009 Daniel B. <daniel@firewall-services.com> 0.2-10
- Small typo correction
* Tue Mar 10 2009 Daniel B. <daniel@firewall-services.com> 0.2-9
- Use allready defined localhost NAS to fixe PPTP problem [SME: 4996]
(thanks John K Pruder)
- fix a typo in squid template
* Sat Mar 07 2009 Daniel B. <daniel@firewall-services.com> 0.2-8
- Add dhcpstart and dhcpstop db parameters (thanks John K Pruder)
* Sat Mar 07 2009 Daniel B. <daniel@firewall-services.com> 0.2-7
- Fix tundev template [SME: 5054]
* Thu Sep 18 2008 Daniel B. <daniel@firewall-services.com> 0.2-6
- Remove warning in httpd.conf file (httpd -t)
* Mon Sep 15 2008 Daniel B. <daniel@firewall-services.com> 0.2-5
- Fix Syntax Error in /etc/chilli.conf template (25listen) [SME: 4559]
* Mon Sep 08 2008 Daniel B. <daniel@firewall-services.com> 0.2-4
- Requires perl(NetAddr::IP)
* Fri Sep 5 2008 Daniel B. <daniel@firewall-services.com> 0.2-3
- Chilli IP computed with NetAddr::IP
- Radius timeout set to 3 sec
- syntax error in radius users template fixed (for guest access)
* Wed Sep 03 2008 Daniel B. <daniel@firewall-services.com> 0.2-2
Thu Sep 03 2008 --> Thu Aug 28 2008 or Wed Sep 03 2008 or Thu Sep 04 2008 or ....
- Bug fix for guest access
* Tue Sep 2 2008 Daniel B. <daniel@firewall-services.com> 0.2-1
- uplink and downlink for guest account are configurable via db keys
* Tue Sep 2 2008 Daniel B. <daniel@firewall-services.com> 0.2-0
- Login page is a CGI, with a server-manager login page look
- Guest Access can be enabled with guestAccess key (enabled/disabled)
- merge patchs in main package
* Mon Sep 01 2008 Daniel B. <daniel@firewall-services.com> 0.1-8
- Fix uamallowed not working (since bypass_auth_with_squid_fix patch)
- Add WebRequests key (use of squid or direct connexions, default to direct)
- disable radconf in /etc/chilli/config
- possible to disable https (enabled by default in AllowedOutgoing)
- add tcp:static.sourceforge.net:80 in uamallowed so daloradius homepage is displayed correctly
- add radiustimeout directive so authentication errors display the standard message quickly
* Thu Aug 28 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-7
- Reverted moving of default db entries to SPEC file since common practice is to store them in files
* Thu Aug 28 2008 Daniel B. <daniel@firewall-services.com> 0.1-6
- split uamallowed (one per line)
- Add dnsparanoia directive
- correct cmdsock directive
- initialise default configuration db in the spec file
* Thu Aug 28 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-5
- Remove the reset of $OUT from the template
* Thu Aug 28 2008 Daniel B. <daniel@firewall-services.com> 0.1-4
- Add template to enable auth module unix (replace the template-custom)
- Copy images to /opt/chilli/template before removing .rpmnew directory
- Correct dependency (e-smith-radiusd not esmith-radiusd)
* Wed Aug 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.1-3
- Split requirements to one per line
- Removed .rpmnew directory from package
- Removed the need for templates-custom as package now requires e-smith-radiusd >= 1.0.0-18
* Tue Aug 26 2008 Daniel B. <daniel@firewall-services.com>
- [0.1-2]
- Most firewall customizations (for incomming and forwarded traffic from
chilli network only) can be set through db commands (Patch3)
- Outgoing DNS is allowed only for the two DNS servers configured
- Clean spec file, and put php files in /opt/chilli (Patch4)
* Tue Apr 15 2008 Daniel Berteaud <daniel@firewall-services.com>
- [0.1-1]
- security fixe: auth bypass with squid (patch1)
- masq template not expanded (patch2)
* Fri Apr 04 2008 Daniel Berteaud <daniel@firewall-services.com>
- [0.1]
- initiale release
%prep
%setup
%build
/usr/bin/perl createlinks
%install
/bin/rm -rf $RPM_BUILD_ROOT
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
/bin/rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--file /etc/chilli/conup.sh 'attr(755,root,root)' \
--file /etc/chilli/condown.sh 'attr(750,root,root)' \
--file /etc/chilli/call_conup.sh 'attr(755,root,root)' \
--file /etc/chilli/call_condown.sh 'attr(755,root,root)' \
--file /opt/chilli/cgi-bin/hotspotlogin.cgi 'attr(0750,root,www) %config(noreplace)' \
--file /opt/chilli/lang/hotspotlogin.fr.pl 'config(noreplace)' \
--file /opt/chilli/lang/hotspotlogin.en.pl 'config(noreplace)' \
--file /opt/chilli/css/sme.css 'config(noreplace)' \
> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if ! /usr/bin/id coovachilli &>/dev/null; then
/usr/sbin/useradd -c 'Coova Chilli User' -s /sbin/nologin -r -d /etc/chilli coovachilli &>/dev/null || \
%logmsg "Unexpected error adding user \"coovachilli\". Abort installation."
fi
%preun
if [ $1 == 0 ]; then
/sbin/e-smith/db configuration setprop chilli status disabled
/etc/rc.d/init.d/chilli stop >& /dev/null || :
fi