aboutsummaryrefslogtreecommitdiff
path: root/www/squid32/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/squid32/files')
-rw-r--r--www/squid32/files/extra-patch-src-cf.data.pre.aufs20
-rw-r--r--www/squid32/files/patch-configure47
-rw-r--r--www/squid32/files/patch-helpers-basic_auth-LDAP-config.test12
-rw-r--r--www/squid32/files/patch-helpers-basic_auth-SASL-config.test12
-rw-r--r--www/squid32/files/patch-helpers-external_acl-LDAP_group-config.test12
-rw-r--r--www/squid32/files/patch-src-cf.data.pre13
-rw-r--r--www/squid32/files/pkg-install.in79
-rw-r--r--www/squid32/files/pkg-message.in33
-rw-r--r--www/squid32/files/squid.in96
9 files changed, 324 insertions, 0 deletions
diff --git a/www/squid32/files/extra-patch-src-cf.data.pre.aufs b/www/squid32/files/extra-patch-src-cf.data.pre.aufs
new file mode 100644
index 000000000000..019fdcac0fc7
--- /dev/null
+++ b/www/squid32/files/extra-patch-src-cf.data.pre.aufs
@@ -0,0 +1,20 @@
+--- src/cf.data.pre.orig Wed Nov 1 15:12:02 2006
++++ src/cf.data.pre Wed Nov 1 15:12:17 2006
+@@ -1097,6 +1100,17 @@
+
+ see argument descriptions under ufs above
+
++ Note:
++ By default, FreeBSD uses the pthread(3) M:N threading library.
++ You can, however, map the thread library to the 1:1 libthr(3)
++ implementation by inserting the following lines into
++ /etc/libmap.conf and see whether this performs better on your
++ system:
++
++ [%%PREFIX%%/sbin/squid]
++ libpthread.so.1 libthr.so.1
++ libpthread.so.2 libthr.so.2
++
+ The diskd store type:
+
+ "diskd" uses the same storage format as "ufs", utilizing a
diff --git a/www/squid32/files/patch-configure b/www/squid32/files/patch-configure
new file mode 100644
index 000000000000..0b7bf2394c01
--- /dev/null
+++ b/www/squid32/files/patch-configure
@@ -0,0 +1,47 @@
+--- configure.orig 2012-10-21 18:10:03.000000000 +0200
++++ configure 2012-10-21 18:27:39.000000000 +0200
+@@ -22154,7 +22154,7 @@
+
+ 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"
+@@ -22351,7 +22351,7 @@
+
+
+ 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>
+@@ -22363,7 +22363,7 @@
+ 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>
+@@ -22424,7 +22424,7 @@
+
+ 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 :
+@@ -22467,7 +22467,7 @@
+
+ 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 :
diff --git a/www/squid32/files/patch-helpers-basic_auth-LDAP-config.test b/www/squid32/files/patch-helpers-basic_auth-LDAP-config.test
new file mode 100644
index 000000000000..9961e5fa44cb
--- /dev/null
+++ b/www/squid32/files/patch-helpers-basic_auth-LDAP-config.test
@@ -0,0 +1,12 @@
+--- helpers/basic_auth/LDAP/config.test.orig 2012-10-20 14:39:49.000000000 +0200
++++ helpers/basic_auth/LDAP/config.test 2012-10-21 20:49:49.000000000 +0200
+@@ -1,8 +1,2 @@
+ #!/bin/sh
+-if [ -f /usr/include/ldap.h ]; then
+- exit 0
+-fi
+-if [ -f /usr/include/winldap.h ]; then
+- exit 0
+-fi
+-exit 1
++exit 0
diff --git a/www/squid32/files/patch-helpers-basic_auth-SASL-config.test b/www/squid32/files/patch-helpers-basic_auth-SASL-config.test
new file mode 100644
index 000000000000..4952c279e82f
--- /dev/null
+++ b/www/squid32/files/patch-helpers-basic_auth-SASL-config.test
@@ -0,0 +1,12 @@
+--- helpers/basic_auth/SASL/config.test.orig 2012-10-20 14:39:49.000000000 +0200
++++ helpers/basic_auth/SASL/config.test 2012-10-21 20:50:57.000000000 +0200
+@@ -1,8 +1,2 @@
+ #!/bin/sh
+-if [ -f /usr/include/sasl.h ]; then
+- exit 0
+-fi
+-if [ -f /usr/include/sasl/sasl.h ]; then
+- exit 0
+-fi
+-exit 1
++exit 0
diff --git a/www/squid32/files/patch-helpers-external_acl-LDAP_group-config.test b/www/squid32/files/patch-helpers-external_acl-LDAP_group-config.test
new file mode 100644
index 000000000000..d7b6fe19f770
--- /dev/null
+++ b/www/squid32/files/patch-helpers-external_acl-LDAP_group-config.test
@@ -0,0 +1,12 @@
+--- helpers/external_acl/LDAP_group/config.test.orig 2012-10-20 14:39:49.000000000 +0200
++++ helpers/external_acl/LDAP_group/config.test 2012-10-21 20:51:53.000000000 +0200
+@@ -1,8 +1,2 @@
+ #!/bin/sh
+-if [ -f /usr/include/ldap.h ]; then
+- exit 0
+-fi
+-if [ -f /usr/include/winldap.h ]; then
+- exit 0
+-fi
+-exit 1
++exit 0
diff --git a/www/squid32/files/patch-src-cf.data.pre b/www/squid32/files/patch-src-cf.data.pre
new file mode 100644
index 000000000000..b3831a3132ef
--- /dev/null
+++ b/www/squid32/files/patch-src-cf.data.pre
@@ -0,0 +1,13 @@
+--- src/cf.data.pre.orig 2012-10-20 14:39:49.000000000 +0200
++++ src/cf.data.pre 2012-10-28 11:28:18.000000000 +0100
+@@ -3479,6 +3479,10 @@
+ LOC: Config.pidFilename
+ DOC_START
+ A filename to write the process-id to. To disable, enter "none".
++
++ Note: If you change this setting, you need to set squid_pidfile
++ in /etc/rc.conf to reflect the new value. Please see
++ %%PREFIX%%/etc/rc.d/squid for details.
+ DOC_END
+
+ NAME: log_fqdn
diff --git a/www/squid32/files/pkg-install.in b/www/squid32/files/pkg-install.in
new file mode 100644
index 000000000000..1ee676c254a8
--- /dev/null
+++ b/www/squid32/files/pkg-install.in
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/bin:/usr/bin:/usr/sbin
+pkgname=$1
+squid_base="/var/squid"
+squid_cachedir="${squid_base}/cache"
+squid_confdir="${PKG_PREFIX:-%%PREFIX%%}/etc/squid"
+squid_logdir="/var/log/squid"
+squid_rundir="/var/run/squid"
+# these are hardcoded, see /usr/ports/UIDs and /usr/ports/GIDs:
+squid_user=squid
+squid_group=squid
+squid_gid=100
+squid_uid=100
+case $2 in
+PRE-INSTALL)
+ echo "===> Pre-installation configuration for ${pkgname}"
+ ;;
+POST-INSTALL)
+ # Since we usually start the Squid master process as ${squid_user}
+ # instead of root make sure that ${squid_base} is writable for it.
+ if [ ! -d ${squid_base} ]; then
+ echo "Creating ${squid_base}..."
+ install -d -o root -g ${squid_group} \
+ -m 0775 ${squid_base}
+ else
+ chgrp ${squid_group} ${squid_base}
+ chmod g+w ${squid_base}
+ fi
+ if [ ! -d ${squid_cachedir} ]; then
+ echo "Creating ${squid_cachedir} ..."
+ install -d -o ${squid_user} -g ${squid_group} \
+ -m 0750 ${squid_cachedir}
+ else
+ chown ${squid_user} ${squid_cachedir}
+ chgrp ${squid_group} ${squid_cachedir}
+ chmod 0750 ${squid_cachedir}
+ fi
+ if [ ! -d ${squid_confdir} ]; then
+ echo "Creating ${squid_confdir}..."
+ install -d -o root -g ${squid_group} \
+ -m 0755 ${squid_confdir}
+ else
+ chgrp ${squid_group} ${squid_confdir}
+ fi
+ if [ ! -d ${squid_logdir} ]; then
+ echo "Creating ${squid_logdir}..."
+ install -d -o ${squid_user} -g ${squid_group} \
+ -m 0750 ${squid_logdir}
+ else
+ chown ${squid_user} ${squid_logdir}
+ chgrp ${squid_group} ${squid_logdir}
+ fi
+ if [ ! -d ${squid_rundir} ]; then
+ echo "Creating ${squid_rundir}..."
+ install -d -o ${squid_user} -g ${squid_group} \
+ -m 0755 ${squid_rundir}
+ else
+ chown ${squid_user} ${squid_rundir}
+ chgrp ${squid_group} ${squid_rundir}
+ fi
+ for file in cachemgr.conf errorpage.css mime.conf msntauth.conf squid.conf; do
+ if [ ! -f ${squid_confdir}/${file} \
+ -a -f ${squid_confdir}/${file}.default ]; then
+ echo "Creating ${file} from default..."
+ install -c -o root -g ${squid_group} -m 0640 \
+ ${squid_confdir}/${file}.default \
+ ${squid_confdir}/${file}
+ fi
+ done
+ ;;
+*)
+ exit 64
+ ;;
+esac
+exit 0
diff --git a/www/squid32/files/pkg-message.in b/www/squid32/files/pkg-message.in
new file mode 100644
index 000000000000..d73cc6e7748d
--- /dev/null
+++ b/www/squid32/files/pkg-message.in
@@ -0,0 +1,33 @@
+ o You can find the configuration files for this package in the
+ directory %%PREFIX%%/etc/squid.
+
+ o The default cache directory is /var/squid/.
+ The default log directory is /var/log/squid/.
+
+ Note:
+ You must initialize new cache directories before you can start
+ squid. Do this by running "squid -z" as 'root' or 'squid'.
+ If your cache directories are already initialized (e.g. after an
+ upgrade of squid) you do not need to initialize them again.
+
+ o The default configuration will deny everyone but the local host and
+ local networks as defined in RFC 1918 for IPv4 and RFCs 4193 and
+ 4291 for IPv6 access to the proxy service. Edit the "http_access
+ allow/deny" directives in %%PREFIX%%/etc/squid/squid.conf
+ to suit your needs.
+
+ To enable Squid, set squid_enable=yes in either
+ /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
+ Please see %%PREFIX%%/etc/rc.d/squid for further details.
+
+ Note:
+ If you just updated your Squid installation from an earlier version,
+ make sure to check your Squid configuration against the 3.2 default
+ configuration file %%PREFIX%%/etc/squid/squid.conf.default.
+
+ %%PREFIX%%/etc/squid/squid.conf.documented is a fully annotated
+ configuration file you can consult for further reference.
+
+ Additionally, you should check your configuration by calling
+ 'squid -f /path/to/squid.conf -k parse' before starting Squid.
+
diff --git a/www/squid32/files/squid.in b/www/squid32/files/squid.in
new file mode 100644
index 000000000000..ce3e9b64d37a
--- /dev/null
+++ b/www/squid32/files/squid.in
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: squid
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Note:
+# Set "squid_enable=yes" in either /etc/rc.conf, /etc/rc.conf.local or
+# /etc/rc.conf.d/squid to activate Squid.
+#
+# Additional variables you can define in one of these files:
+#
+# squid_chdir: the directory into which the rc system moves into before
+# starting Squid. Default: /var/squid
+#
+# squid_conf: The configuration file that Squid should use.
+# Default: %%PREFIX%%/etc/squid/squid.conf
+#
+# squid_fib: The alternative routing table id that Squid should use.
+# Default: none
+# See setfib(1) for further details. Note that the setfib(2)
+# system call is not available in FreeBSD versions prior to 7.1.
+#
+# squid_user: The user id that should be used to run the Squid master
+# process. Default: %%SQUID_UID%%.
+# Note that you probably need to define "squid_user=root" if
+# you want to run Squid in reverse proxy setups or if you want
+# Squid to listen on a "privileged" port < 1024.
+#
+# squid_pidfile:
+# The name (including the full path) of the Squid
+# master process' PID file.
+# Default: /var/run/squid/squid.pid.
+# You only need to change this if you changed the
+# corresponding entry in your Squid configuration.
+#
+# squid_flags: Additional commandline arguments for Squid you might want to
+# use. See squid(8) for further details.
+#
+
+squid_checkrunning() {
+ ${command} ${command_args} ${squid_flags} -k check 2>/dev/null
+}
+
+squid_setfib() {
+ sysctl net.fibs >/dev/null 2>&1 || return 0
+ if [ "x${squid_fib}" != "xNONE" ]; then
+ command="setfib -F ${squid_fib} ${command}"
+ else
+ return 0
+ fi
+}
+
+squid_stop() {
+ echo "Stopping ${name}."
+ ${command} ${command_args} ${squid_flags} -k shutdown
+ run_rc_command poll
+}
+
+. /etc/rc.subr
+
+name=squid
+rcvar=squid_enable
+
+command=%%PREFIX%%/sbin/squid
+extra_commands=reload
+reload_cmd="${command} ${command_args} ${squid_flags} -k reconfigure"
+start_precmd="squid_setfib"
+stop_precmd="squid_checkrunning"
+stop_cmd="squid_stop"
+
+load_rc_config ${name}
+
+squid_chdir=${squid_chdir:-"/var/squid"}
+squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"}
+squid_enable=${squid_enable:-"NO"}
+squid_fib=${squid_fib:-"NONE"}
+squid_pidfile=${squid_pidfile:-"/var/run/squid/squid.pid"}
+squid_user=${squid_user:-"squid"}
+
+pidfile=${squid_pidfile}
+required_dirs=${squid_chdir}
+
+# squid(8) will not start if ${squid_conf} is not present so try
+# to catch that beforehand via ${required_files} rather than make
+# squid(8) crash.
+
+required_files=${squid_conf}
+
+# Now make sure that we invoke squid with "-f ${squid_conf}":
+
+command_args="-f ${squid_conf}"
+
+run_rc_command "$1"