Permalink
Browse files

Backport squid3 for the sake of 2012Q2 and 2012Q4

  • Loading branch information...
1 parent a7f1166 commit 73ed4d2745e6b8d4daef6ebe16c02ddcf94c9d13 @mamash mamash committed Mar 12, 2013
View
@@ -0,0 +1,21 @@
+Squid is a fully-featured HTTP/1.0 proxy with partial HTTP/1.1 support
+The 3.1 series brings many new features and upgrades to the basic
+networking protocols. A short list of the major new features is:
+
+ * Connection Pinning (for NTLM Auth Passthrough)
+ * Native IPv6
+ * Quality of Service (QoS) Flow support
+ * Native Memory Cache
+ * SSL Bump (for HTTPS Filtering and Adaptation)
+ * TProxy v4.1+ support
+ * eCAP Adaptation Module support
+ * Error Page Localization
+ * Follow X-Forwarded-For support
+ * X-Forwarded-For options extended (truncate, delete, transparent)
+ * Peer-Name ACL
+ * Reply headers to external ACL.
+ * ICAP and eCAP Logging
+ * ICAP Service Sets and Chains
+ * ICY (SHOUTcast) streaming protocol support
+ * HTTP/1.1 support on connections to web servers and peers.
+ (with plans to make this full support within the 3.1 series)
View
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.2 2013/02/19 19:22:45 markd Exp $
+
+DISTNAME= squid-3.3.1
+PKGREVISION= 1
+CATEGORIES= www
+MASTER_SITES= http://www.squid-cache.org/Versions/v3/${PKGVERSION_NOREV:R}/ \
+ ${SQUID_MASTER_SITES}
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= tron@NetBSD.org
+HOMEPAGE= http://www.squid-cache.org/
+COMMENT= Post-Harvest_cached WWW proxy cache and accelerator
+LICENSE= gnu-gpl-v2
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= perl gmake
+GNU_CONFIGURE= yes
+
+.include "../../www/squid/Makefile.squid"
+
+CONFIGURE_ARGS+= --disable-strict-error-checking
+CONFIGURE_ARGS+= --enable-auth
+CONFIGURE_ARGS+= --enable-icap-client
+CONFIGURE_ARGS+= --with-default-user=${SQUID_USER}
+CONFIGURE_ARGS+= --with-pidfile=${VARBASE}/run/squid.pid
+
+REPLACE_PERL+= tools/helper-mux.pl
+
+EGFILES+= errors/errorpage.css
+CONF_FILES+= ${PREFIX}/${EGDIR}/errorpage.css ${PKG_SYSCONFDIR}/errorpage.css
+
+SQUID_BACKENDS?= ufs
+SQUID_NTLM_AUTH_HELPERS?= fakeauth
+.include "options.mk"
+
+post-build:
+ cd ${WRKSRC}/src && ${CP} -pf squid.conf.documented squid.conf.default
+
+.include "../../mk/bsd.pkg.mk"
View
@@ -0,0 +1,50 @@
+@comment $NetBSD: PLIST,v 1.3 2013/03/05 01:59:51 taca Exp $
+bin/purge
+bin/squidclient
+${PLIST.ba_getpwnam}libexec/basic_getpwnam_auth
+${PLIST.ba_LDAP}libexec/basic_ldap_auth
+${PLIST.ba_MSNT}libexec/basic_msnt_auth
+${PLIST.ba_NCSA}libexec/basic_ncsa_auth
+${PLIST.ba_NIS}libexec/basic_nis_auth
+${PLIST.ba_PAM}libexec/basic_pam_auth
+libexec/cachemgr.cgi
+${PLIST.da_LDAP}libexec/digest_ldap_auth
+${PLIST.diskd}libexec/diskd
+${PLIST.eacl_LDAP_group}libexec/ext_ldap_group_acl
+${PLIST.eacl_unix_group}libexec/ext_unix_group_acl
+libexec/helper-mux.pl
+libexec/log_db_daemon
+libexec/log_file_daemon
+${PLIST.ta_kerberos}libexec/negotiate_kerberos_auth
+${PLIST.ta_kerberos}libexec/negotiate_kerberos_auth_test
+${PLIST.na_SMB}libexec/ntlm_auth
+libexec/pinger
+${PLIST.unlinkd}libexec/unlinkd
+libexec/url_fake_rewrite
+libexec/url_fake_rewrite.sh
+man/man1/squidclient.1
+man/man8/cachemgr.cgi.8
+${PLIST.ba_getpwnam}man/man8/basic_getpwnam_auth.8
+${PLIST.ba_LDAP}man/man8/basic_ldap_auth.8
+${PLIST.ba_NCSA}man/man8/basic_ncsa_auth.8
+${PLIST.ba_PAM}man/man8/basic_pam_auth.8
+${PLIST.eacl_LDAP_group}man/man8/ext_ldap_group_acl.8
+${PLIST.eacl_unix_group}man/man8/ext_unix_group_acl.8
+${PLIST.ta_kerberos}man/man8/negotiate_kerberos_auth.8
+man/man8/log_db_daemon.8
+man/man8/squid.8
+sbin/squid
+share/doc/squid/ChangeLog
+share/doc/squid/README.FreeBSD
+share/doc/squid/README.NetBSD
+share/doc/squid/README.OpenBSD
+share/doc/squid/README.Solaris
+share/doc/squid/RELEASENOTES.html
+share/doc/squid/debug-sections.txt
+share/examples/rc.d/squid
+share/examples/squid/cachemgr.conf
+share/examples/squid/errorpage.css
+share/examples/squid/mime.conf
+share/examples/squid/msntauth.conf
+share/examples/squid/squid.conf
+share/squid/mib.txt
View
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.2 2013/02/19 19:22:45 markd Exp $
+
+SHA1 (squid-3.3.1.tar.xz) = d996c5b49bb244aad69e45c85499c8cb1f2c4716
+RMD160 (squid-3.3.1.tar.xz) = 1419cc29351a5a784456fb0f447fced59f42f0fd
+Size (squid-3.3.1.tar.xz) = 2173060 bytes
+SHA1 (patch-configure) = 8e5eb49a8d04c77f3cf9de9390a8992268421cb6
+SHA1 (patch-errors_Makefile.in) = afbac822ac84d5e1734d55fc625e949ae0b85289
+SHA1 (patch-helpers_basic_auth_MSNT_Makefile.in) = 74a0379d3ec0c2601dbb62b16df889bf4edcaedf
+SHA1 (patch-src_DiskIO_DiskDaemon_diskd.cc) = f815c33ba6b11aae2b0e661605e3fd7fc291cbf1
+SHA1 (patch-src_Makefile.in) = 919797e74c378daad88b5ac1ee7efe6f5f580a33
+SHA1 (patch-src_acl_DomainData.cc) = 19b223e4c976179f40343074d531434c1ed78b9b
+SHA1 (patch-src_acl_Url.cc) = 418a4d8bf9600601363c5353e063a5eeced81088
+SHA1 (patch-src_base_TidyPointer.h) = 93428d26bb2479fc845764a324658eaacd26588e
+SHA1 (patch-src_ip_Intercept.cc) = 972ad12063bcf3d24704976960f1a71452d0aa87
+SHA1 (patch-src_store.cc) = 055d98a59103b02a51876a5c8ffed9514954beb4
+SHA1 (patch-tools_Makefile.in) = 3a7678c63a11a35fabef091a3b18e63859f0796f
View
@@ -0,0 +1,174 @@
+# $NetBSD: options.mk,v 1.3 2013/03/05 01:59:51 taca Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.squid
+PKG_SUPPORTED_OPTIONS= inet6 snmp ssl squid-backend-diskd squid-backend-null \
+ squid-backend-ufs squid-carp squid-unlinkd \
+ squid-kerberos-helper squid-ldap-helper squid-pam-helper
+PKG_OPTIONS_LEGACY_OPTS= diskd:squid-backend-diskd \
+ null:squid-backend-null ufs:squid-backend-ufs \
+ linux-netfilter:squid-netfilter ipf-transparent:squid-ipf \
+ pf-transparent:squid-pf unlinkd:squid-unlinkd \
+ arp-acl:squid-arp-acl pam-helper:squid-pam-helper carp:squid-carp
+
+PLIST_VARS+= diskd snmp unlinkd
+PLIST_VARS+= ba_LDAP ba_MSNT ba_NCSA ba_NIS ba_PAM ba_getpwnam
+PLIST_VARS+= da_LDAP
+PLIST_VARS+= na_SMB
+PLIST_VARS+= ta_kerberos
+PLIST_VARS+= eacl_ip_user eacl_LDAP_group eacl_unix_group
+
+PKG_SUGGESTED_OPTIONS= inet6 snmp ssl squid-backend-diskd squid-carp \
+ squid-pam-helper squid-unlinkd
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(OPSYS:MLinux)
+PKG_SUPPORTED_OPTIONS+= squid-netfilter
+.endif
+
+# some release of NetBSD lacks <ipl.h> header of IP Filter 4.x
+.if ${OPSYS} != "NetBSD" || ${OS_VERSION:M[01].*} || exists(/usr/include/netinet/ipl.h)
+PKG_SUPPORTED_OPTIONS+= squid-ipf
+.endif
+
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "DragonFly"
+PKG_SUPPORTED_OPTIONS+= squid-pf
+.endif
+
+.if (${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD") && \
+ !empty(PKG_SUPPORTED_OPTIONS:Msquid-ipf)
+PKG_SUGGESTED_OPTIONS+= squid-ipf
+.endif
+
+.if ${OPSYS} == "OpenBSD"
+PKG_SUGGESTED_OPTIONS+= squid-pf
+.endif
+
+.if ${OPSYS} == "Darwin"
+PKG_SUPPORTED_OPTIONS+= squid-ipfw
+PKG_SUGGESTED_OPTIONS+= squid-ipfw
+.endif
+
+# limited platform support squid-arp-acl
+.if !empty(OPSYS:MFreeBSD) || !empty(OPSYS:MNetBSD) || !empty(OPSYS:MOpenBSD) || !empty(OPSYS:MLinux) || !empty(OPSYS:MSunOS)
+PKG_SUPPORTED_OPTIONS+= squid-arp-acl
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+SQUID_BACKENDS?= ufs null
+SQUID_BASIC_AUTH_HELPERS?= MSNT NCSA NIS getpwnam
+SQUID_DIGEST_AUTH_HELPERS?= password
+SQUID_NTLM_AUTH_HELPERS?= SMB
+SQUID_EXTERNAL_ACL_HELPERS?= fileuser_ip unix_group
+
+# squid's code has preference as:
+# squid-ipf > squid-pf > squid-netfilter
+# So, options.mk introduce preference as:
+# squid-netfilter > squid-pf > squid-ipf
+.if !empty(PKG_OPTIONS:Msquid-netfilter)
+CONFIGURE_ARGS+= --enable-linux-netfilter
+.elif !empty(PKG_OPTIONS:Msquid-pf)
+CONFIGURE_ARGS+= --enable-pf-transparent
+.elif !empty(PKG_OPTIONS:Msquid-ipf)
+CONFIGURE_ARGS+= --enable-ipf-transparent
+.elif !empty(PKG_OPTIONS:Msquid-ipfw)
+CONFIGURE_ARGS+= --enable-ipfw-transparent
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-arp-acl)
+CONFIGURE_ARGS+= --enable-arp-acl
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-carp)
+CONFIGURE_ARGS+= --enable-carp
+.endif
+
+.if !empty(PKG_SUPPORTED_OPTIONS:Minet6) && empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-kerberos-helper)
+.include "../../mk/krb5.buildlink3.mk"
+SQUID_NEGOTIATE_AUTH_HELPERS+= kerberos
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-ldap-helper)
+.include "../../databases/openldap-client/buildlink3.mk"
+SQUID_BASIC_AUTH_HELPERS+= LDAP
+SQUID_DIGEST_AUTH_HELPERS+= LDAP
+SQUID_EXTERNAL_ACL_HELPERS+= LDAP_group
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-pam-helper)
+. include "../../mk/pam.buildlink3.mk"
+SQUID_BASIC_AUTH_HELPERS+= PAM
+.endif
+
+.if !empty(PKG_OPTIONS:Msnmp)
+CONFIGURE_ARGS+= --enable-snmp
+PLIST.snmp= yes
+.else
+CONFIGURE_ARGS+= --disable-snmp
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+CONFIGURE_ARGS+= --enable-ssl --with-openssl=${SSLBASE:Q}
+. include "../../security/openssl/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Msquid-backend-diskd)
+SQUID_BACKENDS+= diskd
+PLIST.diskd= yes
+.endif
+
+.if empty(PKG_OPTIONS:Msquid-unlinkd)
+CONFIGURE_ARGS+= --disable-unlinkd
+.else
+PLIST.unlinkd= yes
+.endif
+
+.if empty(SQUID_BASIC_AUTH_HELPERS)
+CONFIGURE_ARGS+= --disable-auth-basic
+.else
+CONFIGURE_ARGS+= --enable-auth-basic=${SQUID_BASIC_AUTH_HELPERS:Q}
+. for i in ${SQUID_BASIC_AUTH_HELPERS}
+PLIST.ba_${i}= yes
+. endfor
+.endif
+
+.if empty(SQUID_DIGEST_AUTH_HELPERS)
+CONFIGURE_ARGS+= --disable-auth-digest
+.else
+CONFIGURE_ARGS+= --enable-auth-digest=${SQUID_DIGEST_AUTH_HELPERS:Q}
+. for i in ${SQUID_DIGEST_AUTH_HELPERS}
+PLIST.da_${i}= yes
+. endfor
+.endif
+
+.if empty(SQUID_NEGOTIATE_AUTH_HELPERS)
+CONFIGURE_ARGS+= --disable-auth-negotiate
+.else
+CONFIGURE_ARGS+= --enable-auth-negotiate=${SQUID_NEGOTIATE_AUTH_HELPERS:Q}
+. for i in ${SQUID_NEGOTIATE_AUTH_HELPERS}
+PLIST.ta_${i}= yes
+. endfor
+.endif
+
+.if empty(SQUID_NTLM_AUTH_HELPERS)
+CONFIGURE_ARGS+= --disable-auth-ntlm
+.else
+CONFIGURE_ARGS+= --enable-auth-ntlm=${SQUID_NTLM_AUTH_HELPERS:Q}
+. for i in ${SQUID_NTLM_AUTH_HELPERS}
+PLIST.na_${i}= yes
+. endfor
+.endif
+
+.if empty(SQUID_EXTERNAL_ACL_HELPERS)
+CONFIGURE_ARGS+= --disable-external-acl-helpers
+.else
+CONFIGURE_ARGS+= --enable-external-acl-helpers=${SQUID_EXTERNAL_ACL_HELPERS:Q}
+. for i in ${SQUID_EXTERNAL_ACL_HELPERS}
+PLIST.eacl_${i}= yes
+. endfor
+.endif
@@ -0,0 +1,51 @@
+$NetBSD: patch-configure,v 1.1 2013/02/10 18:16:53 adam Exp $
+
+Compatibility problems.
+
+--- configure.orig 2013-02-09 07:30:57.000000000 +0000
++++ configure
+@@ -22437,7 +22437,7 @@ fi
+
+ done
+
+- if test "x$ac_heimdal" == "x" ; then
++ if test "x$ac_heimdal" = "x" ; then
+ for ac_header in gssapi/gssapi_generic.h
+ do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "gssapi/gssapi_generic.h" "ac_cv_header_gssapi_gssapi_generic_h" "$ac_includes_default"
+@@ -22634,7 +22634,7 @@ done
+
+
+ ac_com_error_message=no
+- if test "x$ac_cv_header_com_err_h" == "xyes" ; then
++ if test "x$ac_cv_header_com_err_h" = "xyes" ; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <com_err.h>
+@@ -22646,7 +22646,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
+ fi
+ rm -f conftest*
+
+- elif test "x$ac_cv_header_et_com_err_h" == "xyes" ; then
++ elif test "x$ac_cv_header_et_com_err_h" = "xyes" ; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <et/com_err.h>
+@@ -22707,7 +22707,7 @@ $as_echo "#define HAVE_MAX_SKEW_IN_KRB5_
+
+ fi
+
+- if test `echo $KRB5LIBS | grep -c com_err` -ne 0 -a "x$ac_com_error_message" == "xyes" ; then
++ if test `echo $KRB5LIBS | grep -c com_err` -ne 0 -a "x$ac_com_error_message" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_message in -lcom_err" >&5
+ $as_echo_n "checking for error_message in -lcom_err... " >&6; }
+ if ${ac_cv_lib_com_err_error_message+:} false; then :
+@@ -22750,7 +22750,7 @@ $as_echo "#define HAVE_ERROR_MESSAGE 1"
+
+ fi
+
+- elif test "x$ac_com_error_message" == "xyes" ; then
++ elif test "x$ac_com_error_message" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_message in -lkrb5" >&5
+ $as_echo_n "checking for error_message in -lkrb5... " >&6; }
+ if ${ac_cv_lib_krb5_error_message+:} false; then :
@@ -0,0 +1,23 @@
+$NetBSD: patch-errors_Makefile.in,v 1.1 2013/02/10 18:16:53 adam Exp $
+
+Don't install errorpage.css.
+
+--- errors/Makefile.in.orig 2013-02-01 10:56:12.000000000 +0000
++++ errors/Makefile.in
+@@ -501,7 +501,7 @@ install-dvi: install-dvi-am
+
+ install-dvi-am:
+
+-install-exec-am: install-exec-local
++install-exec-am:
+
+ install-html: install-html-am
+
+@@ -618,7 +618,6 @@ install-data-local: translate
+ done; \
+ $(INSTALL_DATA) $(srcdir)/TRANSLATORS $(DESTDIR)$(DEFAULT_ERROR_DIR)/TRANSLATORS; \
+ $(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(DEFAULT_ERROR_DIR)/COPYRIGHT; \
+- $(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET).default; \
+ $(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ;
+
+ uninstall-local:
Oops, something went wrong.

0 comments on commit 73ed4d2

Please sign in to comment.