diff options
author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2025-03-23 10:00:16 +0300 |
---|---|---|
committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2025-03-23 10:02:13 +0300 |
commit | 92e3cb2e65657b9f337eee4d2867c48682b4cbbc (patch) | |
tree | c57c4759c44a51c98b86b2e22589dd64d753d639 | |
parent | da090138028894c6b00c21730aa3a02cda57fb24 (diff) | |
download | guix-92e3cb2e65657b9f337eee4d2867c48682b4cbbc.tar.gz guix-92e3cb2e65657b9f337eee4d2867c48682b4cbbc.zip |
gnu: libmodbus: Update to 3.1.11.
* gnu/packages/engineering.scm (libmodbus): Update to 3.1.11. Add a missing
newline after the package definition.
[source]: Add a patch which disables a test that requires networking.
* gnu/packages/patches/libmodbus-disable-networking-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Change-Id: I657c0aac3435ec20da6e15d31484effdb7c2dc0b
-rw-r--r-- | gnu/local.mk | 3 | ||||
-rw-r--r-- | gnu/packages/engineering.scm | 11 | ||||
-rw-r--r-- | gnu/packages/patches/libmodbus-disable-networking-test.patch | 35 |
3 files changed, 45 insertions, 4 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index cd29329c8f..c1ef6fab18 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -49,7 +49,7 @@ # Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> # Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> # Copyright © 2022, 2024 Remco van 't Veer <remco@remworks.net> -# Copyright © 2022, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> +# Copyright © 2022, 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> # Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> # Copyright © 2022 muradm <mail@muradm.net> # Copyright © 2022 Hilton Chain <hako@ultrarare.space> @@ -1843,6 +1843,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ %D%/packages/patches/libmemcached-build-with-gcc7.patch \ %D%/packages/patches/libmhash-hmac-fix-uaf.patch \ + %D%/packages/patches/libmodbus-disable-networking-test.patch \ %D%/packages/patches/lib-tl-for-telegram-memcpy.patch \ %D%/packages/patches/llama-cpp-vulkan-optional.patch \ %D%/packages/patches/llhttp-ponyfill-object-fromentries.patch \ diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f3bcf77c79..8b6bd85293 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1733,7 +1733,7 @@ send break and throttle transmission speed.") (define-public libmodbus (package (name "libmodbus") - (version "3.1.10") + (version "3.1.11") (source (origin (method git-fetch) (uri (git-reference @@ -1742,15 +1742,20 @@ send break and throttle transmission speed.") (file-name (git-file-name name version)) (sha256 (base32 - "0nbpk1n56kclab8fl32dxi46v2bwax3gfk1zkc796srm7vj42sbv")))) + "15rqrzamlp6cvixz6klnawlc9s3w34bapc1fs2c4amwyvi3n5xvp")) + ;; The patch removes a test that requires networking. + ;; See <https://github.com/stephane/libmodbus/issues/802> + (patches + (search-patches "libmodbus-disable-networking-test.patch")))) (build-system gnu-build-system) - (native-inputs (list autoconf automake libtool)) + (native-inputs (list autoconf psmisc automake libtool)) (synopsis "Library for the Modbus protocol") (description "@code{libmodbus} is a library to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection.") (home-page "https://libmodbus.org/") (license license:lgpl2.1+))) + (define-public harminv (package (name "harminv") diff --git a/gnu/packages/patches/libmodbus-disable-networking-test.patch b/gnu/packages/patches/libmodbus-disable-networking-test.patch new file mode 100644 index 0000000000..045390cbbd --- /dev/null +++ b/gnu/packages/patches/libmodbus-disable-networking-test.patch @@ -0,0 +1,35 @@ +From 4fc47d8711650a1385bea0652e522af2c85129bc Mon Sep 17 00:00:00 2001 +From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com> +Date: Sun, 23 Mar 2025 09:44:34 +0300 +Subject: [PATCH] tests/unit-test-client: Disable a test requiring networking + +* tests/unit-test-client.c (main): Disable the test that requires networking +as it fails with "Network is unreachable" (errno: 101) in environments where +networking is not available (e.g. GNU Guix.) See +<https://github.com/stephane/libmodbus/issues/802>. +--- + tests/unit-test-client.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c +index a1813b1..58eaf5f 100644 +--- a/tests/unit-test-client.c ++++ b/tests/unit-test-client.c +@@ -671,14 +671,6 @@ int main(int argc, char *argv[]) + printf("7/8 Disable byte timeout: "); + ASSERT_TRUE(rc == 1, ""); + +- // Invalid in TCP or RTU mode... +- modbus_t *invalid_ctx = modbus_new_tcp("1.2.3.4", 1502); +- modbus_set_response_timeout(ctx, 0, 1); +- rc = modbus_connect(invalid_ctx); +- printf("8/8 Connection timeout: "); +- ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, ""); +- modbus_free(invalid_ctx); +- + /* Restore original response timeout */ + modbus_set_response_timeout(ctx, old_response_to_sec, old_response_to_usec); + +-- +2.48.1 + |