public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-proxy/squidguard/files/, net-proxy/squidguard/
@ 2016-07-07 20:51 Sergey Popov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergey Popov @ 2016-07-07 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     34cabded1facfd9aa06d1b6b4de0bbe4ebc7842e
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 19:33:15 2016 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 20:50:58 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34cabded

net-proxy/squidguard: drop old vulnerable version

Gentoo-Bug: 586668

Package-Manager: portage-2.3.0_rc1

 net-proxy/squidguard/Manifest                      |  1 -
 .../files/squidguard-1.4-autoheader.patch          | 61 ------------------
 .../files/squidguard-1.4-cross-compile.patch       | 51 ---------------
 .../squidguard/files/squidguard-1.4-gentoo.patch   | 74 ----------------------
 .../files/squidguard-1.4-upstream-fixes.patch      | 24 -------
 .../files/squidguard-1.4-vsnprintf.patch           | 44 -------------
 net-proxy/squidguard/squidguard-1.4-r4.ebuild      | 73 ---------------------
 7 files changed, 328 deletions(-)

diff --git a/net-proxy/squidguard/Manifest b/net-proxy/squidguard/Manifest
index 4987384..f43eed6 100644
--- a/net-proxy/squidguard/Manifest
+++ b/net-proxy/squidguard/Manifest
@@ -1,2 +1 @@
-DIST squidGuard-1.4.tar.gz 1968492 SHA256 0711ce60b8e2bbba107b980fed446a88df35e1584b39f079c0cae54a172c5141 SHA512 6d55bda4c6b597ff52fed95ec336ca2d0b028359332217a552e645a3ac76d6d812926cd837e77cb5e046109c3c6291d52b92f3f7ac987dbf1b6fd17d68f1413d WHIRLPOOL 0c1e5813f4ac0d84303ec420a811f9ed3691aba3a7785591ab440aa5e768a50e54e77846e8a5df4364bd5a8bdb1d6de0813b35ef3fe8536730e372d3b98db533
 DIST squidGuard-1.5-beta.tar.gz 1983030 SHA256 ba4b79cd193bd3095f3fd27a6e2fc1b36effc2e12a33e17159d4a51993fb3c8e SHA512 37ddc2ac82596e9d24aac6a610763f2eeb7c15b3a2d7babb85948e1da912aebb1dc85309766f7d8c3d7c22713e24a51f4cdef4520117a03d839662ef2494b6e7 WHIRLPOOL 6f65c6a9b23396a7c4a10f344a20cb4824e0abae451fb95a1b563084d0c9755b20f67a74d991b76a54d239ad3dbc6ba468d3c687fdbd80c31567608a927154fc

