From patchwork Thu Nov 30 02:55:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B52C46CA3 for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web11.63590.1701312960356836611 for ; Wed, 29 Nov 2023 18:56:00 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=hSR06Z8h; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312959; bh=g+b22BIM6jrYJTJEAqVXj/NFiFuJCkiB7VMNm+4jnmw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hSR06Z8htk3VhdvXuKGkC1q3depLgr2ssgFNZZfv3z5uKC9xvCV//HtpG24vOjIqL 423maf/3Dsb0MODkhsGRxsg7rTMrq8sqQHoAJDLLAsl/UnfF98dsvKeOGWVlVKkTg8 w039+wEJ8856iyLLDnfV/GY/mTdwbghjpsO36YjEb9FJ+Sec8glsQXkJVP+8GXkJK5 TQMwlbUYD9OdlaPal9uFsKUbACHiyM4O9/2apL4eCExnDVZgz0tJBAVC1i6IWQmnBh hYFNX+p7Wv32eOQsJZLCUibRlIAF6p5BObFZpVoqm4YWQchIHLGj097E60qJxENlgY MpO/mQhbNbaeQ== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 2366011202A3; Thu, 30 Nov 2023 02:55:57 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 1/6] squid: update from v5.7 to v6.5 Date: Thu, 30 Nov 2023 03:55:24 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: Rtf08UYCO_k4tyPtTsIp7hXKPLPax2RZ X-Proofpoint-ORIG-GUID: Rtf08UYCO_k4tyPtTsIp7hXKPLPax2RZ X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107154 From: Patrick Wicki Refresh patches and clean up ones that are no longer needed: * dlopen test was removed in b65d2165c5c250242764ed7cdac4540fba813dec * libxml2 variables were removed in 866a092dad01e58986a6e9ecb84ac89037a63e9a * squid-conf-tests no longer run at build time since cd3dc147bf8abc0225237ced865c6660fffcb63a Fix squid-conf-tests to allow running on target device. License change: Update year The version update eliminates the following CVEs: * CVE-2023-5824 (affected: <6.4) * CVE-2023-46724 (affected: >=3.3.0.1, <6.4) * CVE-2023-46728 (affected: <6.0.1) * CVE-2023-46846 (affected: >=2.6, <6.4) * CVE-2023-46847 (affected: >=3.2.0.1, <6.4) * CVE-2023-46848 (affected: >=5.0.3, <6.4) Signed-off-by: Patrick Wicki --- ...for-Wno-error-format-truncation-comp.patch | 18 ++--- ...quid-conf-tests-run-on-target-device.patch | 74 +++++++++++++++++++ ...d-dynamic-ldb-link-test-in-configure.patch | 40 ---------- .../files/Set-up-for-cross-compilation.patch | 10 +-- .../files/Skip-AC_RUN_IFELSE-tests.patch | 25 +++---- .../recipes-daemons/squid/files/run-ptest | 1 + .../squid/files/set_sysroot_patch.patch | 41 ---------- ...-t-do-squid-conf-tests-at-build-time.patch | 61 --------------- .../squid/{squid_5.7.bb => squid_6.5.bb} | 27 +++---- 9 files changed, 110 insertions(+), 187 deletions(-) create mode 100644 meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch delete mode 100644 meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch delete mode 100644 meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch delete mode 100644 meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch rename meta-networking/recipes-daemons/squid/{squid_5.7.bb => squid_6.5.bb} (81%) diff --git a/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index acebd6dce..a478dcd80 100644 --- a/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/meta-networking/recipes-daemons/squid/files/0001-configure-Check-for-Wno-error-format-truncation-comp.patch @@ -1,4 +1,4 @@ -From c21adbb0b230ffba97cf5d059e2bd024e13a37df Mon Sep 17 00:00:00 2001 +From 38e7e90cc2075952c1b74f5fca826f9c6cadb2f0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Apr 2017 11:54:57 -0700 Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler @@ -13,8 +13,8 @@ Signed-off-by: Khem Raj --- Upstream-Status: Pending - acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 ++ + acinclude/ax_check_compile_flag.m4 | 74 ++++++++++++++++++++++++++++++ + configure.ac | 2 + 2 files changed, 76 insertions(+) create mode 100644 acinclude/ax_check_compile_flag.m4 @@ -99,20 +99,20 @@ index 0000000..dcabb92 +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/configure.ac b/configure.ac -index ff4688c..9382fdf 100644 +index 2543676..4635474 100644 --- a/configure.ac +++ b/configure.ac -@@ -26,6 +26,7 @@ m4_include([acinclude/pkg.m4]) +@@ -28,6 +28,7 @@ m4_include([acinclude/pkg.m4]) + m4_include([acinclude/tdb.m4]) m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) + m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) +m4_include([acinclude/ax_check_compile_flag.m4]) HOSTCXX="$BUILD_CXX" PRESET_CFLAGS="$CFLAGS" -@@ -44,6 +45,7 @@ AC_PROG_CXX +@@ -59,6 +60,7 @@ AC_USE_SYSTEM_EXTENSIONS + AC_LANG([C++]) - AC_CANONICAL_HOST +AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[CFLAGS="$CFLAGS -Wno-error=format-truncation" CXXFLAGS="$CXXFLAGS -Wno-error=format-truncation"]) # Clang 3.2 on some CPUs requires -march-native to detect correctly. diff --git a/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch b/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch new file mode 100644 index 000000000..56c91de3c --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/0002-squid-make-squid-conf-tests-run-on-target-device.patch @@ -0,0 +1,74 @@ +From cd8bf8a4bf881f84c23a5fc1f48bb716efa51512 Mon Sep 17 00:00:00 2001 +From: Patrick Wicki +Date: Wed, 22 Nov 2023 15:35:44 +0100 +Subject: [PATCH] squid: make squid-conf-tests run on target device + +* Fix paths to allow tests to run outside the original builddir +* Allow the tests to run on read-only root + * Don't overwrite tests with true on success + * Change logfile path to /var/log + +Upstream-Status: Inappropriate [cross compile specific] + +Signed-off-by: Patrick Wicki + +--- + test-suite/Makefile.am | 16 ++++++++-------- + test-suite/test-squid-conf.sh | 2 +- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am +index 8becdbc..eccd49c 100644 +--- a/test-suite/Makefile.am ++++ b/test-suite/Makefile.am +@@ -21,7 +21,7 @@ LDADD = \ + EXTRA_PROGRAMS = mem_node_test splay + + EXTRA_DIST = \ +- $(srcdir)/squidconf/* \ ++ squidconf/* \ + test-functionality.sh \ + test-sources.sh \ + test-squid-conf.sh \ +@@ -134,21 +134,21 @@ VirtualDeleteOperator_SOURCES = \ + + installcheck-local: squid-conf-tests + +-squid-conf-tests: $(srcdir)/test-squid-conf.sh $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* +- @failed=0; cfglist="$(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*.conf"; rm -f $@ || $(TRUE); \ ++squid-conf-tests: test-squid-conf.sh $(top_builddir)/src/squid.conf.default squidconf/* ++ @failed=0; cfglist="$(top_builddir)/src/squid.conf.default squidconf/*.conf"; rm -f $@ || $(TRUE); \ + for cfg in $$cfglist ; do \ +- $(srcdir)/test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ ++ ./test-squid-conf.sh $(top_builddir) $(sbindir) $$cfg || \ + { echo "FAIL: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + failed=1; break; \ + }; \ + if test "$$failed" -eq 0; then \ + echo "PASS: squid.conf test: $$cfg" | \ + sed s%$(top_builddir)/src/%% | \ +- sed s%$(srcdir)/squidconf/%% ; \ ++ sed s%squidconf/%% ; \ + else break; fi; \ + done; \ +- if test "$$failed" -eq 0; then cp $(TRUE) $@ ; else exit 1; fi ++ exit "$$failed" + +-CLEANFILES += squid-conf-tests squid-stderr.log ++CLEANFILES += squid-conf-tests /var/log/squid-stderr.log +diff --git a/test-suite/test-squid-conf.sh b/test-suite/test-squid-conf.sh +index 05fcaf3..a5a8a5a 100755 +--- a/test-suite/test-squid-conf.sh ++++ b/test-suite/test-squid-conf.sh +@@ -111,7 +111,7 @@ then + done < $instructionsFile + fi + +-errorLog="squid-stderr.log" ++errorLog="/var/log/squid-stderr.log" + + $sbindir/squid -k parse -f $configFile 2> $errorLog + result=$? diff --git a/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch b/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch deleted file mode 100644 index 738e609c0..000000000 --- a/meta-networking/recipes-daemons/squid/files/Fix-flawed-dynamic-ldb-link-test-in-configure.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b73b802282bf95d214c86ba943c5765ba6930bc1 Mon Sep 17 00:00:00 2001 -From: Jim Somerville -Date: Mon, 21 Oct 2013 12:50:44 -0400 -Subject: [PATCH] Fix flawed dynamic -ldb link test in configure - -The test uses dbopen, but just ignores the fact -that this function may not exist in the db version -used. This leads to the dynamic link test failing -and the configure script just making assumptions -about why and setting the need for -ldb incorrectly. - -Signed-off-by: Jim Somerville - ---- -Upstream-Status: Pending - - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/configure.ac b/configure.ac -index d2f7feb..c7ae568 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3268,6 +3268,16 @@ case "$host" in - ;; - esac - -+if test "x$ac_cv_have_decl_dbopen" = "xyes"; then -+ dnl 1.85 -+ SQUID_CHECK_DBOPEN_NEEDS_LIBDB -+else -+ # dbopen isn't there. So instead of running a compile/link test that -+ # uses it and is thus guaranteed to fail, we just assume that we will -+ # need to link in the db library, rather than fabricate some other -+ # dynamic compile/link test. -+ ac_cv_dbopen_libdb="yes" -+fi - dnl System-specific library modifications - dnl - case "$host" in diff --git a/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch index ffb737164..ae8706df7 100644 --- a/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch +++ b/meta-networking/recipes-daemons/squid/files/Set-up-for-cross-compilation.patch @@ -1,4 +1,4 @@ -From 995aaf30799fa972441354b6feb45f0621968929 Mon Sep 17 00:00:00 2001 +From c0be3192f608037682464bcb728e97f9d9b543aa Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Wed, 16 Oct 2013 16:41:03 -0400 Subject: [PATCH] Set up for cross compilation @@ -17,12 +17,12 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac -index fe80ee0..57cd1ac 100644 +index ca0bc79..c222851 100644 --- a/configure.ac +++ b/configure.ac -@@ -27,6 +27,7 @@ m4_include([acinclude/lib-checks.m4]) - m4_include([acinclude/ax_cxx_compile_stdcxx_11.m4]) - m4_include([acinclude/ax_cxx_0x_types.m4]) +@@ -29,6 +29,7 @@ m4_include([acinclude/tdb.m4]) + m4_include([acinclude/lib-checks.m4]) + m4_include([acinclude/ax_cxx_compile_stdcxx.m4]) +HOSTCXX="$BUILD_CXX" PRESET_CFLAGS="$CFLAGS" diff --git a/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch index 10853333e..5bb30bfcb 100644 --- a/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch +++ b/meta-networking/recipes-daemons/squid/files/Skip-AC_RUN_IFELSE-tests.patch @@ -1,4 +1,4 @@ -From e4778299a3e49a634d2c7fe4fd9ac77777e829e3 Mon Sep 17 00:00:00 2001 +From 050f8ab275a7a5f3d94045da6b15a2b63dfbeb3f Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Tue, 14 Oct 2014 02:56:08 -0400 Subject: [PATCH] Skip AC_RUN_IFELSE tests @@ -17,10 +17,10 @@ Signed-off-by: Jackie Huang 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 -index ad0ba60..4477446 100644 +index 2c4e340..64648e3 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 -@@ -61,7 +61,15 @@ main(void) +@@ -57,7 +57,15 @@ main(void) return 0; } @@ -35,13 +35,13 @@ index ad0ba60..4477446 100644 + dnl Can't test in cross compiled env - so assume good + squid_cv_broken_heimdal_krb5_h=no ]) + SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test) ]) - ]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H diff --git a/acinclude/lib-checks.m4 b/acinclude/lib-checks.m4 -index 1e9333527c..2d42787029 100644 +index 53847a8..850322a 100644 --- a/acinclude/lib-checks.m4 +++ b/acinclude/lib-checks.m4 -@@ -227,7 +227,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ +@@ -205,7 +205,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_CONST_SSL_METHOD],[ [ AC_MSG_RESULT([no]) ], @@ -52,15 +52,14 @@ index 1e9333527c..2d42787029 100644 SQUID_STATE_ROLLBACK(check_const_SSL_METHOD) ]) -@@ -386,8 +386,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ - [ - AC_MSG_RESULT([yes]) - AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) -- ], --[]) +@@ -347,7 +349,9 @@ AC_DEFUN([SQUID_CHECK_OPENSSL_TXTDB],[ + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(SQUID_USE_SSLLHASH_HACK, 1) +- ],[]) + ],[ + AC_MSG_RESULT([skipped - can't test in cross-compiled env]) + ]) - SQUID_STATE_ROLLBACK(check_TXTDB) + SQUID_STATE_ROLLBACK(check_TXTDB) ]) diff --git a/meta-networking/recipes-daemons/squid/files/run-ptest b/meta-networking/recipes-daemons/squid/files/run-ptest index de79a293c..8f8e28f92 100644 --- a/meta-networking/recipes-daemons/squid/files/run-ptest +++ b/meta-networking/recipes-daemons/squid/files/run-ptest @@ -1,3 +1,4 @@ #!/bin/sh # +make -C test-suite -k squid-conf-tests make -C test-suite -k runtest-TESTS diff --git a/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch b/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch deleted file mode 100644 index 124e04490..000000000 --- a/meta-networking/recipes-daemons/squid/files/set_sysroot_patch.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 702bd881b66dc034e711c0ff47805f2da40b6e0d Mon Sep 17 00:00:00 2001 -From: Yue Tao -Date: Mon, 8 Aug 2016 16:04:33 +0800 -Subject: [PATCH] Set the SYSROOT for libxml2 header file to avoid host - contamination. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Yue Tao -Signed-off-by: Yi Zhao - ---- - configure.ac | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 504a844..ff4688c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -931,15 +931,15 @@ if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then - dnl Find the main header and include path... - AC_CACHE_CHECK([location of libxml2 include files], [ac_cv_libxml2_include], [ - AC_CHECK_HEADERS([libxml/parser.h], [], [ -- AC_MSG_NOTICE([Testing in /usr/include/libxml2]) -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/include/libxml2]) - SAVED_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" -+ CPPFLAGS="-I$SYSROOT/usr/include/libxml2 $CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/include/libxml2"], [ -- AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) -- CPPFLAGS="-I/usr/local/include/libxml2 $SAVED_CPPFLAGS" -+ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/include/libxml2"], [ -+ AC_MSG_NOTICE([Testing in $SYSROOT/usr/local/include/libxml2]) -+ CPPFLAGS="-I$SYSROOT/usr/local/include/libxml2 $SAVED_CPPFLAGS" - unset ac_cv_header_libxml_parser_h -- AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I/usr/local/include/libxml2"], [ -+ AC_CHECK_HEADERS([libxml/parser.h], [LIBXML2_CFLAGS="$LIBXML2_CFLAGS -I$SYSROOT/usr/local/include/libxml2"], [ - AC_MSG_NOTICE([Failed to find libxml2 header file libxml/parser.h]) - ]) - ]) diff --git a/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch deleted file mode 100644 index ea27285e0..000000000 --- a/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 8786b91488dae3f6dfeadd686e80d2ffc5c29320 Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Thu, 25 Aug 2016 15:22:57 +0800 -Subject: [PATCH] squid: don't do squid-conf-tests at build time - -* squid-conf-tests is a test to run "squid -k parse -f" - to perse the config files, which should not be run - at build time since we are cross compiling, so remove - it but it will be added back for the runtime ptest. - -* Fix the directories of the conf files for squid-conf-tests - so that it can run on the target board. - -Upstream-Status: Inappropriate [cross compile specific] - -Signed-off-by: Jackie Huang - ---- - test-suite/Makefile.am | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am -index 0233c0e..e0021b6 100644 ---- a/test-suite/Makefile.am -+++ b/test-suite/Makefile.am -@@ -40,8 +40,7 @@ TESTS += debug \ - splay\ - mem_node_test\ - mem_hdr_test\ -- $(ESI_TESTS) \ -- squid-conf-tests -+ $(ESI_TESTS) - - ## Sort by alpha - any build failures are significant. - check_PROGRAMS += debug \ -@@ -159,19 +158,19 @@ VirtualDeleteOperator_SOURCES = \ - ##$(TARGLIB): $(LIBOBJS) - ## $(AR_R) $(TARGLIB) $(LIBOBJS) - --squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/* -+squid-conf-tests: $(sysconfdir)/squid.conf.default squidconf/* - @failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \ - for cfg in $$cfglist ; do \ -- $(top_builddir)/src/squid -k parse -f $$cfg || \ -+ squid -k parse -f $$cfg || \ - { echo "FAIL: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - failed=1; break; \ - }; \ - if test "$$failed" -eq 0; then \ - echo "PASS: squid.conf test: $$cfg" | \ -- sed s%$(top_builddir)/src/%% | \ -- sed s%$(srcdir)/squidconf/%% ; \ -+ sed s%$(sysconfdir)/%% | \ -+ sed s%squidconf/%% ; \ - else break; fi; \ - done; \ - if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi diff --git a/meta-networking/recipes-daemons/squid/squid_5.7.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb similarity index 81% rename from meta-networking/recipes-daemons/squid/squid_5.7.bb rename to meta-networking/recipes-daemons/squid/squid_6.5.bb index 2a5de1872..3795da7f5 100644 --- a/meta-networking/recipes-daemons/squid/squid_5.7.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -15,21 +15,19 @@ MIN_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 \ file://Set-up-for-cross-compilation.patch \ file://Skip-AC_RUN_IFELSE-tests.patch \ - file://Fix-flawed-dynamic-ldb-link-test-in-configure.patch \ file://squid-use-serial-tests-config-needed-by-ptest.patch \ file://run-ptest \ file://volatiles.03_squid \ - file://set_sysroot_patch.patch \ - file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ + file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ " SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" -SRC_URI[sha256sum] = "4c17e1eb324c4b7aa3c6889eba66eeca7ed98625d44076f7db7b027b2b093bd5" +SRC_URI[sha256sum] = "99acd54ec9d68b2a9080d19fcc43eca1a245146cf162dbba689510d01e6d0f25" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://errors/COPYRIGHT;md5=0a7deb73d8fb7a9849af7145987829a4 \ + file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ " DEPENDS = "libtool krb5 openldap db cyrus-sasl" @@ -81,23 +79,17 @@ do_install_ptest() { cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - # Needed to generate file squid.conf.default - oe_runmake DESTDIR=${D}${PTEST_PATH} -C src install-data-local - install -d ${D}${sysconfdir}/squid - install -m 0644 ${D}${PTEST_PATH}/${sysconfdir}/squid/squid.conf.default ${D}${sysconfdir}/squid + # Install default config + install -d ${D}${PTEST_PATH}/src + install -m 0644 ${B}/src/squid.conf.default ${D}${PTEST_PATH}/src - # Don't need these directories - rm -rf ${D}${PTEST_PATH}/${sysconfdir} - rm -rf ${D}${PTEST_PATH}/usr - rm -rf ${D}${PTEST_PATH}/var + # autoconf.h is needed during squid-conf-tests + install -d ${D}${PTEST_PATH}/include + install -m 0644 ${B}/include/autoconf.h ${D}${PTEST_PATH}/include # do NOT need to rebuild Makefile itself sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # Add squid-conf-tests for runtime tests - sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \ - -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # Ensure the path for command true is correct sed -i 's:^TRUE = .*$:TRUE = /bin/true:' ${D}${PTEST_PATH}/${TESTDIR}/Makefile } @@ -122,7 +114,6 @@ do_install:append() { FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" FILES:${PN}-dbg += "/usr/src/debug" FILES:${PN}-doc += "${datadir}/*.txt" -FILES:${PN}-ptest += "${sysconfdir}/squid/squid.conf.default" RDEPENDS:${PN} += "perl" RDEPENDS:${PN}-ptest += "perl make" From patchwork Thu Nov 30 02:55:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25D24C10DC3 for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web10.63777.1701312961463018996 for ; Wed, 29 Nov 2023 18:56:02 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=uPpVGHZd; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312960; bh=mNtQ3owRybDGfFtJMWdAIloy9rN+Y3s/2Bhv4W+f/Jw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=uPpVGHZdfSfVY4wo2vFZkqN7O3lZWxlnnO7RCIvBOdkwq0K3ZhaLMvJvoXXx1nZps PyoLoPbmulPzRm+49kOsbY5sZuve32OL886MeIfJvDQCeSpgarVQy89NS83gfetkLM Ywo3CHA7Zc+HMFWg8Vgai7UGSWOZ1WZjIcPx56V4cPp7EDw7cbt0cJL4Sk/F0lWFw1 3kIfMxnh32F7/ySsi/2c4UrKKy6diTV+oCA7+NjHMqpatWSsWdeL9nEXB3SvUFXcEU zPn36wcgWqbIl6FfLehzgI4FLP7he89x5804dW0ekJ/4Y+RAZNpH005SBvUQm4O2MR dW6Twmndbo1Ng== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id B9701112029C; Thu, 30 Nov 2023 02:55:59 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 2/6] squid: add nm dispatcher reload hook Date: Thu, 30 Nov 2023 03:55:25 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: Fqz1IEyD1NsD4SSx-OfQpxX_fDpqslsw X-Proofpoint-ORIG-GUID: Fqz1IEyD1NsD4SSx-OfQpxX_fDpqslsw X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107155 From: Patrick Wicki This enables the networkmanager dispatcher to reload squid automatically on network changes. This idea is from the Fedora package where they do the same: https://src.fedoraproject.org/rpms/squid/blob/rawhide/f/squid.spec#_207 Signed-off-by: Patrick Wicki --- meta-networking/recipes-daemons/squid/files/squid.nm | 7 +++++++ meta-networking/recipes-daemons/squid/squid_6.5.bb | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 meta-networking/recipes-daemons/squid/files/squid.nm diff --git a/meta-networking/recipes-daemons/squid/files/squid.nm b/meta-networking/recipes-daemons/squid/files/squid.nm new file mode 100644 index 000000000..b58ee11bd --- /dev/null +++ b/meta-networking/recipes-daemons/squid/files/squid.nm @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$2" in + up|down|vpn-up|vpn-down) + systemctl -q reload squid.service || : + ;; +esac diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index 3795da7f5..33a8bc476 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -20,6 +20,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2 file://volatiles.03_squid \ file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \ + file://squid.nm \ " SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" @@ -49,6 +50,8 @@ PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-c PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" +PACKAGES =+ "${PN}-networkmanager" + BASIC_AUTH = "DB SASL LDAP" DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" @@ -109,11 +112,16 @@ do_install:append() { rmdir "${D}${localstatedir}/log/${BPN}" rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log" + + # Install NetworkManager dispatcher reload hooks + install -d ${D}${libdir}/NetworkManager/dispatcher.d + install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid } FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" FILES:${PN}-dbg += "/usr/src/debug" FILES:${PN}-doc += "${datadir}/*.txt" +FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" RDEPENDS:${PN} += "perl" RDEPENDS:${PN}-ptest += "perl make" From patchwork Thu Nov 30 02:55:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F719C10DAA for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web10.63780.1701312962849126008 for ; Wed, 29 Nov 2023 18:56:02 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=RyA/PFwu; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312962; bh=hU8shcUuaETa8k5VeoLdArP1Q8l8NRKDX3XLlEX5ThY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=RyA/PFwuAD+CW2AwfN4r2GKqzDWwUOzQ7PN1N+MfYebcg7CfLhWlBwtiNwkY8fEFA ClXcjAVyPEtdDpaypqjwRGpaO5rhoZbak3mk+lVx0d/E61FFNlZfn3lxyiyFbogsSJ F2aV3kVJOZb+Y1gdAYIt90J+1osgj6v42YU244c278Qh36e7A/AhnoyiaqCkzau9OR pJL/2uyt2BiWP1N8cO9J6x6QU3LV5El+c1Z2twO560FSTPK7usvTDKb4jHkOgdqEzh sfEEGbI5PffwISAskmQTyRIvTFLYQ+yD2IfUYzUtBJAmJ/9ifH7r4e9T3bxch4Htyi Z7IEwnmE7EOeg== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 4B77611201D5; Thu, 30 Nov 2023 02:56:01 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 3/6] squid: add auth packageconfig Date: Thu, 30 Nov 2023 03:55:26 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: 2titNmbSVEhebNYpYEgMLEU0y5AqgFub X-Proofpoint-ORIG-GUID: 2titNmbSVEhebNYpYEgMLEU0y5AqgFub X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=896 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107156 From: Patrick Wicki Introduce PACKAGECONFIG[auth] and pin the dependencies to it. This allows building squid without authentication support and all its related dependencies. Signed-off-by: Patrick Wicki --- meta-networking/recipes-daemons/squid/squid_6.5.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index 33a8bc476..66b42ebbb 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -30,7 +30,7 @@ SRC_URI[sha256sum] = "99acd54ec9d68b2a9080d19fcc43eca1a245146cf162dbba689510d01e LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://errors/COPYRIGHT;md5=d324bc1f9447d1d1588d75b22a678dc4 \ " -DEPENDS = "libtool krb5 openldap db cyrus-sasl" +DEPENDS = "libtool" inherit autotools pkgconfig useradd ptest perlnative @@ -42,13 +42,16 @@ LDFLAGS:append:riscv32 = " -latomic" USERADD_PACKAGES = "${PN}" USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ - " +PACKAGECONFIG ??= "auth \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" + PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" +PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" PACKAGES =+ "${PN}-networkmanager" @@ -57,7 +60,7 @@ BASIC_AUTH = "DB SASL LDAP" DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" -EXTRA_OECONF += "--with-default-user=squid --enable-auth-basic='${BASIC_AUTH}' \ +EXTRA_OECONF += "--with-default-user=squid \ --sysconfdir=${sysconfdir}/${BPN} \ --with-logdir=${localstatedir}/log/${BPN} \ 'PERL=${USRBINPATH}/env perl'" From patchwork Thu Nov 30 02:55:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41151C46CA7 for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web10.63781.1701312964348981192 for ; Wed, 29 Nov 2023 18:56:04 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=mFGvzgi2; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312963; bh=FMco+fKHHna6g68BBLG1OJ77WUO/6hTxjhxtY57hWes=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=mFGvzgi2qBTYVH5stA8IdULnLqeTMG7d3uwjy72GYE2EIN/DKoW9oOtoK2Exk+hHU oSj2qk00jxXt6rZg+LY0WbIgWYrUmhQwPJAtIQ3YM5M3uKeuA0n16rUXnHjwUIWUkE AfwD87dieBWCN+Q+oCYglFauNTJbyoUdsfejv73fb5hCp8CviAG5DVVVwhvOH3MEvY B7cu+XvCmwh2seHd1NZBYDZQ1uzw1sBRA82L/vKqqbH8fMikil6TnC3t5OFj69MK0r RF+/944Ycfdo26SDDZduTrkJ4FuideqdG2fFKD0iR2pKGpzM1ANK4sfViFnZH7qTQi cojLpmQJOeDTQ== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id B65E5112026E; Thu, 30 Nov 2023 02:56:02 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 4/6] squid: move configs to sub package Date: Thu, 30 Nov 2023 03:55:27 +0100 Message-ID: <14e2e3caff4acb99c107e11ae5f4cd9638b01ab5.1701312810.git.patrick.wicki@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: 2VK3EqIgbGH4hPCgC7xXP-W6qGmaaWod X-Proofpoint-ORIG-GUID: 2VK3EqIgbGH4hPCgC7xXP-W6qGmaaWod X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=625 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107157 From: Patrick Wicki Move the config files to a separate squid-conf package. This allows shipping new configs via a custom conf package. Signed-off-by: Patrick Wicki --- meta-networking/recipes-daemons/squid/squid_6.5.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index 66b42ebbb..af3cbe067 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -53,7 +53,10 @@ PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" -PACKAGES =+ "${PN}-networkmanager" +PACKAGES =+ " \ + ${PN}-conf \ + ${PN}-networkmanager \ +" BASIC_AUTH = "DB SASL LDAP" @@ -124,7 +127,8 @@ do_install:append() { FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" FILES:${PN}-dbg += "/usr/src/debug" FILES:${PN}-doc += "${datadir}/*.txt" +FILES:${PN}-conf += "${sysconfdir}/squid" FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d" -RDEPENDS:${PN} += "perl" +RDEPENDS:${PN} += "perl ${PN}-conf" RDEPENDS:${PN}-ptest += "perl make" From patchwork Thu Nov 30 02:55:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BA5FC10F04 for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web11.63594.1701312965949389345 for ; Wed, 29 Nov 2023 18:56:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=hPhsJA7m; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312965; bh=AXaegzb2LRsR+E0dN9AHni9SZaCIOhttOiOLVJ/PMtQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hPhsJA7mzsI3g3jb3SeGyYL2OCZcalceLQXM7S/gV1Ui5SZbbAGCQ/I53PWrPXwZj P5yC251ZjjfEQcylOaehEZUGa0Hol1WXRsvgbNpH5WolNBWsQLXtg6JQUygIWtQd/V tQCWFPK3d/C+xb6i4/8Eiz2oo6KbQEz+sz7NTH+2GL6MxFlCY7FyiZbL8DZNl8/Tlz H7FW1+PM5mgLyxpjRyr5xK/HnGjqU7f8CwjyQKg0Vb6yeWLyJwazCnBLLnAtwWSJFP FtBnde0YgJI1mx6+kr991HmnrUVlQtFFgxsVhpyWhKb6Kz8aZw9tg1afTuR2qegWp8 qWTHwEjFenWBw== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id 3ACEE11201D5; Thu, 30 Nov 2023 02:56:04 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 5/6] squid: add url-rewrite-helpers packageconfig Date: Thu, 30 Nov 2023 03:55:28 +0100 Message-ID: <1a27ed5cacd67a6d2c3ce712f278ee05ef82cf09.1701312810.git.patrick.wicki@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: 5wRmDHNExvzH1uDAukeFsXBE3-zvTlTq X-Proofpoint-ORIG-GUID: 5wRmDHNExvzH1uDAukeFsXBE3-zvTlTq X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=658 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107158 From: Patrick Wicki Signed-off-by: Patrick Wicki --- meta-networking/recipes-daemons/squid/squid_6.5.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index af3cbe067..2641943fe 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -42,7 +42,7 @@ LDFLAGS:append:riscv32 = " -latomic" USERADD_PACKAGES = "${PN}" USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" -PACKAGECONFIG ??= "auth \ +PACKAGECONFIG ??= "auth url-rewrite-helpers \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ " @@ -52,6 +52,7 @@ PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-c PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" +PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," PACKAGES =+ " \ ${PN}-conf \ From patchwork Thu Nov 30 02:55:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Wicki X-Patchwork-Id: 35410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 189EFC07E97 for ; Thu, 30 Nov 2023 02:56:10 +0000 (UTC) Received: from ci74p00im-qukt09090301.me.com (ci74p00im-qukt09090301.me.com [17.57.156.20]) by mx.groups.io with SMTP id smtpd.web10.63782.1701312967408326927 for ; Wed, 29 Nov 2023 18:56:07 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@subset.ch header.s=sig1 header.b=kY55KeNc; spf=pass (domain: subset.ch, ip: 17.57.156.20, mailfrom: patrick.wicki@subset.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subset.ch; s=sig1; t=1701312966; bh=2iM/wy0DiLlz/nri3mKWkNQVG/D/CvMrwJBruLM0/so=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kY55KeNcEHtyRtJwWNkw1LfjVIxkjgeGGYVf3QOoRpfiJYB+ux+xP0mAWRWO8eKof fF5XuqCbkKSbKpDlAmjrn+YaZ0/e6vdU3EkZ8ofCp5m12cYxV3Tg/BOisRF2TvIOUE 3A1jljAymOQAndcBge2Ie8XCTlIY0k0SvkGLDQlWqXEtwUvRPpakLIhFUycjYi4w2y kvhRCHvdVQ322a5f8K0wEuABnc54qIWqGywSu9YFKym+HAQZhl+5a1pgZ9llB0IsrN PpitOnQc4kS+S13TC84vhUrXS+/V+EyfQC6PKUb5JCASUdIxk5EYG3PznrGKvT3Kbj x9EUi5kCfBaXg== Received: from localhost.localdomain (ci77p00im-dlb-asmtp-mailmevip.me.com [17.57.156.26]) by ci74p00im-qukt09090301.me.com (Postfix) with ESMTPSA id CCE6D112026E; Thu, 30 Nov 2023 02:56:05 +0000 (UTC) From: patrick.wicki@subset.ch To: openembedded-devel@lists.openembedded.org Cc: Patrick Wicki Subject: [oe][meta-networking][PATCH 6/6] squid: add systemd service Date: Thu, 30 Nov 2023 03:55:29 +0100 Message-ID: <1a378232d3f888d04ec0b72957691d7977454a24.1701312810.git.patrick.wicki@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: nGQPO7u-khg70sYDAGmxEWgSntpBSwiI X-Proofpoint-ORIG-GUID: nGQPO7u-khg70sYDAGmxEWgSntpBSwiI X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 clxscore=1030 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2311300020 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 30 Nov 2023 02:56:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/107159 From: Patrick Wicki Integrate the upstream unit file into the recipe. Signed-off-by: Patrick Wicki --- meta-networking/recipes-daemons/squid/squid_6.5.bb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/squid/squid_6.5.bb b/meta-networking/recipes-daemons/squid/squid_6.5.bb index 2641943fe..8d5d1a384 100644 --- a/meta-networking/recipes-daemons/squid/squid_6.5.bb +++ b/meta-networking/recipes-daemons/squid/squid_6.5.bb @@ -32,7 +32,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ " DEPENDS = "libtool" -inherit autotools pkgconfig useradd ptest perlnative +inherit autotools pkgconfig useradd ptest perlnative systemd LDFLAGS:append:mipsarch = " -latomic" LDFLAGS:append:powerpc = " -latomic" @@ -44,6 +44,7 @@ USERADD_PARAM:${PN} = "--system --no-create-home --home-dir /var/run/squid --she PACKAGECONFIG ??= "auth url-rewrite-helpers \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ " PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" @@ -53,6 +54,7 @@ PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2" PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl" PACKAGECONFIG[auth] = "--enable-auth-basic='${BASIC_AUTH}',--disable-auth --disable-auth-basic,krb5 openldap db cyrus-sasl" PACKAGECONFIG[url-rewrite-helpers] = "--enable-url-rewrite-helpers,--disable-url-rewrite-helpers," +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" PACKAGES =+ " \ ${PN}-conf \ @@ -106,6 +108,12 @@ do_install_ptest() { do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # Install service unit file + install -d ${D}/${systemd_unitdir}/system + install ${S}/tools/systemd/squid.service ${D}/${systemd_unitdir}/system + sed -i 's:/var/run/:/run/:g' ${D}/${systemd_unitdir}/system/squid.service + + # Configure tmpfiles.d install -d ${D}${sysconfdir}/tmpfiles.d echo "d ${localstatedir}/run/${BPN} 0755 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf echo "d ${localstatedir}/log/${BPN} 0750 squid squid -" >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf @@ -125,6 +133,9 @@ do_install:append() { install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid } +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "squid.service" + FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons" FILES:${PN}-dbg += "/usr/src/debug" FILES:${PN}-doc += "${datadir}/*.txt"