From patchwork Wed Apr 14 11:57:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4162 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4FL1FH702fz44QV for ; Wed, 14 Apr 2021 11:57:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4FL1FH4YLdzxB; Wed, 14 Apr 2021 11:57:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4FL1FH3zdBz2yXw; Wed, 14 Apr 2021 11:57:55 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4FL1FG2swNz2xS8 for ; Wed, 14 Apr 2021 11:57:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4FL1FF6TwNztt; Wed, 14 Apr 2021 11:57:53 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1618401474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eyD0eaFyhstmUA70IH3+2h9zJMiNuFN9yfMS799bPho=; b=xR6qQAPULhRhuBbx4j8CUNtf2ScQtIIiLhVEdtv9JiCOAkmw2+MFRYLPf9L9hHhVExuFBN XZYF8LPB+rrYjMCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1618401474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eyD0eaFyhstmUA70IH3+2h9zJMiNuFN9yfMS799bPho=; b=KNGFRaaLVtpryasywPDVHew2WyOUL3xoL9AvolUHsdcgJELlHWG1azenxLbnOKi1QCKCe0 kD0WN0c/MeKSdivzZn7OFJLHCQzCiHEq5saioaW8Hq73ufl2nJ21+LSI/KopQ9F2FksoXp 3S+JNXMsMe8226++L3PH7ypYVXnvZyHZIr8BhK4GjIRD2ljAVWZepsLwF60c4iRd8XPJ0Q xnYUa8ck89rQALG1vhHHsngRuz+JzfWI4vBCJCR+/r50EVkeqspP09TxAGErUV2nMY6xGk vykYNHXD5w3qC7wzAWmKSx/JGpj2xfF9rRPNvPJJiiyfJdJR12BpRUnRw0h5VA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] collectd: patch for successful build with updated lm_sensors Date: Wed, 14 Apr 2021 13:57:45 +0200 Message-Id: <20210414115745.3669452-2-adolf.belka@ipfire.org> In-Reply-To: <20210414115745.3669452-1-adolf.belka@ipfire.org> References: <20210414115745.3669452-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Patch to remove checks for SENSORS_API_VERSION upper limit Patch based on one by Pavel Rochnyack https://git.ipfire.org/?p=thirdparty/collectd.git;a=commitdiff;h=d5a3c020> - Without this patch collectd fails to build with the updated lm_sensors version (3-6-0) due to a problem with the version of libsensors used by lm_sensors Signed-off-by: Adolf Belka --- lfs/collectd | 1 + ...-for-SENSORS_API_VERSION-upper-limit.patch | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch diff --git a/lfs/collectd b/lfs/collectd index 7c9744531..36b507868 100644 --- a/lfs/collectd +++ b/lfs/collectd @@ -106,6 +106,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/silence-openvpn-errors.patch cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd-4.10.9-xfs-compile-fix.patch cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd-4.10-libiptc-build-fixes.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch cd $(DIR_APP) && autoupdate -v configure.in cd $(DIR_APP) && autoreconf -vfi cd $(DIR_APP)/libltdl && autoreconf -vfi diff --git a/src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch b/src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch new file mode 100644 index 000000000..ae3cc4c7d --- /dev/null +++ b/src/patches/collectd-4.10.9-remove-checks-for-SENSORS_API_VERSION-upper-limit.patch @@ -0,0 +1,63 @@ +Based on patch from Pavel Rochnyack +https://git.ipfire.org/?p=thirdparty/collectd.git;a=commitdiff;h=d5a3c020d33cc33ee8049f54c7b4dffcd123bf83 + +diff -Naur collectd-4.10.9/src/sensors.c.orig collectd-4.10.9/src/sensors.c +--- collectd-4.10.9/src/sensors.c.orig 2013-04-08 08:26:17.000000000 +0200 ++++ collectd-4.10.9/src/sensors.c 2021-04-13 23:17:43.196069346 +0200 +@@ -150,7 +150,7 @@ + # endif + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + typedef struct featurelist + { + const sensors_chip_name *chip; +@@ -162,11 +162,7 @@ + # ifndef SENSORS_CONF_PATH + # define SENSORS_CONF_PATH "/etc/sensors3.conf" + # endif +-/* #endif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ + +-#else /* if SENSORS_API_VERSION >= 0x500 */ +-# error "This version of libsensors is not supported yet. Please report this " \ +- "as bug." + #endif + + static const char *conffile = SENSORS_CONF_PATH; +@@ -394,7 +390,7 @@ + } /* while sensors_get_detected_chips */ + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + chip_num = 0; + while ((chip = sensors_get_detected_chips (NULL, &chip_num)) != NULL) + { +@@ -448,7 +444,7 @@ + } /* while (subfeature) */ + } /* while (feature) */ + } /* while (chip) */ +-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ ++#endif /* (SENSORS_API_VERSION >= 0x400) */ + + if (first_feature == NULL) + { +@@ -541,7 +537,7 @@ + } /* for fl = first_feature .. NULL */ + /* #endif SENSORS_API_VERSION < 0x400 */ + +-#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) ++#elif (SENSORS_API_VERSION >= 0x400) + for (fl = first_feature; fl != NULL; fl = fl->next) + { + double value; +@@ -576,7 +572,7 @@ + + sensors_submit (plugin_instance, type, type_instance, value); + } /* for fl = first_feature .. NULL */ +-#endif /* (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500) */ ++#endif /* (SENSORS_API_VERSION >= 0x400) */ + + return (0); + } /* int sensors_read */