diff --git a/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch b/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch
deleted file mode 100644
index af97d8e..0000000
--- a/net-proxy/squidguard/files/squidguard-1.4-autoheader.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
---- squidGuard-1.4.orig/configure.in	2009-01-03 20:04:30.000000000 +0000
-+++ squidGuard-1.4/configure.in	2009-01-10 13:08:49.000000000 +0000
-@@ -93,18 +93,18 @@
- 	     squiduser=$withval)
- 
- if test -n "$sg_config"; then
--	AC_DEFINE(ACCONFIG)
-+	AC_DEFINE(ACCONFIG, 1, [Defined if you supply --with-sg-config])
- changequote(, )dnl
- 	sg_cfgdir=`echo $sg_config|sed "s%/[^/][^/]*$%%"`
- changequote([, ])dnl
- fi
- 
- if test -n "$sg_logdir"; then
--	AC_DEFINE(ACLOGDIR)
-+	AC_DEFINE(ACLOGDIR, 1, [Defined if you supply --with-sg-logdir])
- fi
- 
- if test -n "$sg_dbhome"; then
--	AC_DEFINE(ACDBHOME)
-+	AC_DEFINE(ACDBHOME, 1, [Defined if you supply --with-sg-dbhome])
- fi
- 
- CFLAGS="$CFLAGS $db_inc"
-@@ -186,7 +186,7 @@
- 	YACCLINE=""
- fi
- if test "$with_ldap" = "yes"; then
--       AC_DEFINE(HAVE_LIBLDAP)
-+       AC_DEFINE(HAVE_LIBLDAP, 1, [Define if LDAP support should be compiled])
-        AC_RUN_IFELSE([
- 
-        #include <ldap.h>
-@@ -277,7 +277,7 @@
-       CPPFLAGS="${CPPFLAGS} -I${MYSQL_INC_DIR}"
-       AC_CHECK_LIB(z, compress)
-       LIBS="-lmysqlclient ${LIBS}"
--      AC_DEFINE(HAVE_MYSQL)
-+      AC_DEFINE(HAVE_MYSQL, 1, [Define if MySQL support should be compiled])
-     fi
-   fi
- else
-@@ -380,7 +380,7 @@
- 	], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=no)
- 
- if test $dbg2_ok_version = yes; then
--	AC_DEFINE(DB_VERSION_GT2)
-+	AC_DEFINE(DB_VERSION_GT2, 1, [Define if you have dbversion greater than 3.2])
- fi
- 
- AC_RUN_IFELSE([
-@@ -404,7 +404,7 @@
-         ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=no)
- 
- if test $dbg3_ok_version = yes; then
--        AC_DEFINE(DB_VERSION_GT3)
-+        AC_DEFINE(DB_VERSION_GT3, 1, [Define if you have dbversion greater than 4.0])
- fi
- 
- 

diff --git a/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch b/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch
deleted file mode 100644
index ad397fe..0000000
--- a/net-proxy/squidguard/files/squidguard-1.4-cross-compile.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
---- squidGuard-1.4.orig/configure.in	2009-01-03 20:04:30.000000000 +0000
-+++ squidGuard-1.4/configure.in	2009-04-25 09:53:49.000000000 +0000
-@@ -201,7 +201,9 @@
-                echo "Unable to link to LDAP library."
-                echo
-                exit 1
--       ],)
-+       ],[
-+               ac_status=0
-+       ])
- fi
- 
- dnl
-@@ -314,7 +316,8 @@
- 			exit (0);
- 		exit (1);
- 	}	
--	], db_ok_version=yes, db_ok_version=no, db_ok_version=no)
-+	], db_ok_version=yes, db_ok_version=no, db_ok_version=yes)
-+
- 
- if test $db_ok_version = no; then
- 	echo
-@@ -345,7 +348,7 @@
- 			exit (1);
- 		exit (0);
- 	}	
--	], db_ok_version=yes, db_ok_version=no, db_ok_version=no)
-+	], db_ok_version=yes, db_ok_version=no, db_ok_version=yes)
- 
- if test $db_ok_version = no; then
- 	echo
-@@ -377,7 +380,7 @@
- 			exit (0);
- 		exit (1);
- 	}	
--	], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=no)
-+	], dbg2_ok_version=yes, dbg2_ok_version=no, dbg2_ok_version=yes)
- 
- if test $dbg2_ok_version = yes; then
- 	AC_DEFINE(DB_VERSION_GT2)
-@@ -401,7 +404,7 @@
-                         exit (0);
-                 exit (1);
-         }
--        ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=no)
-+        ], dbg3_ok_version=yes, dbg3_ok_version=no, dbg3_ok_version=yes)
- 
- if test $dbg3_ok_version = yes; then
-         AC_DEFINE(DB_VERSION_GT3)

