commit squidGuard for openSUSE:Factory
Hello community, here is the log from the commit of package squidGuard for openSUSE:Factory checked in at Mon Sep 28 18:29:30 CEST 2009. -------- --- squidGuard/squidGuard.changes 2008-07-22 17:57:49.000000000 +0200 +++ squidGuard/squidGuard.changes 2009-09-26 23:42:20.000000000 +0200 @@ -1,0 +2,26 @@ +Sat Sep 26 23:35:58 CEST 2009 - lrupp@suse.de + +- update to 1.4: + + some fixes + + Added MySQL support for authentication. The database is + assumed to be configured on localhost. + + Fixed configure.in to comply with the autoconf standard + + Fixed broken "make test" + + Added new runtime parameter "-P". This parameter changes + the default behaviour from stop (emergency mode) to pass + when an error in building the database files occurs. So + this parameter only works in connection with the runtime + paramter "-C". Before using "-P" in your environment + make sure that nothing breakes when the building of the + db files fail. + + Added Spanish translation to squidGuard.cgi +- enabled --nolog option +- enabled mysql auth +- removed squidGuard-1.3-bl_less_noise.patch (upstream) +- adapted squidGuard-1.3-config.patch +- split up doc package +- package the cgi scripts (and babel files) in /srv/www/cgi-bin +- package blocked.gif in /srv/www/htdocs/images +- added squidGuard.logrotate script + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- squidGuard-1.3-bl_less_noise.patch squidGuard-1.3-config.patch squidGuard-1.3-progressbar.patch squidGuard-1.3-trailing_dot.patch squidGuard-1.3-unusual_url_end.patch squidGuard-1.3.tar.bz2 New: ---- blocked.gif squidGuard-1.4-mysql.patch squidGuard-1.4.tar.bz2 squidGuard-Makefile.patch squidGuard-config.patch squidGuard-trailing_dot.patch squidGuard-unusual_url_end.patch squidGuard.logrotate ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ squidGuard.spec ++++++ --- /var/tmp/diff_new_pack.3lFTpq/_old 2009-09-28 18:26:37.000000000 +0200 +++ /var/tmp/diff_new_pack.3lFTpq/_new 2009-09-28 18:26:37.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package squidGuard (Version 1.3) +# spec file for package squidGuard (Version 1.4) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,25 +19,34 @@ Name: squidGuard -BuildRequires: bison db-devel flex openldap2-devel squid +Summary: Filter plugin for squid License: GPL v2 or later Group: Productivity/Networking/Web/Proxy -AutoReqProv: on -Version: 1.3 -Release: 93 +Version: 1.4 +Release: 1 Url: http://www.squidguard.org/ -Provides: squidgrd -Obsoletes: squidgrd -PreReq: http_proxy -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Summary: Filter plugin for squid -Source0: squidGuard-%{version}.tar.bz2 +PreReq: squid +Recommends: logrotate +Recommends: lynx +BuildRequires: bison db-devel flex openldap2-devel +BuildRequires: libmysqlclient-devel +BuildRequires: gettext grep libtool +BuildRequires: lynx +Source0: %{name}-%{version}.tar.bz2 Source1: README.SuSE -Patch0: squidGuard-1.3-config.patch -Patch1: squidGuard-1.3-bl_less_noise.patch -Patch2: squidGuard-1.3-trailing_dot.patch -Patch3: squidGuard-1.3-progressbar.patch -Patch4: squidGuard-1.3-unusual_url_end.patch +Source2: squidGuard.logrotate +Source3: blocked.gif +Patch0: squidGuard-Makefile.patch +Patch1: squidGuard-1.4-mysql.patch +Patch2: squidGuard-config.patch +Patch3: squidGuard-trailing_dot.patch +Patch4: squidGuard-unusual_url_end.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define sg_dbhome /var/lib/squidGuard/db +%define sg_logdir /var/log/squidGuard +%define sg_config /etc/squidguard.conf +%define cgidir /srv/www/cgi-bin +%define imgdir /srv/www/htdocs/images %description SquidGuard is a free (GPL), flexible and ultra-fast filter, redirector, @@ -52,40 +61,92 @@ P�l Baltzersen <pal.baltzersen@ost.eltele.no> Lars Erik H�land <leh@nimrod.no> +%package doc +Summary: Additional documentation and examples for %name +Group: Documentation/Other +License: GPL v2 or later + +%description doc +SquidGuard is a free (GPL), flexible and ultra-fast filter, redirector, +and access controller plugin for squid. It lets you define multiple +access rules with different restrictions for different user groups on a +squid cache. SquidGuard uses squid's standard redirector interface. + +This package contains additional scripts and documentation. + + +Authors: +-------- + P�l Baltzersen <pal.baltzersen@ost.eltele.no> + Lars Erik H�land <leh@nimrod.no> + + %prep -%setup -n squidGuard-%{version} -%patch0 -p1 +%setup -q +%patch0 -p0 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%patch2 -p0 +%patch3 -p0 +%patch4 -p0 find -type d | xargs chmod 755 cp %{SOURCE1} . +# patch the test configs +pushd test 1>/dev/null +for i in test*.conf.in; do + sed "s|logdir @TESTDIR@|logdir %{sg_logdir}|; \ + s|dbhome @TESTDIR@|dbhome %{sg_dbhome}|" $i > $i.tmp + mv -v $i.tmp $i +done %build -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --exec_prefix=/usr \ - --bindir=/usr/sbin \ - --sbindir=/usr/sbin \ - --with-ldap=/usr \ - --with-db-inc=/usr/include/db4 \ - --with-sg-config=/etc/squidguard.conf \ - --with-sg-dbhome=/var/lib/squidGuard/db \ - --with-sg-logdir=/var/log/squidGuard -make +gettextize +export CFLAGS="%optflags" +./configure \ + --bindir=%{_sbindir} \ + --sbindir=%{_sbindir} \ + --with-squiduser=squid \ + --with-mysql \ + --with-nolog=yes \ + --with-db-inc=%{_includedir}/db4 \ + --with-sg-config=%{sg_config} \ + --with-sg-dbhome=%{sg_dbhome} \ + --with-sg-logdir=%{sg_logdir} \ + --with-ldap=%_prefix +make %{?jobs:-j%jobs} +pushd contrib +make %{?jobs:-j%jobs} +popd # --------------------------------------------------------------------------- %install mkdir $RPM_BUILD_ROOT/etc -make install DESTDIR=$RPM_BUILD_ROOT -# config file to the correct place... -# install -m 644 test/test1.conf $RPM_BUILD_ROOT/etc/squidGuard.conf +%makeinstall +# fix install dir +if [ -f $RPM_BUILD_ROOT/%{_bindir}/squidGuard ]; then + mkdir -p $RPM_BUILD_ROOT/%{_sbindir} + install -m755 $RPM_BUILD_ROOT/%{_bindir}/squidGuard $RPM_BUILD_ROOT/%{_sbindir}/ + rm -rf $RPM_BUILD_ROOT/%{_bindir} +fi +# install blacklist mkdir -p $RPM_BUILD_ROOT/var/lib/squidGuard/db/blacklist install -m 644 test/blacklist/* $RPM_BUILD_ROOT/var/lib/squidGuard/db/blacklist -mkdir -p $RPM_BUILD_ROOT/var/log/squidGuard +# install cgi +mkdir -p $RPM_BUILD_ROOT/%{cgidir} +mkdir -p $RPM_BUILD_ROOT/%{imgdir} +install -m755 samples/*.cgi $RPM_BUILD_ROOT/%{cgidir}/ +install -m644 samples/babel* $RPM_BUILD_ROOT/%{cgidir}/ +install -m644 %{S:3} $RPM_BUILD_ROOT/%{imgdir}/blocked.gif +# prepare logdir +mkdir -p $RPM_BUILD_ROOT%{sg_logdir} +# prepare logrotate +mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d +sed "s|@SG_LOGDIR@|%{sg_logdir}|g" %{SOURCE2} > $RPM_BUILD_ROOT/etc/logrotate.d/%{name} +# clean up rm -f {contrib,doc,samples,test}/{Makefile,*.in,*/*.in,.*.swp} +# install docu +mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} +cp -r {contrib,doc,samples,test} $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/ +cp ANNOUNCE CHANGELOG COPYING FAQ GPL ISSUES.txt README* $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/ # --------------------------------------------------------------------------- %clean @@ -93,14 +154,30 @@ %files %defattr(-,root,root) +%dir %{_defaultdocdir}/%{name} +%doc %{_defaultdocdir}/%{name}/ANNOUNCE +%doc %{_defaultdocdir}/%{name}/CHANGELOG +%doc %{_defaultdocdir}/%{name}/COPYING +%doc %{_defaultdocdir}/%{name}/FAQ +%doc %{_defaultdocdir}/%{name}/GPL +%doc %{_defaultdocdir}/%{name}/ISSUES.txt +%doc %{_defaultdocdir}/%{name}/README* %attr(700, squid, root) %dir /var/lib/squidGuard -%attr(700, squid, root) %dir /var/lib/squidGuard/db -%attr(700, squid, root) %dir /var/log/squidGuard -%config(noreplace) /etc/squidguard.conf +%attr(700, squid, root) %dir %{sg_dbhome} +%attr(700, squid, root) %dir %{sg_logdir} +%config(noreplace) %{sg_config} %config(noreplace) /var/lib/squidGuard/db/blacklist -/usr/sbin/* -%doc ANNOUNCE CHANGELOG CONFIGURATION COPYING FAQ GPL -%doc INSTALL ISSUES.txt README README.LDAP README.SuSE -%doc contrib doc samples test +%config(noreplace) /etc/logrotate.d/%{name} +%{_sbindir}/* +%dir %{imgdir} +%{cgidir}/* +%{imgdir}/* + +%files doc +%defattr(-,root,root) +%doc %{_defaultdocdir}/%{name}/contrib +%doc %{_defaultdocdir}/%{name}/doc +%doc %{_defaultdocdir}/%{name}/samples +%doc %{_defaultdocdir}/%{name}/test %changelog ++++++ squidGuard-1.4-mysql.patch ++++++ Index: squidGuard.1.4-beta/configure =================================================================== --- squidGuard.1.4-beta.orig/configure +++ squidGuard.1.4-beta/configure @@ -4402,7 +4402,7 @@ echo "${ECHO_T}no" >&6; } fi else - for i in lib lib/mysql; do + for i in lib lib/mysql lib64 lib64/mysql; do str="$MYSQL_DIR/$i/libmysqlclient.*" for j in `echo $str`; do if test -r $j; then ++++++ squidGuard-1.3.tar.bz2 -> squidGuard-1.4.tar.bz2 ++++++ ++++ 23543 lines of diff (skipped) ++++++ squidGuard-Makefile.patch ++++++ Index: Makefile.in =================================================================== --- Makefile.in.orig +++ Makefile.in @@ -15,9 +15,9 @@ LIBS = @LIBS@ RM = rm -f MKINSTALLDIRS = mkdir -p -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = $(exec_prefix)/bin +prefix = $(DESTDIR)@prefix@ +exec_prefix = $(DESTDIR)@exec_prefix@ +bindir = $(DESTDIR)@bindir@ infodir = $(prefix)/info logdir = @sg_logdir@ configfile = @sg_config@ @@ -47,34 +47,28 @@ install: install-build install-conf install-conf: @echo Installing configuration file ; - @if [ ! -d $(prefix)/squidGuard ]; then \ - $(MKINSTALLDIRS) $(prefix)/squidGuard ; \ - echo Created directory $(prefix)/squidGuard ; \ - chown -R $(SQUIDUSER) $(prefix)/squidGuard || exit 1 ; \ - echo Assigned $(prefix)/squidGuard to user $(SQUIDUSER) ; \ + @if [ ! -d $(DESTDIR)$(prefix)/squidGuard ]; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/squidGuard ; \ + echo Created directory $(DESTDIR)$(prefix)/squidGuard ; \ fi ; - @if [ ! -d $(dbhomedir) ]; then \ - $(MKINSTALLDIRS) $(dbhomedir) ; \ - echo Created directory $(dbhomedir) ; \ - chown -R $(SQUIDUSER) $(dbhomedir) || exit 1 ; \ - echo Assigned $(dbhomedir) to user $(SQUIDUSER) ; \ + @if [ ! -d $(DESTDIR)$(dbhomedir) ]; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(dbhomedir) ; \ + echo Created directory $(DESTDIR)$(dbhomedir) ; \ fi ; - @if [ ! -d $(logdir) ]; then \ - $(MKINSTALLDIRS) $(logdir) ; \ - echo Created directory $(logdir) ; \ - chown -R $(SQUIDUSER) $(logdir) || exit 1 ; \ - echo Assigned $(logdir) to user $(SQUIDUSER) ; \ + @if [ ! -d $(DESTDIR)$(logdir) ]; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(logdir) ; \ + echo Created directory $(DESTDIR)$(logdir) ; \ fi ; - @if [ ! -d `dirname $(configfile)` ]; then \ + @if [ ! -d `dirname $(DESTDIR)$(configfile)` ]; then \ umask 022 ; \ - mkdir -p `dirname $(configfile)` ; \ - echo No configuration directory found. Created `dirname $(configfile)`. ; \ + mkdir -p `dirname $(DESTDIR)$(configfile)` ; \ + echo No configuration directory found. Created `dirname $(DESTDIR)$(configfile)`. ; \ fi; - @if test ! -f $(configfile); then \ - cp samples/sample.conf $(configfile) || exit 1 ; \ + @if test ! -f $(DESTDIR)$(configfile); then \ + cp samples/sample.conf $(DESTDIR)$(configfile) || exit 1 ; \ echo Copied sample squidGuard.conf ; \ - chmod 644 $(configfile) || exit 1 ; \ - echo $(configfile) is now readable ; \ + chmod 644 $(DESTDIR)$(configfile) || exit 1 ; \ + echo $(DESTDIR)$(configfile) is now readable ; \ echo The initial configuration is complete. ; \ else \ echo Configuration file found. Not changing anything ; \ @@ -84,7 +78,7 @@ install-conf: @echo ; install-build: - @echo Installing squidGuard + @echo Installing squidGuard in $(bindir) @if [ ! -d $(bindir) ]; then \ $(MKINSTALLDIRS) $(bindir) ; \ fi ; \ Index: src/Makefile.in =================================================================== --- src/Makefile.in.orig +++ src/Makefile.in @@ -31,11 +31,11 @@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = $(exec_prefix)/bin -logdir = @sg_logdir@ -cfgdir = @sg_cfgdir@ +prefix = $(DESTDIR)@prefix@ +exec_prefix = $(DESTDIR)@exec_prefix@ +bindir = $(DESTDIR)@bindir@ +logdir = $(DESTDIR)@sg_logdir@ +cfgdir = $(DESTDIR)@sg_cfgdir@ infodir = $(prefix)/info OBJS = main.o sgLog.o sgDb.o HTParse.o sgDiv.o sgFree.o y.tab.o lex.yy.o @@ -122,12 +122,13 @@ uninstall:: uninstall.bin install.bin:: squidGuard @echo making $@ in `basename \`pwd\`` - @$(MKDIR) $(bindir) $(logdir) $(cfgdir) - $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard + @$(MKDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(logdir) $(DESTDIR)$(cfgdir) + @echo installing squidGuard in $(DESTDIR)$(bindir)/squidGuard + $(INSTALL_PROGRAM) squidGuard $(DESTDIR)$(bindir)/squidGuard uninstall.bin:: @echo making $@ in `basename \`pwd\`` - $(RM) $(bindir)/squidGuard + $(RM) $(DESTDIR)$(bindir)/squidGuard update:: @echo making $@ in `basename \`pwd\`` ++++++ squidGuard-config.patch ++++++ Index: src/sg.h.in =================================================================== --- src/sg.h.in.orig +++ src/sg.h.in @@ -79,9 +79,9 @@ int tolower(); #define WARNING_LOGFILE "squidGuard.log" #define ERROR_LOGFILE "squidGuard.error" -#define DEFAULT_CONFIGFILE "@prefix@/squidGuard/squidGuard.conf" -#define DEFAULT_LOGDIR "@prefix@/squidGuard/log" -#define DEFAULT_DBHOME "@prefix@/squidGuard/db" +#define DEFAULT_CONFIGFILE "/etc/squidGuard.conf" +#define DEFAULT_LOGDIR "/var/log/squidGuard" +#define DEFAULT_DBHOME "/var/lib/squidGuard/db" #define EXEC_PROGRAM "@prefix@/bin/squidGuard" #ifdef ACCONFIG ++++++ squidGuard-trailing_dot.patch ++++++ Index: src/sgDiv.c =================================================================== --- src/sgDiv.c.orig +++ src/sgDiv.c @@ -94,6 +94,7 @@ int parseLine(line, s) int i = 0; char c; int report_once = 1; + int trailingdot = 1; size_t strsz; int ndx = 0; @@ -148,6 +149,16 @@ int parseLine(line, s) report_once--; } } + else if ('.' == p[ndx] && '/' == p[ndx+1] && trailingdot == 0) { + /* If the domain has trailing dot, remove (problem found with squid 3.0 stable1-5) */ + /* if this char is a dot and the next char is a slash, then shift the rest of the string left one char */ + /* We do this only the first time it is encountered. */ + trailingdot++; + size_t sz = strlen(p+ndx+1); + strncpy(p+ndx,p+ndx+1, sz); + p[ndx+sz] = '\0'; + @NOLOG1@ sgLogError("Warning: Possible bypass attempt. Found a trailing dot in the domain name: %s", s->orig); @NOLOG2@ + } else { /* increment the string indexer */ ++++++ squidGuard-unusual_url_end.patch ++++++ Index: src/sgDiv.c =================================================================== --- src/sgDiv.c.orig +++ src/sgDiv.c @@ -133,7 +133,7 @@ int parseLine(line, s) { /* in case this is a '://' skip over it, but try to not read past EOS */ if(3 <= strsz-ndx) { - if(':' == p[ndx] && '/' == p[ndx+1] && '/' == p[ndx+2]) { + if(':' == p[ndx] && '/' == p[ndx+1] && '/' == p[ndx+2] && '\0' != p[ndx+3]) { ndx+=3; /* 3 == strlen("://"); */ } } ++++++ squidGuard.logrotate ++++++ @SG_LOGDIR@/squidGuard.log { compress dateext notifempty create 640 squid root rotate 99 size 4M #maxage 365 postrotate /etc/init.d/squid reload endscript } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de