ports/65356: [Maintainer] www/squid: new vendor patches, some cleanup
Thomas-Martin Seck
tmseck at netcologne.de
Fri Apr 9 12:40:20 UTC 2004
>Number: 65356
>Category: ports
>Synopsis: [Maintainer] www/squid: new vendor patches, some cleanup
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 09 05:40:19 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Thomas-Martin Seck
>Release: FreeBSD 4.9-STABLE i386
>Organization:
a private site in Germany
>Environment:
FreeBSD ports repository as of March 9, 2004.
>Description:
- Integrate two new vendor patches, please see
<http://www.squid-cache.org/Versions/v2/2.5/bugs/> for details
- Correct OpenSSL support and, while at it, clean up CFLAGS and LDFLAGS
handling (thanks to dinoex for lots of helpful advice!).
- better be safe than sorry and pass PTHREAD_CFLAGS through in case
we are compiling with threads
- try to remove the errorpages directory silently since user defined
directories might legitimately be present
- clean up shell scripting:
+ do not use too many variables
+ use /bin/sh's features instead of external commands
>How-To-Repeat:
>Fix:
Apply this patch:
Index: distinfo
===================================================================
--- distinfo (revision 1)
+++ distinfo (working copy)
@@ -12,3 +12,7 @@
SIZE (squid2.5/squid-2.5.STABLE5-deny_info.patch) = 1282
MD5 (squid2.5/squid-2.5.STABLE5-CONNECT_timeout.patch) = b6aa700c75a061dc9658d8dc198a9183
SIZE (squid2.5/squid-2.5.STABLE5-CONNECT_timeout.patch) = 2531
+MD5 (squid2.5/squid-2.5.STABLE5-cache_swap_log.patch) = 8009bc493487a98b5f3deb01add66734
+SIZE (squid2.5/squid-2.5.STABLE5-cache_swap_log.patch) = 1245
+MD5 (squid2.5/squid-2.5.STABLE5-ntlm_warning.patch) = 57ec2b3e27dcff757412d6d0a6d3c778
+SIZE (squid2.5/squid-2.5.STABLE5-ntlm_warning.patch) = 900
Index: files/squid.sh
===================================================================
--- files/squid.sh (revision 1)
+++ files/squid.sh (working copy)
@@ -61,7 +61,7 @@
fi
;;
*)
- echo "usage: `basename $0` {start|stop}" >&2
+ echo "usage: ${0##*/} {start|stop}" >&2
exit 64
;;
esac
Index: pkg-install
===================================================================
--- pkg-install (revision 1)
+++ pkg-install (working copy)
@@ -7,8 +7,8 @@
pkgname=$1
squid_base=${PKG_PREFIX:-/usr/local}/squid
squid_confdir=${PKG_PREFIX:-/usr/local}/etc/squid
-squid_user=${SQUID_USER:=squid}
-squid_group=${SQUID_GROUP:=squid}
+: ${squid_user:=squid}
+: ${squid_group:=squid}
squid_gid=100
squid_uid=100
# Try to catch the case where the $squid_user might have been created with an
Index: Makefile
===================================================================
--- Makefile (revision 1)
+++ Makefile (working copy)
@@ -29,7 +29,7 @@
PORTNAME= squid
PORTVERSION= 2.5.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= \
ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
@@ -47,7 +47,9 @@
squid-2.5.STABLE5-helper_warning.patch \
squid-2.5.STABLE5-vary.patch \
squid-2.5.STABLE5-deny_info.patch \
- squid-2.5.STABLE5-CONNECT_timeout.patch
+ squid-2.5.STABLE5-CONNECT_timeout.patch \
+ squid-2.5.STABLE5-cache_swap_log.patch \
+ squid-2.5.STABLE5-ntlm_warning.patch
PATCH_DIST_STRIP= -p1
MAINTAINER= tmseck at netcologne.de
@@ -110,8 +112,8 @@
MAN8+= pam_auth.8 squid_unix_group.8
.if defined(WITH_SQUID_LDAP_AUTH)
USE_OPENLDAP= yes
-CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
MAN8+= squid_ldap_auth.8 squid_ldap_group.8
basic_auth+= LDAP
external_acl+= ldap_group
@@ -128,7 +130,9 @@
.if defined(WITH_SQUID_AUFS)
store_types+= aufs
# Nil aufs threads is default, set any other value via SQUID_CONFIGURE_ARGS
-CONFIGURE_ARGS+= --enable-async-io --with-pthreads
+CONFIGURE_ARGS+= --enable-async-io \
+ --with-pthreads
+CFLAGS+= ${PTHREAD_CFLAGS}
.endif
.if defined(WITH_SQUID_COSS)
store_types+= coss
@@ -148,7 +152,14 @@
CONFIGURE_ARGS+= --enable-carp
.endif
.if defined(WITH_SQUID_SSL)
-CONFIGURE_ARGS+= --enable-ssl
+# we need to .include bsd.openssl.mk manually here because USE_OPENSSL only
+# works when it is defined before bsd.port{.pre}.mk is .included and this is
+# not possible when using OPTIONS
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CONFIGURE_ARGS+= --enable-ssl \
+ --with-openssl="${OPENSSLBASE}"
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -I${LOCALBASE}/lib
.endif
.if defined(WITH_SQUID_PINGER)
CONFIGURE_ARGS+= --enable-icmp
@@ -189,8 +200,8 @@
.if defined(WITH_SQUID_PF)
.if ${OSVERSION} >= 502106
# This will work only systems where PF is part of the base system for now.
-# If someone is eager to teach autoconf to pick up the pf port
-# on 5.[0-2] systems instead, go on, I will integrate your patch.
+# If someone is eager to teach squid's configure script how to pick up the pf
+# port on 5.[0-2] systems instead, go on, I will integrate your patch.
CONFIGURE_ARGS+= --enable-pf-transparent
.else
IGNORE= WITH_SQUID_PF only works on systems where pf is part of the base system.
@@ -253,6 +264,9 @@
CONFIGURE_ARGS+= ${SQUID_CONFIGURE_ARGS}
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/doc/squid.8
@@ -270,7 +284,7 @@
>${WRKDIR}/squid.sh
pre-su-install:
- @${SETENV} SQUID_USER=${SQUID_UID} SQUID_GROUP=${SQUID_GID} \
+ @${SETENV} squid_user=${SQUID_UID} squid_group=${SQUID_GID} \
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@@ -297,7 +311,8 @@
>>${TMPPLIST}
@${ECHO_CMD} "@dirrm etc/squid/errors/${d}" >>${TMPPLIST}
.endfor
- @${ECHO_CMD} "@dirrm etc/squid/errors" >>${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir etc/squid/errors 2>/dev/null || true" \
+ >>${TMPPLIST}
changeuser:
# Recover from the problem that earlier versions of this port created the
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list