@@ -64,7 +64,7 @@ sub die_with_sample {
64
64
chomp $docker_slim_run_install ;
65
65
66
66
my $docker_slim_run_purge = <<'EOF' ;
67
- savedPackages="ca-certificates make netbase zlib1g-dev libssl-dev" \
67
+ savedPackages="ca-certificates curl make netbase zlib1g-dev libssl-dev" \
68
68
&& apt-mark auto '.*' > /dev/null \
69
69
&& apt-mark manual $savedPackages \
70
70
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
@@ -87,21 +87,27 @@ sub die_with_sample {
87
87
88
88
my %install_modules = (
89
89
cpanm => {
90
- name => " App-cpanminus-1.7047" ,
91
- url => " https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7047.tar.gz" ,
90
+ name => " App-cpanminus-1.7047" ,
91
+ url => " https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7047.tar.gz" ,
92
+
92
93
# sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
93
94
sha256 => " 963e63c6e1a8725ff2f624e9086396ae150db51dd0a337c3781d09a994af05a5" ,
94
- patch => q[ perl -pi -E 's{http://(www\.cpan\.org|backpan\.perl\.org|cpan\.metacpan\.org|fastapi\.metacpan\.org|cpanmetadb\.plackperl\.org)}{https://$1}g' bin/cpanm] ,
95
+
96
+ patch_https =>
97
+ q[ perl -pi -E 's{http://(www\.cpan\.org|backpan\.perl\.org|cpan\.metacpan\.org|fastapi\.metacpan\.org|cpanmetadb\.plackperl\.org)}{https://$1}g' bin/cpanm] ,
98
+ patch_nolwp => q[ perl -pi -E 's{try_lwp=>1}{try_lwp=>0}g' bin/cpanm] ,
95
99
},
96
100
iosocketssl => {
97
- name => " IO-Socket-SSL-2.085" ,
98
- url => " https://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz" ,
101
+ name => " IO-Socket-SSL-2.085" ,
102
+ url => " https://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz" ,
103
+
99
104
# sha256 taken from http://www.cpan.org/authors/id/S/SU/SULLR/CHECKSUMS
100
105
sha256 => " 95b2f7c0628a7e246a159665fbf0620d0d7835e3a940f22d3fdd47c3aa799c2e" ,
101
106
},
102
107
netssleay => {
103
- name => " Net-SSLeay-1.94" ,
104
- url => " https://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz" ,
108
+ name => " Net-SSLeay-1.94" ,
109
+ url => " https://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz" ,
110
+
105
111
# sha256 taken from http://www.cpan.org/authors/id/C/CH/CHRISN/CHECKSUMS
106
112
sha256 => " 9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d" ,
107
113
},
@@ -133,8 +139,8 @@ sub die_with_sample {
133
139
134
140
my $patch ;
135
141
my $tarball = CPAN::Perl::Releases::MetaCPAN::perl_tarballs($release -> {version })-> {' tar.gz' };
136
- my ($file ) = File::Basename::fileparse($tarball );
137
- my $url = " https://cpan.metacpan.org/authors/id/$tarball " ;
142
+ my ($file ) = File::Basename::fileparse($tarball );
143
+ my $url = " https://cpan.metacpan.org/authors/id/$tarball " ;
138
144
if (-f " downloads/$file " && ` sha256sum downloads/$file ` =~ / ^\Q $release ->{sha256}\E\s +\Q downloads\/ $file \E / ) {
139
145
print " Skipping download of $file , already current\n " ;
140
146
}
@@ -169,9 +175,9 @@ sub die_with_sample {
169
175
my $module = $install_modules {$name };
170
176
$release -> {" ${name} _dist_$_ " } = $module -> {$_ } for keys %$module ;
171
177
}
172
- $release -> {" cpm_dist_$_ " } = $cpm {$_ } for keys %cpm ;
178
+ $release -> {" cpm_dist_$_ " } = $cpm {$_ } for keys %cpm ;
173
179
174
- $release -> {extra_flags } ||= ' ' ;
180
+ $release -> {extra_flags } ||= ' ' ;
175
181
176
182
$release -> {image } = $build =~ / main/ ? ' buildpack-deps' : ' debian' ;
177
183
@@ -214,8 +220,10 @@ sub die_with_sample {
214
220
$output =~ s /\{\{ test\}\} / TEST_JOBS=\$ (nproc) make test_harness/ ;
215
221
}
216
222
elsif ($release -> {run_tests } eq " no" ) {
223
+
217
224
# https://metacpan.org/pod/Devel::PatchPerl#CAVEAT
218
225
$output =~ s /\{\{ test\}\} / LD_LIBRARY_PATH=. .\/ perl -Ilib -de0/ ;
226
+
219
227
# https://metacpan.org/pod/distribution/perl/INSTALL#Building-a-shared-Perl-library
220
228
}
221
229
else {
@@ -327,7 +335,8 @@ =head1 DESCRIPTION
327
335
&& curl -fLO {{cpanm_dist_url}} \
328
336
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum --strict --check - \
329
337
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} \
330
- && {{cpanm_dist_patch}} \
338
+ && {{cpanm_dist_patch_https}} \
339
+ && {{cpanm_dist_patch_nolwp}} \
331
340
&& perl bin/cpanm . && cd /root \
332
341
&& curl -fLO '{{netssleay_dist_url}}' \
333
342
&& echo '{{netssleay_dist_sha256}} *{{netssleay_dist_name}}.tar.gz' | sha256sum --strict --check - \
0 commit comments