diff --git a/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch
deleted file mode 100644
index 60b5461..0000000
--- a/net-proxy/squidguard/files/squidguard-1.4-gentoo.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
---- squidGuard-1.4.orig/Makefile.in	2008-05-17 18:36:44.000000000 +0000
-+++ squidGuard-1.4/Makefile.in	2009-01-10 13:02:14.000000000 +0000
-@@ -43,7 +43,7 @@
- # Dependencies for installing
- #	
- 
--install:	install-build install-conf
-+install:	install-build
- 
- install-conf:
- 	@echo Installing configuration file  ;
-@@ -85,10 +85,10 @@
- 
- install-build:
- 	@echo Installing squidGuard 
--	@if [ ! -d $(bindir) ]; then \
--		$(MKINSTALLDIRS) $(bindir) ; \
-+	@if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
-+		$(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
- 	fi ; \
--	cp src/squidGuard $(bindir) || exit 1 ;  \
-+	cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ;  \
- 	echo Done. ;
- 
- clean::
-diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
---- squidGuard-1.4.orig/src/Makefile.in	2009-01-03 20:05:39.000000000 +0000
-+++ squidGuard-1.4/src/Makefile.in	2009-01-10 13:02:14.000000000 +0000
-@@ -110,6 +110,8 @@
- 	mv -f y.tab.c y.tab.c.bison
- 	mv -f y.tab.h y.tab.h.bison
- 
-+sg.y sg.l:
-+
- #
- # Dependencies for installing
- #
-@@ -122,8 +124,8 @@
- 
- install.bin:: squidGuard
- 	@echo making $@ in `basename \`pwd\``
--	@$(MKDIR) $(bindir) $(logdir) $(cfgdir)
--	$(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
-+	@$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
-+	$(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
- 
- uninstall.bin::
- 	@echo making $@ in `basename \`pwd\``
-diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c
---- squidGuard-1.4.orig/src/sgDb.c	2008-07-14 18:29:41.000000000 +0000
-+++ squidGuard-1.4/src/sgDb.c	2009-01-10 13:02:14.000000000 +0000
-@@ -103,13 +103,21 @@
-     if(createdb)
-       flag = flag | DB_TRUNCATE;
-     if ((ret = 
-+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
-+#else
- 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
-+#endif
-       (void) Db->dbp->close(Db->dbp, 0);
-       sgLogFatalError("Error db_open: %s", strerror(ret));
-     }
-   } else {
-     if ((ret = 
-+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
-+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
-+#else
- 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
-+#endif
-       sgLogFatalError("Error db_open: %s", strerror(ret));
-     }
-   }

diff --git a/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch b/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch
deleted file mode 100644
index 007e6b4..0000000
--- a/net-proxy/squidguard/files/squidguard-1.4-upstream-fixes.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nru squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4/src/sgDiv.c.in
---- squidGuard-1.4.orig/src/sgDiv.c.in	2008-07-14 18:02:43.000000000 +0200
-+++ squidGuard-1.4/src/sgDiv.c.in	2009-11-28 09:33:05.000000000 +0100
-@@ -745,7 +745,7 @@
-       p++;
-       break;
-     case 'u': /* Requested URL */
--      strcat(buf, req->orig);
-+      strncat(buf, req->orig, 2048);
-       p++;
-       break;
-     default:
-diff -Nru squidGuard-1.4.orig/src/sg.h.in squidGuard-1.4/src/sg.h.in
---- squidGuard-1.4.orig/src/sg.h.in	2007-11-16 17:58:32.000000000 +0100
-+++ squidGuard-1.4/src/sg.h.in	2009-11-28 09:33:37.000000000 +0100
-@@ -73,7 +73,7 @@
- #define REQUEST_TYPE_REDIRECT   2
- #define REQUEST_TYPE_PASS       3
- 
--#define MAX_BUF 4096
-+#define MAX_BUF 12288
- 
- #define DEFAULT_LOGFILE "squidGuard.log"
- #define WARNING_LOGFILE "squidGuard.log"

diff --git a/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch b/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch
deleted file mode 100644
index bf4efec..0000000
--- a/net-proxy/squidguard/files/squidguard-1.4-vsnprintf.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
---- squidGuard-1.4.orig/configure.in	2009-04-26 12:28:49.000000000 +0000
-+++ squidGuard-1.4/configure.in	2009-04-26 12:29:35.000000000 +0000
-@@ -421,7 +421,7 @@
- AC_CHECK_FUNCS(regexec, , AC_MSG_ERROR([No regexec library function.]))
- AC_CHECK_FUNCS(strdup, , AC_MSG_ERROR([No strdup library function.]))
- AC_CHECK_FUNCS(strerror, , AC_MSG_ERROR([No strerror library function.]))
--AC_CHECK_FUNCS(vsprintf, , AC_MSG_ERROR([No vsprintf library function.]))
-+AC_CHECK_FUNCS(vsnprintf, , AC_MSG_ERROR([No vsnprintf library function.]))
- AC_CHECK_FUNCS(sigaction)
- AC_CHECK_FUNCS(signal)
- 
-diff -Nru squidGuard-1.4.orig/src/sgLog.c squidGuard-1.4/src/sgLog.c
---- squidGuard-1.4.orig/src/sgLog.c	2007-11-16 16:58:32.000000000 +0000
-+++ squidGuard-1.4/src/sgLog.c	2009-04-26 12:31:40.000000000 +0000
-@@ -55,7 +55,7 @@
-   char msg[MAX_BUF];
-   va_list ap;
-   VA_START(ap, format);
--  if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) 
-+  if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) 
-     fprintf(stderr,"overflow in vsprintf (sgLog): %s",strerror(errno));
-   va_end(ap);
-   date = niso(0);
-@@ -87,8 +87,8 @@
-   char msg[MAX_BUF];
-   va_list ap;
-   VA_START(ap, format);
--  if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) 
--    sgLogFatalError("overflow in vsprintf (sgLogError): %s",strerror(errno));
-+  if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) 
-+    fprintf(stderr,"overflow in vsprintf (sgLogError): %s",strerror(errno));
-   va_end(ap);
-   sgLog(globalErrorLog,"%s",msg);
- }
-@@ -104,7 +104,7 @@
-   char msg[MAX_BUF];
-   va_list ap;
-   VA_START(ap, format);
--  if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) 
-+  if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) 
-     return;
-   va_end(ap);
-   sgLog(globalErrorLog,"%s",msg);

