guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 6925f537252b68808b8415c314cc343b804a9c4c
Author: Brendan Tildesley <[email protected]>
AuthorDate: Mon Sep 28 13:46:38 2026 +0800
gnu: python-paho-mqtt: Fix build.
* gnu/packages/messaging.scm (python-paho-mqtt): Tests use certs that
expired July 6th. let them be regenerated during build so they should
never expire.
[phases]{regenerate-test-certificates}: New phase.
[native-inputs]: Add openssl, and perl.
Merges: guix/guix!11617
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/messaging.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1a7ef2540cc..64b77b85fce 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3205,8 +3205,17 @@ as phones, embedded computers or microcontrollers.")
(add-after 'unpack 'patch-tests
(lambda* _
(substitute* "tests/lib/conftest.py"
- (("raise RuntimeError") "pass;")))))))
- (native-inputs (list python-hatchling python-pytest))
+ (("raise RuntimeError") "pass;"))))
+ (add-before 'check 'regenerate-test-certificates
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; The bundled certificates expire. Generate fresh fixtures
+ ;; while retaining the deliberately expired and invalid ones.
+ (with-directory-excursion "tests/ssl"
+ (substitute* "openssl.cnf"
+ (("\\$ENV::HOME/\\.rnd") ".rnd"))
+ (invoke "sh" "gen.sh"))))))))
+ (native-inputs (list openssl perl python-hatchling python-pytest))
(home-page "https://www.eclipse.org/paho/")
(synopsis "Python implementation of an MQTT client class")
(description "MQTT and MQTT-SN are lightweight publish/subscribe messaging