%define name smeserver-dansguardian-panel %define version 2.11 %define release 9 Summary: SMEserver panel to set up dansguardian to filter www content. Name: %{name} Version: %{version} Release: %{release} Vendor: dungog.net URL: http://www.dungog.net/wiki Distribution: SME Server Group: SMEServer/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-dansguardian-panel-2.11-locale-2013-07-14.patch Patch1: smeserver-dansguardian-panel-2.11-x64sup.patch Patch2: smeserver-dansguardian-panel-2.11-locale-2016-03-09.patch Patch3: smeserver-dansguardian-panel-2.11-MainConfigTemplates.patch Patch4: smeserver-dansguardian-panel-2.11-locale-2016-05-26.patch Patch5: smeserver-dansguardian-panel-2.11-newPerlModulesPath.patch Patch6: smeserver-dansguardian-panel-2.11-locale-2017-02-02.patch Patch7: smeserver-dansguardian-panel-2.11-locale-2017-12-02.patch Packager: Stephen Noble BuildRoot: /var/tmp/%{name}-%{version} BuildArchitectures: noarch Requires: e-smith-release >= 8 Requires: e-smith-formmagick >= 1.4.0-10 Requires: smeserver-dansguardian >= 2.9-5 Requires: dansguardian >= 2.10 AutoReqProv: no License: dungog.net BuildRequires: e-smith-devtools >= 1.13.1-03 %description rpm to setup dansguardian.org web content filter with a server-manager panel, /etc/dansguardian templates and other custom modifications to tie into ongong smeserver changes. Requires dansguardian and smeserver-dansguardian %changelog * sam. déc. 02 2017 SME Translation Server 2.11-9 - apply locale 2017-12-02 patch * Wed Feb 01 2017 Jean-Philipe Pialasse 2.11-9.sme - apply local 2017-02-02.patch * Thu May 26 2016 Jean-Philipe Pialasse 2.11-8.sme - fix wrong path to module [SME: 9526] * Thu May 26 2016 Jean-Philipe Pialasse 2.11-7.sme - fix needing new dansguardian.conf template [SME: 9526] - thank you to Steve Semple to parse the file - apply locale 2016-05-26 patch * Wed Mar 09 2016 JP Pialasse 2.11-6.sme - apply locale 2016-03-09 patch * Wed Sep 25 2013 JP Pialasse 2.11-5.sme - x64 support [SME: 7866] * Sun Jul 14 2013 JP Pialasse 2.11-3.sme - apply locale 2013-07-14 patch * Tue Jun 25 2013 JP Pialasse 2.11-2 - initial import - thanks to Stephen Noble permission - added devtools to build requires * Fri Dec 12 2008 Stephen Noble 2.10-2 - fix cosmetic uninitialized values in logs * Fri Dec 12 2008 Stephen Noble 2.10-1 - update Requires to dansguardian >= 2.10 * Tue Nov 18 2008 Stephen Noble 2.9-20 - force safe search on Google,Yahoo,Metacrawler,Singingfish,Lycos * Tue Oct 21 2008 Stephen Noble 2.9-19 - new proxy method LDAP, beta-see wiki * Thu May 08 2008 Stephen Noble 2.9-18 - fix bypass AV label in filtergroup page * Thu Apr 24 2008 Stephen Noble 2.9-17 - add fields for proxybypass and portblock * Sun Apr 20 2008 Stephen Noble 2.9-16 - fixed dansguardian-filtergroup fragment * Fri Apr 4 2008 Stephen Noble 2.9-15 - fixed 3128 portblocking * Sat Mar 22 2008 Stephen Noble 2.9-14 - Removed non FM panel, testing * Sun Mar 16 2008 Stephen Noble 2.9-7 - Initial FM version * Sat Dec 22 2007 Stephen Noble 2.9-6 - 'Block all file and mimetypes' checkbox fixed * Sat Dec 22 2007 Stephen Noble 2.9-5 - split banning https to seperate check box * Sat Nov 10 2007 Stephen Noble 2.9-4 - adjust config files, remove -g and -Q options - denied.pl, very quiet denied page * Sun Oct 28 2007 Stephen Noble 2.9-3 - upgrade to require dans 2.9.9.1 - help file is now at dungog.net/wiki - fixed display of phraselists, badwords & google searches - blanket ban of extension & mimetype added - extension & mimetype override clarified * Sat Jun 09 2007 Stephen Noble - *main page now uses -Q restart, (& -r, reload, this applies filtering on IP changes) - -Q kill any running copy AND start a new one with current options. - -r closes all connections and reloads config files by issuing a HUP, - but this does not reset the maxchildren option. - *filter group page uses -g - -g gently restarts by not closing all current connections and only reloads - filter group config files by issuing a USR1. * Mon Oct 2 2006 Stephen Noble - update to dansguardian 2.9 (beta) - regexp checks requires update of pcre rpm - - exception group and banned group removed - - global group for most lists added - settings stored in /home/e-smith/db/dungog/*f0 - bypass dansguardian and squid authentication in - Common > modify > entire domain > allow = exceptionsitelistf0 - - default list settings stored in *f1 - extra groups *f4 and *f5 added - db for language added - - example scripts tproxy and dproxy added, reconfigure with cron - - each group (*f1,*f2 etc) can have different settings for: - banned/filtered/unfiltered - time restriction to be banned/filtered/unfiltered - have a bypass link - virus scanned - reporting level - custom denied page - filter lists (except AVexceptions which are global) - check boxes for urlregexp proxies (ok), urlregexp safesearch (not working?) - urlregexp for porn and ads tweeked - new lists, regexp modify url, regexp replace content, allow mine/type - , allow file type, allow files from site - [2.9-1] * Wed Aug 30 2006 Stephen Noble - dansguardian.pl modified, old version is .old in Primary cgi-bin - mailto link and back link added, bypass wording changed - ident working - [1.2-9] * Thu Apr 6 2006 Stephen Noble - default exceptionsitelist used to bypass dans and squid auth - reporting options changed, bypass link possible without rudeness - restarting comment... - [1.2-8] * Wed Mar 8 2006 Stephen Noble - Primary/cgi-bin files chmod differently - Requires dansguardian - loglevel warning fixed - [1.2-7] * Mon Feb 6 2006 Stephen Noble - phraselist and blacklist db's moved to correct dir - [1.2-6] * Fri Dec 2 2005 Stephen Noble - dans restart button added - [1.2-5] * Wed Nov 9 2005 Stephen Noble - ident and proxyauth only enabled when selected - filtergroup for proxyuser/ncsa fixed - dans starts last with a 5 second delay on a save all - [1.2-4] * Sat Nov 5 2005 Stephen Noble - simplified panel - proxy and port blocking db values seperated - [1.2-3] * Mon Oct 3 2005 Stephen Noble - modified service restarting - instruction and fragments for ncsa users, passwords and groups - [1.2-2] * Fri Sep 16 2005 Stephen Noble - SME7 initial version - runs under daemontools - for DG 2.8.0.6-el4 no patches - [1.2-1] * Fri Sep 16 2005 Stephen Noble - dgav updated to 6.4.3 based on DG 2.8.0.6 - google patch not included - AVexceptions moved to filtergroups - phraselist expanded and explained better - note on rsyncing mesd blacklists - requires 2.8.0.6-av643 - 2.8-21 * Tue Nov 6 2001 Stephen Noble 0.1-1 - initial release %prep %setup %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %build perl createlinks /sbin/e-smith/validate-lexicon root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/dungogdansguardian /sbin/e-smith/validate-lexicon root/etc/e-smith/web/functions/dungogdansguardian mkdir -p root/etc/e-smith/db/dungog/defaults/dansguardian echo "settings" > root/etc/e-smith/db/dungog/defaults/dansguardian/type echo "2" > root/etc/e-smith/db/dungog/defaults/dansguardian/loglevel echo "3" > root/etc/e-smith/db/dungog/defaults/dansguardian/logfileformat echo "8080" > root/etc/e-smith/db/dungog/defaults/dansguardian/port echo "transparent" > root/etc/e-smith/db/dungog/defaults/dansguardian/proxyaccess echo "none" > root/etc/e-smith/db/dungog/defaults/dansguardian/contentscanner echo "3" > root/etc/e-smith/db/dungog/defaults/dansguardian/reportinglevel for link in f0 f1 f2 f3 f4 f5 do mkdir -p root/etc/dansguardian/lists/$link mkdir -p root/etc/e-smith/db/dungog/defaults/dansguardian$link echo "settings" > root/etc/e-smith/db/dungog/defaults/dansguardian$link/type done for link in badwords domainsforsale gambling googlesearches illegaldrugs malware nudism pornography safelabel translation violence webmail chat drugadvocacy games gore intolerance music peer2peer proxies secretsocieties travel warezhacking conspiracy forums goodphrases idtheft legaldrugs news personals rta sport upstreamfilter weapons do mkdir -p root/etc/e-smith/db/phraselist/defaults/$link echo "list" > root/etc/e-smith/db/phraselist/defaults/$link/type done for link in ads adult aggressive artnudes audio-video beerliquorinfo beerliquorsale cellphones chat childcare clothing culnary dialers drugs ecommerce entertainment forums frencheducation gambling gardening government hacking homerepair hygiene jewelry jobsearch kidstimewasting news mail onlineauctions onlinegames onlinepayment personalfinance pets porn proxy publicite radio redirector religion ringtones searchengines sportnews sports spyware updatesites vacation violence virusinfected warez weapons webmail whitelist do mkdir -p root/etc/e-smith/db/blacklist/defaults/$link echo "list" > root/etc/e-smith/db/blacklist/defaults/$link/type done %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --file '/usr/bin/rsync-sgbl' 'attr(0755,root,root)' \ --file '/usr/bin/tproxy' 'attr(0755,root,root)' \ --file '/usr/bin/dproxy' 'attr(0755,root,root)' \ --file '/home/e-smith/files/ibays/Primary/cgi-bin/dansguardian.pl' 'attr(4755,root,root)' \ --file '/home/e-smith/files/ibays/Primary/cgi-bin/denied.pl' 'attr(4755,root,root)' \ > %{name}-%{version}-filelist echo "%doc " >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post touch /home/e-smith/db/dungog touch /etc/dansguardian/lists/phraselists/goodphrases/weighted touch /home/e-smith/files/ibays/Primary/cgi-bin/notempty #&upgrades %postun #uninstalls if [ $1 = 0 ] ; then /sbin/e-smith/db configuration setprop squid TransparentPort 3128 /sbin/e-smith/expand-template /etc/httpd/conf/proxy/proxy.pac /sbin/e-smith/expand-template /etc/squid/squid.conf echo 'optionally run signal-event network-create to complete uninstall' fi #&upgrades %files -f %{name}-%{version}-filelist %defattr(-,root,root)