diff --git a/net-proxy/squidguard/squidguard-1.4-r4.ebuild b/net-proxy/squidguard/squidguard-1.4-r4.ebuild
deleted file mode 100644
index 64bd3b9..0000000
--- a/net-proxy/squidguard/squidguard-1.4-r4.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=2
-WANT_AUTOMAKE=none
-
-inherit eutils autotools user
-
-DESCRIPTION="Combined filter, redirector and access controller plugin for Squid"
-HOMEPAGE="http://www.squidguard.org"
-SRC_URI="http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ppc ppc64 sparc x86"
-IUSE="ldap"
-
-RDEPEND=">=sys-libs/db-2
-	ldap? ( net-nds/openldap )"
-DEPEND="${RDEPEND}
-	sys-devel/bison
-	sys-devel/flex"
-
-S="${WORKDIR}/squidGuard-${PV}"
-
-pkg_setup() {
-	enewgroup squid
-	enewuser squid -1 -1 /var/cache/squid squid
-}
-
-src_prepare() {
-	epatch "${FILESDIR}/${P}-gentoo.patch"
-	epatch "${FILESDIR}/${P}-autoheader.patch"
-	epatch "${FILESDIR}/${P}-vsnprintf.patch"
-	epatch "${FILESDIR}/${P}-cross-compile.patch"
-	epatch "${FILESDIR}/${P}-upstream-fixes.patch"
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_with ldap) \
-		--with-sg-config=/etc/squidGuard/squidGuard.conf \
-		--with-sg-logdir=/var/log/squidGuard \
-		|| die "configure has failed"
-}
-
-src_install() {
-	emake prefix="/usr" INSTDIR="${D}" install || die "emake install has failed"
-
-	keepdir /var/log/squidGuard
-	fowners squid:squid /var/log/squidGuard
-
-	insinto /etc/squidGuard/sample
-	doins "${FILESDIR}"/squidGuard.conf.*
-	insinto /etc/squidGuard/sample/db
-	doins "${FILESDIR}"/blockedsites
-
-	dodoc ANNOUNCE CHANGELOG README
-	dohtml doc/*.html
-	docinto text
-	dodoc doc/*.txt
-}
-
-pkg_postinst() {
-	einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
-	einfo "    url_rewrite_program /usr/bin/squidGuard"
-	einfo "    url_rewrite_children 10"
-	einfo ""
-	einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
-	einfo "Examples can be found in /etc/squidGuard/sample/"
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-proxy/squidguard/files/, net-proxy/squidguard/
@ 2020-07-07 13:58 Sergey Popov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergey Popov @ 2020-07-07 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     b5009e568eb238903189fbdd2cbbf58793e0ebe3
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  7 13:58:28 2020 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jul  7 13:58:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5009e56

net-proxy/squidguard: drop old version

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 net-proxy/squidguard/Manifest                      |   1 -
 .../files/squidguard-1.5_beta-gentoo.patch         |  50 --------
 .../files/squidguard-1.5_beta-protocol.patch       | 130 ---------------------
 net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild | 102 ----------------
 4 files changed, 283 deletions(-)

diff --git a/net-proxy/squidguard/Manifest b/net-proxy/squidguard/Manifest
index c54a3bc2dce..7deddebc437 100644
--- a/net-proxy/squidguard/Manifest
+++ b/net-proxy/squidguard/Manifest
@@ -1,2 +1 @@
-DIST squidGuard-1.5-beta.tar.gz 1983030 BLAKE2B 60405e097babb15eb099649d4ffe23a798207c6d3ac490b8c0c7da777a0136fecb867537214aa90c58ff246a86a0cf7ce59b021e29071ecc43ad002f3a0e3def SHA512 37ddc2ac82596e9d24aac6a610763f2eeb7c15b3a2d7babb85948e1da912aebb1dc85309766f7d8c3d7c22713e24a51f4cdef4520117a03d839662ef2494b6e7
 DIST squidguard-1.6.0.tar.gz 1902233 BLAKE2B 36b422fb2424c79532e0d9dc237b4a60b7817190a45de3646a50031b341c5e94540f55adea7b3e8241b8d87fdec551c5c40d1f60ea90e25347305ef9e473b5d3 SHA512 d6e934f550cd777d58abda5f4fd905ccc396afc28e1ddb0bb842a9a3364cbe43db5c30834fe1ed7d93623a361dde50362a79ac2b660382c7e81b4f067f2ac65e

diff --git a/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch
deleted file mode 100644
index 814079764a3..00000000000
--- a/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
---- squidGuard-1.4.orig/Makefile.in	2008-05-17 18:36:44.000000000 +0000
-+++ squidGuard-1.4/Makefile.in	2009-01-10 13:02:14.000000000 +0000
-@@ -43,7 +43,7 @@
- # Dependencies for installing
- #	
- 
--install:	install-build install-conf
-+install:	install-build
- 
- install-conf:
- 	@echo Installing configuration file  ;
-@@ -85,10 +85,10 @@
- 
- install-build:
- 	@echo Installing squidGuard 
--	@if [ ! -d $(bindir) ]; then \
--		$(MKINSTALLDIRS) $(bindir) ; \
-+	@if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
-+		$(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
- 	fi ; \
--	cp src/squidGuard $(bindir) || exit 1 ;  \
-+	cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ;  \
- 	echo Done. ;
- 
- clean::
-diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
---- squidGuard-1.4.orig/src/Makefile.in	2009-01-03 20:05:39.000000000 +0000
-+++ squidGuard-1.4/src/Makefile.in	2009-01-10 13:02:14.000000000 +0000
-@@ -110,6 +110,8 @@
- 	mv -f y.tab.c y.tab.c.bison
- 	mv -f y.tab.h y.tab.h.bison
- 
-+sg.y sg.l:
-+
- #
- # Dependencies for installing
- #
-@@ -122,8 +124,8 @@
- 
- install.bin:: squidGuard
- 	@echo making $@ in `basename \`pwd\``
--	@$(MKDIR) $(bindir) $(logdir) $(cfgdir)
--	$(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
-+	@$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
-+	$(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
- 
- uninstall.bin::
- 	@echo making $@ in `basename \`pwd\``
-diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c

diff --git a/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch b/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch
deleted file mode 100644
index 289fc7563b7..00000000000
--- a/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Patch for compatibility with new(>=3.4) Squid helper protocol
-
-Bugreport: http://bugs.squid-cache.org/show_bug.cgi?id=3978
-
-diff -ur squidGuard-1.5-beta.orig/src/main.c squidGuard-1.5-beta/src/main.c
---- squidGuard-1.5-beta.orig/src/main.c	2013-12-12 11:47:31.000000000 +1300
-+++ squidGuard-1.5-beta/src/main.c	2013-12-12 11:50:38.000000000 +1300
-@@ -185,7 +185,7 @@
- 	sgReloadConfig();
-       }
-       if(failsafe_mode) {
--	puts("");
-+	puts("ERR message=\"squidGuard failsafe mode\"");
- 	fflush(stdout);
- 	if(sig_hup){
-           sgReloadConfig();
-@@ -194,7 +194,7 @@
-       }
-       if(parseLine(buf,&squidInfo) != 1){
- 	sgLogError("ERROR: Error parsing squid line: %s",buf);
--	puts("");
-+	puts("BH message=\"squidGuard error parsing squid line\"");
-       }
-         else {
- 	src = Source;
-@@ -206,14 +206,14 @@
- 	  acl = sgAclCheckSource(src);
- 	  if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
- 	    if(src == NULL || src->cont_search == 0){
--	      puts(""); 
-+	      puts("ERR");
- 	      break;
- 	    } else
- 	      if(src->next != NULL){
- 		src = src->next;
- 		continue;
- 	      } else {
--		puts("");
-+		puts("ERR");
- 		break;
- 	      }
- 	  } else {
-@@ -228,6 +228,10 @@
- 	    fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
- 		    squidInfo.srcDomain,squidInfo.ident,
- 		    squidInfo.method);
-+           if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
-+             fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
-+           } else
-+             fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
-             /* sgLogDebug("DEBUG: %s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method);  */
- 	    break;
- 	  }
-diff -ur squidGuard-1.5-beta.orig/src/main.c.in squidGuard-1.5-beta/src/main.c.in
---- squidGuard-1.5-beta.orig/src/main.c.in	2013-12-12 11:47:31.000000000 +1300
-+++ squidGuard-1.5-beta/src/main.c.in	2013-12-12 11:53:18.000000000 +1300
-@@ -185,7 +185,7 @@
- 	sgReloadConfig();
-       }
-       if(failsafe_mode) {
--	puts("");
-+	puts("ERR message=\"squidGuard failsafe mode\"");
- 	fflush(stdout);
- 	if(sig_hup){
-           sgReloadConfig();
-@@ -194,7 +194,7 @@
-       }
-       if(parseLine(buf,&squidInfo) != 1){
- 	sgLogError("ERROR: Error parsing squid line: %s",buf);
--	puts("");
-+	puts("BH message=\"squidGuard error parsing squid line\"");
-       }
-         else {
- 	src = Source;
-@@ -206,14 +206,14 @@
- 	  acl = sgAclCheckSource(src);
- 	  if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
- 	    if(src == NULL || src->cont_search == 0){
--	      puts(""); 
-+	      puts("ERR");
- 	      break;
- 	    } else
- 	      if(src->next != NULL){
- 		src = src->next;
- 		continue;
- 	      } else {
--		puts("");
-+		puts("ERR");
- 		break;
- 	      }
- 	  } else {
-@@ -225,9 +225,11 @@
- 	      squidInfo.ident[0] = '-';
- 	      squidInfo.ident[1] = '\0';
- 	    }
--	    fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
--		    squidInfo.srcDomain,squidInfo.ident,
--		    squidInfo.method);
-+           if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
-+             fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
-+           } else
-+             fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
-+
-             /* sgLogDebug("DEBUG: %s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method);  */
- 	    break;
- 	  }
-diff -ur squidGuard-1.5-beta.orig/src/sgDiv.c squidGuard-1.5-beta/src/sgDiv.c
---- squidGuard-1.5-beta.orig/src/sgDiv.c	2013-12-12 11:47:31.000000000 +1300
-+++ squidGuard-1.5-beta/src/sgDiv.c	2013-12-12 11:48:36.000000000 +1300
-@@ -782,7 +782,7 @@
-   }
-   sgLogError("ERROR: Going into emergency mode");
-   while(fgets(buf, MAX_BUF, stdin) != NULL){
--    puts("");
-+    puts("ERR");
-     fflush(stdout);
-   }
-   sgLogError("ERROR: Ending emergency mode, stdin empty");
-diff -ur squidGuard-1.5-beta.orig/src/sgDiv.c.in squidGuard-1.5-beta/src/sgDiv.c.in
---- squidGuard-1.5-beta.orig/src/sgDiv.c.in	2013-12-12 11:47:31.000000000 +1300
-+++ squidGuard-1.5-beta/src/sgDiv.c.in	2013-12-12 11:48:36.000000000 +1300
-@@ -782,7 +782,7 @@
-   }
-   sgLogError("ERROR: Going into emergency mode");
-   while(fgets(buf, MAX_BUF, stdin) != NULL){
--    puts("");
-+    puts("ERR");
-     fflush(stdout);
-   }
-   sgLogError("ERROR: Ending emergency mode, stdin empty");

