From c465fdc5f83b56064a2c5f93a2e8fb5bdadbe81b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 14 Jan 2016 00:07:53 +0100 Subject: [PATCH 1/4] squid: build-depend on libext2fs squid uses libcom_err, a static library provided by libext2fs Signed-off-by: Daniel Golle --- net/squid/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/squid/Makefile b/net/squid/Makefile index a5e43b340..9796b46e7 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -21,6 +21,9 @@ PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +# uses libcom_err.la +PKG_BUILD_DEP:=libext2fs + include $(INCLUDE_DIR)/package.mk define Package/squid/Default From 92fa2b3895ac3577fec0fdf533818c1758916682 Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Thu, 11 Feb 2016 09:16:56 +0100 Subject: [PATCH 2/4] squid: disable krb5 - fix build error reported by buildbot by disabling krb5 - libcom_err from krb5 is used - configure output: configure: WARNING: library 'com_err' is required for Heimdal Kerberos - krb5 has its own libcom_err (see krb5 package) with its own symbols - linking with wrong libcom_err from libext2fs produces errors during libgssapi_krb5.so: undefined reference to `error_message@com_err_3_MIT' libgssapi_krb5.so: undefined reference to `remove_error_table@com_err_3_MIT' libgssapi_krb5.so: undefined reference to `add_error_table@com_err_3_MIT' -> remove libext2fs dependency (wasnt working anyway - no PKG_BUILD_DEP) Signed-off-by: Dirk Neukirchen --- net/squid/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/squid/Makefile b/net/squid/Makefile index 9796b46e7..dcf138aae 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -21,9 +21,6 @@ PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -# uses libcom_err.la -PKG_BUILD_DEP:=libext2fs - include $(INCLUDE_DIR)/package.mk define Package/squid/Default @@ -88,6 +85,7 @@ CONFIGURE_ARGS += \ --disable-auth-basic \ --disable-arch-native \ --with-krb5-config=no \ + --without-mit-krb5 \ --without-libcap \ --without-netfilter-conntrack From 3e972a57c62d58914d5bcdd5d4789f96aa227a29 Mon Sep 17 00:00:00 2001 From: Adam Gensler Date: Sun, 8 Jan 2017 10:12:57 -0500 Subject: [PATCH 3/4] net/squid: Allow squid to parse mime.conf Copy mime.conf to temporary directory so squid process can properly read the file. Without it squid cannot access mime.conf and throws a warning during startup. Signed-off by: Adam Gensler --- net/squid/files/squid.config | 4 ++++ net/squid/files/squid.init | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/net/squid/files/squid.config b/net/squid/files/squid.config index 4c0daae95..327ecef7c 100644 --- a/net/squid/files/squid.config +++ b/net/squid/files/squid.config @@ -3,3 +3,7 @@ config squid 'squid' option http_port '3128' option coredump_dir '/tmp/squid' option visible_hostname 'OpenWrt' + option mime_table '/etc/squid/mime.conf' + #option http_port_options 'intercept' + #option ssldb '/tmp/squid/ssldb' + #option ssldb_options '-M 4MB' diff --git a/net/squid/files/squid.init b/net/squid/files/squid.init index 8b3094840..177b1490c 100644 --- a/net/squid/files/squid.init +++ b/net/squid/files/squid.init @@ -7,6 +7,7 @@ STOP=10 USE_PROCD=1 PROG=/usr/sbin/squid CONFIGFILE="/tmp/squid/squid.conf" +MIMETABLE="/tmp/squid/mime.conf" validate_squid_section() { uci_validate_section squid squid "${1}" \ @@ -14,7 +15,8 @@ validate_squid_section() { 'http_port:port:3128' \ 'coredump_dir:string' \ 'visible_hostname:string:OpenWrt' \ - 'pinger_enable:string:off' + 'pinger_enable:string:off' \ + 'mime_table:string:/etc/squid/mime.conf' } start_service() { @@ -33,6 +35,9 @@ start_service() { echo visible_hostname $visible_hostname >> $CONFIGFILE echo pinger_enable $pinger_enable >> $CONFIGFILE + cat $mime_table > $MIMETABLE + echo mime_table $MIMETABLE >> $CONFIGFILE + procd_open_instance procd_set_param command $PROG -s -f $CONFIGFILE -N procd_set_param file $CONFIGFILE From 9b772a50db5f2d2376ec97f7e273ec5c9bc138a8 Mon Sep 17 00:00:00 2001 From: Marko Ratkaj Date: Tue, 19 Sep 2017 17:38:19 +0200 Subject: [PATCH 4/4] squid: bump to 3.5.27 Bump Squid to version 3.5.27 and fix broken menuconfig menu. Signed-off-by: Marko Ratkaj --- net/squid/Makefile | 12 +++++---- net/squid/patches/001-cross_compile.patch | 24 +++++++++++++++--- net/squid/patches/100-mime.patch | 30 ----------------------- 3 files changed, 27 insertions(+), 39 deletions(-) delete mode 100644 net/squid/patches/100-mime.patch diff --git a/net/squid/Makefile b/net/squid/Makefile index dcf138aae..b9cedd7ea 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -8,15 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squid -PKG_VERSION:=3.5.12 +PKG_VERSION:=3.5.27 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Luka Perkov +PKG_MAINTAINER:=Marko Ratkaj PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.5/ -PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63 +PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v3/3.5/ \ + http://www2.pl.squid-cache.org/Versions/v3/3.5/ \ + http://www.squid-cache.org/Versions/v3/3.5/ +PKG_HASH:=5ddb4367f2dc635921f9ca7a59d8b87edb0412fa203d1543393ac3c7f9fef0ec PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,11 +30,11 @@ define Package/squid/Default CATEGORY:=Network SUBMENU:=Web Servers/Proxies URL:=http://www.squid-cache.org/ + MENU:=1 endef define Package/squid $(call Package/squid/Default) - MENU:=1 DEPENDS:=+libopenssl +libpthread +librt +libltdl +libstdcpp TITLE:=full-featured Web proxy cache endef diff --git a/net/squid/patches/001-cross_compile.patch b/net/squid/patches/001-cross_compile.patch index c7493bbce..be9fdcd25 100644 --- a/net/squid/patches/001-cross_compile.patch +++ b/net/squid/patches/001-cross_compile.patch @@ -1,24 +1,40 @@ --- a/src/Makefile.in +++ b/src/Makefile.in -@@ -7761,3 +7761,3 @@ cache_cf.o: cf_parser.cci +@@ -7984,7 +7984,7 @@ cache_cf.o: cf_parser.cci + + # cf_gen builds the configuration files. cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci - $(BUILDCXX) $(BUILDCXXFLAGS) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src + g++ -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src + # squid.conf.default is built by cf_gen when making cf_parser.cci + squid.conf.default squid.conf.documented: cf_parser.cci --- a/configure +++ b/configure -@@ -20133,3 +20133,3 @@ if test "$cross_compiling" = yes; then : +@@ -20842,7 +20842,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -@@ -28289,3 +28289,3 @@ else + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -29142,7 +29142,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -@@ -28314,3 +28314,3 @@ else + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -29167,7 +29167,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/net/squid/patches/100-mime.patch b/net/squid/patches/100-mime.patch deleted file mode 100644 index 1138a413d..000000000 --- a/net/squid/patches/100-mime.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/mime.conf.default -+++ b/src/mime.conf.default -@@ -1,20 +1,3 @@ --## Copyright (C) 1996-2015 The Squid Software Foundation and contributors --## --## Squid software is distributed under GPLv2+ license and includes --## contributions from numerous individuals and organizations. --## Please see the COPYING and CONTRIBUTORS files for details. --## --# --# This file associates URL patterns for servers or services --# that don't automatically include Content-Type (like ftp) with a mime type --# and a graphical icon. --# --# Content-Encodings are taken from section 3.1 of RFC2068 (HTTP/1.1) --# --# This file has the format : --# --# regexp content-type icon encoding mode actions --#-------------------------------------------------------------------------------------------------------- - \.gif$ image/gif silk/image.png - image +download - \.mime$ www/mime silk/page_white_text.png - ascii +download - ^internal-dirup$ - silk/arrow_up.png - - -@@ -191,6 +174,4 @@ README text/plain silk/information.pn - \.xml$ text/xml silk/page_world.png - ascii +download - \.xsl$ text/xml silk/layout.png - ascii +download - \.xyz$ chemical/x-xyz silk/chart_line.png - image +download --# --# the default - . text/plain silk/bullet_red.png - image +download +view