diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-09 03:01:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-09 03:01:30 +0000 |
commit | 140e2f7f1509acd423172e2895d0d7839e5b88c6 (patch) | |
tree | b95babe2ddbb2ed3cb8f1aee35286b5218e5e4d1 /systems/texlive/tlnet/tlpkg/TeXLive | |
parent | afbba3b1d12f17572ca4745766f2e0d55a6f58f3 (diff) |
CTAN sync 202401090301
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm | 16 | ||||
-rw-r--r-- | systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm | 9 |
2 files changed, 18 insertions, 7 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm index 1e22f354d4..f424d7e6a2 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm @@ -1,4 +1,4 @@ -# $Id: TLDownload.pm 61372 2021-12-21 22:46:16Z karl $ +# $Id: TLDownload.pm 69328 2024-01-07 11:11:02Z preining $ # TeXLive::TLDownload.pm - module for abstracting the download modes # Copyright 2009-2021 Norbert Preining # This file is licensed under the GNU General Public License version 2 @@ -11,7 +11,7 @@ package TeXLive::TLDownload; use TeXLive::TLUtils; use TeXLive::TLConfig; -my $svnrev = '$Revision: 61372 $'; +my $svnrev = '$Revision: 69328 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; @@ -40,10 +40,11 @@ if ($@) { sub new { my $class = shift; + my %params = @_; my $self = {}; $self->{'initcount'} = 0; bless $self, $class; - $self->reinit(); + $self->reinit(defined($params{'certificates'}) ? $params{'certificates'} : ""); return $self; } @@ -52,6 +53,7 @@ sub new sub reinit { my $self = shift; + my $certs = shift; # Irritatingly, as of around version 6.52, when env_proxy is set, LWP # started unconditionally complaining if the environment contains @@ -68,6 +70,14 @@ sub reinit { @env_proxy = ("env_proxy", 1); } # + # Set HTTPS_CA_FILE to the TL provided certificate bundle + # for systems that don't have a system-wide certificate bundle + # in particular MacOS. + if ((! exists $ENV{'HTTPS_CA_FILE'}) && $certs) { + debug("Setting env var HTTPS_CA_FILE to " . $certs ."\n"); + $ENV{'HTTPS_CA_FILE'} = $certs + } + # my $ua = LWP::UserAgent->new( agent => "texlive/lwp", # use LWP::ConnCache, and keep 1 connection open diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm index 30d53ad7c7..a3bf3ff3b3 100644 --- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm +++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm @@ -1,4 +1,4 @@ -# $Id: TLUtils.pm 68283 2023-09-15 13:11:11Z preining $ +# $Id: TLUtils.pm 69327 2024-01-07 11:10:51Z preining $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007-2023 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 @@ -8,7 +8,7 @@ use strict; use warnings; package TeXLive::TLUtils; -my $svnrev = '$Revision: 68283 $'; +my $svnrev = '$Revision: 69327 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -4229,6 +4229,7 @@ false. =cut sub setup_persistent_downloads { + my $certs = shift; if ($TeXLive::TLDownload::net_lib_avail) { ddebug("setup_persistent_downloads has net_lib_avail set\n"); if ($::tldownload_server) { @@ -4236,10 +4237,10 @@ sub setup_persistent_downloads { debug("stop retrying to initialize LWP after 10 failures\n"); return 0; } else { - $::tldownload_server->reinit(); + $::tldownload_server->reinit(certificates => $certs); } } else { - $::tldownload_server = TeXLive::TLDownload->new; + $::tldownload_server = TeXLive::TLDownload->new(certificates => $certs); } if (!defined($::tldownload_server)) { ddebug("TLUtils:setup_persistent_downloads: failed to get ::tldownload_server\n"); |