diff --git a/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild b/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
deleted file mode 100644
index 235a6ac00ed..00000000000
--- a/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-WANT_AUTOMAKE=none
-
-inherit autotools db-use eutils user
-
-MY_P="squidGuard-${PV/_/-}"
-
-DESCRIPTION="Combined filter, redirector and access controller plugin for Squid"
-HOMEPAGE="http://www.squidguard.org"
-SRC_URI="http://www.squidguard.org/Downloads/Devel/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ppc ppc64 sparc x86"
-
-IUSE="ldap"
-
-RDEPEND="|| (
-		sys-libs/db:4.8
-		sys-libs/db:4.7
-		sys-libs/db:4.6
-		sys-libs/db:4.5
-		sys-libs/db:4.4
-		sys-libs/db:4.3
-		sys-libs/db:4.2
-	)
-	ldap? ( net-nds/openldap:0 )"
-
-DEPEND="${RDEPEND}
-	sys-devel/bison:0
-	sys-devel/flex:0"
-
-S="${WORKDIR}/${MY_P}"
-
-suitable_db_version() {
-	local tested_slots="4.8 4.7 4.6 4.5 4.4 4.3 4.2"
-	for ver in ${tested_slots}; do
-		if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
-			echo ${ver}
-			return 0
-		fi
-	done
-	die "No suitable BerkDB versions found, aborting"
-}
-
-pkg_setup() {
-	enewgroup squid
-	enewuser squid -1 -1 /var/cache/squid squid
-}
-
-src_prepare() {
-	mv configure.in configure.ac || die
-	epatch \
-		"${FILESDIR}/${P}-gentoo.patch" \
-		"${FILESDIR}/${P}-protocol.patch"
-
-	# Link only with specific BerkDB versions
-	db_version="$(suitable_db_version)"
-	sed -i -e "/\$LIBS -ldb/s/-ldb/-l$(db_libname ${db_version})/" configure.ac || die
-
-	eapply_user
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_with ldap) \
-		--with-db-inc="$(db_includedir ${db_version})" \
-		--with-sg-config=/etc/squidGuard/squidGuard.conf \
-		--with-sg-logdir=/var/log/squidGuard
-}
-
-src_install() {
-	emake prefix="/usr" INSTDIR="${D}" install
-
-	keepdir /var/log/squidGuard
-	fowners squid:squid /var/log/squidGuard
-
-	insinto /etc/squidGuard/sample
-	doins "${FILESDIR}"/squidGuard.conf.*
-	insinto /etc/squidGuard/sample/db
-	doins "${FILESDIR}"/blockedsites
-
-	dodoc ANNOUNCE CHANGELOG README
-	docinto html
-	dodoc doc/*.html
-	docinto text
-	dodoc doc/*.txt
-}
-
-pkg_postinst() {
-	einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
-	einfo "    url_rewrite_program /usr/bin/squidGuard"
-	einfo "    url_rewrite_children 10"
-	einfo ""
-	einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
-	einfo "Examples can be found in /etc/squidGuard/sample/"
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-proxy/squidguard/files/, net-proxy/squidguard/
@ 2025-02-10  9:26 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-02-10  9:26 UTC (permalink / raw
  To: gentoo-commits

commit:     d62dd665656426d5e0e21d55da493db14559c61f
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Thu Jan 16 14:36:58 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 09:24:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d62dd665

net-proxy/squidguard: update EAPI 7 -> 8, fix implicit defines in configure

Nothing defined HAVE_STDLIB_H, so configure test failed, so wrong version of
BerkleyDB was chosen, so compilation failed.
Also included extended patch of stdlib.h in configure from the bug tracker,
with all attribution.

Closes: https://bugs.gentoo.org/898084
Bug: https://bugs.gentoo.org/932312
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40160
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../squidguard/files/squidguard-1.6.0-C23.patch    |  37 ++++++++
 .../squidguard/files/squidguard-1.6.0-stdlib.patch |  40 +++++++-
 net-proxy/squidguard/squidguard-1.6.0-r2.ebuild    | 104 +++++++++++++++++++++
 3 files changed, 177 insertions(+), 4 deletions(-)

diff --git a/net-proxy/squidguard/files/squidguard-1.6.0-C23.patch b/net-proxy/squidguard/files/squidguard-1.6.0-C23.patch
new file mode 100644
index 000000000000..23121819391b
--- /dev/null
+++ b/net-proxy/squidguard/files/squidguard-1.6.0-C23.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/898084
+https://bugs.gentoo.org/932312
+nothing defined HAVE_STDLIB_H to permit inclusion of stdlib.h,
+which caused failures to find correct version of db
+also fill the function definitions for C23
+--- a/configure.ac
++++ b/configure.ac
+@@ -5,6 +5,9 @@
+ AC_INIT(src/main.c.in)
+ AC_CONFIG_HEADER(src/config.h)
+ 
++AC_INCLUDES_DEFAULT
++AC_USE_SYSTEM_EXTENSIONS
++
+ dnl
+ dnl Checks for programs.
+ dnl
+--- a/src/sg.h.in
++++ b/src/sg.h.in
+@@ -360,7 +360,7 @@
+ void   sgEmergency __P(());
+ void   sgReloadConfig __P(());
+ void   sgHandlerSigHUP __P((int));
+-void   sgAlarm __P(());
++void   sgAlarm __P((int signal));
+ int    sgStrRcmp __P((char *, char *));
+ int    sgStrRncmp __P((char *, char *, int));
+ int    sgDomStrRncmp __P((char *, char *, int));
+@@ -431,7 +431,7 @@
+ int    sgRegExpMatch __P((struct sgRegExp *, char *));
+ char   *sgRegExpSubst __P((struct sgRegExp *, char *));
+ 
+-void   sgDbInit __P(());
++void   sgDbInit __P((struct sgDb *Db, char *file));
+ void   sgDbLoadTextFile __P((struct sgDb *, char *, int));
+ void   sgDbUpdate __P((struct sgDb *, char *, char *, size_t));
+ 

diff --git a/net-proxy/squidguard/files/squidguard-1.6.0-stdlib.patch b/net-proxy/squidguard/files/squidguard-1.6.0-stdlib.patch
index 51489b32de5e..f36a094edfe6 100644
--- a/net-proxy/squidguard/files/squidguard-1.6.0-stdlib.patch
+++ b/net-proxy/squidguard/files/squidguard-1.6.0-stdlib.patch
@@ -1,6 +1,18 @@
---- a/configure.ac	2022-12-15 10:33:13.845801113 +0300
-+++ b/configure.ac	2022-12-15 10:33:39.828949903 +0300
-@@ -342,6 +342,9 @@
+https://bugs.gentoo.org/919449
+patch by joergd <joergd@bitquell.de>
+--- a/configure.ac	2019-02-02 18:00:40.000000000 +0100
++++ b/configure.ac	2025-01-13 12:13:48.087653985 +0100
+@@ -233,6 +233,9 @@
+     AC_DEFINE(HAVE_LIBLDAP, 1, [Define if LDAP support should be compiled])
+     AC_RUN_IFELSE([AC_LANG_SOURCE([[
+         #include <ldap.h>
++        #ifdef HAVE_STDLIB_H
++            #include <stdlib.h>
++        #endif
+         int main()
+         {
+            LDAP *p;
+@@ -342,6 +345,9 @@
  LIBS="$LIBS -ldb"
  AC_RUN_IFELSE([AC_LANG_SOURCE([[
      #include <db.h>
@@ -10,7 +22,27 @@
      int main() 
      {
          int major, minor, patch;
-@@ -377,6 +378,9 @@
+@@ -377,6 +383,9 @@
+ 
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+     #include <db.h>
++    #ifdef HAVE_STDLIB_H
++        #include <stdlib.h>
++    #endif
+     int main() 
+     {
+         int major, minor, patch;
+@@ -413,6 +422,9 @@
+ 
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+     #include <db.h>
++    #ifdef HAVE_STDLIB_H
++        #include <stdlib.h>
++    #endif
+     int main() 
+     {
+         int major, minor, patch;
+@@ -441,6 +453,9 @@
  
  AC_RUN_IFELSE([AC_LANG_SOURCE([[
      #include <db.h>

diff --git a/net-proxy/squidguard/squidguard-1.6.0-r2.ebuild b/net-proxy/squidguard/squidguard-1.6.0-r2.ebuild
new file mode 100644
index 000000000000..c922848a5b42
--- /dev/null
+++ b/net-proxy/squidguard/squidguard-1.6.0-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools db-use
+
+DESCRIPTION="Combined filter, redirector and access controller plugin for Squid"
+HOMEPAGE="http://www.squidguard.org"
+SRC_URI="mirror://debian/pool/main/s/squidguard/${PN}_${PV}.orig.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="ldap"
+
+RDEPEND="
+	acct-group/squid
+	acct-user/squid
+	|| (
+		sys-libs/db:5.3
+		sys-libs/db:4.8
+	)
+	ldap? ( net-nds/openldap:= )"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+	app-alternatives/yacc:0
+	app-alternatives/lex:0
+"
+
+suitable_db_version() {
+	local tested_slots="5.3 4.8"
+	for ver in ${tested_slots}; do
+		if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
+			echo ${ver}
+			return 0
+		fi
+	done
+	die "No suitable BerkDB versions found, aborting"
+}
+
+PATCHES=(
+	"${FILESDIR}/${P}-gentoo.patch"
+	"${FILESDIR}/${P}-gcc-10.patch"
+	"${FILESDIR}/${P}-stdlib.patch"
+	"${FILESDIR}/${P}-C23.patch"
+)
+
+src_prepare() {
+	default
+
+	# Link only with specific BerkDB versions
+	# Do not inject default paths for library searching
+	db_version="$(suitable_db_version)"
+	sed -i \
+		-e "/\$LIBS -ldb/s/-ldb/-l$(db_libname ${db_version})/" \
+		-e '/$LDFLAGS $db_lib $ldap_lib/d' \
+		configure.ac || die
+
+	eautoreconf
+
+	# Workaround for missing install-sh, bug #705374
+	local amver=$(best_version dev-build/automake)
+	amver=$(ver_cut 1-2 "${amver#dev-build/automake-}")
+	cp -p "${BROOT}/usr/share/automake-${amver}/install-sh" . || die
+}
+
+src_configure() {
+	econf \
+		$(use_with ldap) \
+		--with-db-inc="$(db_includedir ${db_version})" \
+		--with-sg-config=/etc/squidGuard/squidGuard.conf \
+		--with-sg-logdir=/var/log/squidGuard
+}
+
+src_install() {
+	emake prefix="/usr" DESTDIR="${D}" install
+
+	keepdir /var/log/squidGuard
+	fowners squid:squid /var/log/squidGuard
+
+	insinto /etc/squidGuard/sample
+	doins "${FILESDIR}"/squidGuard.conf.*
+	insinto /etc/squidGuard/sample/db
+	doins "${FILESDIR}"/blockedsites
+
+	dodoc ANNOUNCE CHANGELOG README
+	docinto html
+	dodoc doc/*.html
+	docinto text
+	dodoc doc/*.txt
+}
+
+pkg_postinst() {
+	einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
+	einfo "    url_rewrite_program /usr/bin/squidGuard"
+	einfo "    url_rewrite_children 10"
+	einfo ""
+	einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
+	einfo "Examples can be found in /etc/squidGuard/sample/"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-10  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 20:51 [gentoo-commits] repo/gentoo:master commit in: net-proxy/squidguard/files/, net-proxy/squidguard/ Sergey Popov
  -- strict thread matches above, loose matches on Subject: below --
2020-07-07 13:58 Sergey Popov
2025-02-10  9:26 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox