@@ -85,11 +85,25 @@ sub die_with_sample {
85
85
86
86
my %builds ;
87
87
88
- # sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
89
- my %cpanm = (
90
- name => " App-cpanminus-1.7047" ,
91
- url => " https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7047.tar.gz" ,
92
- sha256 => " 963e63c6e1a8725ff2f624e9086396ae150db51dd0a337c3781d09a994af05a5" ,
88
+ my %install_modules = (
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" ,
92
+ # sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
93
+ sha256 => " 963e63c6e1a8725ff2f624e9086396ae150db51dd0a337c3781d09a994af05a5" ,
94
+ },
95
+ iosocketssl => {
96
+ name => " IO-Socket-SSL-2.085" ,
97
+ url => " https://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.085.tar.gz" ,
98
+ # sha256 taken from http://www.cpan.org/authors/id/S/SU/SULLR/CHECKSUMS
99
+ sha256 => " 95b2f7c0628a7e246a159665fbf0620d0d7835e3a940f22d3fdd47c3aa799c2e" ,
100
+ },
101
+ netssleay => {
102
+ name => " Net-SSLeay-1.94" ,
103
+ url => " https://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz" ,
104
+ # sha256 taken from http://www.cpan.org/authors/id/C/CH/CHRISN/CHECKSUMS
105
+ sha256 => " 9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d" ,
106
+ },
93
107
);
94
108
95
109
# sha256 checksum is from docker-perl team, cf https://github.com/docker-library/official-images/pull/12612#issuecomment-1158288299
@@ -148,8 +162,12 @@ sub die_with_sample {
148
162
}
149
163
150
164
for my $build (keys %builds ) {
151
- $release -> {url } = $url ;
152
- $release -> {" cpanm_dist_$_ " } = $cpanm {$_ } for keys %cpanm ;
165
+ $release -> {url } = $url ;
166
+
167
+ for my $name (keys %install_modules ) {
168
+ my $module = $install_modules {$name };
169
+ $release -> {" ${name} _dist_$_ " } = $module -> {$_ } for keys %$module ;
170
+ }
153
171
$release -> {" cpm_dist_$_ " } = $cpm {$_ } for keys %cpm ;
154
172
155
173
$release -> {extra_flags } ||= ' ' ;
@@ -159,8 +177,7 @@ sub die_with_sample {
159
177
for my $debian_release (@{$release -> {debian_release }}) {
160
178
161
179
my $output = $template ;
162
- $output =~ s /\{\{ $_\}\} / $release ->{$_ }/ mg
163
- for (qw( version pause extra_flags sha256 type url image cpanm_dist_name cpanm_dist_url cpanm_dist_sha256 cpm_dist_url cpm_dist_sha256) );
180
+ $output =~ s /\{\{ $_\}\} / $release ->{$_ }/ mg for keys %$release ;
164
181
$output =~ s /\{\{ args\}\} / $builds {$build }/ mg ;
165
182
166
183
if ($build =~ / slim/ ) {
@@ -309,7 +326,12 @@ =head1 DESCRIPTION
309
326
&& curl -fLO {{cpanm_dist_url}} \
310
327
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum --strict --check - \
311
328
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} && perl bin/cpanm . && cd /root \
312
- && cpanm IO::Socket::SSL \
329
+ && curl -fLO '{{netssleay_dist_url}}' \
330
+ && echo '{{netssleay_dist_sha256}} *{{netssleay_dist_name}}.tar.gz' | sha256sum --strict --check - \
331
+ && cpanm --from $PWD {{netssleay_dist_name}}.tar.gz \
332
+ && curl -fLO '{{iosocketssl_dist_url}}' \
333
+ && echo '{{iosocketssl_dist_sha256}} *{{iosocketssl_dist_name}}.tar.gz' | sha256sum --strict --check - \
334
+ && SSL_CERT_DIR=/etc/ssl/certs cpanm --from $PWD {{iosocketssl_dist_name}}.tar.gz \
313
335
&& curl -fL {{cpm_dist_url}} -o /usr/local/bin/cpm \
314
336
# sha256 checksum is from docker-perl team, cf https://github.com/docker-library/official-images/pull/12612#issuecomment-1158288299
315
337
&& echo '{{cpm_dist_sha256}} */usr/local/bin/cpm' | sha256sum --strict --check - \
0 commit comments