summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2025-03-23 10:00:16 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2025-03-23 10:02:13 +0300
commit92e3cb2e65657b9f337eee4d2867c48682b4cbbc (patch)
treec57c4759c44a51c98b86b2e22589dd64d753d639
parentda090138028894c6b00c21730aa3a02cda57fb24 (diff)
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.mk3
-rw-r--r--gnu/packages/engineering.scm11
-rw-r--r--gnu/packages/patches/libmodbus-disable-networking-test.patch35
3 files changed, 45 insertions, 4 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index cd29329c8fb..c1ef6fab183 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -49,7 +49,7 @@
49# Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> 49# Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
50# Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> 50# Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
51# Copyright © 2022, 2024 Remco van 't Veer <remco@remworks.net> 51# Copyright © 2022, 2024 Remco van 't Veer <remco@remworks.net>
52# Copyright © 2022, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> 52# Copyright © 2022, 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com>
53# Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> 53# Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
54# Copyright © 2022 muradm <mail@muradm.net> 54# Copyright © 2022 muradm <mail@muradm.net>
55# Copyright © 2022 Hilton Chain <hako@ultrarare.space> 55# Copyright © 2022 Hilton Chain <hako@ultrarare.space>
@@ -1843,6 +1843,7 @@ dist_patch_DATA = \
1843 %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ 1843 %D%/packages/patches/mcrypt-CVE-2012-4527.patch \
1844 %D%/packages/patches/libmemcached-build-with-gcc7.patch \ 1844 %D%/packages/patches/libmemcached-build-with-gcc7.patch \
1845 %D%/packages/patches/libmhash-hmac-fix-uaf.patch \ 1845 %D%/packages/patches/libmhash-hmac-fix-uaf.patch \
1846 %D%/packages/patches/libmodbus-disable-networking-test.patch \
1846 %D%/packages/patches/lib-tl-for-telegram-memcpy.patch \ 1847 %D%/packages/patches/lib-tl-for-telegram-memcpy.patch \
1847 %D%/packages/patches/llama-cpp-vulkan-optional.patch \ 1848 %D%/packages/patches/llama-cpp-vulkan-optional.patch \
1848 %D%/packages/patches/llhttp-ponyfill-object-fromentries.patch \ 1849 %D%/packages/patches/llhttp-ponyfill-object-fromentries.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f3bcf77c797..8b6bd85293e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1733,7 +1733,7 @@ send break and throttle transmission speed.")
1733(define-public libmodbus 1733(define-public libmodbus
1734 (package 1734 (package
1735 (name "libmodbus") 1735 (name "libmodbus")
1736 (version "3.1.10") 1736 (version "3.1.11")
1737 (source (origin 1737 (source (origin
1738 (method git-fetch) 1738 (method git-fetch)
1739 (uri (git-reference 1739 (uri (git-reference
@@ -1742,15 +1742,20 @@ send break and throttle transmission speed.")
1742 (file-name (git-file-name name version)) 1742 (file-name (git-file-name name version))
1743 (sha256 1743 (sha256
1744 (base32 1744 (base32
1745 "0nbpk1n56kclab8fl32dxi46v2bwax3gfk1zkc796srm7vj42sbv")))) 1745 "15rqrzamlp6cvixz6klnawlc9s3w34bapc1fs2c4amwyvi3n5xvp"))
1746 ;; The patch removes a test that requires networking.
1747 ;; See <https://github.com/stephane/libmodbus/issues/802>
1748 (patches
1749 (search-patches "libmodbus-disable-networking-test.patch"))))
1746 (build-system gnu-build-system) 1750 (build-system gnu-build-system)
1747 (native-inputs (list autoconf automake libtool)) 1751 (native-inputs (list autoconf psmisc automake libtool))
1748 (synopsis "Library for the Modbus protocol") 1752 (synopsis "Library for the Modbus protocol")
1749 (description "@code{libmodbus} is a library to send/receive data with a 1753 (description "@code{libmodbus} is a library to send/receive data with a
1750device which respects the Modbus protocol. This library can use a serial port 1754device which respects the Modbus protocol. This library can use a serial port
1751or an Ethernet connection.") 1755or an Ethernet connection.")
1752 (home-page "https://libmodbus.org/") 1756 (home-page "https://libmodbus.org/")
1753 (license license:lgpl2.1+))) 1757 (license license:lgpl2.1+)))
1758
1754(define-public harminv 1759(define-public harminv
1755 (package 1760 (package
1756 (name "harminv") 1761 (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 00000000000..045390cbbd8
--- /dev/null
+++ b/gnu/packages/patches/libmodbus-disable-networking-test.patch
@@ -0,0 +1,35 @@
1From 4fc47d8711650a1385bea0652e522af2c85129bc Mon Sep 17 00:00:00 2001
2From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
3Date: Sun, 23 Mar 2025 09:44:34 +0300
4Subject: [PATCH] tests/unit-test-client: Disable a test requiring networking
5
6* tests/unit-test-client.c (main): Disable the test that requires networking
7as it fails with "Network is unreachable" (errno: 101) in environments where
8networking is not available (e.g. GNU Guix.) See
9<https://github.com/stephane/libmodbus/issues/802>.
10---
11 tests/unit-test-client.c | 8 --------
12 1 file changed, 8 deletions(-)
13
14diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c
15index a1813b1..58eaf5f 100644
16--- a/tests/unit-test-client.c
17+++ b/tests/unit-test-client.c
18@@ -671,14 +671,6 @@ int main(int argc, char *argv[])
19 printf("7/8 Disable byte timeout: ");
20 ASSERT_TRUE(rc == 1, "");
21
22- // Invalid in TCP or RTU mode...
23- modbus_t *invalid_ctx = modbus_new_tcp("1.2.3.4", 1502);
24- modbus_set_response_timeout(ctx, 0, 1);
25- rc = modbus_connect(invalid_ctx);
26- printf("8/8 Connection timeout: ");
27- ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
28- modbus_free(invalid_ctx);
29-
30 /* Restore original response timeout */
31 modbus_set_response_timeout(ctx, old_response_to_sec, old_response_to_usec);
32
33--
342.48.1
35