aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Olaechea <pirata@gmail.com>2024-11-22 19:33:38 +0000
committerChristopher Baines <mail@cbaines.net>2024-11-22 21:57:43 +0000
commiteabdad1ad5144487a1606fb35afa11c1bb6dc720 (patch)
tree34cae8348b0cd569de3c539967f22e26a4dd3403
parentc2a80ba78c979d2df2434fed0b9e55a29102f5c2 (diff)
downloadguix-eabdad1ad5144487a1606fb35afa11c1bb6dc720.tar.gz
guix-eabdad1ad5144487a1606fb35afa11c1bb6dc720.zip
gnu: ruby-net-smtp: Fix tests.
The tests where failing due to the SSL certificate being used expired. Regenerate the certificate running the check phase. * gnu/packages/ruby.scm (ruby-net-smtp): Fix check phase. Change-Id: I8bd72f2e929f496996f6fd88b13a4d95837273da
-rw-r--r--gnu/packages/ruby.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 12c439b3a9..f08d52dbc8 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4730,6 +4730,32 @@ POP3, the Post Office Protocol version 3, as specified by
(base32
"0ca2wh45xvc09rv6v6sz3vbnkzrjzk5c4l6dk50zk4dwxvghma8r"))))
(build-system ruby-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'regenerate-certificate
+ ;; On version 0.5.0 a Makefile was introduced to regenerated
+ ;; the certificates, and instead of calling openssl directory
+ ;; we could do (with-directory-excursion "test/net/fixtures"
+ ;; (invoke "make" "regen_certs"). However the certificate is
+ ;; expired versions before 0.5.0 as well.
+ (lambda _
+ (with-directory-excursion "test/net/fixtures"
+ (invoke
+ "openssl" "req" "-new" "-key" "server.key" "-out"
+ "server.csr" "-subj"
+ "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost")
+ (invoke "openssl" "req" "-new" "-x509" "-days" "3650"
+ "-key" "server.key" "-out" "cacert.pem" "-subj"
+ (string-append
+ "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby "
+ "Core Team/CN=Ruby Test "
+ "CA/emailAddress=security@ruby-lang.org"))
+ (invoke "openssl" "x509" "-days" "3650" "-CA" "cacert.pem"
+ "-CAkey" "server.key" "-set_serial" "00" "-in"
+ "server.csr" "-req" "-out" "server.crt")))))))
+ (native-inputs (list openssl))
(propagated-inputs (list ruby-net-protocol))
(synopsis "Simple Mail Transfer Protocol client library for Ruby")
(description "This library provides functionality to send Internet mail