unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Should we include nss-certs out of the box?
Date: Mon, 08 Apr 2024 14:56:54 -0400	[thread overview]
Message-ID: <87wmp7adjd.fsf@freakingpenguin.com> (raw)
In-Reply-To: <874jciuxqq.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 03 Apr 2024 14:06:37 -0400")

I wonder if instead (or in addition to) a step should be added to the
default profile to symlink nss-certs to
/etc/ssl/certs/ca-certificates.crt?

Consider running $ guix shell rust:cargo nss-certs -CN -- cargo search
ox.

On c9cd16c630 this will fail with

--8<---------------cut here---------------start------------->8---
    Updating crates.io index
error: download of config.json failed

Caused by:
  failed to download from `https://index.crates.io/config.json`

Caused by:
  [60] SSL peer certificate or SSH remote key was not OK (server certificate verification failed. CAfile: none CRLfile: none)
--8<---------------cut here---------------end--------------->8---

This is because /etc/ssl/certs doesn't exist in the shell's container.

A user could work around this by running in the shell:

--8<---------------cut here---------------start------------->8---
export SSL_CERT_FILE=$GUIX_ENVIRONMENT/etc/ssl/certs/ca-certificates.crt
--8<---------------cut here---------------end--------------->8---

but this complicates the handle $ guix shell ... -- <command> syntax.

The only package that seems to escape this nonfunctional trap is git
because the package definition explicitly sets a GIT_SSL_CAINFO search
path specification.

IMO, if we agree to add nss-certs to %base-packages, we should also set
up a /etc/ssl/certs symlink to %default-profile-hooks. It's very odd to
see `building CA certificate bundle...` printed to the console yet not
be able to use https except for git in shell containers.

Power users will still be able to override the normal behavior by
setting the package-specific environment variables. This change would
just change the default state from "nonfunctional" to "working".

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.


  parent reply	other threads:[~2024-04-08 18:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 18:06 Should we include nss-certs out of the box? Maxim Cournoyer
2024-04-03 19:21 ` Ryan Prior
2024-04-03 20:10 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-04-05 16:45 ` Jan Wielkiewicz
2024-04-08 18:56 ` Richard Sent [this message]
2024-04-10 14:50 ` Ludovic Courtès
2024-04-19  1:58   ` Maxim Cournoyer
2024-04-23 14:18 ` Clément Lassieur
2024-04-25 15:35   ` Maxim Cournoyer
2024-04-25 22:42     ` Clément Lassieur
  -- strict thread matches above, loose matches on Subject: below --
2024-04-18 10:45 Fabio Natali
2024-04-19 15:25 ` Maxim Cournoyer
2024-04-20 10:06   ` Fabio Natali
2024-04-21 19:29     ` Fabio Natali
2024-04-23  6:11       ` pelzflorian (Florian Pelz)

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=87wmp7adjd.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.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).