| Summary: | [PATCH] www/squid: major overhaul and update | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Thomas-Martin Seck <tmseck> | ||||
| Component: | Individual Port(s) | Assignee: | Adrian Chadd <adrian> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-ports-bugs->adrian Over to maintainer Update to the latest set of patches from squid-cache.org as of
11/21/2003.
Bugfixes:
Check for errors when creating SQUID_{USER,GROUP}
Use SU_CMD to run the pre-install script; it needs root privs
Cleanup .orig files in the "errors" directory; they will get installed
otherwise
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/Makefile,v
retrieving revision 1.5
retrieving revision 1.7
diff -u -r1.5 -r1.7
--- Makefile 9 Nov 2003 18:38:52 -0000 1.5
+++ Makefile 21 Nov 2003 19:16:16 -0000 1.7
@@ -47,7 +47,9 @@
squid-2.5.STABLE4_auth_param_doc.patch \
squid-2.5.STABLE4-error_load_text.patch \
squid-2.5.STABLE4-xpi_mime.patch \
- squid-2.5.STABLE4-size_overflow.patch
+ squid-2.5.STABLE4-size_overflow.patch \
+ squid-2.5.STABLE4-extacl_auth_loop.patch \
+ squid-2.5.STABLE4-squid_ldap_group.patch
PATCH_DIST_STRIP= -p1
WRKSRC= ${WRKDIR}/${PORTNAME}-2.5.STABLE4
@@ -195,6 +197,7 @@
.if !defined(NOPORTDOCS)
@cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} <${FILESDIR}/FAQ.html.patch
.endif
+ @find ${WRKSRC}/errors -type f -name '*.orig' -delete
pre-configure:
.if defined(PACKAGE_BUILDING) || defined(BATCH)
@@ -221,7 +224,7 @@
pre-install:
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' -e 's|%%SQUID_UID%%|${SQUID_UID}|g' ${FILESDIR}/squid.sh.sample >${WRKSRC}/squid.sh.sample
@env SQUID_UID=${SQUID_UID} SQUID_GID=${SQUID_GID} \
- PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ PKG_PREFIX=${PREFIX} ${SU_CMD} "${PKGINSTALL} ${PKGNAME} PRE-INSTALL"
post-install:
.ifdef WITH_SQUID_PINGER
Index: distinfo
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/distinfo,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- distinfo 9 Nov 2003 16:48:19 -0000 1.1.1.2
+++ distinfo 21 Nov 2003 19:16:16 -0000 1.2
@@ -8,4 +8,6 @@
MD5 (squid2.5/squid-2.5.STABLE4-error_load_text.patch) = 3935a3005d125f55cd78b228eba20647
MD5 (squid2.5/squid-2.5.STABLE4-xpi_mime.patch) = 1143fb9244690a24450c3c9ce6105da4
MD5 (squid2.5/squid-2.5.STABLE4-size_overflow.patch) = 7cd2d6b1ebbd86aa143fa5a57156d6ce
+MD5 (squid2.5/squid-2.5.STABLE4-extacl_auth_loop.patch) = de06bbc89f5408b7ab83733d894d4fe7
+MD5 (squid2.5/squid-2.5.STABLE4-squid_ldap_group.patch) = c3af2e0c4958897abf7c821e9b8cdb8a
MD5 (squid2.5/FAQ.tar.gz) = IGNORE
Index: pkg-install
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/pkg-install,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- pkg-install 9 Nov 2003 16:48:20 -0000 1.1.1.2
+++ pkg-install 14 Nov 2003 19:55:57 -0000 1.2
@@ -16,15 +16,23 @@
# XXX: Check whether pw really exists (pre 2.2.8 Systems)?
if ! pw groupshow ${squid_group} >/dev/null 2>&1; then
echo "There is no group \"${squid_group}\" on this system, so I will try to create one:"
- pw groupadd ${squid_group}
+ if ! pw groupadd ${squid_group} ; then
+ echo "Failed to create group ${squid_group}!" >&2
+ exit 1
+ else
+ echo "Group ${squid_group} created successfully"
+ fi
else
echo "I will use the existing group \"${squid_group}\"."
fi
if ! pw usershow ${squid_user} >/dev/null 2>&1; then
echo "There is no account \"${squid_user}\" on this system, so I will try to create it:"
- pw useradd ${squid_user} -c "squid caching-proxy pseudo user" -g ${squid_group} -d "${squid_base}" -s "/sbin/nologin" -h -
- echo "Success! The \"${squid_user}\" account has been created with the following settings:"
- pw usershow ${squid_user}
+ if ! pw useradd ${squid_user} -c "squid caching-proxy pseudo user" -g ${squid_group} -d "${squid_base}" -s "/sbin/nologin" -h - ; then
+ echo "Failed to create user ${squid_user}!" >&2
+ else
+ echo "Success! The \"${squid_user}\" account has been created with the following settings:"
+ pw usershow ${squid_user}
+ fi
else
echo "I will use the existing account \"${squid_user}\"."
tput md
Integrate the latest patches from squid-cache.org as of 12/19/2003.
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile 21 Nov 2003 19:16:16 -0000 1.7
+++ Makefile 18 Dec 2003 08:01:34 -0000
@@ -49,7 +49,22 @@
squid-2.5.STABLE4-xpi_mime.patch \
squid-2.5.STABLE4-size_overflow.patch \
squid-2.5.STABLE4-extacl_auth_loop.patch \
- squid-2.5.STABLE4-squid_ldap_group.patch
+ squid-2.5.STABLE4-squid_ldap_group.patch \
+ squid-2.5.STABLE4-positive_dns_ttl.patch \
+ squid-2.5.STABLE4-gopherhtml.patch \
+ squid-2.5.STABLE4-netroute.patch \
+ squid-2.5.STABLE4-synflood.patch \
+ squid-2.5.STABLE4-fqdn.patch \
+ squid-2.5.STABLE4-connect_cleanup.patch \
+ squid-2.5.STABLE4-pconn_post.patch \
+ squid-2.5.STABLE4-ftp_put.patch \
+ squid-2.5.STABLE4-pconn-load.patch \
+ squid-2.5.STABLE4-icon_urls.patch \
+ squid-2.5.STABLE4-redirector_access.patch \
+ squid-2.5.STABLE4-pconn-lifo.patch \
+ squid-2.5.STABLE4-cache_peer_maxconn.patch \
+ squid-2.5.STABLE4-pid_filename_none.patch \
+ squid-2.5.STABLE4-dns_namelength.patch
PATCH_DIST_STRIP= -p1
WRKSRC= ${WRKDIR}/${PORTNAME}-2.5.STABLE4
Index: distinfo
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 21 Nov 2003 19:16:16 -0000 1.2
+++ distinfo 18 Dec 2003 08:02:04 -0000
@@ -10,4 +10,19 @@
MD5 (squid2.5/squid-2.5.STABLE4-size_overflow.patch) = 7cd2d6b1ebbd86aa143fa5a57156d6ce
MD5 (squid2.5/squid-2.5.STABLE4-extacl_auth_loop.patch) = de06bbc89f5408b7ab83733d894d4fe7
MD5 (squid2.5/squid-2.5.STABLE4-squid_ldap_group.patch) = c3af2e0c4958897abf7c821e9b8cdb8a
+MD5 (squid2.5/squid-2.5.STABLE4-positive_dns_ttl.patch) = 7fca4475d86acc7db242c261b08751d7
+MD5 (squid2.5/squid-2.5.STABLE4-gopherhtml.patch) = 2c6c50a4a8f4d0d0017ab7c15bacfe26
+MD5 (squid2.5/squid-2.5.STABLE4-netroute.patch) = f83e66712f37f34a04571b31be6c2db8
+MD5 (squid2.5/squid-2.5.STABLE4-synflood.patch) = b92e7a56e87374ebf2eb50e044f07f6d
+MD5 (squid2.5/squid-2.5.STABLE4-fqdn.patch) = dbf2c020e3c3c52ae540d96a724fac87
+MD5 (squid2.5/squid-2.5.STABLE4-connect_cleanup.patch) = ee0398f51a22ab2c82048c8935d6d11c
+MD5 (squid2.5/squid-2.5.STABLE4-pconn_post.patch) = 4a5b7ab04fe8b73906db441448534bbb
+MD5 (squid2.5/squid-2.5.STABLE4-ftp_put.patch) = d3b69c8e79c96c13005d6dbeb72e5c76
+MD5 (squid2.5/squid-2.5.STABLE4-pconn-load.patch) = a432f9eff9e0963b7338e41a91230d95
+MD5 (squid2.5/squid-2.5.STABLE4-icon_urls.patch) = cf28143216b1364e56e820dddbb66dfc
+MD5 (squid2.5/squid-2.5.STABLE4-redirector_access.patch) = 9c534a3d58fe0e3545cd4ed9af92a0e8
+MD5 (squid2.5/squid-2.5.STABLE4-pconn-lifo.patch) = f41051c248764749d9d9ca5704925da7
+MD5 (squid2.5/squid-2.5.STABLE4-cache_peer_maxconn.patch) = fe187067007693348589fab26bdc36a7
+MD5 (squid2.5/squid-2.5.STABLE4-pid_filename_none.patch) = 808bafa144b22c3cf6900759b30f39e6
+MD5 (squid2.5/squid-2.5.STABLE4-dns_namelength.patch) = 290da300d02124be3971282d5b0a799d
MD5 (squid2.5/FAQ.tar.gz) = IGNORE
Update to the latest patches from squid-cache.org as of 12/24/2003.
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile 18 Dec 2003 08:38:47 -0000 1.8
+++ Makefile 24 Dec 2003 18:00:31 -0000
@@ -64,7 +64,12 @@
squid-2.5.STABLE4-pconn-lifo.patch \
squid-2.5.STABLE4-cache_peer_maxconn.patch \
squid-2.5.STABLE4-pid_filename_none.patch \
- squid-2.5.STABLE4-dns_namelength.patch
+ squid-2.5.STABLE4-dns_namelength.patch \
+ squid-2.5.STABLE4-urllogin_acl.patch \
+ squid-2.5.STABLE4-russian.patch \
+ squid-2.5.STABLE4-redirlog.patch \
+ squid-2.5.STABLE4-pinger.patch \
+ squid-2.5.STABLE4-partial_reload.patch
PATCH_DIST_STRIP= -p1
WRKSRC= ${WRKDIR}/${PORTNAME}-2.5.STABLE4
Index: distinfo
===================================================================
RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo 18 Dec 2003 08:38:47 -0000 1.3
+++ distinfo 24 Dec 2003 17:59:59 -0000
@@ -25,4 +25,9 @@
MD5 (squid2.5/squid-2.5.STABLE4-cache_peer_maxconn.patch) = fe187067007693348589fab26bdc36a7
MD5 (squid2.5/squid-2.5.STABLE4-pid_filename_none.patch) = 808bafa144b22c3cf6900759b30f39e6
MD5 (squid2.5/squid-2.5.STABLE4-dns_namelength.patch) = 290da300d02124be3971282d5b0a799d
+MD5 (squid2.5/squid-2.5.STABLE4-urllogin_acl.patch) = 5ad09d7d4bf105e699cfeb647a4836a3
+MD5 (squid2.5/squid-2.5.STABLE4-russian.patch) = 5a4357bd56134fc6578c435314c1a835
+MD5 (squid2.5/squid-2.5.STABLE4-redirlog.patch) = 8a2cc15f2bde6fa263a9e40aae807f82
+MD5 (squid2.5/squid-2.5.STABLE4-pinger.patch) = 0902849d051873aaf5f54584d0536bb5
+MD5 (squid2.5/squid-2.5.STABLE4-partial_reload.patch) = 6d8fa663f46ffc2272b7d18a0b6eea34
MD5 (squid2.5/FAQ.tar.gz) = IGNORE
Correct two MD5 checksums. These patches were probably just re-issued. I cannot tell exactly what changed since I threw away the versions I had lying around locally before. Sorry about that. Index: distinfo =================================================================== RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/distinfo,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- distinfo 24 Dec 2003 18:08:50 -0000 1.4 +++ distinfo 26 Dec 2003 19:35:33 -0000 1.5 @@ -9,7 +9,7 @@ MD5 (squid2.5/squid-2.5.STABLE4-xpi_mime.patch) = 1143fb9244690a24450c3c9ce6105da4 MD5 (squid2.5/squid-2.5.STABLE4-size_overflow.patch) = 7cd2d6b1ebbd86aa143fa5a57156d6ce MD5 (squid2.5/squid-2.5.STABLE4-extacl_auth_loop.patch) = de06bbc89f5408b7ab83733d894d4fe7 -MD5 (squid2.5/squid-2.5.STABLE4-squid_ldap_group.patch) = c3af2e0c4958897abf7c821e9b8cdb8a +MD5 (squid2.5/squid-2.5.STABLE4-squid_ldap_group.patch) = a5d0a8730aacf129401aabdfa61d60f7 MD5 (squid2.5/squid-2.5.STABLE4-positive_dns_ttl.patch) = 7fca4475d86acc7db242c261b08751d7 MD5 (squid2.5/squid-2.5.STABLE4-gopherhtml.patch) = 2c6c50a4a8f4d0d0017ab7c15bacfe26 MD5 (squid2.5/squid-2.5.STABLE4-netroute.patch) = f83e66712f37f34a04571b31be6c2db8 @@ -22,7 +22,7 @@ MD5 (squid2.5/squid-2.5.STABLE4-icon_urls.patch) = cf28143216b1364e56e820dddbb66dfc MD5 (squid2.5/squid-2.5.STABLE4-redirector_access.patch) = 9c534a3d58fe0e3545cd4ed9af92a0e8 MD5 (squid2.5/squid-2.5.STABLE4-pconn-lifo.patch) = f41051c248764749d9d9ca5704925da7 -MD5 (squid2.5/squid-2.5.STABLE4-cache_peer_maxconn.patch) = fe187067007693348589fab26bdc36a7 +MD5 (squid2.5/squid-2.5.STABLE4-cache_peer_maxconn.patch) = efd99c5e2f526c08cb52d9af948c7b25 MD5 (squid2.5/squid-2.5.STABLE4-pid_filename_none.patch) = 808bafa144b22c3cf6900759b30f39e6 MD5 (squid2.5/squid-2.5.STABLE4-dns_namelength.patch) = 290da300d02124be3971282d5b0a799d MD5 (squid2.5/squid-2.5.STABLE4-urllogin_acl.patch) = 5ad09d7d4bf105e699cfeb647a4836a3 I have updated the patch files up to this point. -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@freebsd.org | Weblog: http://weblog.barnet.com.au/edwin/ This PR can be closed for now. I will open separate PRs for functional changes and updates soon. State Changed From-To: open->closed Submitter has noted, in followup, that he is reworking the content of this PR and will submit a new one(s) to replace it. |
This PR extends PR 58090. The attached patch updates www/squid to the latest version as of 11/9/2003 (minus the errorpages patch, which is partly broken. The non-broken part is implemented as a FreeBSD patch). Additionally, it improves the existing port in various ways. I keep trying to get any feedback from the current maintainer for more than six months now, unfortunately he has not given any yet so I finally decided to file a PR. Summary of changes: - added tunables SQUID_{UID,GID} (following www/squidguard), defaulting to squid/squid - added tunables for various helper applications - let squid's STABLE-version number show up in PORTVERSION - moved squid.sh to squid.sh.sample - implemented a pkg-deinstall script; pkg_add and make install no longer behave differently. Moved all pkg-plist @exec-magic into pkg-(de)install. - install the FAQ from squid-cache.org as additional documentation; since it get's rerolled once in a while ignore it in the distfile checks - other minor cleanups Fix: Apply this patchset: