Skip site navigation (1)Skip section navigation (2)
Date:      30 May 2010 15:31:12 -0000
From:      Thomas-Martin Seck <tmseck@web.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/147219: [Maintainer] www/squid31: correct two configuration tests
Message-ID:  <20100530153112.22608.qmail@wcfields.tmseck.homedns.org>
Resent-Message-ID: <201005301540.o4UFe6I2095873@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         147219
>Category:       ports
>Synopsis:       [Maintainer] www/squid31: correct two configuration tests
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 30 15:40:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Thomas-Martin Seck
>Release:        FreeBSD 8.0-RELEASE amd64
>Organization:
a private site in Germany
>Environment:
FreeBSD ports collection as of May 30, 2010.

	
>Description:
Squid 3.1 uses g++ to compile the configuration test programs. This
causes two tests (for setresuid(2) and strnstr(3)) to fail due to
g++ complaining about programming errors within the tests itself.
These tests do work on earlier versions of Squid where gcc is used
to compile them.

Add a patch to correct these issues and bump PORTREVISION.

Thanks to Anton Kaukin for informing the maintainer about the problem and
providing a patch.

Added file:

files/patch-configure
	
>How-To-Repeat:

Run 'make configure' and look for the output of the setresuid and strnstr
tests in WRKSRC/config.log.
	
>Fix:
Apply this patch:

Index: Makefile
===================================================================
--- Makefile	(.../www/squid31)	(Revision 1837)
+++ Makefile	(.../local/squid31)	(Revision 1837)
@@ -53,6 +53,7 @@
 
 PORTNAME=	squid
 PORTVERSION=	3.1.${SQUID_STABLE_VER}
+PORTREVISION=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
 		http://mirrors.ccs.neu.edu/Squid/ \
@@ -74,6 +75,7 @@
 DISTNAME=	squid-3.1.${SQUID_STABLE_VER}
 DIST_SUBDIR=	squid3.1
 
+PATCHFILES=
 PATCH_SITES=	http://www.squid-cache.org/%SUBDIR%/ \
 		http://www2.us.squid-cache.org/%SUBDIR%/ \
 		http://www1.at.squid-cache.org/%SUBDIR%/ \
@@ -83,7 +85,6 @@
 		http://www1.jp.squid-cache.org/%SUBDIR%/ \
 		http://www2.tw.squid-cache.org/%SUBDIR%/
 PATCH_SITE_SUBDIR=	Versions/v3/3.1/changesets
-PATCHFILES=
 
 MAINTAINER=	tmseck@web.de
 COMMENT=	HTTP Caching Proxy
Index: files/patch-configure
===================================================================
--- files/patch-configure	(.../www/squid31)	(Revision 0)
+++ files/patch-configure	(.../local/squid31)	(Revision 1837)
@@ -0,0 +1,23 @@
+Correct two configure tests that fail whenn g++ is used instead of gcc.
+--- configure.orig	2010-05-30 16:00:03.000000000 +0200
++++ configure	2010-05-30 16:00:33.000000000 +0200
+@@ -48547,7 +48547,10 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ 
++#include <sys/types.h> /* for setresuid(2) on FreeBSD */
++#include <stdio.h> /* for perror(3) on FreeBSD */
+ #include <stdlib.h>
++#include <unistd.h> /* for setresuid(2) on FreeBSD */
+   int main(int argc, char **argv) {
+     if(setresuid(-1,-1,-1)) {
+       perror("setresuid:");
+@@ -48632,7 +48635,7 @@
+ int main(int argc, char **argv)
+ {
+     int size = 20;
+-    char *str = malloc(size);
++    char *str = (char *)malloc(size);
+     memset(str, 'x', size);
+     strnstr(str, "fubar", size);
+     return 0;
	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100530153112.22608.qmail>