Merge pull request #262304 from NixOS/perl-updates

[staging-next] Updates to perlPackages 2023-10
This commit is contained in:
Janne Heß
2023-10-26 18:45:19 +02:00
committed by GitHub
6 changed files with 1910 additions and 1698 deletions
@@ -1,23 +1,22 @@
diff -ru Paranoid-2.05/lib/Paranoid.pm /tmp/Paranoid-2.05/lib/Paranoid.pm
--- Paranoid-2.05/lib/Paranoid.pm 2017-02-06 05:48:57.000000000 -0500
+++ /tmp/Paranoid-2.05/lib/Paranoid.pm 2018-05-10 06:40:35.286313299 -0400
@@ -61,7 +61,7 @@
diff '--color=auto' -ur Paranoid-2.10/lib/Paranoid.pm Paranoid-2.10-patched/lib/Paranoid.pm
--- Paranoid-2.10/lib/Paranoid.pm 2022-03-08 10:01:04.000000000 +0100
+++ Paranoid-2.10-patched/lib/Paranoid.pm 2023-10-20 16:57:54.025754755 +0200
@@ -47,7 +47,7 @@
%EXPORT_TAGS = ( all => [@EXPORT_OK], );
my $path = shift;
use constant PTRUE_ZERO => '0 but true';
-use constant DEFAULT_PATH => '/bin:/sbin:/usr/bin:/usr/sbin';
+use constant DEFAULT_PATH => '__BLESSED_PATH__';
- $path = '/bin:/usr/bin' unless defined $path;
+ $path = '__BLESSED_PATH__' unless defined $path;
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
$ENV{PATH} = $path;
Binary files Paranoid-2.05/lib/.Paranoid.pm.swp and /tmp/Paranoid-2.05/lib/.Paranoid.pm.swp differ
diff -ru Paranoid-2.05/t/01_init_core.t /tmp/Paranoid-2.05/t/01_init_core.t
--- Paranoid-2.05/t/01_init_core.t 2016-07-12 04:49:33.000000000 -0400
+++ /tmp/Paranoid-2.05/t/01_init_core.t 2018-05-10 06:43:41.323183381 -0400
@@ -35,5 +35,5 @@
#####################################################################
#
diff '--color=auto' -ur Paranoid-2.10/t/01_init_core.t Paranoid-2.10-patched/t/01_init_core.t
--- Paranoid-2.10/t/01_init_core.t 2022-01-24 10:30:20.000000000 +0100
+++ Paranoid-2.10-patched/t/01_init_core.t 2023-10-20 16:58:16.856288407 +0200
@@ -35,5 +35,4 @@
ok( psecureEnv('/bin:/sbin'), 'psecureEnv 1' );
is( $ENV{PATH}, '/bin:/sbin', 'Validated PATH' );
ok( psecureEnv(), 'psecureEnv 2' );
-is( $ENV{PATH}, '/bin:/usr/bin', 'Validated PATH' );
-is( $ENV{PATH}, '/bin:/sbin:/usr/bin:/usr/sbin', 'Validated PATH' );
-
+is( $ENV{PATH}, '__BLESSED_PATH__', 'Validated PATH' );
@@ -1,31 +1,14 @@
From 321401098f2c86a6f68e186cfc06e030b09484b6 Mon Sep 17 00:00:00 2001
From: Tyson Whitehead <twhitehead@gmail.com>
Date: Fri, 29 Jun 2018 15:47:00 -0400
Subject: [PATCH] Respect NIX_SSL_CERT_FILE and SSL_CERT_FILE (in that order)
---
lib/LWP/Protocol/https.pm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm
index f7230e2..c78b9ce 100644
index 645e828..7098f64 100644
--- a/lib/LWP/Protocol/https.pm
+++ b/lib/LWP/Protocol/https.pm
@@ -23,6 +23,14 @@ sub _extra_sock_opts
$ssl_opts{SSL_verify_mode} = 0;
@@ -29,6 +29,9 @@ sub _extra_sock_opts
}
}
if ($ssl_opts{SSL_verify_mode}) {
+ unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
+ $ssl_opts{SSL_ca_file} = $ENV{'NIX_SSL_CERT_FILE'}
+ if !defined $ssl_opts{SSL_ca_file};
+ $ssl_opts{SSL_ca_file} = $ENV{'SSL_CERT_FILE'}
+ if !defined $ssl_opts{SSL_ca_file};
+ $ssl_opts{SSL_ca_file} = "/etc/ssl/certs/ca-certificates.crt"
+ if !defined $ssl_opts{SSL_ca_file} && -e "/etc/ssl/certs/ca-certificates.crt";
+ }
unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
eval {
require Mozilla::CA;
--
2.14.0
+ if ($ENV{NIX_SSL_CERT_FILE}) {
+ $ssl_opts{SSL_ca_file} //= $ENV{NIX_SSL_CERT_FILE};
+ }
unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
if ($Net::HTTPS::SSL_SOCKET_CLASS eq 'IO::Socket::SSL'
&& defined &IO::Socket::SSL::default_ca
@@ -1,26 +0,0 @@
diff --git a/lib/mhamain.pl b/lib/mhamain.pl
index 80980a2..c1259ce 100644
--- a/lib/mhamain.pl
+++ b/lib/mhamain.pl
@@ -1562,7 +1562,7 @@ sub signal_catch {
##
sub defineIndex2MsgId {
no warnings qw(deprecated);
- if (!defined(%Index2MsgId)) {
+ unless (%Index2MsgId) {
foreach (keys %MsgId) {
$Index2MsgId{$MsgId{$_}} = $_;
}
diff --git a/lib/mhopt.pl b/lib/mhopt.pl
index 02fb05e..939109b 100644
--- a/lib/mhopt.pl
+++ b/lib/mhopt.pl
@@ -865,7 +865,7 @@ sub update_data_1_to_2 {
sub update_data_2_1_to_later {
no warnings qw(deprecated);
# we can preserve filter arguments
- if (defined(%main::MIMEFiltersArgs)) {
+ if (%main::MIMEFiltersArgs) {
warn qq/ preserving MIMEARGS...\n/;
%readmail::MIMEFiltersArgs = %main::MIMEFiltersArgs;
$IsDefault{'MIMEARGS'} = 0;
@@ -0,0 +1,28 @@
From 6a5fb9efaea35ca29836371307f5083576f421ab Mon Sep 17 00:00:00 2001
From: Stig Palmquist <git@stig.io>
Date: Fri, 20 Oct 2023 00:09:28 +0200
Subject: [PATCH] Set output length of C::P::Argon2 hashes to 16
Since the default lengths in Crypt::Passphrase::Argon2 changed from 16
to 32 in in 0.009, some tests that expected the passphrase to be
unchanged started failing.
---
src/lib/Hydra/Schema/Result/Users.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/Hydra/Schema/Result/Users.pm b/src/lib/Hydra/Schema/Result/Users.pm
index b3de6543..c28ae931 100644
--- a/src/lib/Hydra/Schema/Result/Users.pm
+++ b/src/lib/Hydra/Schema/Result/Users.pm
@@ -216,7 +216,7 @@ sub json_hint {
sub _authenticator() {
my $authenticator = Crypt::Passphrase->new(
- encoder => 'Argon2',
+ encoder => { module => 'Argon2', output_size => 16 },
validators => [
(sub {
my ($password, $hash) = @_;
--
2.42.0
@@ -205,6 +205,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [
./crypt-passphrase-argon2-fix-output-len.patch
];
postPatch = ''
# Change 5s timeout for init to 30s
substituteInPlace t/lib/HydraTestContext.pm \
File diff suppressed because it is too large Load Diff