[squidGuard] poprawka na speca + patche obslugujace db-4.2
Tomasz Kolaj
migo at abp.pl
Mon Dec 20 12:27:21 CET 2004
Witam,
w zalaczniku przesylam zmodyfikowanego speca do squidGuarda i niezbedne
patche ukradzione z projektu gentoo.
--
Tomasz Kolaj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: squidGuard-1.2.0-db4.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: </mailman/pipermail/pld-devel-pl/attachments/20041220/71fc1342/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: squidGuard-1.2.0-db41.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: </mailman/pipermail/pld-devel-pl/attachments/20041220/71fc1342/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: squidGuard-1.2.0-db42.patch
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: </mailman/pipermail/pld-devel-pl/attachments/20041220/71fc1342/attachment-0002.bin>
-------------- next part --------------
# $Revision: 1.30 $, $Date: 2004/11/21 00:46:45 $
%define blist_ver 20041120
%define ver 1.2.0
Summary: Filter, redirector and access controller plugin for Squid
Summary(pl): Wtyczka z filtrem, przekierowywaniem i kontrolerem dostêpu dla Squida
Name: squidGuard
Version: %{ver}_%{blist_ver}
Release: 2
Epoch: 2
License: GPL
Group: Networking/Daemons
Source0: ftp://ftp.teledanmark.no/pub/www/proxy/%{name}/%{name}-%{ver}.tar.gz
# Source0-md5: c6e2e9112fdbda0602656f94c1ce31fd
Source1: %{name}.conf
Source2: ftp://ftp.teledanmark.no/pub/www/proxy/%{name}/contrib/blacklists-%{blist_ver}.tar.gz
# Source2-md5: b9812cb7210d6431d870beda1e35a0d7
#Patch0: %{name}-db.patch
Patch1: %{name}-makefile.patch
Patch2: %{name}-1.2.0-db4.patch
Patch3: %{name}-1.2.0-db41.patch
Patch4: %{name}-1.2.0-db42.patch
URL: http://www.squidguard.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: db-devel
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: flex
Requires(post,preun): grep
Requires(post,preun): squid
Requires(preun): fileutils
Requires: squid
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/%{name}
%define _datadir %{_sysconfdir}
%description
SquidGuard is a combined filter, redirector and access controller
plugin for Squid. It is free, very flexible, extremely fast, easily
installed, portable. SquidGuard can be used to
- limit the web access for some users to a list of accepted/well known
web servers and/or URLs only.
- block access to some listed or blacklisted web servers and/or URLs
for some users.
- block access to URLs matching a list of regular expressions or words
for some users.
- enforce the use of domainnames/prohibit the use of IP address in
URLs.
- redirect blocked URLs to an "intelligent" CGI based info page.
- redirect unregistered user to a registration form.
- redirect popular downloads like Netscape, MSIE etc. to local copies.
- redirect banners to an empty GIF.
- have different access rules based on time of day, day of the week,
date etc.
- have different rules for different user groups.
Neither squidGuard nor Squid can be used to
- filter/censor/edit text inside documents
- filter/censor/edit embeded scripting languages like JavaScript or
VBscript inside HTML
%description -l pl
SquidGuard jest wtyczk± dla Squida bêd±c± po³±czonym filtrem,
przekierowywaniem i kontrolerem dostêpu. Jest darmowy, elastyczny,
bardzo szybki, ³atwo instalowalny, przeno¶ny. Mo¿e byæ u¿ywany do:
- ograniczenia dostêpu do WWW dla niektórych u¿ytkowników na podstawie
listy akceptowanych serwerów lub URL-i
- blokowania dostêpu do niektórych serwerów lub URL-i dla niektórych
u¿ytkowników
- blokowania dostêpu do URL na podstawie wyra¿eñ regularnych lub
s³ów dla niektórych u¿ytkowników
- narzucenia u¿ywania nazw domen/zabronienia u¿ywania adresów IP w
URL-ach
- przekierowania zablokowanych URL-i na "inteligentn±" stronê
informacyjn± w CGI
- przekierowania niezarejestrowanych u¿ytkowników do formularza
rejestracyjnego
- przekierowania ¶ci±gania popularnego oprogramowania (Netscape, MSIE)
na lokalne kopie
- przekierowania bannerów na puste GIF-y
- uzale¿nienia regu³ dostêpu w zale¿no¶ci od pory dnia, dnia tygodnia,
daty itp.
- ró¿nych regu³ dostêpu dla ró¿nych grup u¿ytkowników.
Natomiast ani squidGuard ani Squid nie mo¿e byæ u¿yty do:
- filtrowania/cenzurowania/edycji tekstu wewn±trz dokumentu
- filtrowania/cenzurowania/edycji osadzonych w HTML skryptów
(JavaScript, VBscript...)
%prep
%setup -q -n %{name}-%{ver}
#%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0
%patch4 -p1
%build
rm -f missing
%{__libtoolize}
%{__gettextize}
%{__aclocal}
%{__autoconf}
%configure \
--with-sg-logdir=/var/log/%{name} \
--with-sg-config=%{_sysconfdir}/squidGuard.conf \
--with-sg-dbhome=%{_sysconfdir}/db \
--with-db=%{_prefix}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/var/log/%{name},%{_bindir}} \
$RPM_BUILD_ROOT%{_sysconfdir}/db/{advertising,bannedsource,banneddestination} \
$RPM_BUILD_ROOT%{_sysconfdir}/db/{timerestriction,lansource,privilegedsource}
install src/squidGuard $RPM_BUILD_ROOT%{_bindir}
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/advertising/{domains,urls}
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/banneddestination/{domains,urls,expressions}
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/bannedsource/ips
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/lansource/lan
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/timerestriction/lan
touch $RPM_BUILD_ROOT%{_sysconfdir}/db/privilegedsource/ips
touch $RPM_BUILD_ROOT/var/log/%{name}/%{name}.{log,error}
tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_sysconfdir}/db
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
rm -rf samples/dest
rm -f $(find $RPM_BUILD_ROOT%{_sysconfdir}/db -name *diff -type f)
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ -f /etc/squid/squid.conf ] && \
! grep -q "^redirect_program.*%{_bindir}/%{name}" /etc/squid/squid.conf; then
echo "redirect_program /usr/bin/squidGuard -c /etc/squidGuard/squidGuard.conf" >>/etc/squid/squid.conf
if [ -f /var/lock/subsys/squid ]; then
/etc/rc.d/init.d/squid reload 1>&2
fi
fi
%preun
if [ -f /etc/squid/squid.conf ]; then
umask 027
grep -E -v "^redirect_program.*%{_bindir}/%{name}" /etc/squid/squid.conf > \
/etc/squid/squid.conf.tmp
mv -f /etc/squid/squid.conf.tmp /etc/squid/squid.conf
chown root:squid /etc/squid/squid.conf
if [ -f /var/lock/subsys/squid ]; then
/etc/rc.d/init.d/squid reload 1>&2
fi
fi
%files
%defattr(644,root,root,755)
%doc README ANNOUNCE samples/* doc/*.{html,gif,txt}
%doc contrib/{squidGuardRobot/{squidGuardRobot,RobotUserAgent.pm},sgclean/sgclean,hostbyname/hostbyname}
%attr(755,root,root) %{_bindir}/*
%attr(750,root,squid) %dir %{_sysconfdir}
%attr(640,root,squid) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/squidGuard.conf
%{_sysconfdir}/db
%attr(770,root,squid) %dir /var/log/%{name}
%attr(640,squid,squid) %ghost /var/log/%{name}/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log: squidGuard.spec,v $
Revision 1.30 2004/11/21 00:46:45 paszczus
- updated black lists to 20041120
Revision 1.29 2004/11/08 21:12:26 paszczus
- updated black lists to 20041106
Revision 1.28 2004/10/31 16:25:47 paladine
- spaces->tabs
- formatting
Revision 1.27 2004/10/29 11:17:59 paladine
- spelling fixes
Revision 1.26 2004/10/25 19:44:16 paszczus
- updated blist_ver to 20041023
Revision 1.25 2003/11/21 15:15:20 qboosh
- typos/improvements in pl descriptions
Revision 1.24 2003/08/04 11:35:58 qboosh
- use SUSv2-compliant chown syntax (user:group) instead of deprecated
Revision 1.23 2003/05/28 13:02:02 malekith
- massive attack: source-md5
Revision 1.22 2003/05/25 06:26:58 misi3k
- massive attack s/pld.org.pl/pld-linux.org/
Revision 1.21 2003/02/10 20:44:12 qboosh
- umask in scripts, other fixes/cosmetics where needed
Revision 1.20 2002/12/25 14:10:41 mwinkler
- fix log permission
Revision 1.19 2002/12/25 13:51:15 mwinkler
- BuildRequires added
Revision 1.18 2002/11/26 09:04:25 djrzulf
- back again,
- build but doesn't works,
- i think that db section (create database) should be checked at sources,
revision 1.17 2002/11/24 23:44:25 djrzulf
- it doesn't work and won't work
Revision 1.16 2002/11/21 09:49:07 marcus
- rel.2., fix for ppc ;>
Revision 1.15 2002/11/21 02:08:45 kloczek
- cosmetics.
Revision 1.14 2002/11/07 12:55:23 djrzulf
- corrected some things, temporary save
Revision 1.13 2002/11/07 10:40:26 djrzulf
- s/-pq/-pg/, but still don't work - errors at .conf file
Revision 1.12 2002/10/09 13:14:48 kloczek
- use more macros, some cosmetics, added missing "rm -f missing" and use new %doc
Revision 1.11 2002/05/21 23:14:47 kloczek
perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
s/^automake -a -c -f/\%\{__automake\}/; \
s/^autoconf/\%\{__autoconf\}/"
Revision 1.10 2002/02/22 23:29:45 kloczek
- removed all Group fields translations (oure rpm now can handle translating
Group field using gettext).
Revision 1.9 2002/01/18 02:15:04 kloczek
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
Revision 1.8 2001/10/12 14:26:21 grzegorz
- added reloading squid in %%post
Revision 1.7 2001/10/12 09:54:03 grzegorz
- typo
Revision 1.6 2001/10/12 09:50:02 grzegorz
- added Prereq: grep
- s/BuildRequires: db2-devel/BuildRequires: db3-devel/
- new %%post with automatic squid reconfiguration
- added %%preun with automatic squid reconfiguration
- release 2
- i think that logrotate script is needed too
Revision 1.5 2001/10/11 12:08:34 grzegorz
- correct Source0 URL
Revision 1.4 2001/10/11 09:24:34 qboosh
- pl translations, BuildRequires: autoconf,automake
Revision 1.3 2001/07/24 15:15:42 waszi
- updated to snapshot
- need testing
Revision 1.2 2001/07/24 14:12:06 waszi
- partially rewrited
- NFY
* Wed Jul 11 2001 Florin <florin at mandrakesoft.com> 1.1.4-12mdk
- use the new sample configfile blacklist compliant, logs and data locations
- patch the default logdir and confdir (default_dir.patch)
- add the blacklists-readme file
- add the blacklist sections and databases
- remove the whole test thing from the spec file
- add the nullbanner.png and the squidGuard.cgi modified
* Fri Feb 16 2001 Florin <florin at mandrakesoft.com> 1.1.4-11mdk
- add banneddestination/expressions
* Tue Jan 30 2001 Florin <florin at mandrakesoft.com> 1.1.4-10mdk
- add the timerestriction section
* Tue Jan 30 2001 Florin <florin at mandrakesoft.com> 1.1.4-9mdk
- the nulbanner and the cgi go now in the httpd-naat package
- add /etc/squid/squidGuard.conf.sample
- create the section files from the default config file
* Wed Jan 24 2001 Florin <florin at mandrakesoft.com> 1.1.4-9mdk
- add the nulbanner.gif in the /var/www-naat/icons
* Mon Jan 08 2001 Florin <florin at mandrakesoft.com> 1.1.4-8mdk
- the /var/log/%{name} dir is now owned by squid,squid
* Fri Jan 06 2001 Florin <florin at mandrakesoft.com> 1.1.4-7mdk
- recompile for firewall distrib
- add log,error files in /var/log/%{name}
- copy a sample of the config file in the /etc/squid/directory
* Thu Nov 23 2000 Florin <florin at mandrakesoft.com> 1.1.4-6mdk
- added urls (Lenny compliant ;)
* Thu Nov 23 2000 Florin <florin at mandrakesoft.com> 1.1.4-5mdk
- requires squid
- buildrequires BerkeleyDB
* Tue Nov 21 2000 Florin <florin at mandrakesoft.com> 1.1.4-4mdk
- requires BerkeleyDB package, the new db2-2.7.7 package
- comment the postun section
* Mon Sep 18 2000 Florin <florin at mandrakesoft.com> 1.1.4-3mdk
- set up a ready to use out of the box config
* Fri Sep 15 2000 Florin <florin at mandrakesoft.com> 1.1.4-2mdk
- added the test configuration and the Makefile
- modifying the config files
* Fri Sep 15 2000 Florin <florin at mandrakesoft.com> 1.1.4-1mdk
- first attempt
More information about the pld-devel-pl
mailing list