From b1ce2522b4e469ee738b1a141299ff99db70ef13 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Wed, 30 Oct 2024 13:00:20 -0600 Subject: [PATCH] package/collectd: fix protoc version check We need to add a patch fixing the protoc version check in collectd's configure script, prior to bumping protobuf to a newer version. Signed-off-by: James Hilliard Signed-off-by: Thomas Petazzoni --- ...onfigure.ac-fix-protoc-version-check.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/collectd/0004-configure.ac-fix-protoc-version-check.patch diff --git a/package/collectd/0004-configure.ac-fix-protoc-version-check.patch b/package/collectd/0004-configure.ac-fix-protoc-version-check.patch new file mode 100644 index 0000000000..edf5008f03 --- /dev/null +++ b/package/collectd/0004-configure.ac-fix-protoc-version-check.patch @@ -0,0 +1,48 @@ +From 77f33d05355b115d3384d94c1c4e36c56ea28b09 Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Wed, 30 Oct 2024 12:45:51 -0600 +Subject: [PATCH] configure.ac: fix protoc version check + +The current version check for 3.0.0+ fails to handle cases where +protoc is above version 3.0.0 but does not start with a 3, for +example protoc may have a version of 28.1. + +To fix this use AX_COMPARE_VERSION to properly compare the version. + +Signed-off-by: James Hilliard +Upstream: https://github.com/collectd/collectd/pull/4332 +--- + configure.ac | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 86d2378b..1f7a9cdf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4897,13 +4897,16 @@ AC_PATH_PROG([PROTOC], [protoc]) + have_protoc3="no" + if test "x$PROTOC" != "x"; then + AC_MSG_CHECKING([for protoc 3.0.0+]) +- if $PROTOC --version | $EGREP libprotoc.3 >/dev/null; then +- protoc3="yes (`$PROTOC --version`)" +- have_protoc3="yes" +- else +- protoc3="no (`$PROTOC --version`)" +- fi +- AC_MSG_RESULT([$protoc3]) ++ AC_SUBST([PROTOC_VERSION], [`$PROTOC --version | cut -d ' ' -f 2`]) ++ AX_COMPARE_VERSION([$PROTOC_VERSION],[ge],[3], ++ [ ++ have_protoc3="yes" ++ AC_MSG_RESULT([yes ($PROTOC_VERSION)]) ++ ], ++ [ ++ AC_MSG_RESULT([no ($PROTOC_VERSION)]) ++ ] ++ ) + fi + AM_CONDITIONAL([HAVE_PROTOC3], [test "x$have_protoc3" = "xyes"]) + +-- +2.34.1 +