diff options
author | Rene Ladan <rene@FreeBSD.org> | 2021-09-30 22:18:31 +0200 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2021-09-30 22:19:24 +0200 |
commit | b19fd158df56a285dcd38cc7310e908b05ecb982 (patch) | |
tree | 457624cfb097b8ed7f402ed1c9506470f00d6055 /www/squid3/files | |
parent | astro/py-ephem: Update to 4.1 (diff) |
cleanup: Remove expired ports:
devel/erlang-exmpp: last upstream patches over 10 years ago
sysutils/showbeastie: Broken on FreeBSD 12 and above since 2018
2021-09-30 www/squid3: Unsupported by upstream
2021-09-30 sysutils/cfengine310: OpenSSL 1.1.X is not supported.
2021-09-30 security/py-paramiko1: Out of date version. No consumer now. Use security/py-paramiko
2021-09-30 sysutils/cfengine-masterfiles310: cfengine310 will retire at FreeBSD 11 EOL
2021-09-30 security/openca-tools-forked: Use modern port security/libscep instead
2021-09-30 multimedia/sms1xxx-kmod: Supports DVB API v3 only. Use multimedia/webcamd instead
2021-09-30 sysutils/cfengine311: OpenSSL 1.1.X is not supported.
2021-09-30 sysutils/cfengine-masterfiles311: cfengine311 will retire at FreeBSD 11 EOL
2021-09-30 mail/postfix35: It is only here until FreeBSD 11 is EoL (Postfix >= 3.6 requires OpenSSL >= 1.1.x)
Diffstat (limited to 'www/squid3/files')
-rw-r--r-- | www/squid3/files/extra-patch-gen-stacktrace | 62 | ||||
-rw-r--r-- | www/squid3/files/patch-ServiceRep.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-compat_compat.h | 20 | ||||
-rw-r--r-- | www/squid3/files/patch-compat_shm.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-configure | 82 | ||||
-rw-r--r-- | www/squid3/files/patch-src-cf.data.pre | 13 | ||||
-rw-r--r-- | www/squid3/files/patch-src_DiskIO_Mmapped_MmappedFile.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-src__ip__Intercept.cc | 15 | ||||
-rw-r--r-- | www/squid3/files/patch-src_enums.h | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-src_ipc_mem_Segment.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-src_ssl_gadgets.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/patch-src_ssl_support.cc | 15 | ||||
-rw-r--r-- | www/squid3/files/patch-src_tools.cc | 11 | ||||
-rw-r--r-- | www/squid3/files/pkg-install.in | 67 | ||||
-rw-r--r-- | www/squid3/files/pkg-message.in | 53 | ||||
-rw-r--r-- | www/squid3/files/squid.in | 156 |
16 files changed, 0 insertions, 560 deletions
diff --git a/www/squid3/files/extra-patch-gen-stacktrace b/www/squid3/files/extra-patch-gen-stacktrace deleted file mode 100644 index e1631e239833..000000000000 --- a/www/squid3/files/extra-patch-gen-stacktrace +++ /dev/null @@ -1,62 +0,0 @@ ---- src/tools.cc.orig 2014-10-31 12:36:43.000000000 +0300 -+++ src/tools.cc 2014-11-21 14:11:25.000000000 +0300 -@@ -71,6 +71,13 @@ - #include <errno.h> - #endif - -+#if PRINT_STACK_TRACE -+#ifdef __FreeBSD__ -+#define UNW_LOCAL_ONLY -+#include <libunwind.h> -+#endif -+#endif -+ - #define DEAD_MSG "\ - The Squid Cache (version %s) died.\n\ - \n\ -@@ -411,6 +418,45 @@ - } - - #endif -+#ifdef __FreeBSD__ -+ do { -+ unw_context_t unw_ctx; -+ unw_cursor_t unw_cp; -+ unw_word_t sp, ip, off; -+ int rc = 0; -+ char procname[256]; -+ size_t frame; -+ -+ bzero((void *)&unw_ctx, sizeof(unw_ctx)); -+ bzero((void *)&unw_cp, sizeof(unw_cp)); -+ -+ if ((rc = unw_getcontext(&unw_ctx))) { -+ fprintf(debug_log, "Failed to trace own stack: " -+ "unw_context() said '%s'.\n", unw_strerror(rc)); -+ break; -+ } -+ if ((rc = unw_init_local(&unw_cp, &unw_ctx))) { -+ fprintf(debug_log, "Failed to trace own stack: " -+ "unw_init_local() said '%s'.\n", unw_strerror(rc)); -+ break; -+ } -+ frame = 0; -+ fprintf(debug_log, "Backtrace follows (deepest frame first):\n"); -+ while ((rc = unw_step(&unw_cp)) > 0) { -+ frame++; -+ ip = 0; sp = 0; -+ unw_get_reg(&unw_cp, UNW_REG_IP, &ip); -+ unw_get_reg(&unw_cp, UNW_REG_SP, &sp); -+ off = 0; -+ rc = unw_get_proc_name(&unw_cp, procname, sizeof(procname), &off); -+ if (rc) -+ snprintf (procname, sizeof(procname), "[unknown]"); -+ fprintf(debug_log, "#%zd: %s + 0x%zx, ip = 0x%zx, sp = 0x%zx\n", -+ frame, procname, (size_t)off, (size_t)ip, (size_t)sp); -+ } -+ fprintf(debug_log, "Use addr2line of similar to translate offsets to line information.\n"); -+ } while (0); -+#endif /* __FreeBSD__ */ - #endif /* PRINT_STACK_TRACE */ - - #if SA_RESETHAND == 0 && !_SQUID_WINDOWS_ diff --git a/www/squid3/files/patch-ServiceRep.cc b/www/squid3/files/patch-ServiceRep.cc deleted file mode 100644 index 69e067f5be0c..000000000000 --- a/www/squid3/files/patch-ServiceRep.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/adaptation/ecap/ServiceRep.cc.orig 2018-09-24 18:34:06 UTC -+++ src/adaptation/ecap/ServiceRep.cc -@@ -234,7 +234,7 @@ bool Adaptation::Ecap::ServiceRep::probe - - bool Adaptation::Ecap::ServiceRep::up() const - { -- return theService; -+ return bool(theService); - } - - bool Adaptation::Ecap::ServiceRep::wantsUrl(const String &urlPath) const diff --git a/www/squid3/files/patch-compat_compat.h b/www/squid3/files/patch-compat_compat.h deleted file mode 100644 index b45d7b54ab26..000000000000 --- a/www/squid3/files/patch-compat_compat.h +++ /dev/null @@ -1,20 +0,0 @@ ---- compat/compat.h.orig 2015-11-01 10:44:25 UTC -+++ compat/compat.h -@@ -42,17 +42,6 @@ - #endif - #endif - --/* Solaris 10 has a broken definition for minor_t in IPFilter compat. -- * We must pre-define before doing anything with OS headers so the OS -- * do not. Then un-define it before using the IPFilter *_compat.h headers. -- */ --#if IPF_TRANSPARENT && USE_SOLARIS_IPFILTER_MINOR_T_HACK --/* But we only need do this nasty thing for src/ip/Intercept.cc */ --#if BUILDING_SQUID_IP_INTERCEPT_CC --#define minor_t solaris_minor_t_fubar --#endif --#endif -- - /*****************************************************/ - /* FDSETSIZE is messy and needs to be done before */ - /* sys/types.h are defined. */ diff --git a/www/squid3/files/patch-compat_shm.cc b/www/squid3/files/patch-compat_shm.cc deleted file mode 100644 index 0ec1ee3c4368..000000000000 --- a/www/squid3/files/patch-compat_shm.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- compat/shm.cc.orig 2015-11-01 10:44:25 UTC -+++ compat/shm.cc -@@ -29,6 +29,8 @@ shm_portable_segment_name_is_path() - size_t len = sizeof(jailed); - ::sysctlbyname("security.jail.jailed", &jailed, &len, NULL, 0); - return !jailed; -+#elif defined (__DragonFly__) -+ return true; - #else - return false; - #endif diff --git a/www/squid3/files/patch-configure b/www/squid3/files/patch-configure deleted file mode 100644 index c296c659950a..000000000000 --- a/www/squid3/files/patch-configure +++ /dev/null @@ -1,82 +0,0 @@ ---- configure.orig 2015-11-01 10:46:19 UTC -+++ configure -@@ -32038,7 +32040,7 @@ done - ## - - BUILD_HELPER="NIS" --for ac_header in sys/types.h rpc/rpc.h rpcsvc/ypclnt.h rpcsvc/yp_prot.h crypt.h -+for ac_header in sys/types.h rpc/rpc.h rpcsvc/ypclnt.h rpcsvc/yp_prot.h rpcsvc/crypt.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " -@@ -32053,8 +32055,10 @@ if eval test \"x\$"$as_ac_Header"\" = x" - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - --else -- BUILD_HELPER="" -+# XXX: On FreeBSD we have to do this to make NIS work -+# until https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188247 -+# is resolved. -+ BUILD_HELPER="NIS" - fi - - done -@@ -32519,7 +32523,7 @@ done - - # unconditionally requires crypt(3), for now - if test "x$ac_cv_func_crypt" != "x"; then -- for ac_header in unistd.h crypt.h shadow.h -+ for ac_header in unistd.h rpcsvc/crypt.h shadow.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -@@ -34574,7 +34578,7 @@ for ac_header in \ - arpa/nameser.h \ - assert.h \ - bstring.h \ -- crypt.h \ -+ rpcsvc/crypt.h \ - ctype.h \ - direct.h \ - errno.h \ -@@ -34785,6 +34789,7 @@ ac_fn_cxx_check_header_compile "$LINENO" - #include <netinet/ip.h> - #endif - #if HAVE_NETINET_IP_COMPAT_H -+#include <net/if.h> /* IFNAMSIZ */ - #include <netinet/ip_compat.h> - #endif - #if HAVE_NETINET_IP_FIL_H -@@ -38773,6 +38778,7 @@ if test "x$enable_ipf_transparent" != "x - # include <sys/ioccom.h> - # include <netinet/in.h> - -+# include <net/if.h> /* IFNAMSIZ */ - # include <netinet/ip_compat.h> - # include <netinet/ip_fil.h> - # include <netinet/ip_nat.h> -@@ -38803,6 +38809,7 @@ else - # include <sys/ioccom.h> - # include <netinet/in.h> - #undef minor_t -+# include <net/if.h> /* IFNAMSIZ */ - # include <netinet/ip_compat.h> - # include <netinet/ip_fil.h> - # include <netinet/ip_nat.h> -@@ -38847,6 +38854,7 @@ _ACEOF - ip_fil_compat.h \ - ip_fil.h \ - ip_nat.h \ -+ net/if.h \ - netinet/ip_compat.h \ - netinet/ip_fil_compat.h \ - netinet/ip_fil.h \ -@@ -38876,6 +38884,7 @@ ac_fn_cxx_check_header_compile "$LINENO" - #if HAVE_IP_COMPAT_H - #include <ip_compat.h> - #elif HAVE_NETINET_IP_COMPAT_H -+#include <net/if.h> /* IFNAMSIZ */ - #include <netinet/ip_compat.h> - #endif - #if HAVE_IP_FIL_H diff --git a/www/squid3/files/patch-src-cf.data.pre b/www/squid3/files/patch-src-cf.data.pre deleted file mode 100644 index 0c68c1fd02af..000000000000 --- a/www/squid3/files/patch-src-cf.data.pre +++ /dev/null @@ -1,13 +0,0 @@ ---- src/cf.data.pre.orig 2015-11-01 10:44:25 UTC -+++ src/cf.data.pre -@@ -4558,6 +4558,10 @@ DEFAULT: @DEFAULT_PID_FILE@ - 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 -+ /usr/local/etc/rc.d/squid for details. - DOC_END - - NAME: client_netmask diff --git a/www/squid3/files/patch-src_DiskIO_Mmapped_MmappedFile.cc b/www/squid3/files/patch-src_DiskIO_Mmapped_MmappedFile.cc deleted file mode 100644 index 1feb8081ed7e..000000000000 --- a/www/squid3/files/patch-src_DiskIO_Mmapped_MmappedFile.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/DiskIO/Mmapped/MmappedFile.cc.orig 2015-11-01 10:44:25 UTC -+++ src/DiskIO/Mmapped/MmappedFile.cc -@@ -235,7 +235,7 @@ Mmapping::map() - static const int pageSize = getpagesize(); - delta = offset % pageSize; - -- buf = mmap(NULL, length + delta, prot, flags, fd, offset - delta); -+ buf = mmap(NULL, length + delta, prot, flags | MAP_NOSYNC, fd, offset - delta); - - if (buf == MAP_FAILED) { - const int errNo = errno; diff --git a/www/squid3/files/patch-src__ip__Intercept.cc b/www/squid3/files/patch-src__ip__Intercept.cc deleted file mode 100644 index 1648e1837415..000000000000 --- a/www/squid3/files/patch-src__ip__Intercept.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/ip/Intercept.cc.orig 2015-11-01 10:44:25 UTC -+++ src/ip/Intercept.cc -@@ -202,10 +202,10 @@ Ip::Intercept::IpfInterception(const Com - // for NAT lookup set local and remote IP:port's - if (newConn->remote.isIPv6()) { - #if IPFILTER_VERSION < 5000003 -- // warn once every 10 at critical level, then push down a level each repeated event -+ // warn once every million at critical level, then push down a level each repeated event - static int warningLevel = DBG_CRITICAL; - debugs(89, warningLevel, "IPF (IPFilter v4) NAT does not support IPv6. Please upgrade to IPFilter v5.1"); -- warningLevel = (warningLevel + 1) % 10; -+ warningLevel = (warningLevel + 1) % 1048576; - return false; - #else - natLookup.nl_v = 6; diff --git a/www/squid3/files/patch-src_enums.h b/www/squid3/files/patch-src_enums.h deleted file mode 100644 index 37b7a1c69fbf..000000000000 --- a/www/squid3/files/patch-src_enums.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/enums.h.orig 2018-07-15 20:46:55 UTC -+++ src/enums.h -@@ -9,6 +9,8 @@ - #ifndef SQUID_ENUMS_H - #define SQUID_ENUMS_H - -+#undef FD_NONE -+ - enum fd_type { - FD_NONE, - FD_LOG, diff --git a/www/squid3/files/patch-src_ipc_mem_Segment.cc b/www/squid3/files/patch-src_ipc_mem_Segment.cc deleted file mode 100644 index 6bc6e8c1a732..000000000000 --- a/www/squid3/files/patch-src_ipc_mem_Segment.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ipc/mem/Segment.cc.orig 2015-11-01 10:44:25 UTC -+++ src/ipc/mem/Segment.cc -@@ -150,7 +150,7 @@ Ipc::Mem::Segment::attach() - assert(theSize == static_cast<off_t>(static_cast<size_t>(theSize))); - - void *const p = -- mmap(NULL, theSize, PROT_READ | PROT_WRITE, MAP_SHARED, theFD, 0); -+ mmap(NULL, theSize, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NOSYNC, theFD, 0); - if (p == MAP_FAILED) { - debugs(54, 5, HERE << "mmap " << theName << ": " << xstrerror()); - fatalf("Ipc::Mem::Segment::attach failed to mmap(%s): %s\n", diff --git a/www/squid3/files/patch-src_ssl_gadgets.cc b/www/squid3/files/patch-src_ssl_gadgets.cc deleted file mode 100644 index 034c5c5b428c..000000000000 --- a/www/squid3/files/patch-src_ssl_gadgets.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ssl/gadgets.cc.orig 2018-07-15 20:46:55 UTC -+++ src/ssl/gadgets.cc -@@ -321,7 +321,7 @@ mimicExtensions(Ssl::X509_Pointer & cert, Ssl::X509_Po - &ext_der, - (const ASN1_ITEM *)ASN1_ITEM_ptr(method->it)); - -- ASN1_OCTET_STRING *ext_oct = M_ASN1_OCTET_STRING_new(); -+ ASN1_OCTET_STRING *ext_oct = ASN1_OCTET_STRING_new(); - ext_oct->data = ext_der; - ext_oct->length = ext_len; - X509_EXTENSION_set_data(ext, ext_oct); diff --git a/www/squid3/files/patch-src_ssl_support.cc b/www/squid3/files/patch-src_ssl_support.cc deleted file mode 100644 index 69e8f5cdb278..000000000000 --- a/www/squid3/files/patch-src_ssl_support.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/ssl/support.cc.orig 2018-07-15 20:46:55 UTC -+++ src/ssl/support.cc -@@ -2159,7 +2159,11 @@ remove_session_cb(SSL_CTX *, SSL_SESSION *sessionID) - } - - static SSL_SESSION * --get_session_cb(SSL *, unsigned char *sessionID, int len, int *copy) -+get_session_cb(SSL *, -+#ifdef LIBRESSL_VERSION_NUMBER -+ const -+#endif -+ unsigned char *sessionID, int len, int *copy) - { - if (!SslSessionCache) - return NULL; diff --git a/www/squid3/files/patch-src_tools.cc b/www/squid3/files/patch-src_tools.cc deleted file mode 100644 index 606193be6001..000000000000 --- a/www/squid3/files/patch-src_tools.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/tools.cc.orig 2015-11-01 10:44:25 UTC -+++ src/tools.cc -@@ -635,7 +635,7 @@ no_suid(void) - uid = geteuid(); - debugs(21, 3, "no_suid: PID " << getpid() << " giving up root priveleges forever"); - -- if (setuid(0) < 0) -+ if (setuid(0) < 0 && TheProcessKind != pkHelper) - debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror()); - - if (setuid(uid) < 0) diff --git a/www/squid3/files/pkg-install.in b/www/squid3/files/pkg-install.in deleted file mode 100644 index 8d8d17a353a2..000000000000 --- a/www/squid3/files/pkg-install.in +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/bin:/usr/sbin -pkgname=$1 -squid_homedir="/var/squid" -squid_cache_basedir="${squid_homedir}/cache" -squid_confdir="${PKG_PREFIX:-%%PREFIX%%}/etc/squid" -squid_logdir="/var/log/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_homedir} is writable for it. - if [ ! -d ${squid_homedir} ]; then - echo "Creating ${squid_homedir}..." - install -d -o root -g ${squid_group} \ - -m 0775 ${squid_homedir} - else - chgrp ${squid_group} ${squid_homedir} - chmod g+w ${squid_homedir} - fi - if [ ! -d ${squid_cache_basedir} ]; then - echo "Creating ${squid_cache_basedir} ..." - install -d -o ${squid_user} -g ${squid_group} \ - -m 0750 ${squid_cache_basedir} - else - chown ${squid_user} ${squid_cache_basedir} - chgrp ${squid_group} ${squid_cache_basedir} - chmod 0750 ${squid_cache_basedir} - 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 - 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/squid3/files/pkg-message.in b/www/squid3/files/pkg-message.in deleted file mode 100644 index 739ae1433c57..000000000000 --- a/www/squid3/files/pkg-message.in +++ /dev/null @@ -1,53 +0,0 @@ -[ -{ type: install - message: <<EOM - o You can find the configuration files for this package in the - directory %%PREFIX%%/etc/squid. - - o The default cache directory is /var/squid/cache/. - 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 When using DiskD storage scheme remember to read documentation: - http://wiki.squid-cache.org/Features/DiskDaemon - and alter your kern.ipc defaults in /boot/loader.conf. DiskD will not - work reliably without this. Last recomendations were: - - kern.ipc.msgmnb=8192 - kern.ipc.msgssz=64 - kern.ipc.msgtql=2048 - - 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. - - o If AUTH_SQL option is set, please, don't forget to install one of - following perl modules depending on database you like: - databases/p5-DBD-mysql - databases/p5-DBD-Pg - databases/p5-DBD-SQLite - - 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.4 default - configuration file %%PREFIX%%/etc/squid/squid.conf.sample. - - %%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. -EOM -} -] diff --git a/www/squid3/files/squid.in b/www/squid3/files/squid.in deleted file mode 100644 index c236627dc305..000000000000 --- a/www/squid3/files/squid.in +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh - -# 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. -# 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_krb5_ktname: -# Alternative Kerberos 5 Key Table. -# Default: none -# -# squid_krb5_config: -# Alternative Kerberos 5 config file -# Default: none - -. /etc/rc.subr - -name=squid -rcvar=squid_enable - -# Make sure that we invoke squid with "-f ${squid_conf}"; define this -# variable early so reload_cmd and stop_precmd pick it up: - -extra_commands="reload configtest" -reload_cmd=squid_reload -start_precmd=squid_prestart -start_postcmd=squid_getpid -stop_precmd=squid_prestop -configtest_cmd=squid_configtest -reload_precmd=squid_configtest -restart_precmd=squid_configtest - -# 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. - -squid_load_rc_config() -{ - : ${squid_chdir:=/var/squid} - : ${squid_conf:=%%PREFIX%%/etc/squid/squid.conf} - : ${squid_enable:=NO} - : ${squid_program:=%%PREFIX%%/sbin/squid} - : ${squid_pidfile:=/var/run/squid/squid.pid} - : ${squid_user:=squid} - - required_args="-f ${squid_conf}" - required_dirs=$chdir - required_files=$squid_conf - command_args="${required_args} ${squid_flags}" - procname="?squid-*" - pidfile=$squid_pidfile -} - -squid_prestart() -{ - # setup KRB5_KTNAME: - squid_krb5_ktname=${squid_krb5_ktname:-"NONE"} - if [ "${squid_krb5_ktname}" != "NONE" ]; then - export KRB5_KTNAME=${squid_krb5_ktname} - fi - - # setup KRB5_CONFIG: - squid_krb5_config=${squid_krb5_config:-"NONE"} - if [ "${squid_krb5_config}" != "NONE" ]; then - export KRB5_CONFIG=${squid_krb5_config} - fi - - # setup FIB tables: - if command -v check_namevarlist > /dev/null 2>&1; then - check_namevarlist fib && return 0 - fi - - ${SYSCTL} net.fibs >/dev/null 2>&1 || return 0 - - squid_fib=${squid_fib:-"NONE"} - if [ "${squid_fib}" != "NONE" ]; then - command="setfib -F $squid_fib $command" - else - return 0 - fi - - squid_configtest -} - -squid_reload() -{ - $command $required_args $squid_flags -k reconfigure -} - -squid_configtest() -{ - echo "Performing sanity check on ${name} configuration." - if $command $required_args $squid_flags -k check; then - echo "Configuration for ${name} passes." - return 0 - else - return $? - fi -} - -squid_getpid() -{ - # retrieve the PID of the Squid master process explicitly here - # in case rc.subr was unable to determine it: - if [ -z "$rc_pid" ]; then - while ! [ -f ${pidfile} ]; do - sleep 1 - done - read _pid _junk <${pidfile} - [ -z "${_pid}" ] || pid=${_pid} - else - pid=${rc_pid} - fi -} - -squid_prestop() -{ - command_args="$command_args -k shutdown" - squid_configtest -} - -load_rc_config $name -squid_load_rc_config -run_rc_command $1 |