Subject: bug#25422: GIT_SSL_CAINFO set incorrectly

From: [email-masked] (Ludovic Courtès)
Date: Fri, 10 Feb 2017 21:51:57 +0100

Mekeor Melire <[email-masked]> skribis:

>> > Adding an option to `search-path-specification' seems like a good idea.
>> > Still, I wonder what this snippet from (gnu system) does:
>> >
>> >     (define (operating-system-environment-variables os)
>> >       "Return the environment variables of OS for
>> >     @var{session-environment-service-type}, to be used in @file{/etc/environment}."
>> >       `(("LANG" . ,(operating-system-locale os))
>> >         ("TZ" . ,(operating-system-timezone os))
>> >         ("TZDIR" . ,(file-append tzdata "/share/zoneinfo"))
>> >         ;; Tell 'modprobe' & co. where to look for modules.
>> >         ("LINUX_MODULE_DIRECTORY" . "/run/booted-system/kernel/lib/modules")
>> >         ;; These variables are honored by OpenSSL (libssl) and Git.
>> >         ("SSL_CERT_DIR" . "/etc/ssl/certs")
>> >         ("SSL_CERT_FILE" . "/etc/ssl/certs/ca-certificates.crt")
>> >         ("GIT_SSL_CAINFO" . "/etc/ssl/certs/ca-certificates.crt")  
>> 
>> It defines the content of /etc/environment.
>
> Is there any reason why GIT_SSL_CAINFO has to be set without Git being installed?
>
> I mean, I think the variable just shouldn't be set in /etc/environment by default. It should be set as soon as Git is installed, IMHO.

You are right in principle.

This variable was added in 78ab0746a5, and I think the justification was
convenience and to have things that work out of the box:

  https://lists.gnu.org/archive/html/guix-devel/2015-03/msg00128.html

That’s also an important property.  :-)

Ludo’.