From 10cfee9cf995f0cfb211c77ac85f1b9e61344954 Mon Sep 17 00:00:00 2001 From: ziggi Date: Sat, 25 Jan 2020 10:17:34 +0000 Subject: [PATCH] update squid --- net/squid/Makefile | 12 +-- net/squid/distinfo | 5 +- net/squid/files/extra-patch-gen-stacktrace | 62 ------------- net/squid/files/patch-compat_compat.h | 20 ---- net/squid/files/patch-compat_shm.cc | 11 --- net/squid/files/patch-configure | 92 ------------------- net/squid/files/patch-src-cf.data.pre | 13 --- .../patch-src_DiskIO_Mmapped_MmappedFile.cc | 11 --- net/squid/files/patch-src_enums.h | 12 --- net/squid/files/patch-src_ip_Intercept.cc | 15 --- net/squid/files/patch-src_ipc_mem_Segment.cc | 11 --- .../files/patch-src_security_ServerOptions.h | 11 --- net/squid/files/patch-src_tools.cc | 11 --- net/squid/pkg-plist | 6 ++ 14 files changed, 15 insertions(+), 277 deletions(-) delete mode 100644 net/squid/files/extra-patch-gen-stacktrace delete mode 100644 net/squid/files/patch-compat_compat.h delete mode 100644 net/squid/files/patch-compat_shm.cc delete mode 100644 net/squid/files/patch-configure delete mode 100644 net/squid/files/patch-src-cf.data.pre delete mode 100644 net/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc delete mode 100644 net/squid/files/patch-src_enums.h delete mode 100644 net/squid/files/patch-src_ip_Intercept.cc delete mode 100644 net/squid/files/patch-src_ipc_mem_Segment.cc delete mode 100644 net/squid/files/patch-src_security_ServerOptions.h delete mode 100644 net/squid/files/patch-src_tools.cc diff --git a/net/squid/Makefile b/net/squid/Makefile index e6f447ac..485fbd9c 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -2,13 +2,13 @@ # $Id: Makefile 2316 2009-09-02 08:41:08Z root $ # PORTNAME= squid -PORTVERSION= 4.8 +PORTVERSION= 4.9 CATEGORIES= net MASTER_SITES+= http://www.squid-cache.org/Versions/v4/ -MASTER_SITES+= http://www2.us.squid-cache.org/Versions/v4/ -MASTER_SITES+= http://www1.at.squid-cache.org/Versions/v4/ -MASTER_SITES+= http://www.eu.squid-cache.org/Versions/v4/ -MASTER_SITES+= http://www1.jp.squid-cache.org/Versions/v4/ +MASTER_SITES+= http://www2.us.squid-cache.org/Versions/v4/ +MASTER_SITES+= http://www1.at.squid-cache.org/Versions/v4/ +MASTER_SITES+= http://www.eu.squid-cache.org/Versions/v4/ +MASTER_SITES+= http://www1.jp.squid-cache.org/Versions/v4/ MAINTAINER= homeunix7@gmail.com @@ -89,7 +89,7 @@ CONFIGURE_ARGS+= --enable-icmp #CONFIGURE_ARGS+= --enable-pf-transparent CONFIGURE_ARGS+= --enable-referer-log -CONFIGURE_ARGS+= --enable-snmp +CONFIGURE_ARGS+= --disable-snmp CONFIGURE_ARGS+= --enable-useragent-log CONFIGURE_ARGS+= --with-aufs-threads=10 CONFIGURE_ARGS+= --with-openssl=/usr diff --git a/net/squid/distinfo b/net/squid/distinfo index 70f90734..f1153c8e 100644 --- a/net/squid/distinfo +++ b/net/squid/distinfo @@ -1,2 +1,3 @@ -SHA256 (squid-4.8.tar.xz) = 78cdb324d93341d36d09d5f791060f6e8aaa5ff3179f7c949cd910d023a86210 -SIZE (squid-4.8.tar.xz) = 2440888 +TIMESTAMP = 1579943738 +SHA256 (squid-4.9.tar.xz) = 1cb1838c6683b0568a3a4050f4ea2fc1eaa5cbba6bdf7d57f7258c7cd7b41fa1 +SIZE (squid-4.9.tar.xz) = 2444664 diff --git a/net/squid/files/extra-patch-gen-stacktrace b/net/squid/files/extra-patch-gen-stacktrace deleted file mode 100644 index e1631e23..00000000 --- a/net/squid/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 - #endif - -+#if PRINT_STACK_TRACE -+#ifdef __FreeBSD__ -+#define UNW_LOCAL_ONLY -+#include -+#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/net/squid/files/patch-compat_compat.h b/net/squid/files/patch-compat_compat.h deleted file mode 100644 index 88504672..00000000 --- a/net/squid/files/patch-compat_compat.h +++ /dev/null @@ -1,20 +0,0 @@ ---- compat/compat.h.orig 2016-12-16 10:06:20 UTC -+++ compat/compat.h -@@ -29,17 +29,6 @@ - /******************************************************/ - #include "compat/osdetect.h" - --/* 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/net/squid/files/patch-compat_shm.cc b/net/squid/files/patch-compat_shm.cc deleted file mode 100644 index c220f4de..00000000 --- a/net/squid/files/patch-compat_shm.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- compat/shm.cc.orig 2016-12-16 10:06:20 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/net/squid/files/patch-configure b/net/squid/files/patch-configure deleted file mode 100644 index dd9c909b..00000000 --- a/net/squid/files/patch-configure +++ /dev/null @@ -1,92 +0,0 @@ ---- configure.orig 2019-02-19 03:04:42 UTC -+++ configure -@@ -34701,7 +34701,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" " -@@ -34716,8 +34716,10 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - #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 -@@ -35190,7 +35192,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" -@@ -37582,7 +37584,7 @@ for ac_header in \ - arpa/nameser.h \ - assert.h \ - bstring.h \ -- crypt.h \ -+ rpcsvc/crypt.h \ - ctype.h \ - direct.h \ - errno.h \ -@@ -37790,6 +37792,7 @@ ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" - #include - #endif - #if HAVE_NETINET_IP_COMPAT_H -+#include /* IFNAMSIZ */ - #include - #endif - #if HAVE_NETINET_IP_FIL_H -@@ -41819,6 +41822,7 @@ if test "x$enable_ipf_transparent" != "xno" ; then - # include - # include - -+# include /* IFNAMSIZ */ - # include - # include - # include -@@ -41849,6 +41853,7 @@ else - # include - # include - #undef minor_t -+# include /* IFNAMSIZ */ - # include - # include - # include -@@ -41893,6 +41898,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 \ -@@ -41922,6 +41928,7 @@ ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" - #if HAVE_IP_COMPAT_H - #include - #elif HAVE_NETINET_IP_COMPAT_H -+#include /* IFNAMSIZ */ - #include - #endif - #if HAVE_IP_FIL_H -@@ -41985,8 +41992,7 @@ _ACEOF - - - fi --ac_fn_cxx_check_member "$LINENO" "struct natlookup" "nl_realipaddr.in6" -- "ac_cv_member_struct_natlookup_nl_realipaddr_in6___" " -+ac_fn_cxx_check_member "$LINENO" "struct natlookup" "nl_realipaddr.in6" "ac_cv_member_struct_natlookup_nl_realipaddr_in6___" " - #if USE_SOLARIS_IPFILTER_MINOR_T_HACK - #define minor_t fubar - #endif diff --git a/net/squid/files/patch-src-cf.data.pre b/net/squid/files/patch-src-cf.data.pre deleted file mode 100644 index 9fb9b773..00000000 --- a/net/squid/files/patch-src-cf.data.pre +++ /dev/null @@ -1,13 +0,0 @@ ---- src/cf.data.pre.orig 2018-06-11 16:30:57 UTC -+++ src/cf.data.pre -@@ -4947,6 +4947,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/net/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc b/net/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc deleted file mode 100644 index 9005a091..00000000 --- a/net/squid/files/patch-src_DiskIO_Mmapped_MmappedFile.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/DiskIO/Mmapped/MmappedFile.cc.orig 2016-12-16 10:06:20 UTC -+++ src/DiskIO/Mmapped/MmappedFile.cc -@@ -236,7 +236,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/net/squid/files/patch-src_enums.h b/net/squid/files/patch-src_enums.h deleted file mode 100644 index c9225908..00000000 --- a/net/squid/files/patch-src_enums.h +++ /dev/null @@ -1,12 +0,0 @@ ---- src/enums.h.orig 2019-02-18 18:46:22.000000000 -0800 -+++ src/enums.h 2019-04-17 22:22:05.123445000 -0700 -@@ -9,6 +9,9 @@ - #ifndef SQUID_ENUMS_H - #define SQUID_ENUMS_H - -+/* Namespace pollution from fcntl.h as of FreeBSD r345982 */ -+#undef FD_NONE -+ - enum fd_type { - FD_NONE, - FD_LOG, diff --git a/net/squid/files/patch-src_ip_Intercept.cc b/net/squid/files/patch-src_ip_Intercept.cc deleted file mode 100644 index 7635d3c5..00000000 --- a/net/squid/files/patch-src_ip_Intercept.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- src/ip/Intercept.cc.orig 2018-07-02 03:26:07 UTC -+++ src/ip/Intercept.cc -@@ -215,10 +215,10 @@ Ip::Intercept::IpfInterception(const Comm::ConnectionP - newConn->remote.getInAddr(natLookup.nl_outipaddr.in4); - } - #else -- // 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, "Your IPF (IPFilter) NAT does not support IPv6. Please upgrade it."); -- warningLevel = (warningLevel + 1) % 10; -+ warningLevel = (warningLevel + 1) % 1048576; - return false; - } - newConn->local.getInAddr(natLookup.nl_inip); diff --git a/net/squid/files/patch-src_ipc_mem_Segment.cc b/net/squid/files/patch-src_ipc_mem_Segment.cc deleted file mode 100644 index 88431a56..00000000 --- a/net/squid/files/patch-src_ipc_mem_Segment.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ipc/mem/Segment.cc.orig 2016-12-16 10:06:20 UTC -+++ src/ipc/mem/Segment.cc -@@ -173,7 +173,7 @@ Ipc::Mem::Segment::attach() - assert(theSize == static_cast(static_cast(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) { - int xerrno = errno; - debugs(54, 5, "mmap " << theName << ": " << xstrerr(xerrno)); diff --git a/net/squid/files/patch-src_security_ServerOptions.h b/net/squid/files/patch-src_security_ServerOptions.h deleted file mode 100644 index a27e9769..00000000 --- a/net/squid/files/patch-src_security_ServerOptions.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/security/ServerOptions.h.orig 2019-02-19 02:46:22 UTC -+++ src/security/ServerOptions.h -@@ -35,7 +35,7 @@ class ServerOptions : public PeerOptions (public) - // is more secure to have only a small set of trusted CA. - flags.tlsDefaultCa.defaultTo(false); - } -- ServerOptions(const ServerOptions &) = default; -+ ServerOptions(const ServerOptions &) = delete; - ServerOptions &operator =(const ServerOptions &); - ServerOptions(ServerOptions &&o) { this->operator =(o); } - ServerOptions &operator =(ServerOptions &&o) { this->operator =(o); return *this; } diff --git a/net/squid/files/patch-src_tools.cc b/net/squid/files/patch-src_tools.cc deleted file mode 100644 index 19c4e981..00000000 --- a/net/squid/files/patch-src_tools.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- src/tools.cc.orig 2018-06-11 16:30:57 UTC -+++ src/tools.cc -@@ -605,7 +605,7 @@ no_suid(void) - uid = geteuid(); - debugs(21, 3, "no_suid: PID " << getpid() << " giving up root privileges forever"); - -- if (setuid(0) < 0) { -+ if (setuid(0) < 0 && TheProcessKind != pkHelper) { - int xerrno = errno; - debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerr(xerrno)); - } diff --git a/net/squid/pkg-plist b/net/squid/pkg-plist index bc680c8f..b538cd3c 100644 --- a/net/squid/pkg-plist +++ b/net/squid/pkg-plist @@ -30,6 +30,11 @@ man/man8/squid.8.gz man/man8/storeid_file_rewrite.8.gz man/man8/url_lfs_rewrite.8.gz sbin/squid +share/examples/squid/cachemgr.conf +share/examples/squid/errorpage.css +share/examples/squid/mime.conf.default +share/examples/squid/squid.conf.default +share/examples/squid/squid.conf.documented share/squid/errors/af/ERR_ACCESS_DENIED share/squid/errors/af/ERR_ACL_TIME_QUOTA_EXCEEDED share/squid/errors/af/ERR_AGENT_CONFIGURE @@ -2186,6 +2191,7 @@ share/squid/icons/silk/script.png share/squid/icons/SN.png share/squid/mib.txt @dir libexec/squid +@dir share/examples/squid @dir share/squid/errors/af @dir share/squid/errors/ar @dir share/squid/errors/az