--0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 26, 2011 at 11:43:11AM +0200, Matthias Andree wrote: > >Description: > Dear maintainer, > > I've recently relied on the fact that your port set USE_BDB=3+. > Apparently this was bogus, the port build fails with BDB 4.0 or newer. Unluckily it failed with just 4.0, as you noticed too, because of a patch which should have taken care of that (files/patch-src_sgDB.c) that was plainly wrong, my fault. I filed PR ports/157340 shortly before getting this one from you to solve this. > > Also, the port lacks the 2009 patches from > http://www.squidguard.org/Downloads/Patches/1.4/ No, those are included in normal patches in files. I had to do that because the "patches" on that url are archieves containing the whole file, not real patches, and I would have had to add some quirk in the port's Makefile to directly use those. You can check this by looking at the files: files/patch-src__sgLog.c files/patch-src__sg.h.in files/patch-src__sgDiv.c.in And looking at the diff of the relevant files from the patches after make patch. Also, here is the relevant commit: http://www.freshports.org/commit.php?category=www&port=squidguard&files=yes&message_id=200910222301.n9MN1s6c091848@repoman.freebsd.org > and triggers quite a > few warnings with portlint -C -- please review and update the port. I've checked. I also added a few more fatal ones with a recent(uncommitted) PR. I've fixed some, but I don't really know how to fix some others. Here are the resons I can't fix each of them: WARN: Makefile: possible use of absolute pathname "/var/db/${PORTNAME}". WARN: Makefile: possible use of absolute pathname "/var/log". I really don't know how to reference those directories using make variables, could not find any. If I'm wrong please correct me and I'll modify the port accrdingly. WARN: Makefile: possible use of absolute pathname "/DEST_CLASSES/r". This is part of a sed command line and so is a bogus warning. Also, I did file another PR (ports/157326) which adds another optional vendor patch. The patch in that PR performs some manipualtions on the DISTFILES variable depending on OPTIONS. I now see this was incorrect and have just modified the port to unconditionally download the patches and just apply them depending on options. > > Berkeley DB upgrade instructions are at > http://download.oracle.com/docs/cd/E17076_02/html/upgrading/index.html > > Please check with the upstream maintainer of a db4- or db5-capable > version or patches of/for squidGuard already exist, or contribute them > back. > > If you cannot work with particular newer versions, use INVALID* > variables as in /usr/ports/Mk/bsd.database.mk. > > Thank you. As said before I just noticed this and fixed that special case with BDB 4.0.x. I'm attaching here a patch which combines the ones in ports/157326, ports/157340 and the additional fixes I talked about above. Thanks! -- Guido Falsi <mad@madpilot.net> --0OAP2g/MAC+5xKAE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sg.diff" diff -ruN squidguard.old/Makefile squidguard/Makefile --- squidguard.old/Makefile 2011-05-26 12:32:07.844713066 +0200 +++ squidguard/Makefile 2011-05-26 12:41:01.843234919 +0200 @@ -9,16 +9,21 @@ PORTVERSION= 1.4 PORTREVISION= 3 CATEGORIES= www -MASTER_SITES= http://www.squidguard.org/Downloads/ +MASTER_SITES= http://www.squidguard.org/Downloads/ \ + http://www.squidguard.org/Downloads/Contrib/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + squidGuard-1.4-quoted_string_support.diff \ + squidGuard-1.4-dnsbl.patch +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= mad@madpilot.net COMMENT= A fast redirector for squid +RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid + LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid - USE_BDB= 40+ HAS_CONFIGURE= yes CONFIGURE_ARGS= --with-db-inc=${BDB_INCLUDE_DIR} \ @@ -28,9 +33,12 @@ --with-sg-logdir=${LOGDIR} \ --exec-prefix=${PREFIX} -CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${PREFIX}/include" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" +CFLAGS+= "-I${PREFIX}/include" +LDFLAGS+= "-L${LOCALBASE}/lib" + +CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" -CFGINPUT= ${.CURDIR}/files/sgcfg.in +CFGINPUT= ${FILESDIR}/sgcfg.in SQUID_UID?= squid SQUID_GID?= squid @@ -48,16 +56,11 @@ OPTIONS= SAMPLE_BL "Install sample blacklists" On \ LDAP "Enable LDAP support" Off \ + DNS_BL "Enable DNS based blacklists" Off \ QUOTE_STRING "Add quoted string patch" Off .include <bsd.port.pre.mk> -.if defined(WITH_QUOTE_STRING) -PATCH_SITES= http://www.squidguard.org/Downloads/ -PATCHFILES= Contrib/squidGuard-1.4-quoted_string_support.diff -PATCH_DIST_STRIP=-p2 -.endif - .if defined(WITH_LDAP) CONFIGURE_ARGS+= --with-ldap USE_OPENLDAP= yes @@ -91,6 +94,12 @@ ${REINPLACE_CMD} -E -e 's,(db_version),\1_4002,g' \ ${WRKSRC}/configure ; \ fi +.if defined(WITH_QUOTE_STRING) + ${PATCH} -d ${WRKSRC} --forward --quiet -p2 <${DISTDIR}/squidGuard-1.4-quoted_string_support.diff +.endif +.if defined(WITH_DNS_BL) + ${PATCH} -d ${WRKSRC} --forward --quiet -p1 <${DISTDIR}/squidGuard-1.4-dnsbl.patch +.endif post-build: .if !defined(WITHOUT_SAMPLE_BL) diff -ruN squidguard.old/distinfo squidguard/distinfo --- squidguard.old/distinfo 2011-05-26 12:32:07.844713066 +0200 +++ squidguard/distinfo 2011-05-26 12:41:01.843234919 +0200 @@ -1,4 +1,6 @@ SHA256 (squidGuard-1.4.tar.gz) = 0711ce60b8e2bbba107b980fed446a88df35e1584b39f079c0cae54a172c5141 SIZE (squidGuard-1.4.tar.gz) = 1968492 -SHA256 (Contrib/squidGuard-1.4-quoted_string_support.diff) = 510c2ac13e7211d019c4ab7233bedf6db3d715ebd9e35e7e3f66267cc37b5ec5 -SIZE (Contrib/squidGuard-1.4-quoted_string_support.diff) = 13593 +SHA256 (squidGuard-1.4-quoted_string_support.diff) = 510c2ac13e7211d019c4ab7233bedf6db3d715ebd9e35e7e3f66267cc37b5ec5 +SIZE (squidGuard-1.4-quoted_string_support.diff) = 13593 +SHA256 (squidGuard-1.4-dnsbl.patch) = e1e656573cf3525e69d38db67945c34fbe8b13aa46c3bff0cd946b41be8aec44 +SIZE (squidGuard-1.4-dnsbl.patch) = 9481 diff -ruN squidguard.old/files/patch-src_sgDB.c squidguard/files/patch-src_sgDB.c --- squidguard.old/files/patch-src_sgDB.c 2011-05-26 12:32:07.843713222 +0200 +++ squidguard/files/patch-src_sgDB.c 2011-05-26 12:41:01.843234919 +0200 @@ -1,27 +1,27 @@ ---- src/sgDb.c.orig Mon May 14 08:40:12 2001 -+++ src/sgDb.c Thu Dec 29 23:31:32 2005 -@@ -97,14 +97,20 @@ +--- src/sgDb.c.orig 2008-07-14 20:29:41.000000000 +0200 ++++ src/sgDb.c 2011-05-26 11:04:22.106201692 +0200 +@@ -119,14 +119,20 @@ flag = DB_CREATE; if(createdb) flag = flag | DB_TRUNCATE; -- if ((ret = -- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { +- if ((ret = +- Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { + if ((ret = Db->dbp->open(Db->dbp, -+#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41 -+ NULL, ++#if DB_VERSION_MINOR >= 1 ++ NULL, +#endif -+ dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++ dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { (void) Db->dbp->close(Db->dbp, 0); sgLogFatalError("Error db_open: %s", strerror(ret)); } } else { -- if ((ret = -- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { +- if ((ret = +- Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { + if ((ret = Db->dbp->open(Db->dbp, -+#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41 -+ NULL, ++#if DB_VERSION_MINOR >= 1 ++ NULL, +#endif -+ dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++ dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { sgLogFatalError("Error db_open: %s", strerror(ret)); } } --0OAP2g/MAC+5xKAE--
Responsible Changed From-To: gnats-admin->mandree I'll take it.
mandree 2011-05-26 11:59:53 UTC FreeBSD ports repository Modified files: www/squidguard/files patch-src_sgDB.c Log: Fix to build with db4.0. Needs revision before db60. Submitted by: Guido Falsi (maintainer) PR: ports/157340 PR: ports/157343 (partially) Reported by: pointyhat Revision Changes Path 1.2 +13 -13 ports/www/squidguard/files/patch-src_sgDB.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, with minor changes. Thanks!
mandree 2011-05-26 12:22:56 UTC FreeBSD ports repository Modified files: www/squidguard Makefile distinfo Log: - Add optional vendor patch which adds support for dnsbl. [1] - Pick assorted portlints [2], [3] - Add -I${LOCALBASE}/include to fix WITH_LDAP build [3] - MKDIR configuration directory to fix install from scratch [3] - DISTFILE/MASTER_SITE matching [3] - Bump PORTREVISION [3] Suggested by: Davide D'Amico <davide.damico@gmail.com> (with patch) [1] Submitted by: Guido Falsi (maintainer) [2] Suggested by: mandree [3] PR: ports/157326 [1], [2] PR: ports/157338 [3] PR: ports/157343 [2] Revision Changes Path 1.32 +23 -14 ports/www/squidguard/Makefile 1.8 +4 -2 ports/www/squidguard/distinfo _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"