Skip to contentSkip to conversation

squid: Include <limits> for using std::numeric_limits

PATCH In review Khem Raj 2 participants 5 messages Mar 3, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 squid: Include <limits> for using std::numeric_limits

---
 ...0001-Fix-build-on-Fedora-Rawhide-772.patch | 105 ++++++++++++++++++
 .../squid/{squid_4.13.bb => squid_4.14.bb}    |   6 +-
 2 files changed, 108 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-daemons/squid/files/0001-Fix-build-on-Fedora-Rawhide-772.patch
 rename meta-networking/recipes-daemons/squid/{squid_4.13.bb => squid_4.14.bb} (95%)
meta-networking/recipes-daemons/squid/files/0001-Fix-build-on-Fedora-Rawhide-772.patch new file +105 -0
new file mode 100644
index 0000000000..28a410c26f
@@ -0,0 +1,105 @@
+From 1f8b5f0e1cc27634a7310be4c9674112f919d974 Mon Sep 17 00:00:00 2001
+From: uhliarik <[email protected]>
+Date: Thu, 18 Feb 2021 01:08:40 +0000
+Subject: [PATCH] Fix build on Fedora Rawhide (#772)
+
+* add SYSTEMD_LIBS to all binaries using client_side.cc, fixing linking
+* add `<limits>` to all sources using std::numeric_limits, fixing gcc-11
+  builds
+---
+Upstream-Status: Backport [https://github.com/kraj/squid/commit/1f8b5f0e1cc27634a7310be4c9674112f919d974]
+ src/Makefile.am               | 4 ++++
+ src/ip/QosConfig.cc           | 1 +
+ src/ipc/mem/PageStack.cc      | 1 +
+ src/proxyp/Parser.cc          | 1 +
+ src/security/ServerOptions.cc | 2 ++
+ src/ssl/helper.cc             | 2 ++
+ 6 files changed, 11 insertions(+)
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2320,6 +2320,7 @@ tests_test_http_range_LDADD = \
+ 	$(SSLLIB) \
+ 	$(KRB5LIBS) \
+ 	$(LIBCPPUNIT_LIBS) \
++	$(SYSTEMD_LIBS) \
+ 	$(COMPAT_LIB) \
+ 	$(XTRA_LIBS)
+ tests_test_http_range_LDFLAGS = $(LIBADD_DL)
+@@ -2624,6 +2625,7 @@ tests_testHttpRequest_LDADD = \
+ 	$(SSLLIB) \
+ 	$(KRB5LIBS) \
+ 	$(LIBCPPUNIT_LIBS) \
++	$(SYSTEMD_LIBS) \
+ 	$(COMPAT_LIB) \
+ 	$(XTRA_LIBS)
+ tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
+@@ -3487,6 +3489,7 @@ tests_testURL_LDADD = \
+ 	$(SSLLIB) \
+ 	$(KRB5LIBS) \
+ 	$(LIBCPPUNIT_LIBS) \
++	$(SYSTEMD_LIBS) \
+ 	$(COMPAT_LIB) \
+ 	$(XTRA_LIBS)
+ tests_testURL_LDFLAGS = $(LIBADD_DL)
+@@ -3646,6 +3649,7 @@ nodist_tests_testYesNoNone_SOURCES = \
+ tests_testYesNoNone_LDADD= \
+ 	base/libbase.la \
+ 	$(LIBCPPUNIT_LIBS) \
++	$(SYSTEMD_LIBS) \
+ 	$(COMPAT_LIB) \
+ 	$(XTRA_LIBS)
+ tests_testYesNoNone_LDFLAGS = $(LIBADD_DL)
+--- a/src/ip/QosConfig.cc
++++ b/src/ip/QosConfig.cc
+@@ -21,6 +21,7 @@
+ #include "Parsing.h"
+ 
+ #include <cerrno>
++#include <limits>
+ 
+ CBDATA_CLASS_INIT(acl_tos);
+ 
+--- a/src/ipc/mem/PageStack.cc
++++ b/src/ipc/mem/PageStack.cc
+@@ -14,6 +14,7 @@
+ #include "Debug.h"
+ #include "ipc/mem/Page.h"
+ #include "ipc/mem/PageStack.h"
++#include <limits>
+ 
+ /// used to mark a stack slot available for storing free page offsets
+ const Ipc::Mem::PageStack::Value Writable = 0;
+--- a/src/security/ServerOptions.cc
++++ b/src/security/ServerOptions.cc
+@@ -24,6 +24,8 @@
+ #endif
+ #endif
+ 
++#include <limits>
++
+ Security::ServerOptions &
+ Security::ServerOptions::operator =(const Security::ServerOptions &old) {
+     if (this != &old) {
+--- a/src/ssl/helper.cc
++++ b/src/ssl/helper.cc
+@@ -19,6 +19,8 @@
+ #include "ssl/helper.h"
+ #include "wordlist.h"
+ 
++#include <limits>
++
+ Ssl::CertValidationHelper::LruCache *Ssl::CertValidationHelper::HelperCache = nullptr;
+ 
+ #if USE_SSL_CRTD
+--- a/src/acl/ConnMark.cc
++++ b/src/acl/ConnMark.cc
+@@ -16,6 +16,8 @@
+ #include "http/Stream.h"
+ #include "sbuf/Stream.h"
+ 
++#include <limits>
++
+ bool
+ Acl::ConnMark::empty() const
+ {
meta-networking/recipes-daemons/squid/squid_4.14.bb renamed from meta-networking/recipes-daemons/squid/squid_4.13.bb +3 -3
similarity index 95%
rename from meta-networking/recipes-daemons/squid/squid_4.13.bb
rename to meta-networking/recipes-daemons/squid/squid_4.14.bb
index 873d09344d..6d154c87e0 100644
@@ -24,15 +24,15 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2
            file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
            file://0001-tools.cc-fixed-unused-result-warning.patch \
            file://0001-splay.cc-fix-bind-is-not-a-member-of-std.patch \
+           file://0001-Fix-build-on-Fedora-Rawhide-772.patch \
            "
 
 SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
 
-SRC_URI[md5sum] = "31e524a416715d6bfef30e072d2ca076"
-SRC_URI[sha256sum] = "d09d3c31e3a7d158bda75501e763bd1cd3c3a99f5af6781ec1fd30eed2f771ed"
+SRC_URI[sha256sum] = "4ad08884f065f8e1dac166aa13db6a872cde419a1717dff4c82c2c5337ee5756"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://errors/COPYRIGHT;md5=4c3268f394af77fbbf541875cef96a6c \
+                    file://errors/COPYRIGHT;md5=0e03cd976052c45697ad5d96e7dff8dc \
                     "
 DEPENDS = "libtool krb5 openldap db cyrus-sasl"
 
Signature · 1 line
2.30.1
author
#1 lore raw

PATCH 2/4 minifi-cpp: include limits header for numeric_limits definition

---
 .../0001-cxxopts-Add-limits-header.patch      | 34 +++++++++++++++++++
 .../minifi-cpp/minifi-cpp_0.7.0.bb            |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-extended/minifi-cpp/files/0001-cxxopts-Add-limits-header.patch
meta-oe/recipes-extended/minifi-cpp/files/0001-cxxopts-Add-limits-header.patch new file +34 -0
new file mode 100644
index 0000000000..ef26c475d8
@@ -0,0 +1,34 @@
+From fda0713ce3e07786757a057abe7ebf2146d33780 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 2 Mar 2021 18:31:45 -0800
+Subject: [PATCH] cxxopts: Add limits header
+
+needed for numeric_limits
+
+Upstream-Status: Submitted [https://github.com/apache/nifi-minifi-cpp/pull/1021]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ thirdparty/cxxopts/include/cxxopts.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/thirdparty/cxxopts/include/cxxopts.hpp
++++ b/thirdparty/cxxopts/include/cxxopts.hpp
+@@ -29,6 +29,7 @@ THE SOFTWARE.
+ #include <cctype>
+ #include <exception>
+ #include <iostream>
++#include <limits>
+ #include <map>
+ #include <memory>
+ #include <regex>
+--- a/libminifi/src/utils/StringUtils.cpp
++++ b/libminifi/src/utils/StringUtils.cpp
+@@ -21,6 +21,8 @@
+ #include <Windows.h>
+ #endif
+ 
++#include <limits>
++
+ namespace org {
+ namespace apache {
+ namespace nifi {
meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +1 -0
index 34090cf28c..322b58477d 100644
@@ -28,6 +28,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \
             file://0002-cmake-LibreSSL.cmake-use-libressl-local-source-tarba.patch \
             file://0003-cmake-BundledOSSPUUID.cmake-use-ossp-uuid-local-sour.patch \
             file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \
+            file://0001-cxxopts-Add-limits-header.patch \
             file://minifi.service \
             file://systemd-volatile.conf \
             file://sysvinit-volatile.conf \
Signature · 1 line
2.30.1
author
#2 lore raw

PATCH 3/4 v4l-utils: Package systemd fragment for systemd-udevd.service.d

In reply to Khem Raj
---
 meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +2 -2
index 7d96646220..3c90a68de4 100644
@@ -10,7 +10,7 @@ DEPENDS_append_libc-musl = " argp-standalone"
 DEPENDS_append_class-target = " udev"
 LDFLAGS_append = " -pthread"
 
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig systemd
 
 PACKAGECONFIG ??= "media-ctl"
 PACKAGECONFIG[media-ctl] = "--enable-v4l-utils,--disable-v4l-utils,,"
@@ -40,7 +40,7 @@ FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*"
 FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules"
 RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}"
 
-FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*"
+FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc* ${systemd_system_unitdir}/systemd-udevd.service.d/50-rc_keymap.conf"
 
 FILES_${PN} = "${bindir} ${sbindir}"
 
Signature · 1 line
2.30.1
#3 lore raw

Re: [oe] [meta-oe][PATCH 3/4] v4l-utils: Package systemd fragment for systemd-udevd.service.d

Hi Khem,

please have a look at my reply to my original patch, as well.

Quoted 10 lines · Khem Raj
---
 meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +0 -0
index 7d96646220..3c90a68de4 100644

meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb DEPENDS_append_libc-musl = " argp-standalone" · line 13

Quoted 5 lines
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +1 -1
@@ -10,7 +10,7 @@ DEPENDS_append_libc-musl = " argp-standalone"
 DEPENDS_append_class-target = " udev"
 LDFLAGS_append = " -pthread"
 
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig systemd

As there are no unit-files in v4l-utils I don't see that inheriting systemd.bbclass is giving us anything.

meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" · line 40

Quoted 4 lines
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +0 -0
 PACKAGECONFIG ??= "media-ctl"
 PACKAGECONFIG[media-ctl] = "--enable-v4l-utils,--disable-v4l-utils,,"
@@ -40,7 +40,7 @@ FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*"
 FILES_ir-keytable = "${bindir}/ir-keytable ${base_libdir}/udev/rules.d/*-infrared.rules"

I would add "50-rc_keymap.conf" to the ir-keytable package as this fragment is necessary to make the likewise contained "70-infrared.rules" work...

meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb FILES_media-ctl = "${bindir}/media-ctl ${libdir}/libmediactl.so.*" · line 43

Quoted 4 lines
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +1 -1
 RDEPENDS_ir-keytable += "${VIRTUAL-RUNTIME_ir-keytable-keymaps}"
 
-FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*"
+FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc* ${systemd_system_unitdir}/systemd-udevd.service.d/50-rc_keymap.conf"

... instead of adding it to the package rc-keymaps.

Quoted 1 line
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb +0 -0
 FILES_${PN} = "${bindir} ${sbindir}"
Signature · 4 lines
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author
#4 lore raw

PATCH 4/4 opencv: Upgrade to 4.5.1

In reply to Khem Raj

Drop upstreamed patch

Cc Jose Quaresma <[email protected]>
---
 ...gits-needs-opencv_dnn-module-to-buil.patch | 28 -------------------
 .../{opencv_4.5.0.bb => opencv_4.5.1.bb}      |  3 +-
 2 files changed, 1 insertion(+), 30 deletions(-)
 delete mode 100644 meta-oe/recipes-support/opencv/opencv/0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch
 rename meta-oe/recipes-support/opencv/{opencv_4.5.0.bb => opencv_4.5.1.bb} (98%)
meta-oe/recipes-support/opencv/opencv/0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch deleted +0 -28
deleted file mode 100644
index 022680331a..0000000000
@@ -1,28 +0,0 @@
-From 114af1ca23ff9bf2e521b2969e343e74cdd8eac1 Mon Sep 17 00:00:00 2001
-From: Jose Quaresma <[email protected]>
-Date: Sun, 1 Nov 2020 12:29:56 +0000
-Subject: [PATCH] samples: cmake: digits needs opencv_dnn module to build
-
-Intrudeced in commit 397ba2d9aafb5312e777ce2f886d7b568109e931:
-add OpenCV sample for digit and text recongnition, and provide multiple OCR models.
-https://github.com/opencv/opencv/commit/397ba2d9aafb5312e777ce2f886d7b568109e931
-
-Upstream-Status: Backport [https://github.com/opencv/opencv/commit/79a82013ad2af04269891ce15281c9fdc31d3f66]
-
-Signed-off-by: Jose Quaresma <[email protected]>
----
- samples/cpp/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
-index 617629df2e..14ab6141df 100644
---- a/samples/cpp/CMakeLists.txt
-+++ b/samples/cpp/CMakeLists.txt
-@@ -14,6 +14,7 @@ set(OPENCV_CPP_SAMPLES_REQUIRED_DEPS
-   opencv_features2d
-   opencv_calib3d
-   opencv_stitching
-+  opencv_dnn
-   ${OPENCV_MODULES_PUBLIC}
-   ${OpenCV_LIB_COMPONENTS})
- ocv_check_dependencies(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
meta-oe/recipes-support/opencv/opencv_4.5.1.bb renamed from meta-oe/recipes-support/opencv/opencv_4.5.0.bb +1 -2
similarity index 98%
rename from meta-oe/recipes-support/opencv/opencv_4.5.0.bb
rename to meta-oe/recipes-support/opencv/opencv_4.5.1.bb
index 5263ffc03b..116cc27f5d 100644
@@ -10,7 +10,7 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
 
 DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
 
-SRCREV_opencv = "d5fd2f0155ffad366f9ac912dfd6d189a7a6a98e"
+SRCREV_opencv = "1363496c1106606684d40447f5d1149b2c66a9f8"
 SRCREV_contrib = "37315babf9984a5b6aa981644a20dd8df1a5ff02"
 SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
 SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
@@ -49,7 +49,6 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
            file://0001-Dont-use-isystem.patch \
            file://download.patch \
            file://0001-Make-ts-module-external.patch \
-           file://0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch \
            "
 SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
 
Signature · 1 line
2.30.1