Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/squidguard/files/, net-proxy/squidguard/
Date: Thu, 07 Jul 2016 20:51:07
Message-Id: 1467924658.34cabded1facfd9aa06d1b6b4de0bbe4ebc7842e.pinkbyte@gentoo
1 commit: 34cabded1facfd9aa06d1b6b4de0bbe4ebc7842e
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 7 19:33:15 2016 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 7 20:50:58 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34cabded
7
8 net-proxy/squidguard: drop old vulnerable version
9
10 Gentoo-Bug: 586668
11
12 Package-Manager: portage-2.3.0_rc1
13
14 net-proxy/squidguard/Manifest | 1 -
15 .../files/squidguard-1.4-autoheader.patch | 61 ------------------
16 .../files/squidguard-1.4-cross-compile.patch | 51 ---------------
17 .../squidguard/files/squidguard-1.4-gentoo.patch | 74 ----------------------
18 .../files/squidguard-1.4-upstream-fixes.patch | 24 -------
19 .../files/squidguard-1.4-vsnprintf.patch | 44 -------------
20 net-proxy/squidguard/squidguard-1.4-r4.ebuild | 73 ---------------------
21 7 files changed, 328 deletions(-)
22
23 diff --git a/net-proxy/squidguard/Manifest b/net-proxy/squidguard/Manifest
24 index 4987384..f43eed6 100644
25 --- a/net-proxy/squidguard/Manifest
26 +++ b/net-proxy/squidguard/Manifest
27 @@ -1,2 +1 @@
28 -DIST squidGuard-1.4.tar.gz 1968492 SHA256 0711ce60b8e2bbba107b980fed446a88df35e1584b39f079c0cae54a172c5141 SHA512 6d55bda4c6b597ff52fed95ec336ca2d0b028359332217a552e645a3ac76d6d812926cd837e77cb5e046109c3c6291d52b92f3f7ac987dbf1b6fd17d68f1413d WHIRLPOOL 0c1e5813f4ac0d84303ec420a811f9ed3691aba3a7785591ab440aa5e768a50e54e77846e8a5df4364bd5a8bdb1d6de0813b35ef3fe8536730e372d3b98db533
29 DIST squidGuard-1.5-beta.tar.gz 1983030 SHA256 ba4b79cd193bd3095f3fd27a6e2fc1b36effc2e12a33e17159d4a51993fb3c8e SHA512 37ddc2ac82596e9d24aac6a610763f2eeb7c15b3a2d7babb85948e1da912aebb1dc85309766f7d8c3d7c22713e24a51f4cdef4520117a03d839662ef2494b6e7 WHIRLPOOL 6f65c6a9b23396a7c4a10f344a20cb4824e0abae451fb95a1b563084d0c9755b20f67a74d991b76a54d239ad3dbc6ba468d3c687fdbd80c31567608a927154fc
30
31 diff --git a/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch b/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch
32 deleted file mode 100644
33 index af97d8e..0000000
34 --- a/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch
35 +++ /dev/null
36 @@ -1,61 +0,0 @@
37 -diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
38 ---- squidGuard-1.4.orig/configure.in 2009-01-03 20:04:30.000000000 +0000
39 -+++ squidGuard-1.4/configure.in 2009-01-10 13:08:49.000000000 +0000
40 -@@ -93,18 +93,18 @@
41 - squiduser=$withval)
42 -
43 - if test -n "$sg_config"; then
44 -- AC_DEFINE(ACCONFIG)
45 -+ AC_DEFINE(ACCONFIG, 1, [Defined if you supply --with-sg-config])
46 - changequote(, )dnl
47 - sg_cfgdir=`echo $sg_config|sed "s%/[^/][^/]*$%%"`
48 - changequote([, ])dnl
49 - fi
50 -
51 - if test -n "$sg_logdir"; then
52 -- AC_DEFINE(ACLOGDIR)
53 -+ AC_DEFINE(ACLOGDIR, 1, [Defined if you supply --with-sg-logdir])
54 - fi
55 -
56 - if test -n "$sg_dbhome"; then
57 -- AC_DEFINE(ACDBHOME)
58 -+ AC_DEFINE(ACDBHOME, 1, [Defined if you supply --with-sg-dbhome])
59 - fi
60 -
61 - CFLAGS="$CFLAGS $db_inc"
62 -@@ -186,7 +186,7 @@
63 - YACCLINE=""
64 - fi
65 - if test "$with_ldap" = "yes"; then
66 -- AC_DEFINE(HAVE_LIBLDAP)
67 -+ AC_DEFINE(HAVE_LIBLDAP, 1, [Define if LDAP support should be compiled])
68 - AC_RUN_IFELSE([
69 -
70 - #include <ldap.h>
71 -@@ -277,7 +277,7 @@
72 - CPPFLAGS="${CPPFLAGS} -I${MYSQL_INC_DIR}"
73 - AC_CHECK_LIB(z, compress)
74 - LIBS="-lmysqlclient ${LIBS}"
75 -- AC_DEFINE(HAVE_MYSQL)
76 -+ AC_DEFINE(HAVE_MYSQL, 1, [Define if MySQL support should be compiled])
77 - fi
78 - fi
79 - else
80 -@@ -380,7 +380,7 @@
81 - ], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=no)
82 -
83 - if test $dbg2_ok_version = yes; then
84 -- AC_DEFINE(DB_VERSION_GT2)
85 -+ AC_DEFINE(DB_VERSION_GT2, 1, [Define if you have dbversion greater than 3.2])
86 - fi
87 -
88 - AC_RUN_IFELSE([
89 -@@ -404,7 +404,7 @@
90 - ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=no)
91 -
92 - if test $dbg3_ok_version = yes; then
93 -- AC_DEFINE(DB_VERSION_GT3)
94 -+ AC_DEFINE(DB_VERSION_GT3, 1, [Define if you have dbversion greater than 4.0])
95 - fi
96 -
97 -
98
99 diff --git a/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch b/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch
100 deleted file mode 100644
101 index ad397fe..0000000
102 --- a/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch
103 +++ /dev/null
104 @@ -1,51 +0,0 @@
105 -diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
106 ---- squidGuard-1.4.orig/configure.in 2009-01-03 20:04:30.000000000 +0000
107 -+++ squidGuard-1.4/configure.in 2009-04-25 09:53:49.000000000 +0000
108 -@@ -201,7 +201,9 @@
109 - echo "Unable to link to LDAP library."
110 - echo
111 - exit 1
112 -- ],)
113 -+ ],[
114 -+ ac_status=0
115 -+ ])
116 - fi
117 -
118 - dnl
119 -@@ -314,7 +316,8 @@
120 - exit (0);
121 - exit (1);
122 - }
123 -- ], db_ok_version=yes, db_ok_version=no, db_ok_version=no)
124 -+ ], db_ok_version=yes, db_ok_version=no, db_ok_version=yes)
125 -+
126 -
127 - if test $db_ok_version = no; then
128 - echo
129 -@@ -345,7 +348,7 @@
130 - exit (1);
131 - exit (0);
132 - }
133 -- ], db_ok_version=yes, db_ok_version=no, db_ok_version=no)
134 -+ ], db_ok_version=yes, db_ok_version=no, db_ok_version=yes)
135 -
136 - if test $db_ok_version = no; then
137 - echo
138 -@@ -377,7 +380,7 @@
139 - exit (0);
140 - exit (1);
141 - }
142 -- ], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=no)
143 -+ ], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=yes)
144 -
145 - if test $dbg2_ok_version = yes; then
146 - AC_DEFINE(DB_VERSION_GT2)
147 -@@ -401,7 +404,7 @@
148 - exit (0);
149 - exit (1);
150 - }
151 -- ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=no)
152 -+ ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=yes)
153 -
154 - if test $dbg3_ok_version = yes; then
155 - AC_DEFINE(DB_VERSION_GT3)
156
157 diff --git a/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch
158 deleted file mode 100644
159 index 60b5461..0000000
160 --- a/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch
161 +++ /dev/null
162 @@ -1,74 +0,0 @@
163 -diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
164 ---- squidGuard-1.4.orig/Makefile.in 2008-05-17 18:36:44.000000000 +0000
165 -+++ squidGuard-1.4/Makefile.in 2009-01-10 13:02:14.000000000 +0000
166 -@@ -43,7 +43,7 @@
167 - # Dependencies for installing
168 - #
169 -
170 --install: install-build install-conf
171 -+install: install-build
172 -
173 - install-conf:
174 - @echo Installing configuration file ;
175 -@@ -85,10 +85,10 @@
176 -
177 - install-build:
178 - @echo Installing squidGuard
179 -- @if [ ! -d $(bindir) ]; then \
180 -- $(MKINSTALLDIRS) $(bindir) ; \
181 -+ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
182 -+ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
183 - fi ; \
184 -- cp src/squidGuard $(bindir) || exit 1 ; \
185 -+ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \
186 - echo Done. ;
187 -
188 - clean::
189 -diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
190 ---- squidGuard-1.4.orig/src/Makefile.in 2009-01-03 20:05:39.000000000 +0000
191 -+++ squidGuard-1.4/src/Makefile.in 2009-01-10 13:02:14.000000000 +0000
192 -@@ -110,6 +110,8 @@
193 - mv -f y.tab.c y.tab.c.bison
194 - mv -f y.tab.h y.tab.h.bison
195 -
196 -+sg.y sg.l:
197 -+
198 - #
199 - # Dependencies for installing
200 - #
201 -@@ -122,8 +124,8 @@
202 -
203 - install.bin:: squidGuard
204 - @echo making $@ in `basename \`pwd\``
205 -- @$(MKDIR) $(bindir) $(logdir) $(cfgdir)
206 -- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
207 -+ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
208 -+ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
209 -
210 - uninstall.bin::
211 - @echo making $@ in `basename \`pwd\``
212 -diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c
213 ---- squidGuard-1.4.orig/src/sgDb.c 2008-07-14 18:29:41.000000000 +0000
214 -+++ squidGuard-1.4/src/sgDb.c 2009-01-10 13:02:14.000000000 +0000
215 -@@ -103,13 +103,21 @@
216 - if(createdb)
217 - flag = flag | DB_TRUNCATE;
218 - if ((ret =
219 -+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
220 -+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
221 -+#else
222 - Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
223 -+#endif
224 - (void) Db->dbp->close(Db->dbp, 0);
225 - sgLogFatalError("Error db_open: %s", strerror(ret));
226 - }
227 - } else {
228 - if ((ret =
229 -+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
230 -+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
231 -+#else
232 - Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
233 -+#endif
234 - sgLogFatalError("Error db_open: %s", strerror(ret));
235 - }
236 - }
237
238 diff --git a/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch b/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch
239 deleted file mode 100644
240 index 007e6b4..0000000
241 --- a/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch
242 +++ /dev/null
243 @@ -1,24 +0,0 @@
244 -diff -Nru squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4/src/sgDiv.c.in
245 ---- squidGuard-1.4.orig/src/sgDiv.c.in 2008-07-14 18:02:43.000000000 +0200
246 -+++ squidGuard-1.4/src/sgDiv.c.in 2009-11-28 09:33:05.000000000 +0100
247 -@@ -745,7 +745,7 @@
248 - p++;
249 - break;
250 - case 'u': /* Requested URL */
251 -- strcat(buf, req->orig);
252 -+ strncat(buf, req->orig, 2048);
253 - p++;
254 - break;
255 - default:
256 -diff -Nru squidGuard-1.4.orig/src/sg.h.in squidGuard-1.4/src/sg.h.in
257 ---- squidGuard-1.4.orig/src/sg.h.in 2007-11-16 17:58:32.000000000 +0100
258 -+++ squidGuard-1.4/src/sg.h.in 2009-11-28 09:33:37.000000000 +0100
259 -@@ -73,7 +73,7 @@
260 - #define REQUEST_TYPE_REDIRECT 2
261 - #define REQUEST_TYPE_PASS 3
262 -
263 --#define MAX_BUF 4096
264 -+#define MAX_BUF 12288
265 -
266 - #define DEFAULT_LOGFILE "squidGuard.log"
267 - #define WARNING_LOGFILE "squidGuard.log"
268
269 diff --git a/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch b/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch
270 deleted file mode 100644
271 index bf4efec..0000000
272 --- a/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch
273 +++ /dev/null
274 @@ -1,44 +0,0 @@
275 -diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
276 ---- squidGuard-1.4.orig/configure.in 2009-04-26 12:28:49.000000000 +0000
277 -+++ squidGuard-1.4/configure.in 2009-04-26 12:29:35.000000000 +0000
278 -@@ -421,7 +421,7 @@
279 - AC_CHECK_FUNCS(regexec, , AC_MSG_ERROR([No regexec library function.]))
280 - AC_CHECK_FUNCS(strdup, , AC_MSG_ERROR([No strdup library function.]))
281 - AC_CHECK_FUNCS(strerror, , AC_MSG_ERROR([No strerror library function.]))
282 --AC_CHECK_FUNCS(vsprintf, , AC_MSG_ERROR([No vsprintf library function.]))
283 -+AC_CHECK_FUNCS(vsnprintf, , AC_MSG_ERROR([No vsnprintf library function.]))
284 - AC_CHECK_FUNCS(sigaction)
285 - AC_CHECK_FUNCS(signal)
286 -
287 -diff -Nru squidGuard-1.4.orig/src/sgLog.c squidGuard-1.4/src/sgLog.c
288 ---- squidGuard-1.4.orig/src/sgLog.c 2007-11-16 16:58:32.000000000 +0000
289 -+++ squidGuard-1.4/src/sgLog.c 2009-04-26 12:31:40.000000000 +0000
290 -@@ -55,7 +55,7 @@
291 - char msg[MAX_BUF];
292 - va_list ap;
293 - VA_START(ap, format);
294 -- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
295 -+ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
296 - fprintf(stderr,"overflow in vsprintf (sgLog): %s",strerror(errno));
297 - va_end(ap);
298 - date = niso(0);
299 -@@ -87,8 +87,8 @@
300 - char msg[MAX_BUF];
301 - va_list ap;
302 - VA_START(ap, format);
303 -- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
304 -- sgLogFatalError("overflow in vsprintf (sgLogError): %s",strerror(errno));
305 -+ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
306 -+ fprintf(stderr,"overflow in vsprintf (sgLogError): %s",strerror(errno));
307 - va_end(ap);
308 - sgLog(globalErrorLog,"%s",msg);
309 - }
310 -@@ -104,7 +104,7 @@
311 - char msg[MAX_BUF];
312 - va_list ap;
313 - VA_START(ap, format);
314 -- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
315 -+ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
316 - return;
317 - va_end(ap);
318 - sgLog(globalErrorLog,"%s",msg);
319
320 diff --git a/net-proxy/squidguard/squidguard-1.4-r4.ebuild b/net-proxy/squidguard/squidguard-1.4-r4.ebuild
321 deleted file mode 100644
322 index 64bd3b9..0000000
323 --- a/net-proxy/squidguard/squidguard-1.4-r4.ebuild
324 +++ /dev/null
325 @@ -1,73 +0,0 @@
326 -# Copyright 1999-2015 Gentoo Foundation
327 -# Distributed under the terms of the GNU General Public License v2
328 -# $Id$
329 -
330 -EAPI=2
331 -WANT_AUTOMAKE=none
332 -
333 -inherit eutils autotools user
334 -
335 -DESCRIPTION="Combined filter, redirector and access controller plugin for Squid"
336 -HOMEPAGE="http://www.squidguard.org"
337 -SRC_URI="http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz"
338 -
339 -LICENSE="GPL-2"
340 -SLOT="0"
341 -KEYWORDS="amd64 ~arm ppc ppc64 sparc x86"
342 -IUSE="ldap"
343 -
344 -RDEPEND=">=sys-libs/db-2
345 - ldap? ( net-nds/openldap )"
346 -DEPEND="${RDEPEND}
347 - sys-devel/bison
348 - sys-devel/flex"
349 -
350 -S="${WORKDIR}/squidGuard-${PV}"
351 -
352 -pkg_setup() {
353 - enewgroup squid
354 - enewuser squid -1 -1 /var/cache/squid squid
355 -}
356 -
357 -src_prepare() {
358 - epatch "${FILESDIR}/${P}-gentoo.patch"
359 - epatch "${FILESDIR}/${P}-autoheader.patch"
360 - epatch "${FILESDIR}/${P}-vsnprintf.patch"
361 - epatch "${FILESDIR}/${P}-cross-compile.patch"
362 - epatch "${FILESDIR}/${P}-upstream-fixes.patch"
363 - eautoreconf
364 -}
365 -
366 -src_configure() {
367 - econf \
368 - $(use_with ldap) \
369 - --with-sg-config=/etc/squidGuard/squidGuard.conf \
370 - --with-sg-logdir=/var/log/squidGuard \
371 - || die "configure has failed"
372 -}
373 -
374 -src_install() {
375 - emake prefix="/usr" INSTDIR="${D}" install || die "emake install has failed"
376 -
377 - keepdir /var/log/squidGuard
378 - fowners squid:squid /var/log/squidGuard
379 -
380 - insinto /etc/squidGuard/sample
381 - doins "${FILESDIR}"/squidGuard.conf.*
382 - insinto /etc/squidGuard/sample/db
383 - doins "${FILESDIR}"/blockedsites
384 -
385 - dodoc ANNOUNCE CHANGELOG README
386 - dohtml doc/*.html
387 - docinto text
388 - dodoc doc/*.txt
389 -}
390 -
391 -pkg_postinst() {
392 - einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
393 - einfo " url_rewrite_program /usr/bin/squidGuard"
394 - einfo " url_rewrite_children 10"
395 - einfo ""
396 - einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
397 - einfo "Examples can be found in /etc/squidGuard/sample/"
398 -}