From: Kei Kebreau <kkebreau@posteo.net>
To: Marius Bakke <mbakke@fastmail.com>, ludo@gnu.org
Cc: 32530@debbugs.gnu.org
Subject: [bug#32530] [PATCH] gnu: octave: Fix CA certificate use.
Date: Mon, 17 Sep 2018 12:33:01 -0400 [thread overview]
Message-ID: <87va74krsy.fsf@posteo.net> (raw)
In-Reply-To: <87r2huzk8c.fsf@posteo.net> (Kei Kebreau's message of "Sat, 15 Sep 2018 14:30:43 -0400")
[-- Attachment #1.1: Type: text/plain, Size: 1616 bytes --]
Kei Kebreau <kkebreau@posteo.net> writes:
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Kei Kebreau <kkebreau@posteo.net> writes:
>>
>>> * gnu/packages/maths.scm (octave)[arguments]: Add 'wrap-program' phase to wrap
>>> Octave with the path to system CA certificates.
>>> ---
>>> gnu/packages/maths.scm | 8 +++++++-
>>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
>>> index 3d571e8cc..b0caff0f5 100644
>>> --- a/gnu/packages/maths.scm
>>> +++ b/gnu/packages/maths.scm
>>> @@ -1417,7 +1417,13 @@ can solve two kinds of problems:
>>> (string-append "Vmakeinfo_program = \""
>>> (assoc-ref inputs "texinfo")
>>> "/bin/makeinfo\"")))
>>> - #t)))))
>>> + #t))
>>> + (add-after 'install 'wrap-program
>>> + (lambda* (#:key outputs #:allow-other-keys)
>>> + (let ((out (assoc-ref outputs "out")))
>>> + (wrap-program (string-append out "/bin/octave")
>>> + '("CURLOPT_CAPATH" suffix ("/etc/ssl/certs")))
>>> + #t))))))
>>
>> Instead of wrapping you can add a native-search-path for CURLOPT_CAPATH
>> (as with CURL_CA_BUNDLE for `curl`). That way installing certificates
>> to the profile should be sufficient.
>
> Ah! Yes, this works when I add curl to the profile. I didn't do this the
> first time. I'll upload a patch here soon.
Here's the search path patch. With this, I needed both nss-certs and
cURL installed alongside Octave to get certificates working.
[-- Attachment #1.2: 0001-gnu-curl-Add-a-search-path-for-CURLOPT_CAPATH.patch --]
[-- Type: text/plain, Size: 1103 bytes --]
From 99614c73d5156ded2e865b7daf0955c9ff4eaaf4 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kkebreau@posteo.net>
Date: Sun, 16 Sep 2018 22:17:06 -0400
Subject: [PATCH] gnu: curl: Add a search path for CURLOPT_CAPATH.
* gnu/packages/curl.scm (curl)[native-search-paths]: New field.
---
gnu/packages/curl.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 6d45dc0cc..8bdba8655 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -83,7 +83,10 @@
(variable "CURL_CA_BUNDLE")
(file-type 'regular)
(separator #f) ;single entry
- (files '("etc/ssl/certs/ca-certificates.crt")))))
+ (files '("etc/ssl/certs/ca-certificates.crt")))
+ (search-path-specification
+ (variable "CURLOPT_CAPATH")
+ (files '("etc/ssl/certs")))))
(arguments
`(#:configure-flags '("--with-gnutls" "--with-gssapi")
;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl
--
2.19.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-09-17 16:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-26 0:42 [bug#32530] [PATCH] gnu: octave: Fix CA certificate use Kei Kebreau
2018-09-13 8:43 ` Ludovic Courtès
2018-09-13 23:44 ` Kei Kebreau
2018-09-15 1:54 ` Kei Kebreau
2018-09-15 8:37 ` Marius Bakke
2018-09-15 18:30 ` Kei Kebreau
2018-09-17 16:33 ` Kei Kebreau [this message]
2018-09-17 17:16 ` Marius Bakke
2018-09-18 20:57 ` Kei Kebreau
2018-09-19 17:27 ` Marius Bakke
2018-09-19 19:52 ` Ludovic Courtès
2018-09-19 20:09 ` Marius Bakke
2018-09-19 20:18 ` Ludovic Courtès
2018-09-20 18:03 ` Kei Kebreau
2018-09-24 9:02 ` Ludovic Courtès
2018-09-25 1:43 ` bug#32530: " Kei Kebreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87va74krsy.fsf@posteo.net \
--to=kkebreau@posteo.net \
--cc=32530@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=mbakke@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).