smeserver-webfilter/smeserver-webfilter.spec

188 lines
6.5 KiB
RPMSpec

%define version 0.2.16
%define release 7
%define name smeserver-webfilter
Summary: web filtering proxy for SME Server
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Epoch: 9
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: e-smith-devtools
Requires: squidGuard >= 1.4
Requires: squidclamav
Requires: perl(File::Tail)
Requires: perl(Getopt::Long)
Requires: perl(DBI)
Requires: perl(URI)
Requires: e-smith-apache >= 2.6.0-19
Requires: smeserver-php >= 3.0.0-43
Obsoletes: smeserver-squidguard
Provides: smeserver-squidguard
AutoReqProv: no
%description
Web proxy filtering based on squidguard and squidclamav
%changelog
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.2.16-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 Sep 06 2024 Terry Fage <terry@fage.id.au> 0.2.16-6.sme
- apply locale 2024-09-06.patch
* Fri Nov 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.2.16-5.sme
- apply locale 2022-11-11 patch
* Sat Aug 13 2022 Brian Read <brianr@bjsystems.co.uk> 0.2.16-4.sme
- Update creatlinks for systemd and fix capitalisation of squidGuard in config db [SME: 11978]
- Add in DB entries for transparent-proxying
* Thu Aug 04 2022 Brian Read <brianr@bjsystems.co.uk> 0.2.16-3.sme
- update to httpd 2.4 syntax [SME: 12065]
- Thanks to Zsolt Vasarhelyi
- Add ---ignoredirs directive to fix Transaction check error
* Wed May 25 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.2.16-2.sme
- import to SME 10 and Koozali buildsys [SME: 11978]
* Thu Nov 19 2015 Daniel Berteaud <daniel@firewall-services.com> 0.2.16-1
- Add pt-br localization (by Jáder Marasca)
* Fri May 15 2015 Daniel Berteaud <daniel@firewall-services.com> 0.2.15-1
- Add Danish localization (by Jan B Thygesen)
* Wed Jun 25 2014 Daniel Berteaud <daniel@firewall-services.com> 0.2.14-1
- fix cleanup cronjob on EL6
- Pre-create log files to prevent warnings
* Tue Nov 12 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.13-1
- New branch for SME9
* Fri Sep 6 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.12-1
- Correctly handle more than two unrestricted IP or network
* Wed Jan 23 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.11-1
- It's now possible to log on a remote MySQL server
* Wed Oct 24 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.10-1
- Don't rotate tables, just purge old entries
* Wed Oct 24 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.9-1
- Handle error:unsupported-request-method in squid logs
* Wed Oct 24 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.8-1
- Add it locale for the panel, thanks to Nicola Tiana <Sistemi@chester-perry.it>
* Mon Oct 22 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.7-1
- Use UTF-8 for de locale file
* Mon Oct 22 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.6-1
- Add de locale to the panel, thanks to Daniel Schiffer <danielschiffer@freenet.de>
* Fri Oct 19 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.5-1
- Fix processing of denied CONNECT in squidGuard logs
- Properly escape domain names
* Fri Oct 19 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.4-1
- Use larger varchar for URL and domain names
* Thu Oct 18 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.3-1
- Optimize database inserts
- Log stderr to stdout in squid-db-logd run script
- Add missing dbuser option in squid-db-logd
* Wed Oct 17 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.2-1
- Fix processing CONNECT lines
* Sun Oct 14 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.1-1
- Ignore stats requests from squidclient
* Sun Oct 7 2012 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1
- Include Squid Database Logging Daemon (squid-db-logd)
* Sun Oct 7 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.4-1
- Fix hidding disabled caegories
* Tue Sep 11 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.3-1
- Add whitelists to squidclamav
* Mon Aug 27 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1
- Fix en-us locale (label AV Filtering)
* Fri Jul 6 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1
- Spawn more redirect children
* Mon Apr 16 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1
- Rename to smeserver-webfilter
- Add AV filtering with squidclamav
- Simplified panel
- Log cron job to dev null
- Use quiet rsync arg
* Tue Apr 03 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1
- Fix ownership of log files
* Tue Mar 27 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1
- Add .log suffix to log files
* Tue Mar 27 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1
- Move to git
* Tue Feb 21 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1-1
- initial release
%prep
%setup -q -n %{name}-%{version}
%build
%{__mkdir_p} root/var/log/squid-db-logd
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 \
--dir /var/squidGuard/blacklists 'attr(0750,squid,squid)' \
--dir /var/log/squid-db-logd 'attr(0770,smelog,smelog)' \
--file /usr/bin/squid-db-logd 'attr(0755,root,root)' \
--file /var/service/squid-db-logd/run 'attr(0755,root,root)' \
--file /var/service/squid-db-logd/log/run 'attr(0755,root,root)' \
--file /var/squidGuard/blacklists/black/domains 'attr(0640,squid,squid) %config(noreplace)' \
--file /var/squidGuard/blacklists/black/urls 'attr(0640,squid,squid) %config(noreplace)' \
--file /var/squidGuard/blacklists/white/domains 'attr(0640,squid,squid) %config(noreplace)' \
--file /var/squidGuard/blacklists/white/urls 'attr(0640,squid,squid) %config(noreplace)' \
--file /etc/cron.daily/squid-db-cleanup 'attr(0755,root,root)' \
--ignoredir "/var/log/squidGuard" \
--file /var/log/squidGuard/deny.log 'attr(0640,squid,squid) %config(noreplace)' \
--file /var/log/squidGuard/white.log 'attr(0640,squid,squid) %config(noreplace)' \
--file /var/log/squidGuard/squidGuard.log 'attr(0640,squid,squid) %config(noreplace)' \
> %{name}-%{version}-filelist
echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist
echo "%doc squid_log.sql" >> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%clean
rm -rf $RPM_BUILD_ROOT
%post
%preun