Minetest can't retrieve packages for additional content due to SSL certificate either invalid or not available

  • Open
  • quality assurance status badge
Details
2 participants
  • Maxime Devos
  • pkill9
Owner
unassigned
Submitted by
pkill9
Severity
normal
P
M
M
Maxime Devos wrote on 22 Jan 2022 15:20
(address . 40319@debbugs.gnu.org)(name . pkill9)(address . pkill9@runbox.com)
9359f9f05deeae37a3ffe250999a0ed1760cd51d.camel@telenet.be
Hi,

I can confirm in a pure environment:

1. guix shell --pure minetest le-certs -- minetest
2. click on the +
3. In the GUI: ‘No packages could be retrieved’.
In the terminal:

2022-01-22 13:19:05: ERROR[Main]:
not found (SSL peer certificate or SSH remote key was not OK) (response
code 0)

Minetest uses curl HTTPS, so as a fix, I tried adding

(native-search-paths
(package-native-search-paths curl))

to the package definition of minetest, such that SSL_CERT_FILE/DIR
would be set.

To test:

1. apply the patch (see attachement)
2. ./pre-guix shell --pure minetest le-certs -- minetest
3. click on the +
4. In the GUI, a list of downloadable mods is shown.

The first patch contains the actual fix, the later patches do some
‘cleaning’. I'll sent a mail later confirming that the later patches
don't break Minetest (assuming that's actually the case).

Greetings,
Maxime.
From d4f83265f4638b69bb62338159ff251d61889e9d Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 22 Jan 2022 13:24:22 +0000
Subject: [PATCH 1/3] gnu: minetest: Find TLS certificates.

* gnu/packages/minetest.scm (minetest)[native-search-paths]: Add curl's search paths.


Reported-by: pkill9 <pkill9@runbox.com>
---
gnu/packages/minetest.scm | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index c431942473..c6762bb1f2 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020, 2021 Liliana Marie Prikler <liliana.prikler@gmail.com>
-;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@telenet.be>
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
@@ -109,12 +109,16 @@ (define-public minetest
(setenv "HOME" "/tmp")
(invoke "src/minetest" "--run-unittests")))))))
(native-search-paths
- (list (search-path-specification
- (variable "MINETEST_SUBGAME_PATH")
- (files '("share/minetest/games")))
- (search-path-specification
- (variable "MINETEST_MOD_PATH")
- (files '("share/minetest/mods")))))
+ (append (list (search-path-specification
+ (variable "MINETEST_SUBGAME_PATH")
+ (files '("share/minetest/games")))
+ (search-path-specification
+ (variable "MINETEST_MOD_PATH")
+ (files '("share/minetest/mods"))))
+ ;; Make sure that Minetest can find TLS certificates such that
+ ;; built-in mod downloader/installer can work. See
+ ;; <https://issues.guix.gnu.org/40319>.
+ (package-native-search-paths curl)))
(native-inputs
(list pkg-config))
(inputs

base-commit: 1bd250783d7118c3101dd2a6e090f3d6904b24a0
prerequisite-patch-id: 8e682d35d35a9e0268c00cc009fa5b394d7adc94
prerequisite-patch-id: 7a183c58627b7225154f72a76a1c241c5b6cd419
prerequisite-patch-id: ae89e00772cf3737e32b3b7bd191bfbeaaf5d0ed
prerequisite-patch-id: 0c52e17c64d9c6a43374c31557f2f529d7179052
prerequisite-patch-id: cbb90155003134235f98b750f5e4de2096c9e414
prerequisite-patch-id: ff8b567c0b58018b9c2085a324ce02711eadc77e
prerequisite-patch-id: 6383c3c10d0c47bf13ee87560633d6ec8c89e7df
prerequisite-patch-id: eeb5c4446896b7d5209de79e7b9a2486a9a5dadb
prerequisite-patch-id: 2aa957d39e26f32c6c69cd2dfe0ceb75e6a78d14
--
2.34.0
From f543ece46f0195b6a44493ed6253e4891669baee Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 22 Jan 2022 13:52:46 +0000
Subject: [PATCH 3/3] gnu: minetest-data: Switch to 'copy-build-system'.

This makes the package definition much simpler.

* gnu/packages/minetest.scm (minetest-data)[native-inputs]{source}: Remove.
[build-system]: Switch to 'copy-build-system'.
[arguments]<#:modules>: Remove.
[arguments]<#:builder>: Replace by an equivalent #:install-plan.
---
gnu/packages/minetest.scm | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index c3ca443395..b5ba19c951 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -161,21 +161,9 @@ (define minetest-data
(sha256
(base32
"0i45lbnikvgj9kxdp0yphpjjwjcgp4ibn49xkj78j5ic1s9n8jd4"))))
- (build-system trivial-build-system)
- (native-inputs
- `(("source" ,source)))
+ (build-system copy-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder (begin
- (use-modules (guix build utils))
- (let ((install-dir (string-append
- %output
- "/share/minetest/games/minetest_game")))
- (mkdir-p install-dir)
- (copy-recursively
- (assoc-ref %build-inputs "source")
- install-dir)
- #t))))
+ (list #:install-plan #~'(("." "share/minetest/games/minetest_game"))))
(synopsis "Main game data for the Minetest game engine")
(description
"Game data for the Minetest infinite-world block sandbox game.")
--
2.34.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYewSkRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nufAQDP0keqJUdVuofWZUYzlsJPte9g
jo4VaPP/c01pRO2C5wD9E9j86ATtD9k3PbrT92zhz/fBccGcSEBl0jaxYfXNxg8=
=e3Zn
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 22 Jan 2022 16:05
Re: bug#40319: Minetest can't retrieve packages for additional content due to SSL certificate either invalid or not available
(address . 40319@debbugs.gnu.org)(name . pkill9)(address . pkill9@runbox.com)
3513628a661b0b30afaac14d948275cbfa20325b.camel@telenet.be
Maxime Devos schreef op za 22-01-2022 om 15:20 [+0100]:
Toggle quote (11 lines)
> To test:
>
> 1. apply the patch (see attachement)
> 2. ./pre-guix shell --pure minetest le-certs -- minetest
> 3. click on the +
> 4. In the GUI, a list of downloadable mods is shown.
>
> The first patch contains the actual fix, the later patches do some
> ‘cleaning’.  I'll sent a mail later confirming that the later patches
> don't break Minetest (assuming that's actually the case).

It seems to work.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYewdNRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7raeAP9JG2s4FGkCjBbi/NZmHHp4SWV1
C4UIIX6i3p7InlqhGwD/Z32/vjPT3Jygv2miM1leU/wpY/GaYp0zT3m2546sZgE=
=aaqq
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 40319@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40319
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch