ports/66142: [Maintainer] www/squid24: sync with www/squid
Thomas-Martin Seck
tmseck at netcologne.de
Sat May 1 10:30:22 UTC 2004
>Number: 66142
>Category: ports
>Synopsis: [Maintainer] www/squid24: sync with www/squid
>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: Sat May 01 03:30:21 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 May 1st, 2004.
>Description:
Infrastructural synchronization with www/squid and misc fixes:
- fix CONFLICTS glob
- reinstate LATEST_LINK and name it squid24
- correct CFLAGS/LDFLAGS handling
- remove SQUID_SSL, it does no longer compile
- prefer /bin/sh's features over external programs
- reduce the number of variables in pkg-{de,}install
- no longer hardcode the path to nologin(8)
- inform about squid.sh's rcNG-ness when /etc/rc.subr is present
at installation time
- other miscellaneous fixes
- schedule removal for the 31st October 2004
- bump PORTREVISION
>How-To-Repeat:
>Fix:
Apply this patch:
Index: files/squid.sh
===================================================================
--- files/squid.sh (.../branches/freebsd) (revision 50)
+++ files/squid.sh (.../trunk) (revision 50)
@@ -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 (.../branches/freebsd) (revision 50)
+++ pkg-install (.../trunk) (revision 50)
@@ -7,8 +7,13 @@
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}
+if [ -x /usr/sbin/nologin ]; then
+ nologin=/usr/sbin/nologin
+else
+ nologin=/sbin/nologin
+fi
+: ${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
@@ -42,9 +47,11 @@
if ! pw usershow ${squid_user} -q >/dev/null ; then
echo "There is no account '${squid_user}' on this system, so I will try to create it:"
- if ! pw useradd ${squid_user} -u ${squid_uid} -q \
- -c "squid caching-proxy pseudo user" -g ${squid_group} \
- -d "${squid_base}" -s "/sbin/nologin" -h - ; then
+ if ! pw useradd -q -n ${squid_user} \
+ -u ${squid_uid} -g ${squid_group} \
+ -c "squid caching-proxy pseudo user" \
+ -d "${squid_base}" -s "${nologin}" \
+ -h - ; then
echo "Failed to create user '${squid_user}'!" >&2
echo "Please create it manually." >&2
exit 1
@@ -148,6 +155,15 @@
echo " Please check your squid.conf and update it if necessary."
tput me
echo ""
+ if [ -f /etc/rc.subr ]; then
+ echo " Please note that ${PKG_PREFIX}/etc/rc.d/squid.sh"
+ echo " will not start squid automatically on this system."
+ echo " You need to set squid_enable=yes in either"
+ echo " /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid"
+ echo " See ${PKG_PREFIX}/etc/rc.d/squid.sh for more"
+ echo " configuration options."
+ echo ""
+ fi
;;
*)
exit 64
Index: Makefile
===================================================================
--- Makefile (.../branches/freebsd) (revision 50)
+++ Makefile (.../trunk) (revision 50)
@@ -7,7 +7,7 @@
# Tunables not (yet) configurable via 'make config':
# SQUID_{U,G}ID
# Which user/group squid should run as (default: squid/squid).
-# The user and group will be created if they do not already exist with
+# The user and group will be created if they do not already exist using
# a uid:gid of 100:100.
# NOTE: before version 2.4.7_11, these settings defaulted to
# nobody/nogroup.
@@ -33,7 +33,7 @@
PORTNAME= squid
PORTVERSION= 2.4
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= www
MASTER_SITES= \
ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
@@ -54,17 +54,17 @@
MAINTAINER= tmseck at netcologne.de
COMMENT= The successful WWW proxy cache and accelerator
-CONFLICTS= squid-2.[^4]
+CONFLICTS= squid-2.[^4]*
GNU_CONFIGURE= yes
-STRIP= # won't install scripts correctly otherwise.
+STRIP= # we need to strip the binaries manually
MAKEFILE= makefile
USE_PERL5= yes
USE_REINPLACE= yes
-NO_LATEST_LINK= yes
+LATEST_LINK= squid24
DEPRECATED= This version of squid-2 is no longer officially supported
-EXPIRATION_DATE= when the next release of squid-2 is out
+EXPIRATION_DATE= on the 31st October 2004
SQUID_UID?= squid
SQUID_GID?= squid
@@ -80,7 +80,6 @@
SQUID_DELAY_POOLS "Enable delay pools" off \
SQUID_SNMP "Enable SNMP support" off \
SQUID_CARP "Enable CARP support" off \
- SQUID_SSL "Enable SSL support for reverse proxies" off \
SQUID_PINGER "Install the icmp helper" off \
SQUID_DNS_HELPER "Use the old 'dnsserver' helper" off \
SQUID_HTCP "Enable HTCP support" off \
@@ -107,8 +106,8 @@
auth_modules= MSNT NCSA PAM SMB YP getpwnam
.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
auth_modules+= LDAP
libexec+= squid_ldap_auth
.endif
@@ -126,9 +125,6 @@
.if defined(WITH_SQUID_CARP)
CONFIGURE_ARGS+= --enable-carp
.endif
-.if defined(WITH_SQUID_SSL)
-CONFIGURE_ARGS+= --enable-ssl
-.endif
.if defined(WITH_SQUID_PINGER)
CONFIGURE_ARGS+= --enable-icmp
libexec+= pinger
@@ -149,7 +145,7 @@
.if defined(WITHOUT_SQUID_WCCP)
CONFIGURE_ARGS+= --disable-wccp
.endif
-.if defined(WITH_SQUID_UNDERSCORES)
+.if !defined(WITHOUT_SQUID_UNDERSCORES)
CONFIGURE_ARGS+= --enable-underscores
.endif
.if defined(WITH_SQUID_STRICT_HTTP)
@@ -171,7 +167,6 @@
PLIST_FILES+= ${libexec:S/^/libexec\/squid\//} ${sbin:S/^/sbin\//}
# Other not so common configure options you can set via SQUID_CONFIGURE_ARGS:
-#
# Please see the configure script in the squid source distribution for a
# complete list.
#
@@ -193,11 +188,25 @@
# Optimize time updates to one per second rather than calling gettimeofday()
# --enable-cachemgr-hostname=some.hostname
# Set an explicit hostname in cachemgr.cgi
+# --enable-truncate
+# Use truncate() rather than unlink()
+#
+# This option does not yet work on FreeBSD:
+#
# --enable-ipf-transparent
# Enable Transparent Proxy support for IP-Filter systems (incl 3.0)
-# --enable-truncate
-# Use truncate() rather than unlink()
+# (IPFilter headers are not currently installed to the base system,
+# PRs ports/60700 and misc/44148 describe the problem; see
+# http://www.squid-cache.org/Doc/FAQ/FAQ-17.html for information
+# about how to do transparent proxying with ipfw)
+#
+# --enable-ssl
+# This does not build anymore with recent OpenSSL versions
+CONFIGURE_ARGS+= ${SQUID_CONFIGURE_ARGS}
+
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
@@ -206,12 +215,15 @@
-e 's|%%SQUID_GID%%|${SQUID_GID}|g' ${WRKSRC}/src/cf.data.pre
pre-install:
+# Prevent installation of .orig files by deleting them.
+ @${FIND} ${WRKSRC} -name '*.bak' -delete
+ @${FIND} ${WRKSRC} -name '*.orig' -delete
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%SQUID_UID%%|${SQUID_UID}|g' ${FILESDIR}/squid.sh \
>${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:
@@ -220,14 +232,15 @@
${CHMOD} 4510 ${PREFIX}/libexec/squid/pinger
${CHGRP} ${SQUID_GID} ${PREFIX}/libexec/squid/pinger
.endif
- ${INSTALL_SCRIPT} ${WRKDIR}/squid.sh ${PREFIX}/etc/rc.d/squid.sh
+ ${INSTALL_SCRIPT} ${WRKDIR}/squid.sh ${PREFIX}/etc/rc.d
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${docs} ${DOCSDIR}
.endif
-cd ${PREFIX}/libexec/squid && ${STRIP_CMD} ${libexec}
-cd ${PREFIX}/sbin && ${STRIP_CMD} ${sbin}
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
changeuser:
# Recover from the problem that earlier versions of this port created the
@@ -241,12 +254,12 @@
${ECHO_CMD} "this target!"
exit 1
.endif
- @if [ `id -u` -ne 0 ]; \
+ @if [ `${ID} -u` -ne 0 ]; \
then ${ECHO_CMD} "Sorry, you must be root to use this target."; exit 1; fi; \
current_uid=`id -u ${SQUID_UID}`; \
current_gid=`pw groupshow ${SQUID_GID}|cut -f 3 -d :`; \
${ECHO_CMD} "I will remove this user:"; \
- id -P $${current_uid}; \
+ ${ID} -P $${current_uid}; \
${ECHO_CMD} "and this group:"; \
pw groupshow ${SQUID_GID}; \
${ECHO_CMD} "I will then re-create them with a user and group id of 100."; \
Index: pkg-deinstall
===================================================================
--- pkg-deinstall (.../branches/freebsd) (revision 50)
+++ pkg-deinstall (.../trunk) (revision 50)
@@ -4,7 +4,6 @@
#
PATH=/bin:/usr/bin:/usr/sbin
-pkgname=$1
case $2 in
DEINSTALL)
@@ -16,10 +15,11 @@
POST-DEINSTALL)
rmdir ${PKG_PREFIX}/etc/squid 2>/dev/null
rmdir ${PKG_PREFIX}/squid/cache 2>/dev/null
- rmdir -p ${PKG_PREFIX}/squid/logs 2>/dev/null
- echo "===> post-deinstallation information for ${pkgname}"
+ rmdir ${PKG_PREFIX}/squid/logs 2>/dev/null
+ rmdir ${PKG_PREFIX}/squid 2>/dev/null
+ echo "===> post-deinstallation information for $1"
echo ""
- echo " Please note that ${pkgname} was not completely removed"
+ echo " Please note that $1 was not completely removed"
echo " from this system."
echo ""
echo " The cache and log directories, squid's user account,"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list